@chrt-inc/typescript-sdk 1.754.0 → 1.760.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.ts +0 -13
- package/dist/cjs/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.js +0 -59
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +102 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +439 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.ts +18 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.ts +21 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.ts +25 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/index.js +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.ts +8 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.js +10 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/index.js +3 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +2 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +2 -1
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +75 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +15 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.ts +26 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tracking/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/index.js +1 -0
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdate1.d.ts +0 -4
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.ts +1 -5
- package/dist/cjs/api/types/CargoAiTrackAndTraceUpdateSourceEnum.js +0 -5
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.d.ts +17 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.js +5 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.d.ts +8 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.js +5 -0
- package/dist/cjs/api/types/DriverStatsRes.d.ts +8 -3
- package/dist/cjs/api/types/DriverUpdateRes.d.ts +1 -0
- package/dist/cjs/api/types/FlightLeg1.d.ts +1 -1
- package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/{FlightTrackPosition.d.ts → FlightTrackPosition1.d.ts} +1 -4
- package/dist/cjs/api/types/FlightTrackPosition1.js +5 -0
- package/dist/cjs/api/types/FlightTrackRes.d.ts +2 -2
- package/dist/{esm/api/types/FlightTrackWaypoint.d.mts → cjs/api/types/FlightTrackWaypoint1.d.ts} +1 -4
- package/dist/cjs/api/types/FlightTrackWaypoint1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +4 -2
- package/dist/cjs/api/types/index.js +4 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts +0 -13
- package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.mjs +0 -59
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +102 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +439 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.mts +18 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.mts +21 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.mts +25 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.mts +8 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.mjs +7 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/index.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/index.mjs +2 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +2 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +2 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +75 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.mts +26 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/index.mjs +1 -0
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdate1.d.mts +0 -4
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.d.mts +1 -5
- package/dist/esm/api/types/CargoAiTrackAndTraceUpdateSourceEnum.mjs +1 -4
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.d.mts +17 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.mjs +4 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.d.mts +8 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.mjs +4 -0
- package/dist/esm/api/types/DriverStatsRes.d.mts +8 -3
- package/dist/esm/api/types/DriverUpdateRes.d.mts +1 -0
- package/dist/esm/api/types/FlightLeg1.d.mts +1 -1
- package/dist/esm/api/types/FlightLegClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/{FlightTrackPosition.d.mts → FlightTrackPosition1.d.mts} +1 -4
- package/dist/esm/api/types/FlightTrackPosition1.mjs +4 -0
- package/dist/esm/api/types/FlightTrackRes.d.mts +2 -2
- package/dist/{cjs/api/types/FlightTrackWaypoint.d.ts → esm/api/types/FlightTrackWaypoint1.d.mts} +1 -4
- package/dist/esm/api/types/FlightTrackWaypoint1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +4 -2
- package/dist/esm/api/types/index.mjs +4 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +604 -151
- /package/dist/cjs/api/{types/FlightTrackPosition.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.js} +0 -0
- /package/dist/cjs/api/{types/FlightTrackWaypoint.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.js} +0 -0
- /package/dist/esm/api/{types/FlightTrackPosition.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.mjs} +0 -0
- /package/dist/esm/api/{types/FlightTrackWaypoint.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.mjs} +0 -0
|
@@ -36,9 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.tasks = exports.taskGroups = exports.orderTemplates = exports.orderSchedules = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.
|
|
40
|
-
exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
|
|
39
|
+
exports.tasks = exports.taskGroups = exports.orderTemplates = exports.orderSchedules = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.orderDrafts = exports.drivers = void 0;
|
|
41
40
|
exports.drivers = __importStar(require("./drivers/index.js"));
|
|
41
|
+
__exportStar(require("./drivers/types/index.js"), exports);
|
|
42
|
+
exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
|
|
42
43
|
exports.cargos = __importStar(require("./cargos/index.js"));
|
|
43
44
|
exports.flights = __importStar(require("./flights/index.js"));
|
|
44
45
|
exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts
CHANGED
|
@@ -63,7 +63,8 @@ export declare class TaskGroup {
|
|
|
63
63
|
* provenance: "manual",
|
|
64
64
|
* origin_iata: "origin_iata",
|
|
65
65
|
* destination_iata: "destination_iata",
|
|
66
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
66
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
67
|
+
* carrier_iata: "carrier_iata"
|
|
67
68
|
* }]
|
|
68
69
|
* })
|
|
69
70
|
*/
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js
CHANGED
|
@@ -137,7 +137,8 @@ class TaskGroup {
|
|
|
137
137
|
* provenance: "manual",
|
|
138
138
|
* origin_iata: "origin_iata",
|
|
139
139
|
* destination_iata: "destination_iata",
|
|
140
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
140
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
141
|
+
* carrier_iata: "carrier_iata"
|
|
141
142
|
* }]
|
|
142
143
|
* })
|
|
143
144
|
*/
|
|
@@ -157,7 +157,8 @@ export declare class TaskGroups {
|
|
|
157
157
|
* provenance: "manual",
|
|
158
158
|
* origin_iata: "origin_iata",
|
|
159
159
|
* destination_iata: "destination_iata",
|
|
160
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
160
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
161
|
+
* carrier_iata: "carrier_iata"
|
|
161
162
|
* }]
|
|
162
163
|
* })
|
|
163
164
|
*/
|
|
@@ -525,7 +525,8 @@ class TaskGroups {
|
|
|
525
525
|
* provenance: "manual",
|
|
526
526
|
* origin_iata: "origin_iata",
|
|
527
527
|
* destination_iata: "destination_iata",
|
|
528
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
528
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
529
|
+
* carrier_iata: "carrier_iata"
|
|
529
530
|
* }]
|
|
530
531
|
* })
|
|
531
532
|
*/
|
|
@@ -52,5 +52,31 @@ export declare class Driver {
|
|
|
52
52
|
*/
|
|
53
53
|
updateV1(request: Chrt.LocationFeature, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
|
|
54
54
|
private __updateV1;
|
|
55
|
+
/**
|
|
56
|
+
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
57
|
+
*
|
|
58
|
+
* @param {Chrt.tracking.DriverByDriverDataPointClientCreate1} request
|
|
59
|
+
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.tracking.driver.updateV2({
|
|
65
|
+
* schema_version: 1,
|
|
66
|
+
* location: {
|
|
67
|
+
* type: "Feature",
|
|
68
|
+
* geometry: {
|
|
69
|
+
* type: "GeometryCollection",
|
|
70
|
+
* geometries: [{
|
|
71
|
+
* type: "LineString",
|
|
72
|
+
* coordinates: [[]]
|
|
73
|
+
* }]
|
|
74
|
+
* }
|
|
75
|
+
* },
|
|
76
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
updateV2(request: Chrt.tracking.DriverByDriverDataPointClientCreate1, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
|
|
80
|
+
private __updateV2;
|
|
55
81
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
56
82
|
}
|
|
@@ -126,6 +126,81 @@ class Driver {
|
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
131
|
+
*
|
|
132
|
+
* @param {Chrt.tracking.DriverByDriverDataPointClientCreate1} request
|
|
133
|
+
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* await client.tracking.driver.updateV2({
|
|
139
|
+
* schema_version: 1,
|
|
140
|
+
* location: {
|
|
141
|
+
* type: "Feature",
|
|
142
|
+
* geometry: {
|
|
143
|
+
* type: "GeometryCollection",
|
|
144
|
+
* geometries: [{
|
|
145
|
+
* type: "LineString",
|
|
146
|
+
* coordinates: [[]]
|
|
147
|
+
* }]
|
|
148
|
+
* }
|
|
149
|
+
* },
|
|
150
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
151
|
+
* })
|
|
152
|
+
*/
|
|
153
|
+
updateV2(request, requestOptions) {
|
|
154
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV2(request, requestOptions));
|
|
155
|
+
}
|
|
156
|
+
__updateV2(request, requestOptions) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a, _b, _c, _d;
|
|
159
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
160
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
161
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "tracking/driver/update/v2"),
|
|
162
|
+
method: "POST",
|
|
163
|
+
headers: _headers,
|
|
164
|
+
contentType: "application/json",
|
|
165
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
166
|
+
requestType: "json",
|
|
167
|
+
body: request,
|
|
168
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
169
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
170
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
171
|
+
});
|
|
172
|
+
if (_response.ok) {
|
|
173
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
174
|
+
}
|
|
175
|
+
if (_response.error.reason === "status-code") {
|
|
176
|
+
switch (_response.error.statusCode) {
|
|
177
|
+
case 422:
|
|
178
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
179
|
+
default:
|
|
180
|
+
throw new errors.ChrtError({
|
|
181
|
+
statusCode: _response.error.statusCode,
|
|
182
|
+
body: _response.error.body,
|
|
183
|
+
rawResponse: _response.rawResponse,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
switch (_response.error.reason) {
|
|
188
|
+
case "non-json":
|
|
189
|
+
throw new errors.ChrtError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.rawBody,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
case "timeout":
|
|
195
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/driver/update/v2.");
|
|
196
|
+
case "unknown":
|
|
197
|
+
throw new errors.ChrtError({
|
|
198
|
+
message: _response.error.errorMessage,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
129
204
|
_getAuthorizationHeader() {
|
|
130
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
206
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* schema_version: 1,
|
|
9
|
+
* location: {
|
|
10
|
+
* type: "Feature",
|
|
11
|
+
* geometry: {
|
|
12
|
+
* type: "GeometryCollection",
|
|
13
|
+
* geometries: [{
|
|
14
|
+
* type: "LineString",
|
|
15
|
+
* coordinates: [[]]
|
|
16
|
+
* }]
|
|
17
|
+
* }
|
|
18
|
+
* },
|
|
19
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
export interface DriverByDriverDataPointClientCreate1 {
|
|
23
|
+
schema_version: number;
|
|
24
|
+
location: Chrt.LocationFeature;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type DriverByDriverDataPointClientCreate1 } from "./DriverByDriverDataPointClientCreate1.js";
|
|
@@ -4,5 +4,6 @@ export * as sessions from "./sessions/index.js";
|
|
|
4
4
|
export * as sharingSettings from "./sharingSettings/index.js";
|
|
5
5
|
export * as timeseries from "./timeseries/index.js";
|
|
6
6
|
export * from "./devices/client/requests/index.js";
|
|
7
|
+
export * from "./driver/client/requests/index.js";
|
|
7
8
|
export * from "./sessions/client/requests/index.js";
|
|
8
9
|
export * from "./sharingSettings/client/requests/index.js";
|
|
@@ -43,5 +43,6 @@ exports.sessions = __importStar(require("./sessions/index.js"));
|
|
|
43
43
|
exports.sharingSettings = __importStar(require("./sharingSettings/index.js"));
|
|
44
44
|
exports.timeseries = __importStar(require("./timeseries/index.js"));
|
|
45
45
|
__exportStar(require("./devices/client/requests/index.js"), exports);
|
|
46
|
+
__exportStar(require("./driver/client/requests/index.js"), exports);
|
|
46
47
|
__exportStar(require("./sessions/client/requests/index.js"), exports);
|
|
47
48
|
__exportStar(require("./sharingSettings/client/requests/index.js"), exports);
|
|
@@ -20,8 +20,4 @@ export interface CargoAiTrackAndTraceUpdate1 {
|
|
|
20
20
|
_id: string;
|
|
21
21
|
receivedAt: string;
|
|
22
22
|
source: Chrt.CargoAiTrackAndTraceUpdateSourceEnum;
|
|
23
|
-
/** Must be a string starting with `user_` */
|
|
24
|
-
polledByUserId?: string | null;
|
|
25
|
-
/** Must be a string starting with `org_` */
|
|
26
|
-
polledByOrgId?: string | null;
|
|
27
23
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook"
|
|
5
|
-
export declare const CargoAiTrackAndTraceUpdateSourceEnum: {
|
|
6
|
-
readonly Webhook: "webhook";
|
|
7
|
-
readonly Poll: "poll";
|
|
8
|
-
};
|
|
4
|
+
export type CargoAiTrackAndTraceUpdateSourceEnum = "webhook";
|
|
@@ -3,8 +3,3 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CargoAiTrackAndTraceUpdateSourceEnum = void 0;
|
|
7
|
-
exports.CargoAiTrackAndTraceUpdateSourceEnum = {
|
|
8
|
-
Webhook: "webhook",
|
|
9
|
-
Poll: "poll",
|
|
10
|
-
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface DriverSelfReportedHoursAndMileage1 {
|
|
5
|
+
schema_version: number;
|
|
6
|
+
driver_id: string;
|
|
7
|
+
date: string;
|
|
8
|
+
hours_worked?: number | null;
|
|
9
|
+
miles_driven?: number | null;
|
|
10
|
+
/** Must be a string starting with `org_` */
|
|
11
|
+
org_id: string;
|
|
12
|
+
created_at_timestamp: string;
|
|
13
|
+
/** Must be a string starting with `user_` */
|
|
14
|
+
created_by_user_id: string;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
_id: string;
|
|
17
|
+
}
|
|
@@ -5,7 +5,12 @@ import * as Chrt from "../index.js";
|
|
|
5
5
|
export interface DriverStatsRes {
|
|
6
6
|
task_groups: Chrt.TaskGroup1[];
|
|
7
7
|
excluded_task_groups: Chrt.TaskGroup1[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/** Summed from task group in-progress intervals merged to eliminate double-counting of overlapping task groups. */
|
|
9
|
+
deduped_task_group_driver_hours: number;
|
|
10
|
+
overlapping_task_groups_detected: boolean;
|
|
11
|
+
/** Total mileage recorded for this driver across all tracked pings that fall within the requested query window. Independent of task group filtering or deduplication. i.e. includes pings inside and outside of task group time windows */
|
|
12
|
+
total_driver_mileage_tracked?: number | null;
|
|
13
|
+
/** Total mileage from pings that fall within task group in-progress merged intervals. i.e. excludes pings outside of merged task group time windows */
|
|
14
|
+
deduped_task_group_driver_mileage_tracked?: number | null;
|
|
15
|
+
self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1[];
|
|
11
16
|
}
|
|
@@ -12,7 +12,7 @@ export interface FlightLeg1 {
|
|
|
12
12
|
origin_iata: string;
|
|
13
13
|
destination_iata: string;
|
|
14
14
|
scheduled_departure_utc: string;
|
|
15
|
-
carrier_iata
|
|
15
|
+
carrier_iata: string;
|
|
16
16
|
carrier_icao?: string | null;
|
|
17
17
|
scheduled_arrival_utc?: string | null;
|
|
18
18
|
cirium_flight_id?: number | null;
|
|
@@ -9,7 +9,7 @@ export interface FlightLegClientCreate1 {
|
|
|
9
9
|
origin_iata: string;
|
|
10
10
|
destination_iata: string;
|
|
11
11
|
scheduled_departure_utc: string;
|
|
12
|
-
carrier_iata
|
|
12
|
+
carrier_iata: string;
|
|
13
13
|
carrier_icao?: string | null;
|
|
14
14
|
scheduled_arrival_utc?: string | null;
|
|
15
15
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
* A single reported (or derived) aircraft position along the flown trail.
|
|
6
|
-
*/
|
|
7
|
-
export interface FlightTrackPosition {
|
|
4
|
+
export interface FlightTrackPosition1 {
|
|
8
5
|
lat?: number | null;
|
|
9
6
|
lon?: number | null;
|
|
10
7
|
altitude_ft?: number | null;
|
|
@@ -13,8 +13,8 @@ import * as Chrt from "../index.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export interface FlightTrackRes {
|
|
15
15
|
cirium_flight_id?: number | null;
|
|
16
|
-
positions?: Chrt.
|
|
17
|
-
waypoints?: Chrt.
|
|
16
|
+
positions?: Chrt.FlightTrackPosition1[];
|
|
17
|
+
waypoints?: Chrt.FlightTrackWaypoint1[];
|
|
18
18
|
legacy_route?: string | null;
|
|
19
19
|
bearing?: number | null;
|
|
20
20
|
heading?: number | null;
|
package/dist/{esm/api/types/FlightTrackWaypoint.d.mts → cjs/api/types/FlightTrackWaypoint1.d.ts}
RENAMED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
* A lat/lon point on the published flight plan (the planned path).
|
|
6
|
-
*/
|
|
7
|
-
export interface FlightTrackWaypoint {
|
|
4
|
+
export interface FlightTrackWaypoint1 {
|
|
8
5
|
lat?: number | null;
|
|
9
6
|
lon?: number | null;
|
|
10
7
|
}
|
|
@@ -139,6 +139,8 @@ export * from "./DriverComplianceDocument1.js";
|
|
|
139
139
|
export * from "./DriverComplianceDocumentS3ObjectMetadata1.js";
|
|
140
140
|
export * from "./DriverComplianceDocumentTypeEnum1.js";
|
|
141
141
|
export * from "./DriverListRes.js";
|
|
142
|
+
export * from "./DriverSelfReportedHoursAndMileage1.js";
|
|
143
|
+
export * from "./DriverSelfReportedHoursAndMileageListRes.js";
|
|
142
144
|
export * from "./DriverStatsRes.js";
|
|
143
145
|
export * from "./DriverStatusEnum.js";
|
|
144
146
|
export * from "./DriverUpdateAvailabilityReq.js";
|
|
@@ -155,9 +157,9 @@ export * from "./FlightLegStatusEnum1.js";
|
|
|
155
157
|
export * from "./FlightLegStatusSourceEnum1.js";
|
|
156
158
|
export * from "./FlightLegWebhookInfo.js";
|
|
157
159
|
export * from "./FlightStatusEnum.js";
|
|
158
|
-
export * from "./
|
|
160
|
+
export * from "./FlightTrackPosition1.js";
|
|
159
161
|
export * from "./FlightTrackRes.js";
|
|
160
|
-
export * from "./
|
|
162
|
+
export * from "./FlightTrackWaypoint1.js";
|
|
161
163
|
export * from "./GeometryCollectionGeometriesItem.js";
|
|
162
164
|
export * from "./GeometryCollection.js";
|
|
163
165
|
export * from "./HttpValidationError.js";
|
|
@@ -155,6 +155,8 @@ __exportStar(require("./DriverComplianceDocument1.js"), exports);
|
|
|
155
155
|
__exportStar(require("./DriverComplianceDocumentS3ObjectMetadata1.js"), exports);
|
|
156
156
|
__exportStar(require("./DriverComplianceDocumentTypeEnum1.js"), exports);
|
|
157
157
|
__exportStar(require("./DriverListRes.js"), exports);
|
|
158
|
+
__exportStar(require("./DriverSelfReportedHoursAndMileage1.js"), exports);
|
|
159
|
+
__exportStar(require("./DriverSelfReportedHoursAndMileageListRes.js"), exports);
|
|
158
160
|
__exportStar(require("./DriverStatsRes.js"), exports);
|
|
159
161
|
__exportStar(require("./DriverStatusEnum.js"), exports);
|
|
160
162
|
__exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
|
|
@@ -171,9 +173,9 @@ __exportStar(require("./FlightLegStatusEnum1.js"), exports);
|
|
|
171
173
|
__exportStar(require("./FlightLegStatusSourceEnum1.js"), exports);
|
|
172
174
|
__exportStar(require("./FlightLegWebhookInfo.js"), exports);
|
|
173
175
|
__exportStar(require("./FlightStatusEnum.js"), exports);
|
|
174
|
-
__exportStar(require("./
|
|
176
|
+
__exportStar(require("./FlightTrackPosition1.js"), exports);
|
|
175
177
|
__exportStar(require("./FlightTrackRes.js"), exports);
|
|
176
|
-
__exportStar(require("./
|
|
178
|
+
__exportStar(require("./FlightTrackWaypoint1.js"), exports);
|
|
177
179
|
__exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
|
|
178
180
|
__exportStar(require("./GeometryCollection.js"), exports);
|
|
179
181
|
__exportStar(require("./HttpValidationError.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.760.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export class ChrtClient {
|
|
|
20
20
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
21
21
|
"X-Fern-Language": "JavaScript",
|
|
22
22
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
23
|
-
"X-Fern-SDK-Version": "1.
|
|
24
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
23
|
+
"X-Fern-SDK-Version": "1.760.0",
|
|
24
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.760.0",
|
|
25
25
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
26
26
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
27
27
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.d.mts
CHANGED
|
@@ -84,18 +84,5 @@ export declare class CargoaiTrackAndTrace {
|
|
|
84
84
|
*/
|
|
85
85
|
subscribeV1(request: Chrt.integrations.CargoAiTrackAndTraceSubscribeReq, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceSubscription1>;
|
|
86
86
|
private __subscribeV1;
|
|
87
|
-
/**
|
|
88
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
89
|
-
*
|
|
90
|
-
* @param {string} awb
|
|
91
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
-
*
|
|
93
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
97
|
-
*/
|
|
98
|
-
refreshV1(awb: string, requestOptions?: CargoaiTrackAndTrace.RequestOptions): core.HttpResponsePromise<Chrt.CargoAiTrackAndTraceUpdate1>;
|
|
99
|
-
private __refreshV1;
|
|
100
87
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
101
88
|
}
|
package/dist/esm/api/resources/integrations/resources/cargoaiTrackAndTrace/client/Client.mjs
CHANGED
|
@@ -269,65 +269,6 @@ export class CargoaiTrackAndTrace {
|
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
/**
|
|
273
|
-
* Polls CargoAi for the current tracking snapshot of an AWB and stores it as a new update (source=poll). No subscription required — any order participant can poll on demand. | authz: order participant | () -> (CargoAiTrackAndTraceUpdate1)
|
|
274
|
-
*
|
|
275
|
-
* @param {string} awb
|
|
276
|
-
* @param {CargoaiTrackAndTrace.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
-
*
|
|
278
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* await client.integrations.cargoaiTrackAndTrace.refreshV1("awb")
|
|
282
|
-
*/
|
|
283
|
-
refreshV1(awb, requestOptions) {
|
|
284
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshV1(awb, requestOptions));
|
|
285
|
-
}
|
|
286
|
-
__refreshV1(awb, requestOptions) {
|
|
287
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
-
var _a, _b, _c, _d;
|
|
289
|
-
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);
|
|
290
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
291
|
-
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, `integrations/cargoai_track_and_trace/refresh/v1/${encodeURIComponent(awb)}`),
|
|
292
|
-
method: "POST",
|
|
293
|
-
headers: _headers,
|
|
294
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
295
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
296
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
297
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
298
|
-
});
|
|
299
|
-
if (_response.ok) {
|
|
300
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
301
|
-
}
|
|
302
|
-
if (_response.error.reason === "status-code") {
|
|
303
|
-
switch (_response.error.statusCode) {
|
|
304
|
-
case 422:
|
|
305
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
306
|
-
default:
|
|
307
|
-
throw new errors.ChrtError({
|
|
308
|
-
statusCode: _response.error.statusCode,
|
|
309
|
-
body: _response.error.body,
|
|
310
|
-
rawResponse: _response.rawResponse,
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
switch (_response.error.reason) {
|
|
315
|
-
case "non-json":
|
|
316
|
-
throw new errors.ChrtError({
|
|
317
|
-
statusCode: _response.error.statusCode,
|
|
318
|
-
body: _response.error.rawBody,
|
|
319
|
-
rawResponse: _response.rawResponse,
|
|
320
|
-
});
|
|
321
|
-
case "timeout":
|
|
322
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/cargoai_track_and_trace/refresh/v1/{awb}.");
|
|
323
|
-
case "unknown":
|
|
324
|
-
throw new errors.ChrtError({
|
|
325
|
-
message: _response.error.errorMessage,
|
|
326
|
-
rawResponse: _response.rawResponse,
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
272
|
_getAuthorizationHeader() {
|
|
332
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
274
|
const bearer = yield core.Supplier.get(this._options.token);
|