@chrt-inc/typescript-sdk 0.227.1 → 0.252.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 (204) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +7 -2
  3. package/dist/cjs/api/resources/index.d.ts +1 -0
  4. package/dist/cjs/api/resources/index.js +2 -1
  5. package/dist/cjs/api/resources/tracking/client/Client.d.ts +32 -0
  6. package/dist/cjs/api/resources/tracking/client/Client.js +32 -0
  7. package/dist/cjs/api/resources/tracking/client/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/tracking/client/index.js +2 -0
  9. package/dist/cjs/api/resources/tracking/index.d.ts +2 -0
  10. package/dist/cjs/api/resources/tracking/index.js +18 -0
  11. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.d.ts +67 -0
  12. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.js +202 -0
  13. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/index.js +17 -0
  15. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverLastSeenRequest.d.ts +14 -0
  16. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverUpdateReq.d.ts +19 -0
  17. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/requests/index.d.ts +2 -0
  18. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/requests/index.js +2 -0
  19. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/tracking/resources/cargoByDriver/index.js +17 -0
  21. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +103 -0
  22. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +371 -0
  23. package/dist/cjs/api/resources/tracking/resources/devices/client/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/tracking/resources/devices/client/index.js +17 -0
  25. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.ts +12 -0
  26. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.js +5 -0
  27. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.d.ts +14 -0
  28. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.js +5 -0
  29. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgRequest.d.ts +12 -0
  30. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgRequest.js +5 -0
  31. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.d.ts +12 -0
  32. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.js +5 -0
  33. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +4 -0
  34. package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.js +2 -0
  35. package/dist/cjs/api/resources/tracking/resources/devices/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/tracking/resources/devices/index.js +17 -0
  37. package/dist/cjs/api/resources/tracking/resources/index.d.ts +8 -0
  38. package/dist/cjs/api/resources/tracking/resources/index.js +47 -0
  39. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +137 -0
  40. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +510 -0
  41. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/index.d.ts +2 -0
  42. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/index.js +17 -0
  43. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.d.ts +13 -0
  44. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.js +5 -0
  45. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.d.ts +12 -0
  46. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.js +5 -0
  47. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.d.ts +12 -0
  48. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.js +5 -0
  49. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.d.ts +12 -0
  50. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.js +5 -0
  51. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.d.ts +12 -0
  52. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.js +5 -0
  53. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartSessionRequest.d.ts +12 -0
  54. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartSessionRequest.js +5 -0
  55. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateCommentsRequest1.d.ts +14 -0
  56. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateCommentsRequest1.js +5 -0
  57. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.ts +7 -0
  58. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.js +2 -0
  59. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/index.d.ts +1 -0
  60. package/dist/cjs/api/resources/tracking/resources/sessionByDevice/index.js +17 -0
  61. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.ts +66 -0
  62. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.js +200 -0
  63. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/index.d.ts +2 -0
  64. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/index.js +17 -0
  65. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverLastSeenRequest.d.ts +12 -0
  66. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverLastSeenRequest.js +5 -0
  67. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.d.ts +19 -0
  68. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.js +5 -0
  69. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.d.ts +2 -0
  70. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.js +2 -0
  71. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/index.d.ts +1 -0
  72. package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/index.js +17 -0
  73. package/dist/cjs/api/types/Cargo1.d.ts +2 -0
  74. package/dist/cjs/api/types/CargoStatusEnum1.d.ts +10 -0
  75. package/dist/cjs/api/types/CargoStatusEnum1.js +12 -0
  76. package/dist/cjs/api/types/DecodedJwtWithOrgAndUserId.d.ts +1 -0
  77. package/dist/cjs/api/types/Device1.d.ts +19 -0
  78. package/dist/cjs/api/types/Device1.js +5 -0
  79. package/dist/cjs/api/types/Driver1.d.ts +2 -2
  80. package/dist/cjs/api/types/TrackingCargoByDriverDataPoint1.d.ts +11 -0
  81. package/dist/cjs/api/types/TrackingCargoByDriverDataPoint1.js +5 -0
  82. package/dist/cjs/api/types/TrackingCargoByDriverDataPointMetadata1.d.ts +8 -0
  83. package/dist/cjs/api/types/TrackingCargoByDriverDataPointMetadata1.js +5 -0
  84. package/dist/cjs/api/types/TrackingDeviceTypeEnum1.d.ts +9 -0
  85. package/dist/cjs/api/types/TrackingDeviceTypeEnum1.js +11 -0
  86. package/dist/cjs/api/types/TrackingSessionByDeviceDataPoint1.d.ts +12 -0
  87. package/dist/cjs/api/types/TrackingSessionByDeviceDataPoint1.js +5 -0
  88. package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.d.ts +6 -0
  89. package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.js +5 -0
  90. package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPoint1.d.ts +11 -0
  91. package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPoint1.js +5 -0
  92. package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.ts +7 -0
  93. package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPointMetadata1.js +5 -0
  94. package/dist/cjs/api/types/index.d.ts +9 -2
  95. package/dist/cjs/api/types/index.js +9 -2
  96. package/dist/cjs/version.d.ts +1 -1
  97. package/dist/cjs/version.js +1 -1
  98. package/dist/esm/Client.d.mts +3 -0
  99. package/dist/esm/Client.mjs +7 -2
  100. package/dist/esm/api/resources/index.d.mts +1 -0
  101. package/dist/esm/api/resources/index.mjs +1 -0
  102. package/dist/esm/api/resources/tracking/client/Client.d.mts +32 -0
  103. package/dist/esm/api/resources/tracking/client/Client.mjs +28 -0
  104. package/dist/esm/api/resources/tracking/client/index.d.mts +1 -0
  105. package/dist/esm/api/resources/tracking/client/index.mjs +1 -0
  106. package/dist/esm/api/resources/tracking/index.d.mts +2 -0
  107. package/dist/esm/api/resources/tracking/index.mjs +2 -0
  108. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.d.mts +67 -0
  109. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.mjs +165 -0
  110. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/index.d.mts +2 -0
  111. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/index.mjs +1 -0
  112. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverLastSeenRequest.d.mts +14 -0
  113. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverUpdateReq.d.mts +19 -0
  114. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/index.d.mts +2 -0
  115. package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/index.mjs +1 -0
  116. package/dist/esm/api/resources/tracking/resources/cargoByDriver/index.d.mts +1 -0
  117. package/dist/esm/api/resources/tracking/resources/cargoByDriver/index.mjs +1 -0
  118. package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +103 -0
  119. package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +334 -0
  120. package/dist/esm/api/resources/tracking/resources/devices/client/index.d.mts +2 -0
  121. package/dist/esm/api/resources/tracking/resources/devices/client/index.mjs +1 -0
  122. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.mts +12 -0
  123. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.mjs +4 -0
  124. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.d.mts +14 -0
  125. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.mjs +4 -0
  126. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgRequest.d.mts +12 -0
  127. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgRequest.mjs +4 -0
  128. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.d.mts +12 -0
  129. package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.mjs +4 -0
  130. package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +4 -0
  131. package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.mjs +1 -0
  132. package/dist/esm/api/resources/tracking/resources/devices/index.d.mts +1 -0
  133. package/dist/esm/api/resources/tracking/resources/devices/index.mjs +1 -0
  134. package/dist/esm/api/resources/tracking/resources/index.d.mts +8 -0
  135. package/dist/esm/api/resources/tracking/resources/index.mjs +8 -0
  136. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +137 -0
  137. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +473 -0
  138. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/index.d.mts +2 -0
  139. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/index.mjs +1 -0
  140. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.d.mts +13 -0
  141. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.mjs +4 -0
  142. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.d.mts +12 -0
  143. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.mjs +4 -0
  144. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.d.mts +12 -0
  145. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.mjs +4 -0
  146. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.d.mts +12 -0
  147. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.mjs +4 -0
  148. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.d.mts +12 -0
  149. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.mjs +4 -0
  150. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartSessionRequest.d.mts +12 -0
  151. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartSessionRequest.mjs +4 -0
  152. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateCommentsRequest1.d.mts +14 -0
  153. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateCommentsRequest1.mjs +4 -0
  154. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.mts +7 -0
  155. package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.mjs +1 -0
  156. package/dist/esm/api/resources/tracking/resources/sessionByDevice/index.d.mts +1 -0
  157. package/dist/esm/api/resources/tracking/resources/sessionByDevice/index.mjs +1 -0
  158. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.mts +66 -0
  159. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.mjs +163 -0
  160. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/index.d.mts +2 -0
  161. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/index.mjs +1 -0
  162. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverLastSeenRequest.d.mts +12 -0
  163. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverLastSeenRequest.mjs +4 -0
  164. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.d.mts +19 -0
  165. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.mjs +4 -0
  166. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.d.mts +2 -0
  167. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.mjs +1 -0
  168. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/index.d.mts +1 -0
  169. package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/index.mjs +1 -0
  170. package/dist/esm/api/types/Cargo1.d.mts +2 -0
  171. package/dist/esm/api/types/CargoStatusEnum1.d.mts +10 -0
  172. package/dist/esm/api/types/CargoStatusEnum1.mjs +9 -0
  173. package/dist/esm/api/types/DecodedJwtWithOrgAndUserId.d.mts +1 -0
  174. package/dist/esm/api/types/Device1.d.mts +19 -0
  175. package/dist/esm/api/types/Device1.mjs +4 -0
  176. package/dist/esm/api/types/Driver1.d.mts +2 -2
  177. package/dist/esm/api/types/TrackingCargoByDriverDataPoint1.d.mts +11 -0
  178. package/dist/esm/api/types/TrackingCargoByDriverDataPoint1.mjs +4 -0
  179. package/dist/esm/api/types/TrackingCargoByDriverDataPointMetadata1.d.mts +8 -0
  180. package/dist/esm/api/types/TrackingCargoByDriverDataPointMetadata1.mjs +4 -0
  181. package/dist/esm/api/types/TrackingDeviceTypeEnum1.d.mts +9 -0
  182. package/dist/esm/api/types/TrackingDeviceTypeEnum1.mjs +8 -0
  183. package/dist/esm/api/types/TrackingSessionByDeviceDataPoint1.d.mts +12 -0
  184. package/dist/esm/api/types/TrackingSessionByDeviceDataPoint1.mjs +4 -0
  185. package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.d.mts +6 -0
  186. package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.mjs +4 -0
  187. package/dist/esm/api/types/TrackingTaskGroupByDriverDataPoint1.d.mts +11 -0
  188. package/dist/esm/api/types/TrackingTaskGroupByDriverDataPoint1.mjs +4 -0
  189. package/dist/esm/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.mts +7 -0
  190. package/dist/esm/api/types/TrackingTaskGroupByDriverDataPointMetadata1.mjs +4 -0
  191. package/dist/esm/api/types/index.d.mts +9 -2
  192. package/dist/esm/api/types/index.mjs +9 -2
  193. package/dist/esm/version.d.mts +1 -1
  194. package/dist/esm/version.mjs +1 -1
  195. package/package.json +1 -1
  196. package/reference.md +1048 -0
  197. package/dist/cjs/api/types/Tracker1.d.ts +0 -7
  198. package/dist/cjs/api/types/TrackerSession1.d.ts +0 -7
  199. package/dist/esm/api/types/Tracker1.d.mts +0 -7
  200. package/dist/esm/api/types/TrackerSession1.d.mts +0 -7
  201. /package/dist/cjs/api/{types/Tracker1.js → resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverLastSeenRequest.js} +0 -0
  202. /package/dist/cjs/api/{types/TrackerSession1.js → resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverUpdateReq.js} +0 -0
  203. /package/dist/esm/api/{types/Tracker1.mjs → resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverLastSeenRequest.mjs} +0 -0
  204. /package/dist/esm/api/{types/TrackerSession1.mjs → resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverUpdateReq.mjs} +0 -0
