@chrt-inc/typescript-sdk 1.788.0 → 1.807.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 (211) hide show
  1. package/README.md +13 -10
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +31 -26
  4. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +20 -3
  5. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +68 -2
  6. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/{LineItemGroupSharedTaskGroupMileageCreateClientReq.d.ts → SharedTaskGroupMileageCreateForProviderPayDriverClientReq.d.ts} +1 -1
  7. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.d.ts +24 -0
  8. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/index.d.ts +2 -1
  9. package/dist/cjs/api/resources/flights/client/Client.d.ts +52 -0
  10. package/dist/cjs/api/resources/flights/client/Client.js +135 -0
  11. package/dist/cjs/api/resources/flights/client/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/flights/client/index.js +17 -0
  13. package/dist/cjs/api/resources/flights/client/requests/FlightConnectionsSearchReq.d.ts +45 -0
  14. package/dist/cjs/api/resources/flights/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/flights/client/requests/index.js +2 -0
  16. package/dist/cjs/api/resources/flights/index.d.ts +1 -0
  17. package/dist/cjs/api/resources/flights/index.js +17 -0
  18. package/dist/cjs/api/resources/index.d.ts +2 -0
  19. package/dist/cjs/api/resources/index.js +3 -1
  20. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +1 -1
  21. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +1 -1
  22. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.d.ts +19 -1
  23. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/Client.js +71 -1
  24. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.d.ts +16 -0
  25. package/dist/cjs/api/resources/operations/resources/operationsTasks/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +4 -4
  27. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +11 -3
  28. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.ts +2 -0
  29. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +2 -0
  30. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +0 -22
  31. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +0 -71
  32. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +29 -24
  33. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +54 -51
  34. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts +0 -2
  35. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.d.ts +24 -0
  36. package/dist/{esm/api/resources/tracking/resources/sessions/client/requests/SessionsSyncFlightStatusV1Request.d.mts → cjs/api/resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.d.ts} +1 -1
  37. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.ts +14 -0
  38. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.ts +0 -3
  39. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/index.d.ts +3 -3
  40. package/dist/cjs/api/types/AlertCallback.d.ts +7 -0
  41. package/dist/cjs/api/types/AlertCallback.js +5 -0
  42. package/dist/cjs/api/types/AlertEvent.d.ts +6 -0
  43. package/dist/cjs/api/types/AlertEvent.js +5 -0
  44. package/dist/cjs/api/types/AlertMessage.d.ts +10 -0
  45. package/dist/cjs/api/types/AlertMessage.js +5 -0
  46. package/dist/cjs/api/types/AlertNameValue.d.ts +7 -0
  47. package/dist/cjs/api/types/AlertNameValue.js +5 -0
  48. package/dist/cjs/api/types/AlertNameValues.d.ts +7 -0
  49. package/dist/cjs/api/types/AlertNameValues.js +5 -0
  50. package/dist/cjs/api/types/AlertRuleEnvelope.d.ts +7 -0
  51. package/dist/cjs/api/types/AlertRuleEnvelope.js +5 -0
  52. package/dist/cjs/api/types/CiriumAirportResources.d.ts +9 -0
  53. package/dist/cjs/api/types/CiriumAirportResources.js +5 -0
  54. package/dist/cjs/api/types/CiriumDate.d.ts +6 -0
  55. package/dist/cjs/api/types/CiriumDate.js +5 -0
  56. package/dist/cjs/api/types/{FlightAwareWebhookResponse.d.ts → CiriumFlightAlertsWebhookResponse.d.ts} +1 -1
  57. package/dist/cjs/api/types/CiriumFlightAlertsWebhookResponse.js +5 -0
  58. package/dist/cjs/api/types/CiriumFlightStatus.d.ts +15 -0
  59. package/dist/cjs/api/types/CiriumFlightStatus.js +5 -0
  60. package/dist/cjs/api/types/CiriumOperationalTimes.d.ts +17 -0
  61. package/dist/cjs/api/types/CiriumOperationalTimes.js +5 -0
  62. package/dist/cjs/api/types/ConnectionSearchByEnum.d.ts +8 -0
  63. package/dist/cjs/api/types/ConnectionSearchByEnum.js +10 -0
  64. package/dist/cjs/api/types/ConnectionSearchPreferenceEnum.d.ts +8 -0
  65. package/dist/cjs/api/types/ConnectionSearchPreferenceEnum.js +10 -0
  66. package/dist/cjs/api/types/Driver1.d.ts +0 -1
  67. package/dist/cjs/api/types/DriverListRes.d.ts +1 -1
  68. package/dist/cjs/api/types/DriverWithActiveTaskGroupIds1.d.ts +35 -0
  69. package/dist/cjs/api/types/DriverWithActiveTaskGroupIds1.js +5 -0
  70. package/dist/cjs/api/types/FlightConnection.d.ts +10 -0
  71. package/dist/cjs/api/types/FlightConnection.js +5 -0
  72. package/dist/cjs/api/types/FlightConnectionLeg.d.ts +22 -0
  73. package/dist/cjs/api/types/FlightConnectionLeg.js +5 -0
  74. package/dist/cjs/api/types/FlightConnectionsSearchRes.d.ts +7 -0
  75. package/dist/cjs/api/types/FlightConnectionsSearchRes.js +5 -0
  76. package/dist/cjs/api/types/FlightLeg1.d.ts +3 -2
  77. package/dist/cjs/api/types/OperationsTaskDeadlineUpdate1.d.ts +7 -0
  78. package/dist/cjs/api/types/OperationsTaskDeadlineUpdate1.js +5 -0
  79. package/dist/cjs/api/types/OperationsTaskListRemoveFromCaseRes1.d.ts +1 -1
  80. package/dist/cjs/api/types/OperationsTaskStatusEnum.d.ts +2 -1
  81. package/dist/cjs/api/types/OperationsTaskStatusEnum.js +1 -0
  82. package/dist/cjs/api/types/OperationsTasksBulkUpdateDeadlinesRes1.d.ts +7 -0
  83. package/dist/cjs/api/types/OperationsTasksBulkUpdateDeadlinesRes1.js +5 -0
  84. package/dist/cjs/api/types/OrderBuilderReq.d.ts +2 -0
  85. package/dist/cjs/api/types/OrderDraftValidationRequirements.d.ts +1 -0
  86. package/dist/cjs/api/types/OrderManifestValidationRequirements.d.ts +1 -0
  87. package/dist/cjs/api/types/OrgMembersAndDrivers.d.ts +1 -1
  88. package/dist/cjs/api/types/Session1.d.ts +3 -6
  89. package/dist/cjs/api/types/index.d.ts +19 -4
  90. package/dist/cjs/api/types/index.js +19 -4
  91. package/dist/cjs/version.d.ts +1 -1
  92. package/dist/cjs/version.js +1 -1
  93. package/dist/esm/Client.d.mts +3 -0
  94. package/dist/esm/Client.mjs +7 -2
  95. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +20 -3
  96. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +68 -2
  97. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/{LineItemGroupSharedTaskGroupMileageCreateClientReq.d.mts → SharedTaskGroupMileageCreateForProviderPayDriverClientReq.d.mts} +1 -1
  98. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.d.mts +24 -0
  99. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/index.d.mts +2 -1
  100. package/dist/esm/api/resources/flights/client/Client.d.mts +52 -0
  101. package/dist/esm/api/resources/flights/client/Client.mjs +98 -0
  102. package/dist/esm/api/resources/flights/client/index.d.mts +2 -0
  103. package/dist/esm/api/resources/flights/client/index.mjs +1 -0
  104. package/dist/esm/api/resources/flights/client/requests/FlightConnectionsSearchReq.d.mts +45 -0
  105. package/dist/esm/api/resources/flights/client/requests/index.d.mts +1 -0
  106. package/dist/esm/api/resources/flights/client/requests/index.mjs +1 -0
  107. package/dist/esm/api/resources/flights/index.d.mts +1 -0
  108. package/dist/esm/api/resources/flights/index.mjs +1 -0
  109. package/dist/esm/api/resources/index.d.mts +2 -0
  110. package/dist/esm/api/resources/index.mjs +2 -0
  111. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +1 -1
  112. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +1 -1
  113. package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.d.mts +19 -1
  114. package/dist/esm/api/resources/operations/resources/operationsTasks/client/Client.mjs +71 -1
  115. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.d.mts +16 -0
  116. package/dist/esm/api/resources/operations/resources/operationsTasks/client/requests/index.d.mts +1 -0
  117. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +4 -4
  118. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +11 -3
  119. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListV1Request.d.mts +2 -0
  120. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +2 -0
  121. package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +0 -22
  122. package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +0 -71
  123. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +29 -24
  124. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +54 -51
  125. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.mts +0 -2
  126. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.d.mts +24 -0
  127. package/dist/{cjs/api/resources/tracking/resources/sessions/client/requests/SessionsSyncFlightStatusV1Request.d.ts → esm/api/resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.d.mts} +1 -1
  128. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.d.mts +14 -0
  129. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionsListV1Request.d.mts +0 -3
  130. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/index.d.mts +3 -3
  131. package/dist/esm/api/types/AlertCallback.d.mts +7 -0
  132. package/dist/esm/api/types/AlertCallback.mjs +4 -0
  133. package/dist/esm/api/types/AlertEvent.d.mts +6 -0
  134. package/dist/esm/api/types/AlertEvent.mjs +4 -0
  135. package/dist/esm/api/types/AlertMessage.d.mts +10 -0
  136. package/dist/esm/api/types/AlertMessage.mjs +4 -0
  137. package/dist/esm/api/types/AlertNameValue.d.mts +7 -0
  138. package/dist/esm/api/types/AlertNameValue.mjs +4 -0
  139. package/dist/esm/api/types/AlertNameValues.d.mts +7 -0
  140. package/dist/esm/api/types/AlertNameValues.mjs +4 -0
  141. package/dist/esm/api/types/AlertRuleEnvelope.d.mts +7 -0
  142. package/dist/esm/api/types/AlertRuleEnvelope.mjs +4 -0
  143. package/dist/esm/api/types/CiriumAirportResources.d.mts +9 -0
  144. package/dist/esm/api/types/CiriumAirportResources.mjs +4 -0
  145. package/dist/esm/api/types/CiriumDate.d.mts +6 -0
  146. package/dist/esm/api/types/CiriumDate.mjs +4 -0
  147. package/dist/esm/api/types/{FlightAwareWebhookResponse.d.mts → CiriumFlightAlertsWebhookResponse.d.mts} +1 -1
  148. package/dist/esm/api/types/CiriumFlightAlertsWebhookResponse.mjs +4 -0
  149. package/dist/esm/api/types/CiriumFlightStatus.d.mts +15 -0
  150. package/dist/esm/api/types/CiriumFlightStatus.mjs +4 -0
  151. package/dist/esm/api/types/CiriumOperationalTimes.d.mts +17 -0
  152. package/dist/esm/api/types/CiriumOperationalTimes.mjs +4 -0
  153. package/dist/esm/api/types/ConnectionSearchByEnum.d.mts +8 -0
  154. package/dist/esm/api/types/ConnectionSearchByEnum.mjs +7 -0
  155. package/dist/esm/api/types/ConnectionSearchPreferenceEnum.d.mts +8 -0
  156. package/dist/esm/api/types/ConnectionSearchPreferenceEnum.mjs +7 -0
  157. package/dist/esm/api/types/Driver1.d.mts +0 -1
  158. package/dist/esm/api/types/DriverListRes.d.mts +1 -1
  159. package/dist/esm/api/types/DriverWithActiveTaskGroupIds1.d.mts +35 -0
  160. package/dist/esm/api/types/DriverWithActiveTaskGroupIds1.mjs +4 -0
  161. package/dist/esm/api/types/FlightConnection.d.mts +10 -0
  162. package/dist/esm/api/types/FlightConnection.mjs +4 -0
  163. package/dist/esm/api/types/FlightConnectionLeg.d.mts +22 -0
  164. package/dist/esm/api/types/FlightConnectionLeg.mjs +4 -0
  165. package/dist/esm/api/types/FlightConnectionsSearchRes.d.mts +7 -0
  166. package/dist/esm/api/types/FlightConnectionsSearchRes.mjs +4 -0
  167. package/dist/esm/api/types/FlightLeg1.d.mts +3 -2
  168. package/dist/esm/api/types/OperationsTaskDeadlineUpdate1.d.mts +7 -0
  169. package/dist/esm/api/types/OperationsTaskDeadlineUpdate1.mjs +4 -0
  170. package/dist/esm/api/types/OperationsTaskListRemoveFromCaseRes1.d.mts +1 -1
  171. package/dist/esm/api/types/OperationsTaskStatusEnum.d.mts +2 -1
  172. package/dist/esm/api/types/OperationsTaskStatusEnum.mjs +1 -0
  173. package/dist/esm/api/types/OperationsTasksBulkUpdateDeadlinesRes1.d.mts +7 -0
  174. package/dist/esm/api/types/OperationsTasksBulkUpdateDeadlinesRes1.mjs +4 -0
  175. package/dist/esm/api/types/OrderBuilderReq.d.mts +2 -0
  176. package/dist/esm/api/types/OrderDraftValidationRequirements.d.mts +1 -0
  177. package/dist/esm/api/types/OrderManifestValidationRequirements.d.mts +1 -0
  178. package/dist/esm/api/types/OrgMembersAndDrivers.d.mts +1 -1
  179. package/dist/esm/api/types/Session1.d.mts +3 -6
  180. package/dist/esm/api/types/index.d.mts +19 -4
  181. package/dist/esm/api/types/index.mjs +19 -4
  182. package/dist/esm/version.d.mts +1 -1
  183. package/dist/esm/version.mjs +1 -1
  184. package/package.json +1 -1
  185. package/reference.md +241 -101
  186. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.ts +0 -16
  187. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.ts +0 -16
  188. package/dist/cjs/api/types/FlightAwareAlertFlight.d.ts +0 -16
  189. package/dist/cjs/api/types/FlightAwareAlertPayload.d.ts +0 -17
  190. package/dist/cjs/api/types/FlightStatusEnum.d.ts +0 -14
  191. package/dist/cjs/api/types/FlightStatusEnum.js +0 -16
  192. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionAddFlightReq1.d.mts +0 -16
  193. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.d.mts +0 -16
  194. package/dist/esm/api/types/FlightAwareAlertFlight.d.mts +0 -16
  195. package/dist/esm/api/types/FlightAwareAlertPayload.d.mts +0 -17
  196. package/dist/esm/api/types/FlightStatusEnum.d.mts +0 -14
  197. package/dist/esm/api/types/FlightStatusEnum.mjs +0 -13
  198. /package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/{LineItemGroupSharedTaskGroupMileageCreateClientReq.js → SharedTaskGroupMileageCreateForProviderPayDriverClientReq.js} +0 -0
  199. /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionAddFlightReq1.js → billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.js} +0 -0
  200. /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.js → flights/client/requests/FlightConnectionsSearchReq.js} +0 -0
  201. /package/dist/cjs/api/resources/{tracking/resources/sessions/client/requests/SessionsSyncFlightStatusV1Request.js → operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.js} +0 -0
  202. /package/dist/cjs/api/{types/FlightAwareAlertFlight.js → resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.js} +0 -0
  203. /package/dist/cjs/api/{types/FlightAwareAlertPayload.js → resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.js} +0 -0
  204. /package/dist/cjs/api/{types/FlightAwareWebhookResponse.js → resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.js} +0 -0
  205. /package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/{LineItemGroupSharedTaskGroupMileageCreateClientReq.mjs → SharedTaskGroupMileageCreateForProviderPayDriverClientReq.mjs} +0 -0
  206. /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionAddFlightReq1.mjs → billing/resources/lineItemGroups/client/requests/SharedTaskGroupMileageCreateForProviderPayProviderClientReq.mjs} +0 -0
  207. /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionRemoveFlightReq1.mjs → flights/client/requests/FlightConnectionsSearchReq.mjs} +0 -0
  208. /package/dist/esm/api/resources/{tracking/resources/sessions/client/requests/SessionsSyncFlightStatusV1Request.mjs → operations/resources/operationsTasks/client/requests/OperationsTasksBulkUpdateDeadlinesReq1.mjs} +0 -0
  209. /package/dist/esm/api/{types/FlightAwareAlertFlight.mjs → resources/tracking/resources/sessions/client/requests/SessionSetFlightInfoReq1.mjs} +0 -0
  210. /package/dist/esm/api/{types/FlightAwareAlertPayload.mjs → resources/tracking/resources/sessions/client/requests/SessionsFlightLegsV1Request.mjs} +0 -0
  211. /package/dist/esm/api/{types/FlightAwareWebhookResponse.mjs → resources/tracking/resources/sessions/client/requests/SessionsFlightTrackV1Request.mjs} +0 -0
@@ -0,0 +1,98 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../environments.mjs";
14
+ import * as core from "../../../../core/index.mjs";
15
+ import * as Chrt from "../../../index.mjs";
16
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
17
+ import * as errors from "../../../../errors/index.mjs";
18
+ export class Flights {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Searches Cirium for cargo flight connections between two airports, anchored on a departure or arrival time. | (FlightConnectionsSearchReq) -> (FlightConnectionsSearchRes)
24
+ *
25
+ * @param {Chrt.FlightConnectionsSearchReq} request
26
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Chrt.UnprocessableEntityError}
29
+ *
30
+ * @example
31
+ * await client.flights.searchConnectionsV1({
32
+ * origin: "origin",
33
+ * destination: "destination",
34
+ * search_by: "departure_time",
35
+ * local_date_time: "2024-01-15T09:30:00Z"
36
+ * })
37
+ */
38
+ searchConnectionsV1(request, requestOptions) {
39
+ return core.HttpResponsePromise.fromPromise(this.__searchConnectionsV1(request, requestOptions));
40
+ }
41
+ __searchConnectionsV1(request, requestOptions) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ var _a, _b, _c, _d;
44
+ 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);
45
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
46
+ 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, "flights/connections/search/v1"),
47
+ method: "POST",
48
+ headers: _headers,
49
+ contentType: "application/json",
50
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
51
+ requestType: "json",
52
+ body: request,
53
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
54
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
55
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
56
+ });
57
+ if (_response.ok) {
58
+ return { data: _response.body, rawResponse: _response.rawResponse };
59
+ }
60
+ if (_response.error.reason === "status-code") {
61
+ switch (_response.error.statusCode) {
62
+ case 422:
63
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
64
+ default:
65
+ throw new errors.ChrtError({
66
+ statusCode: _response.error.statusCode,
67
+ body: _response.error.body,
68
+ rawResponse: _response.rawResponse,
69
+ });
70
+ }
71
+ }
72
+ switch (_response.error.reason) {
73
+ case "non-json":
74
+ throw new errors.ChrtError({
75
+ statusCode: _response.error.statusCode,
76
+ body: _response.error.rawBody,
77
+ rawResponse: _response.rawResponse,
78
+ });
79
+ case "timeout":
80
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /flights/connections/search/v1.");
81
+ case "unknown":
82
+ throw new errors.ChrtError({
83
+ message: _response.error.errorMessage,
84
+ rawResponse: _response.rawResponse,
85
+ });
86
+ }
87
+ });
88
+ }
89
+ _getAuthorizationHeader() {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const bearer = yield core.Supplier.get(this._options.token);
92
+ if (bearer != null) {
93
+ return `Bearer ${bearer}`;
94
+ }
95
+ return undefined;
96
+ });
97
+ }
98
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,45 @@
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
+ * origin: "origin",
9
+ * destination: "destination",
10
+ * search_by: "departure_time",
11
+ * local_date_time: "2024-01-15T09:30:00Z"
12
+ * }
13
+ */
14
+ export interface FlightConnectionsSearchReq {
15
+ /** Departure airport code (IATA preferred), e.g. 'EWR'. */
16
+ origin: string;
17
+ /** Arrival airport code (IATA preferred), e.g. 'LAX'. */
18
+ destination: string;
19
+ /** Whether local_date_time is a departure constraint (leaving after) or an arrival constraint (arriving before). */
20
+ search_by: Chrt.ConnectionSearchByEnum;
21
+ /** Return the earliest or latest flights within the search window. */
22
+ prefer?: Chrt.ConnectionSearchPreferenceEnum;
23
+ /** Airport-local date+time (naive, no offset). Origin-local for DEPARTURE_TIME, destination-local for ARRIVAL_TIME. */
24
+ local_date_time: string;
25
+ /** Search window size in hours relative to local_date_time. Default 6; Cirium max 24. */
26
+ num_hours?: number;
27
+ /** Max stops per itinerary. 0 returns nonstop only. */
28
+ max_connections?: number;
29
+ /** Max number of connections to return. */
30
+ max_results?: number;
31
+ /** Include airports sharing the origin's city code. */
32
+ allow_nearby_departures?: boolean;
33
+ /** Include airports sharing the destination's city code. */
34
+ allow_nearby_arrivals?: boolean;
35
+ /** Minimum layover in minutes; useful for cargo since published connect times are not auto-applied for cargo payloads. */
36
+ minimum_connect_time_minutes?: number | null;
37
+ /** Restrict to these airline codes. */
38
+ include_airlines?: string[] | null;
39
+ /** Exclude these airline codes. */
40
+ exclude_airlines?: string[] | null;
41
+ /** Restrict connections to pass through these airports. */
42
+ include_airports?: string[] | null;
43
+ /** Exclude these airports from connections. */
44
+ exclude_airports?: string[] | null;
45
+ }
@@ -0,0 +1 @@
1
+ export { type FlightConnectionsSearchReq } from "./FlightConnectionsSearchReq.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -1,5 +1,6 @@
1
1
  export * as orgs from "./orgs/index.mjs";