@@ -26,6 +26,7 @@ import { Users } from "./api/resources/users/client/Client.js";
26
26
  import { Utils } from "./api/resources/utils/client/Client.js";
27
27
  import { Notifications } from "./api/resources/notifications/client/Client.js";
28
28
  import { OrgConnectionInfos } from "./api/resources/orgConnectionInfos/client/Client.js";
29
+ import { Tracking } from "./api/resources/tracking/client/Client.js";
29
30
  export declare namespace ChrtClient {
30
31
  interface Options {
31
32
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -72,6 +73,7 @@ export declare class ChrtClient {
72
73
  protected _utils: Utils | undefined;
73
74
  protected _notifications: Notifications | undefined;
74
75
  protected _orgConnectionInfos: OrgConnectionInfos | undefined;
76
+ protected _tracking: Tracking | undefined;
75
77
  constructor(_options?: ChrtClient.Options);
76
78
  get dev(): Dev;
77
79
  get drivers(): Drivers;
@@ -96,4 +98,5 @@ export declare class ChrtClient {
96
98
  get utils(): Utils;
97
99
  get notifications(): Notifications;
98
100
  get orgConnectionInfos(): OrgConnectionInfos;
101
+ get tracking(): Tracking;
99
102
  }
@@ -62,13 +62,14 @@ const Client_js_20 = require("./api/resources/users/client/Client.js");
62
62
  const Client_js_21 = require("./api/resources/utils/client/Client.js");
63
63
  const Client_js_22 = require("./api/resources/notifications/client/Client.js");
64
64
  const Client_js_23 = require("./api/resources/orgConnectionInfos/client/Client.js");
65
+ const Client_js_24 = require("./api/resources/tracking/client/Client.js");
65
66
  class ChrtClient {
66
67
  constructor(_options = {}) {
67
68
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
68
69
  "X-Fern-Language": "JavaScript",
69
70
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
70
- "X-Fern-SDK-Version": "0.227.1",
71
- "User-Agent": "@chrt-inc/typescript-sdk/0.227.1",
71
+ "X-Fern-SDK-Version": "0.252.0",
72
+ "User-Agent": "@chrt-inc/typescript-sdk/0.252.0",
72
73
  "X-Fern-Runtime": core.RUNTIME.type,
73
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
74
75
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -165,5 +166,9 @@ class ChrtClient {
165
166
  var _a;
166
167
  return ((_a = this._orgConnectionInfos) !== null && _a !== void 0 ? _a : (this._orgConnectionInfos = new Client_js_23.OrgConnectionInfos(this._options)));
167
168
  }
169
+ get tracking() {
170
+ var _a;
171
+ return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_24.Tracking(this._options)));
172
+ }
168
173
  }
169
174
  exports.ChrtClient = ChrtClient;
@@ -21,6 +21,7 @@ export * as users from "./users/index.js";
21
21
  export * as utils from "./utils/index.js";
22
22
  export * as notifications from "./notifications/index.js";
23
23
  export * as orgConnectionInfos from "./orgConnectionInfos/index.js";
24
+ export * as tracking from "./tracking/index.js";
24
25
  export * from "./dev/client/requests/index.js";
25
26
  export * from "./drivers/client/requests/index.js";
26
27
  export * from "./milestones/client/requests/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.orgConnectionInfos = exports.notifications = exports.utils = exports.users = exports.root = exports.payments = exports.orgs = exports.milestoneNotifications = exports.shipperContactInfo = exports.taskGroups = exports.connections = exports.courierPayDriverPayouts = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverLineItemGroups = exports.shipperPayCourierRateSheets = exports.courierPayDriverRateSheets = exports.orders = exports.orgProfiles = exports.offChrtShipperOrgInfo = exports.milestones = exports.drivers = exports.dev = void 0;
39
+ exports.tracking = exports.orgConnectionInfos = exports.notifications = exports.utils = exports.users = exports.root = exports.payments = exports.orgs = exports.milestoneNotifications = exports.shipperContactInfo = exports.taskGroups = exports.connections = exports.courierPayDriverPayouts = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverLineItemGroups = exports.shipperPayCourierRateSheets = exports.courierPayDriverRateSheets = exports.orders = exports.orgProfiles = exports.offChrtShipperOrgInfo = exports.milestones = exports.drivers = exports.dev = void 0;
40
40
  exports.dev = __importStar(require("./dev/index.js"));
41
41
  exports.drivers = __importStar(require("./drivers/index.js"));
42
42
  exports.milestones = __importStar(require("./milestones/index.js"));
@@ -60,6 +60,7 @@ exports.users = __importStar(require("./users/index.js"));
60
60
  exports.utils = __importStar(require("./utils/index.js"));
61
61
  exports.notifications = __importStar(require("./notifications/index.js"));
62
62
  exports.orgConnectionInfos = __importStar(require("./orgConnectionInfos/index.js"));
63
+ exports.tracking = __importStar(require("./tracking/index.js"));
63
64
  __exportStar(require("./dev/client/requests/index.js"), exports);
64
65
  __exportStar(require("./drivers/client/requests/index.js"), exports);
65
66
  __exportStar(require("./milestones/client/requests/index.js"), exports);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.js";
5
+ import * as core from "../../../../core/index.js";
6
+ import { CargoByDriver } from "../resources/cargoByDriver/client/Client.js";
7
+ import { Devices } from "../resources/devices/client/Client.js";
8
+ import { TaskGroupByDriver } from "../resources/taskGroupByDriver/client/Client.js";
9
+ import { SessionByDevice } from "../resources/sessionByDevice/client/Client.js";
10
+ export declare namespace Tracking {
11
+ interface Options {
12
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
13
+ /** Specify a custom URL to connect the client to. */
14
+ baseUrl?: core.Supplier<string>;
15
+ token?: core.Supplier<core.BearerToken | undefined>;
16
+ /** Additional headers to include in requests. */
17
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
18
+ fetcher?: core.FetchFunction;
19
+ }
20
+ }
21
+ export declare class Tracking {
22
+ protected readonly _options: Tracking.Options;
23
+ protected _cargoByDriver: CargoByDriver | undefined;
24
+ protected _devices: Devices | undefined;
25
+ protected _taskGroupByDriver: TaskGroupByDriver | undefined;
26
+ protected _sessionByDevice: SessionByDevice | undefined;
27
+ constructor(_options?: Tracking.Options);
28
+ get cargoByDriver(): CargoByDriver;
29
+ get devices(): Devices;
30
+ get taskGroupByDriver(): TaskGroupByDriver;
31
+ get sessionByDevice(): SessionByDevice;
32
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Tracking = void 0;
7
+ const Client_js_1 = require("../resources/cargoByDriver/client/Client.js");
8
+ const Client_js_2 = require("../resources/devices/client/Client.js");
9
+ const Client_js_3 = require("../resources/taskGroupByDriver/client/Client.js");
10
+ const Client_js_4 = require("../resources/sessionByDevice/client/Client.js");
11
+ class Tracking {
12
+ constructor(_options = {}) {
13
+ this._options = _options;
14
+ }
15
+ get cargoByDriver() {
16
+ var _a;
17
+ return ((_a = this._cargoByDriver) !== null && _a !== void 0 ? _a : (this._cargoByDriver = new Client_js_1.CargoByDriver(this._options)));
18
+ }
19
+ get devices() {
20
+ var _a;
21
+ return ((_a = this._devices) !== null && _a !== void 0 ? _a : (this._devices = new Client_js_2.Devices(this._options)));
22
+ }
23
+ get taskGroupByDriver() {
24
+ var _a;
25
+ return ((_a = this._taskGroupByDriver) !== null && _a !== void 0 ? _a : (this._taskGroupByDriver = new Client_js_3.TaskGroupByDriver(this._options)));
26
+ }
27
+ get sessionByDevice() {
28
+ var _a;
29
+ return ((_a = this._sessionByDevice) !== null && _a !== void 0 ? _a : (this._sessionByDevice = new Client_js_4.SessionByDevice(this._options)));
30
+ }
31
+ }
32
+ exports.Tracking = Tracking;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./resources/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./resources/index.js"), exports);
@@ -0,0 +1,67 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace CargoByDriver {
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 | undefined> | 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 headers to include in the request. */
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ }
27
+ }
28
+ export declare class CargoByDriver {
29
+ protected readonly _options: CargoByDriver.Options;
30
+ constructor(_options?: CargoByDriver.Options);
31
+ /**
32
+ * Returns the most recent data point in tracking.cargo_by_driver that matches the provided identifiers.
33
+ *
34
+ * @param {Chrt.tracking.CargoByDriverLastSeenRequest} request
35
+ * @param {CargoByDriver.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Chrt.UnprocessableEntityError}
38
+ *
39
+ * @example
40
+ * await client.tracking.cargoByDriver.lastSeen({
41
+ * cargo_id: "cargo_id",
42
+ * task_group_id: "task_group_id"
43
+ * })
44
+ */
45
+ lastSeen(request: Chrt.tracking.CargoByDriverLastSeenRequest, requestOptions?: CargoByDriver.RequestOptions): core.HttpResponsePromise<(Chrt.TrackingCargoByDriverDataPoint1 | null) | undefined>;
46
+ private __lastSeen;
47
+ /**
48
+ * Given a driver_id and task_group_id, find cargos on the task group and write tracking points for those with status IN_TRANSIT.
49
+ *
50
+ * @param {Chrt.tracking.CargoByDriverUpdateReq} request
51
+ * @param {CargoByDriver.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @throws {@link Chrt.UnprocessableEntityError}
54
+ *
55
+ * @example
56
+ * await client.tracking.cargoByDriver.update({
57
+ * task_group_id: "task_group_id",
58
+ * timestamp: "2024-01-15T09:30:00Z",
59
+ * location: {
60
+ * type: "Feature"
61
+ * }
62
+ * })
63
+ */
64
+ update(request: Chrt.tracking.CargoByDriverUpdateReq, requestOptions?: CargoByDriver.RequestOptions): core.HttpResponsePromise<number>;
65
+ private __update;
66
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
67
+ }
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.CargoByDriver = void 0;
49
+ const environments = __importStar(require("../../../../../../environments.js"));
50
+ const core = __importStar(require("../../../../../../core/index.js"));
51
+ const Chrt = __importStar(require("../../../../../index.js"));
52
+ const headers_js_1 = require("../../../../../../core/headers.js");
53
+ const errors = __importStar(require("../../../../../../errors/index.js"));
54
+ class CargoByDriver {
55
+ constructor(_options = {}) {
56
+ this._options = _options;
57
+ }
58
+ /**
59
+ * Returns the most recent data point in tracking.cargo_by_driver that matches the provided identifiers.
60
+ *
61
+ * @param {Chrt.tracking.CargoByDriverLastSeenRequest} request
62
+ * @param {CargoByDriver.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link Chrt.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.tracking.cargoByDriver.lastSeen({
68
+ * cargo_id: "cargo_id",
69
+ * task_group_id: "task_group_id"
70
+ * })
71
+ */
72
+ lastSeen(request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__lastSeen(request, requestOptions));
74
+ }
75
+ __lastSeen(request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ var _a, _b, _c, _d;
78
+ const { cargo_id: cargoId, task_group_id: taskGroupId } = request;
79
+ const _queryParams = {};
80
+ _queryParams["cargo_id"] = cargoId;
81
+ _queryParams["task_group_id"] = taskGroupId;
82
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
83
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "tracking/cargo_by_driver/last_seen"),
84
+ method: "GET",
85
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
+ queryParameters: _queryParams,
87
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
88
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
89
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
90
+ });
91
+ if (_response.ok) {
92
+ return {
93
+ data: _response.body,
94
+ rawResponse: _response.rawResponse,
95
+ };
96
+ }
97
+ if (_response.error.reason === "status-code") {
98
+ switch (_response.error.statusCode) {
99
+ case 422:
100
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
101
+ default:
102
+ throw new errors.ChrtError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.body,
105
+ rawResponse: _response.rawResponse,
106
+ });
107
+ }
108
+ }
109
+ switch (_response.error.reason) {
110
+ case "non-json":
111
+ throw new errors.ChrtError({
112
+ statusCode: _response.error.statusCode,
113
+ body: _response.error.rawBody,
114
+ rawResponse: _response.rawResponse,
115
+ });
116
+ case "timeout":
117
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/cargo_by_driver/last_seen.");
118
+ case "unknown":
119
+ throw new errors.ChrtError({
120
+ message: _response.error.errorMessage,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
124
+ });
125
+ }
126
+ /**
127
+ * Given a driver_id and task_group_id, find cargos on the task group and write tracking points for those with status IN_TRANSIT.
128
+ *
129
+ * @param {Chrt.tracking.CargoByDriverUpdateReq} request
130
+ * @param {CargoByDriver.RequestOptions} requestOptions - Request-specific configuration.
131
+ *
132
+ * @throws {@link Chrt.UnprocessableEntityError}
133
+ *
134
+ * @example
135
+ * await client.tracking.cargoByDriver.update({
136
+ * task_group_id: "task_group_id",
137
+ * timestamp: "2024-01-15T09:30:00Z",
138
+ * location: {
139
+ * type: "Feature"
140
+ * }
141
+ * })
142
+ */
143
+ update(request, requestOptions) {
144
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
145
+ }
146
+ __update(request, requestOptions) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ var _a, _b, _c, _d;
149
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
150
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "tracking/cargo_by_driver/update"),
151
+ method: "POST",
152
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
153
+ contentType: "application/json",
154
+ requestType: "json",
155
+ body: request,
156
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
157
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
158
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
159
+ });
160
+ if (_response.ok) {
161
+ return { data: _response.body, rawResponse: _response.rawResponse };
162
+ }
163
+ if (_response.error.reason === "status-code") {
164
+ switch (_response.error.statusCode) {
165
+ case 422:
166
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
167
+ default:
168
+ throw new errors.ChrtError({
169
+ statusCode: _response.error.statusCode,
170
+ body: _response.error.body,
171
+ rawResponse: _response.rawResponse,
172
+ });
173
+ }
174
+ }
175
+ switch (_response.error.reason) {
176
+ case "non-json":
177
+ throw new errors.ChrtError({
178
+ statusCode: _response.error.statusCode,
179
+ body: _response.error.rawBody,
180
+ rawResponse: _response.rawResponse,
181
+ });
182
+ case "timeout":
183
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/cargo_by_driver/update.");
184
+ case "unknown":
185
+ throw new errors.ChrtError({
186
+ message: _response.error.errorMessage,
187
+ rawResponse: _response.rawResponse,
188
+ });
189
+ }
190
+ });
191
+ }
192
+ _getAuthorizationHeader() {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const bearer = yield core.Supplier.get(this._options.token);
195
+ if (bearer != null) {
196
+ return `Bearer ${bearer}`;
197
+ }
198
+ return undefined;
199
+ });
200
+ }
201
+ }
202
+ exports.CargoByDriver = CargoByDriver;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * cargo_id: "cargo_id",
8
+ * task_group_id: "task_group_id"
9
+ * }
10
+ */
11
+ export interface CargoByDriverLastSeenRequest {
12
+ cargo_id: string;
13
+ task_group_id: string;
14
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * task_group_id: "task_group_id",
9
+ * timestamp: "2024-01-15T09:30:00Z",
10
+ * location: {
11
+ * type: "Feature"
12
+ * }
13
+ * }
14
+ */
15
+ export interface CargoByDriverUpdateReq {
16
+ task_group_id: string;
17
+ timestamp: string;
18
+ location: Chrt.LocationFeature;
19
+ }
@@ -0,0 +1,2 @@
1
+ export { type CargoByDriverLastSeenRequest } from "./CargoByDriverLastSeenRequest.js";
2
+ export { type CargoByDriverUpdateReq } from "./CargoByDriverUpdateReq.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,103 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.js";
5
+ import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
7
+ export declare namespace Devices {
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 | undefined> | 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 headers to include in the request. */
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ }
27
+ }
28
+ export declare class Devices {
29
+ protected readonly _options: Devices.Options;
30
+ constructor(_options?: Devices.Options);
31
+ /**
32
+ * Register a device to the caller's org.
33
+ *
34
+ * @param {Chrt.tracking.DevicesRegisterToOrgRequest} request
35
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Chrt.UnprocessableEntityError}
38
+ *
39
+ * @example
40
+ * await client.tracking.devices.registerToOrg({
41
+ * device_mac_address: "device_mac_address"
42
+ * })
43
+ */
44
+ registerToOrg(request: Chrt.tracking.DevicesRegisterToOrgRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<string>;
45
+ private __registerToOrg;
46
+ /**
47
+ * Get a device by device_mac_address.
48
+ *
49
+ * @param {Chrt.tracking.DevicesGetRequest} request
50
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.tracking.devices.get({
56
+ * device_mac_address: "device_mac_address"
57
+ * })
58
+ */
59
+ get(request: Chrt.tracking.DevicesGetRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1>;
60
+ private __get;
61
+ /**
62
+ * List all devices registered to the caller's org.
63
+ *
64
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @example
67
+ * await client.tracking.devices.list()
68
+ */
69
+ list(requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<Chrt.Device1[]>;
70
+ private __list;
71
+ /**
72
+ * Link a device to a cargo (bidirectional references).
73
+ *
74
+ * @param {Chrt.tracking.DevicesLinkToCargoRequest} request
75
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link Chrt.UnprocessableEntityError}
78
+ *
79
+ * @example
80
+ * await client.tracking.devices.linkToCargo({
81
+ * device_mac_address: "device_mac_address",
82
+ * cargo_id: "cargo_id"
83
+ * })
84
+ */
85
+ linkToCargo(request: Chrt.tracking.DevicesLinkToCargoRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
86
+ private __linkToCargo;
87
+ /**
88
+ * Unlink a device from its cargo if linked.
89
+ *
90
+ * @param {Chrt.tracking.DevicesUnlinkFromCargoRequest} request
91
+ * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link Chrt.UnprocessableEntityError}
94
+ *
95
+ * @example
96
+ * await client.tracking.devices.unlinkFromCargo({
97
+ * device_mac_address: "device_mac_address"
98
+ * })
99
+ */
100
+ unlinkFromCargo(request: Chrt.tracking.DevicesUnlinkFromCargoRequest, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
101
+ private __unlinkFromCargo;
102
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
103
+ }