2
2
  export * as shipping from "./shipping/index.mjs";
3
+ export * as flights from "./flights/index.mjs";
3
4
  export * as utils from "./utils/index.mjs";
4
5
  export * as analytics from "./analytics/index.mjs";
5
6
  export * as billing from "./billing/index.mjs";
@@ -10,5 +11,6 @@ export * as operations from "./operations/index.mjs";
10
11
  export * as tracking from "./tracking/index.mjs";
11
12
  export * as trackingIntegrations from "./trackingIntegrations/index.mjs";
12
13
  export * as users from "./users/index.mjs";
14
+ export * from "./flights/client/requests/index.mjs";
13
15
  export * from "./orgs/client/requests/index.mjs";
14
16
  export * from "./utils/client/requests/index.mjs";
@@ -1,5 +1,6 @@
1
1
  export * as orgs from "./orgs/index.mjs";
2
2
  export * as shipping from "./shipping/index.mjs";
3
+ export * as flights from "./flights/index.mjs";
3
4
  export * as utils from "./utils/index.mjs";
4
5
  export * as analytics from "./analytics/index.mjs";
5
6
  export * as billing from "./billing/index.mjs";
@@ -10,5 +11,6 @@ export * as operations from "./operations/index.mjs";
10
11
  export * as tracking from "./tracking/index.mjs";
11
12
  export * as trackingIntegrations from "./trackingIntegrations/index.mjs";
12
13
  export * as users from "./users/index.mjs";
14
+ export * from "./flights/client/requests/index.mjs";
13
15
  export * from "./orgs/client/requests/index.mjs";
14
16
  export * from "./utils/client/requests/index.mjs";
@@ -201,7 +201,7 @@ export declare class OperationsTaskLists {
201
201
  applyToCaseV1(taskListId: string, caseId: string, request?: Chrt.operations.OperationsTaskListsApplyToCaseV1Request, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string[]>;
202
202
  private __applyToCaseV1;
203
203
  /**
204
- * Removes the OperationsTasks this OperationsTaskList added to the Case (matched by source_task_list_id). Only untouched (not_started) tasks are deleted; started/completed/skipped tasks are kept. Returns deleted and kept counts. | authz: min_org_role=operator | () -> (OperationsTaskListRemoveFromCaseRes1)
204
+ * Removes the OperationsTasks this OperationsTaskList added to the Case (matched by source_task_list_id). Only untouched (not_started) tasks are deleted; started/completed/skipped/cancelled tasks are kept. Returns deleted and kept counts. | authz: min_org_role=operator | () -> (OperationsTaskListRemoveFromCaseRes1)
205
205
  *
206
206
  * @param {string} taskListId
207
207
  * @param {string} caseId
@@ -733,7 +733,7 @@ export class OperationsTaskLists {
733
733
  });
734
734
  }
735
735
  /**
736
- * Removes the OperationsTasks this OperationsTaskList added to the Case (matched by source_task_list_id). Only untouched (not_started) tasks are deleted; started/completed/skipped tasks are kept. Returns deleted and kept counts. | authz: min_org_role=operator | () -> (OperationsTaskListRemoveFromCaseRes1)
736
+ * Removes the OperationsTasks this OperationsTaskList added to the Case (matched by source_task_list_id). Only untouched (not_started) tasks are deleted; started/completed/skipped/cancelled tasks are kept. Returns deleted and kept counts. | authz: min_org_role=operator | () -> (OperationsTaskListRemoveFromCaseRes1)
737
737
  *
738
738
  * @param {string} taskListId
739
739
  * @param {string} caseId
@@ -112,7 +112,25 @@ export declare class OperationsTasks {
112
112
  createV1(request: Chrt.operations.OperationsTaskClientCreate1, requestOptions?: OperationsTasks.RequestOptions): core.HttpResponsePromise<string>;
113
113
  private __createV1;
114
114
  /**
115
- * Sets an OperationsTask's status (not_started / in_progress / completed / skipped). Setting COMPLETED stamps completed_at/by; any other status clears them. | authz: min_org_role=operator | (OperationsTaskStatusReq) -> (bool)
115
+ * Sets deadline_timestamp on multiple OperationsTasks in one call, each scoped to the caller's organization. Task ids that don't exist or belong to another org are silently skipped; the response reports how many were updated. | authz: min_org_role=operator | (OperationsTasksBulkUpdateDeadlinesReq1) -> (OperationsTasksBulkUpdateDeadlinesRes1)
116
+ *
117
+ * @param {Chrt.operations.OperationsTasksBulkUpdateDeadlinesReq1} request
118
+ * @param {OperationsTasks.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link Chrt.UnprocessableEntityError}
121
+ *
122
+ * @example
123
+ * await client.operations.operationsTasks.bulkUpdateDeadlinesV1({
124
+ * operations_task_deadline_updates: [{
125
+ * task_id: "task_id",
126
+ * deadline_timestamp: "2024-01-15T09:30:00Z"
127
+ * }]
128
+ * })
129
+ */
130
+ bulkUpdateDeadlinesV1(request: Chrt.operations.OperationsTasksBulkUpdateDeadlinesReq1, requestOptions?: OperationsTasks.RequestOptions): core.HttpResponsePromise<Chrt.OperationsTasksBulkUpdateDeadlinesRes1>;
131
+ private __bulkUpdateDeadlinesV1;
132
+ /**
133
+ * Sets an OperationsTask's status (not_started / in_progress / completed / skipped / cancelled). Setting COMPLETED stamps completed_at/by; any other status clears them. | authz: min_org_role=operator | (OperationsTaskStatusReq) -> (bool)
116
134
  *
117
135
  * @param {string} taskId
118
136
  * @param {Chrt.operations.OperationsTaskStatusReq} request
@@ -395,7 +395,77 @@ export class OperationsTasks {
395
395
  });
396
396
  }
397
397
  /**
398
- * Sets an OperationsTask's status (not_started / in_progress / completed / skipped). Setting COMPLETED stamps completed_at/by; any other status clears them. | authz: min_org_role=operator | (OperationsTaskStatusReq) -> (bool)
398
+ * Sets deadline_timestamp on multiple OperationsTasks in one call, each scoped to the caller's organization. Task ids that don't exist or belong to another org are silently skipped; the response reports how many were updated. | authz: min_org_role=operator | (OperationsTasksBulkUpdateDeadlinesReq1) -> (OperationsTasksBulkUpdateDeadlinesRes1)
399
+ *
400
+ * @param {Chrt.operations.OperationsTasksBulkUpdateDeadlinesReq1} request
401
+ * @param {OperationsTasks.RequestOptions} requestOptions - Request-specific configuration.
402
+ *
403
+ * @throws {@link Chrt.UnprocessableEntityError}
404
+ *
405
+ * @example
406
+ * await client.operations.operationsTasks.bulkUpdateDeadlinesV1({
407
+ * operations_task_deadline_updates: [{
408
+ * task_id: "task_id",
409
+ * deadline_timestamp: "2024-01-15T09:30:00Z"
410
+ * }]
411
+ * })
412
+ */
413
+ bulkUpdateDeadlinesV1(request, requestOptions) {
414
+ return core.HttpResponsePromise.fromPromise(this.__bulkUpdateDeadlinesV1(request, requestOptions));
415
+ }
416
+ __bulkUpdateDeadlinesV1(request, requestOptions) {
417
+ return __awaiter(this, void 0, void 0, function* () {
418
+ var _a, _b, _c, _d;
419
+ 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);
420
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
421
+ 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, "operations/operations_tasks/bulk_update_deadlines/v1"),
422
+ method: "PATCH",
423
+ headers: _headers,
424
+ contentType: "application/json",
425
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
426
+ requestType: "json",
427
+ body: request,
428
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
429
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
430
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
431
+ });
432
+ if (_response.ok) {
433
+ return {
434
+ data: _response.body,
435
+ rawResponse: _response.rawResponse,
436
+ };
437
+ }
438
+ if (_response.error.reason === "status-code") {
439
+ switch (_response.error.statusCode) {
440
+ case 422:
441
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
442
+ default:
443
+ throw new errors.ChrtError({
444
+ statusCode: _response.error.statusCode,
445
+ body: _response.error.body,
446
+ rawResponse: _response.rawResponse,
447
+ });
448
+ }
449
+ }
450
+ switch (_response.error.reason) {
451
+ case "non-json":
452
+ throw new errors.ChrtError({
453
+ statusCode: _response.error.statusCode,
454
+ body: _response.error.rawBody,
455
+ rawResponse: _response.rawResponse,
456
+ });
457
+ case "timeout":
458
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /operations/operations_tasks/bulk_update_deadlines/v1.");
459
+ case "unknown":
460
+ throw new errors.ChrtError({
461
+ message: _response.error.errorMessage,
462
+ rawResponse: _response.rawResponse,
463
+ });
464
+ }
465
+ });
466
+ }
467
+ /**
468
+ * Sets an OperationsTask's status (not_started / in_progress / completed / skipped / cancelled). Setting COMPLETED stamps completed_at/by; any other status clears them. | authz: min_org_role=operator | (OperationsTaskStatusReq) -> (bool)
399
469
  *
400
470
  * @param {string} taskId
401
471
  * @param {Chrt.operations.OperationsTaskStatusReq} request
@@ -0,0 +1,16 @@
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
+ * operations_task_deadline_updates: [{
9
+ * task_id: "task_id",
10
+ * deadline_timestamp: "2024-01-15T09:30:00Z"
11
+ * }]
12
+ * }
13
+ */
14
+ export interface OperationsTasksBulkUpdateDeadlinesReq1 {
15
+ operations_task_deadline_updates: Chrt.OperationsTaskDeadlineUpdate1[];
16
+ }
@@ -1,5 +1,6 @@
1
1
  export { type OperationsTasksListV1Request } from "./OperationsTasksListV1Request.mjs";
2
2
  export { type OperationsTaskClientUpdate1 } from "./OperationsTaskClientUpdate1.mjs";
3
3
  export { type OperationsTaskClientCreate1 } from "./OperationsTaskClientCreate1.mjs";
4
+ export { type OperationsTasksBulkUpdateDeadlinesReq1 } from "./OperationsTasksBulkUpdateDeadlinesReq1.mjs";
4
5
  export { type OperationsTaskStatusReq } from "./OperationsTaskStatusReq.mjs";
5
6
  export { type OperationsTaskAddCommentReq1 } from "./OperationsTaskAddCommentReq1.mjs";
@@ -152,17 +152,17 @@ export declare class Drivers {
152
152
  deleteSelfReportedHoursAndMileageV1(driverId: string, reportDate: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
153
153
  private __deleteSelfReportedHoursAndMileageV1;
154
154
  /**
155
- * Retrieves driver information for the caller within their organization. | () -> (Driver1)
155
+ * Retrieves driver information for the caller within their organization. | () -> (DriverWithActiveTaskGroupIds1)
156
156
  *
157
157
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
158
158
  *
159
159
  * @example
160
160
  * await client.shipping.drivers.getForCallerV1()
161
161
  */
162
- getForCallerV1(requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.Driver1>;
162
+ getForCallerV1(requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverWithActiveTaskGroupIds1>;
163
163
  private __getForCallerV1;
164
164
  /**
165
- * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
165
+ * Retrieves detailed driver information by driver ID within the organization. | () -> (DriverWithActiveTaskGroupIds1)
166
166
  *
167
167
  * @param {string} driverId
168
168
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
@@ -172,7 +172,7 @@ export declare class Drivers {
172
172
  * @example
173
173
  * await client.shipping.drivers.getByDriverIdV1("driver_id")
174
174
  */
175
- getByDriverIdV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.Driver1>;
175
+ getByDriverIdV1(driverId: string, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverWithActiveTaskGroupIds1>;
176
176
  private __getByDriverIdV1;
177
177
  /**
178
178
  * Lists all organization members paired with their driver information if they are drivers. Supports search by name, filtering, sorting, and pagination. | () -> (OrgMembersAndDriversListRes)
@@ -540,7 +540,7 @@ export class Drivers {
540
540
  });
541
541
  }
542
542
  /**
543
- * Retrieves driver information for the caller within their organization. | () -> (Driver1)
543
+ * Retrieves driver information for the caller within their organization. | () -> (DriverWithActiveTaskGroupIds1)
544
544
  *
545
545
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
546
546
  *
@@ -591,7 +591,7 @@ export class Drivers {
591
591
  });
592
592
  }
593
593
  /**
594
- * Retrieves detailed driver information by driver ID within the organization. | () -> (Driver1)
594
+ * Retrieves detailed driver information by driver ID within the organization. | () -> (DriverWithActiveTaskGroupIds1)
595
595
  *
596
596
  * @param {string} driverId
597
597
  * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
@@ -772,7 +772,7 @@ export class Drivers {
772
772
  __listV1() {
773
773
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
774
774
  var _a, _b, _c, _d, _e, _f, _g, _h;
775
- const { sort_order: sortOrder, page, page_size: pageSize, search, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, } = request;
775
+ const { sort_order: sortOrder, page, page_size: pageSize, search, filter_available_according_to_driver: filterAvailableAccordingToDriver, filter_available_according_to_operators: filterAvailableAccordingToOperators, filter_status: filterStatus, } = request;
776
776
  const _queryParams = {};
777
777
  if (sortOrder !== undefined) {
778
778
  _queryParams["sort_order"] = sortOrder;
@@ -793,6 +793,14 @@ export class Drivers {
793
793
  _queryParams["filter_available_according_to_operators"] =
794
794
  (_d = filterAvailableAccordingToOperators === null || filterAvailableAccordingToOperators === void 0 ? void 0 : filterAvailableAccordingToOperators.toString()) !== null && _d !== void 0 ? _d : null;
795
795
  }
796
+ if (filterStatus !== undefined) {
797
+ if (Array.isArray(filterStatus)) {
798
+ _queryParams["filter_status"] = filterStatus.map((item) => item);
799
+ }
800
+ else {
801
+ _queryParams["filter_status"] = filterStatus;
802
+ }
803
+ }
796
804
  let _headers = mergeHeaders((_e = this._options) === null || _e === void 0 ? void 0 : _e.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
797
805
  const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
798
806
  url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.ChrtEnvironment.Local, "shipping/drivers/list/v1"),
@@ -24,4 +24,6 @@ export interface DriversListV1Request {
24
24
  filter_available_according_to_driver?: boolean | null;
25
25
  /** Filter by operator-set availability */
26
26
  filter_available_according_to_operators?: boolean | null;
27
+ /** Filter by driver state (UNASSIGNED / ASSIGNED / IN_PROGRESS) */
28
+ filter_status?: (Chrt.DriverStatusEnum | null) | (Chrt.DriverStatusEnum | null)[];
27
29
  }
@@ -17,6 +17,8 @@ export interface OrdersNewDraftReq {
17
17
  department_id?: string | null;
18
18
  /** OperationsTaskList ids to apply to the coordinator's Case at draft creation; foreign/stale ids are skipped without failing the draft. */
19
19
  task_list_ids?: string[];
20
+ /** If set, pins the first applied OperationsTask's deadline; later from_previous_task entries cascade from it. None anchors the chain to the apply time (now). */
21
+ initial_deadline_timestamp?: string | null;
20
22
  /** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
21
23
  creation_idempotency_key?: string | null;
22
24
  /** Seed content for the OrderThread's first user turn (text + long-lived references). Agentic builds supply it; click-ops leaves it None for a blank seed turn. */
@@ -30,28 +30,6 @@ export declare namespace Driver {
30
30
  export declare class Driver {
31
31
  protected readonly _options: Driver.Options;
32
32
  constructor(_options?: Driver.Options);
33
- /**
34
- * Records driver location updates. Updates driver's last seen timestamp and location. Automatically records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos (cargo_by_driver). | auth: api_key | (LocationFeature) -> (DriverUpdateRes)
35
- *
36
- * @param {Chrt.LocationFeature} request
37
- * @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Chrt.UnprocessableEntityError}
40
- *
41
- * @example
42
- * await client.tracking.driver.updateV1({
43
- * type: "Feature",
44
- * geometry: {
45
- * type: "GeometryCollection",
46
- * geometries: [{
47
- * type: "LineString",
48
- * coordinates: [[]]
49
- * }]
50
- * }
51
- * })
52
- */
53
- updateV1(request: Chrt.LocationFeature, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
54
- private __updateV1;
55
33
  /**
56
34
  * 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
35
  *
@@ -19,77 +19,6 @@ export class Driver {
19
19
  constructor(_options = {}) {
20
20
  this._options = _options;
21
21
  }
22
- /**
23
- * Records driver location updates. Updates driver's last seen timestamp and location. Automatically records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos (cargo_by_driver). | auth: api_key | (LocationFeature) -> (DriverUpdateRes)
24
- *
25
- * @param {Chrt.LocationFeature} request
26
- * @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
27
- *
28
- * @throws {@link Chrt.UnprocessableEntityError}
29
- *
30
- * @example
31
- * await client.tracking.driver.updateV1({
32
- * type: "Feature",
33
- * geometry: {
34
- * type: "GeometryCollection",
35
- * geometries: [{
36
- * type: "LineString",
37
- * coordinates: [[]]
38
- * }]
39
- * }
40
- * })
41
- */
42
- updateV1(request, requestOptions) {
43
- return core.HttpResponsePromise.fromPromise(this.__updateV1(request, requestOptions));
44
- }
45
- __updateV1(request, requestOptions) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- var _a, _b, _c, _d;
48
- 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);
49
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
50
- 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/v1"),
51
- method: "POST",
52
- headers: _headers,
53
- contentType: "application/json",
54
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
55
- requestType: "json",
56
- body: request,
57
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
58
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
59
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
- });
61
- if (_response.ok) {
62
- return { data: _response.body, rawResponse: _response.rawResponse };
63
- }
64
- if (_response.error.reason === "status-code") {
65
- switch (_response.error.statusCode) {
66
- case 422:
67
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
68
- default:
69
- throw new errors.ChrtError({
70
- statusCode: _response.error.statusCode,
71
- body: _response.error.body,
72
- rawResponse: _response.rawResponse,
73
- });
74
- }
75
- }
76
- switch (_response.error.reason) {
77
- case "non-json":
78
- throw new errors.ChrtError({
79
- statusCode: _response.error.statusCode,
80
- body: _response.error.rawBody,
81
- rawResponse: _response.rawResponse,
82
- });
83
- case "timeout":
84
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/driver/update/v1.");
85
- case "unknown":
86
- throw new errors.ChrtError({
87
- message: _response.error.errorMessage,
88
- rawResponse: _response.rawResponse,
89
- });
90
- }
91
- });
92
- }
93
22
  /**
94
23
  * 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
24
  *