@chrt-inc/typescript-sdk 1.331.0 → 1.333.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.d.ts +3 -0
- package/dist/cjs/Client.js +41 -36
- package/dist/cjs/api/resources/flights/client/Client.d.ts +47 -0
- package/dist/cjs/api/resources/flights/client/Client.js +127 -0
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +5 -7
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.js +8 -10
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +5 -7
- package/dist/cjs/api/resources/taskGroups/client/Client.js +8 -10
- package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/tracking/client/Client.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +10 -13
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +9 -12
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +0 -15
- package/dist/cjs/api/resources/tracking/resources/index.d.ts +2 -3
- package/dist/cjs/api/resources/tracking/resources/index.js +3 -4
- package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.d.ts +16 -16
- package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.js +11 -11
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/index.js +17 -0
- package/dist/cjs/api/types/FlightInfoForTaskRes.d.ts +10 -0
- package/dist/cjs/api/types/SetFlightInfoReq.d.ts +9 -0
- package/dist/cjs/api/types/Task1.d.ts +0 -1
- package/dist/cjs/api/types/TaskClientCreate1.d.ts +0 -1
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
- package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/flights/client/Client.d.mts +47 -0
- package/dist/esm/api/resources/flights/client/Client.mjs +90 -0
- package/dist/esm/api/resources/flights/client/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +5 -7
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.mjs +8 -10
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +5 -7
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +8 -10
- package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/tracking/client/Client.mjs +3 -3
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +10 -13
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +9 -12
- package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/index.d.mts +2 -3
- package/dist/esm/api/resources/tracking/resources/index.mjs +2 -3
- package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.d.mts +16 -16
- package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.mjs +9 -9
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/sharingSettings/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/sharingSettings/index.mjs +1 -0
- package/dist/esm/api/types/FlightInfoForTaskRes.d.mts +10 -0
- package/dist/esm/api/types/SetFlightInfoReq.d.mts +9 -0
- package/dist/esm/api/types/Task1.d.mts +0 -1
- package/dist/esm/api/types/TaskClientCreate1.d.mts +0 -1
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
- package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +97 -39
- package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.ts +0 -13
- package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.ts +0 -13
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.d.ts +0 -24
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.js +0 -5
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +0 -1
- package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.mts +0 -13
- package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +0 -13
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.d.mts +0 -24
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.mjs +0 -4
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +0 -1
- /package/dist/{esm/api/resources/tracking/resources/driver/client/requests/index.mjs → cjs/api/resources/flights/client/index.d.ts} +0 -0
- /package/dist/cjs/api/resources/{tracking/resources/driver/client/requests → flights/client}/index.js +0 -0
- /package/dist/cjs/api/resources/{tracking/resources/sharing → flights}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{tracking/resources/sharing → flights}/index.js +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.js +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.d.ts +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.js +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.d.ts +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.js +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.ts +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.js +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.js +0 -0
- /package/dist/cjs/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.js → types/FlightInfoForTaskRes.js} +0 -0
- /package/dist/cjs/api/{resources/taskGroups/client/requests/SetFlightNumberReq.js → types/SetFlightInfoReq.js} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sharing/client/requests/index.mjs → flights/client/index.d.mts} +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sharing → flights}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{tracking/resources/sharing → flights}/index.mjs +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.d.mts +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.mjs +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.d.mts +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.mjs +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.mts +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.mjs +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.d.mts +0 -0
- /package/dist/esm/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.mjs → types/FlightInfoForTaskRes.mjs} +0 -0
- /package/dist/esm/api/{resources/taskGroups/client/requests/SetFlightNumberReq.mjs → types/SetFlightInfoReq.mjs} +0 -0
|
@@ -56,25 +56,22 @@ class Driver {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Records driver location updates. Automatically writes to all IN_PROGRESS task groups and their associated cargos. Updates driver's last seen timestamp and location. | (DriverUpdateReq) -> (DriverUpdateRes)
|
|
59
|
+
* Records driver location updates. Automatically writes to all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. Updates driver's last seen timestamp and location. | (DriverUpdateReq) -> (DriverUpdateRes)
|
|
60
60
|
*
|
|
61
|
-
* @param {Chrt.
|
|
61
|
+
* @param {Chrt.LocationFeature} request
|
|
62
62
|
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
67
|
* await client.tracking.driver.updateV1({
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* type: "
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* coordinates: [[]]
|
|
76
|
-
* }]
|
|
77
|
-
* }
|
|
68
|
+
* type: "Feature",
|
|
69
|
+
* geometry: {
|
|
70
|
+
* type: "GeometryCollection",
|
|
71
|
+
* geometries: [{
|
|
72
|
+
* type: "LineString",
|
|
73
|
+
* coordinates: [[]]
|
|
74
|
+
* }]
|
|
78
75
|
* }
|
|
79
76
|
* })
|
|
80
77
|
*/
|
|
@@ -1,17 +1,2 @@
|
|
|
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
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export * as devices from "./devices/index.js";
|
|
2
2
|
export * as driver from "./driver/index.js";
|
|
3
3
|
export * as sessions from "./sessions/index.js";
|
|
4
|
-
export * as
|
|
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";
|
|
8
7
|
export * from "./sessions/client/requests/index.js";
|
|
9
|
-
export * from "./
|
|
8
|
+
export * from "./sharingSettings/client/requests/index.js";
|
|
@@ -36,13 +36,12 @@ 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.timeseries = exports.
|
|
39
|
+
exports.timeseries = exports.sharingSettings = exports.sessions = exports.driver = exports.devices = void 0;
|
|
40
40
|
exports.devices = __importStar(require("./devices/index.js"));
|
|
41
41
|
exports.driver = __importStar(require("./driver/index.js"));
|
|
42
42
|
exports.sessions = __importStar(require("./sessions/index.js"));
|
|
43
|
-
exports.
|
|
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);
|
|
47
46
|
__exportStar(require("./sessions/client/requests/index.js"), exports);
|
|
48
|
-
__exportStar(require("./
|
|
47
|
+
__exportStar(require("./sharingSettings/client/requests/index.js"), exports);
|
package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.d.ts
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../core/index.js";
|
|
6
6
|
import * as Chrt from "../../../../../index.js";
|
|
7
|
-
export declare namespace
|
|
7
|
+
export declare namespace SharingSettings {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -27,74 +27,74 @@ export declare namespace Sharing {
|
|
|
27
27
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export declare class
|
|
31
|
-
protected readonly _options:
|
|
32
|
-
constructor(_options?:
|
|
30
|
+
export declare class SharingSettings {
|
|
31
|
+
protected readonly _options: SharingSettings.Options;
|
|
32
|
+
constructor(_options?: SharingSettings.Options);
|
|
33
33
|
/**
|
|
34
34
|
* Get all tracking datasets and their sharing settings for a given order. | authz_personas=[shipper_org_operators, forwarder_org_operators, courier_org_operators] | () -> (list[TrackingSharingSettingsRes])
|
|
35
35
|
*
|
|
36
36
|
* @param {string} orderIdOrShortId
|
|
37
|
-
* @param {
|
|
37
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.tracking.
|
|
42
|
+
* await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
|
|
43
43
|
*/
|
|
44
|
-
getSettingsV1(orderIdOrShortId: string, requestOptions?:
|
|
44
|
+
getSettingsV1(orderIdOrShortId: string, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSharingSettingsRes[]>;
|
|
45
45
|
private __getSettingsV1;
|
|
46
46
|
/**
|
|
47
47
|
* Updates the sharing settings for a task group by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (TaskGroupByDriverSharingSettingsUpdateReq) -> (TaskGroupByDriverSharingSettings1)
|
|
48
48
|
*
|
|
49
49
|
* @param {Chrt.tracking.TaskGroupByDriverSharingSettingsUpdateReq} request
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
51
|
*
|
|
52
52
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
* await client.tracking.
|
|
55
|
+
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
56
56
|
* task_group_id: "task_group_id",
|
|
57
57
|
* driver_id: "driver_id",
|
|
58
58
|
* "public": true
|
|
59
59
|
* })
|
|
60
60
|
*/
|
|
61
|
-
taskGroupByDriverSharingSettingsV1(request: Chrt.tracking.TaskGroupByDriverSharingSettingsUpdateReq, requestOptions?:
|
|
61
|
+
taskGroupByDriverSharingSettingsV1(request: Chrt.tracking.TaskGroupByDriverSharingSettingsUpdateReq, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupByDriverSharingSettings1>;
|
|
62
62
|
private __taskGroupByDriverSharingSettingsV1;
|
|
63
63
|
/**
|
|
64
64
|
* Updates the sharing settings for a cargo by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (CargoByDriverSharingSettingsUpdateReq) -> (CargoByDriverSharingSettings1)
|
|
65
65
|
*
|
|
66
66
|
* @param {Chrt.tracking.CargoByDriverSharingSettingsUpdateReq} request
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
68
|
*
|
|
69
69
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
|
-
* await client.tracking.
|
|
72
|
+
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
73
73
|
* task_group_id: "task_group_id",
|
|
74
74
|
* cargo_id: "cargo_id",
|
|
75
75
|
* driver_id: "driver_id",
|
|
76
76
|
* "public": true
|
|
77
77
|
* })
|
|
78
78
|
*/
|
|
79
|
-
cargoByDriverSettingsV1(request: Chrt.tracking.CargoByDriverSharingSettingsUpdateReq, requestOptions?:
|
|
79
|
+
cargoByDriverSettingsV1(request: Chrt.tracking.CargoByDriverSharingSettingsUpdateReq, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.CargoByDriverSharingSettings1>;
|
|
80
80
|
private __cargoByDriverSettingsV1;
|
|
81
81
|
/**
|
|
82
82
|
* Updates the sharing settings for a cargo by device tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, order_creator_org_operators] | (CargoByDeviceSharingSettingsUpdateReq) -> (CargoByDeviceSharingSettings1)
|
|
83
83
|
*
|
|
84
84
|
* @param {Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq} request
|
|
85
|
-
* @param {
|
|
85
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
86
|
*
|
|
87
87
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
|
-
* await client.tracking.
|
|
90
|
+
* await client.tracking.sharingSettings.cargoByDeviceSettingsV1({
|
|
91
91
|
* task_group_id: "task_group_id",
|
|
92
92
|
* cargo_id: "cargo_id",
|
|
93
93
|
* device_id: "device_id",
|
|
94
94
|
* "public": true
|
|
95
95
|
* })
|
|
96
96
|
*/
|
|
97
|
-
cargoByDeviceSettingsV1(request: Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq, requestOptions?:
|
|
97
|
+
cargoByDeviceSettingsV1(request: Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.CargoByDeviceSharingSettings1>;
|
|
98
98
|
private __cargoByDeviceSettingsV1;
|
|
99
99
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
100
|
}
|
package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.js
RENAMED
|
@@ -45,13 +45,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.SharingSettings = void 0;
|
|
49
49
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
50
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
51
|
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
-
class
|
|
54
|
+
class SharingSettings {
|
|
55
55
|
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
@@ -59,12 +59,12 @@ class Sharing {
|
|
|
59
59
|
* Get all tracking datasets and their sharing settings for a given order. | authz_personas=[shipper_org_operators, forwarder_org_operators, courier_org_operators] | () -> (list[TrackingSharingSettingsRes])
|
|
60
60
|
*
|
|
61
61
|
* @param {string} orderIdOrShortId
|
|
62
|
-
* @param {
|
|
62
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
|
-
* await client.tracking.
|
|
67
|
+
* await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
|
|
68
68
|
*/
|
|
69
69
|
getSettingsV1(orderIdOrShortId, requestOptions) {
|
|
70
70
|
return core.HttpResponsePromise.fromPromise(this.__getSettingsV1(orderIdOrShortId, requestOptions));
|
|
@@ -118,12 +118,12 @@ class Sharing {
|
|
|
118
118
|
* Updates the sharing settings for a task group by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (TaskGroupByDriverSharingSettingsUpdateReq) -> (TaskGroupByDriverSharingSettings1)
|
|
119
119
|
*
|
|
120
120
|
* @param {Chrt.tracking.TaskGroupByDriverSharingSettingsUpdateReq} request
|
|
121
|
-
* @param {
|
|
121
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
122
|
*
|
|
123
123
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
124
|
*
|
|
125
125
|
* @example
|
|
126
|
-
* await client.tracking.
|
|
126
|
+
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
127
127
|
* task_group_id: "task_group_id",
|
|
128
128
|
* driver_id: "driver_id",
|
|
129
129
|
* "public": true
|
|
@@ -187,12 +187,12 @@ class Sharing {
|
|
|
187
187
|
* Updates the sharing settings for a cargo by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (CargoByDriverSharingSettingsUpdateReq) -> (CargoByDriverSharingSettings1)
|
|
188
188
|
*
|
|
189
189
|
* @param {Chrt.tracking.CargoByDriverSharingSettingsUpdateReq} request
|
|
190
|
-
* @param {
|
|
190
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
191
|
*
|
|
192
192
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
193
193
|
*
|
|
194
194
|
* @example
|
|
195
|
-
* await client.tracking.
|
|
195
|
+
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
196
196
|
* task_group_id: "task_group_id",
|
|
197
197
|
* cargo_id: "cargo_id",
|
|
198
198
|
* driver_id: "driver_id",
|
|
@@ -254,12 +254,12 @@ class Sharing {
|
|
|
254
254
|
* Updates the sharing settings for a cargo by device tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, order_creator_org_operators] | (CargoByDeviceSharingSettingsUpdateReq) -> (CargoByDeviceSharingSettings1)
|
|
255
255
|
*
|
|
256
256
|
* @param {Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq} request
|
|
257
|
-
* @param {
|
|
257
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
258
258
|
*
|
|
259
259
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
260
260
|
*
|
|
261
261
|
* @example
|
|
262
|
-
* await client.tracking.
|
|
262
|
+
* await client.tracking.sharingSettings.cargoByDeviceSettingsV1({
|
|
263
263
|
* task_group_id: "task_group_id",
|
|
264
264
|
* cargo_id: "cargo_id",
|
|
265
265
|
* device_id: "device_id",
|
|
@@ -327,4 +327,4 @@ class Sharing {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
exports.
|
|
330
|
+
exports.SharingSettings = SharingSettings;
|
|
@@ -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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface SetFlightInfoReq {
|
|
5
|
+
/** Flight number to set on the task group */
|
|
6
|
+
flight_number?: string | null;
|
|
7
|
+
/** Flight Aware's uuid for flights */
|
|
8
|
+
fa_flight_id?: string | null;
|
|
9
|
+
}
|
|
@@ -9,7 +9,6 @@ export interface TaskClientCreate1 {
|
|
|
9
9
|
time_windows?: Chrt.TimeWindow1[];
|
|
10
10
|
order_placer_comments?: string | null;
|
|
11
11
|
shipper_contact_ids?: string[];
|
|
12
|
-
flight_number?: string | null;
|
|
13
12
|
}
|
|
14
13
|
export declare namespace TaskClientCreate1 {
|
|
15
14
|
type Action = Chrt.ChrtGroundCourierTaskActionEnum1 | Chrt.FlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
|
|
@@ -7,7 +7,6 @@ export interface TaskClientUpdate1 {
|
|
|
7
7
|
action?: TaskClientUpdate1.Action | null;
|
|
8
8
|
time_windows?: Chrt.TimeWindow1[];
|
|
9
9
|
shipper_contact_ids?: string[];
|
|
10
|
-
flight_number?: string | null;
|
|
11
10
|
}
|
|
12
11
|
export declare namespace TaskClientUpdate1 {
|
|
13
12
|
type Action = Chrt.ChrtGroundCourierTaskActionEnum1 | Chrt.FlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
|
|
@@ -37,6 +37,7 @@ export * from "./Driver1.js";
|
|
|
37
37
|
export * from "./DriverStatusEnum.js";
|
|
38
38
|
export * from "./DriverUpdateAvailabilityReq.js";
|
|
39
39
|
export * from "./DriverUpdateRes.js";
|
|
40
|
+
export * from "./FlightInfoForTaskRes.js";
|
|
40
41
|
export * from "./FlightTaskActionEnum1.js";
|
|
41
42
|
export * from "./ForwarderConnectionRes.js";
|
|
42
43
|
export * from "./ForwarderCourierConnection1.js";
|
|
@@ -92,6 +93,7 @@ export * from "./SessionByDeviceDataPoint1.js";
|
|
|
92
93
|
export * from "./SessionByDeviceDataPointMetadata1.js";
|
|
93
94
|
export * from "./SessionByDeviceMarkOutliersResponse1.js";
|
|
94
95
|
export * from "./SessionDeleteResponse1.js";
|
|
96
|
+
export * from "./SetFlightInfoReq.js";
|
|
95
97
|
export * from "./ShipperConnectionRes.js";
|
|
96
98
|
export * from "./ShipperContact1.js";
|
|
97
99
|
export * from "./ShipperContactClientCreate1.js";
|
|
@@ -53,6 +53,7 @@ __exportStar(require("./Driver1.js"), exports);
|
|
|
53
53
|
__exportStar(require("./DriverStatusEnum.js"), exports);
|
|
54
54
|
__exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
|
|
55
55
|
__exportStar(require("./DriverUpdateRes.js"), exports);
|
|
56
|
+
__exportStar(require("./FlightInfoForTaskRes.js"), exports);
|
|
56
57
|
__exportStar(require("./FlightTaskActionEnum1.js"), exports);
|
|
57
58
|
__exportStar(require("./ForwarderConnectionRes.js"), exports);
|
|
58
59
|
__exportStar(require("./ForwarderCourierConnection1.js"), exports);
|
|
@@ -108,6 +109,7 @@ __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
|
|
|
108
109
|
__exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
|
|
109
110
|
__exportStar(require("./SessionByDeviceMarkOutliersResponse1.js"), exports);
|
|
110
111
|
__exportStar(require("./SessionDeleteResponse1.js"), exports);
|
|
112
|
+
__exportStar(require("./SetFlightInfoReq.js"), exports);
|
|
111
113
|
__exportStar(require("./ShipperConnectionRes.js"), exports);
|
|
112
114
|
__exportStar(require("./ShipperContact1.js"), exports);
|
|
113
115
|
__exportStar(require("./ShipperContactClientCreate1.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.333.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ import { ShipperPayCourierStatements } from "./api/resources/shipperPayCourierSt
|
|
|
15
15
|
import { Connections } from "./api/resources/connections/client/Client.mjs";
|
|
16
16
|
import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.mjs";
|
|
17
17
|
import { Dev } from "./api/resources/dev/client/Client.mjs";
|
|
18
|
+
import { Flights } from "./api/resources/flights/client/Client.mjs";
|
|
18
19
|
import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.mjs";
|
|
19
20
|
import { Drivers } from "./api/resources/drivers/client/Client.mjs";
|
|
20
21
|
import { Cargos } from "./api/resources/cargos/client/Client.mjs";
|
|
@@ -69,6 +70,7 @@ export declare class ChrtClient {
|
|
|
69
70
|
protected _connections: Connections | undefined;
|
|
70
71
|
protected _orgProfiles: OrgProfiles | undefined;
|
|
71
72
|
protected _dev: Dev | undefined;
|
|
73
|
+
protected _flights: Flights | undefined;
|
|
72
74
|
protected _taskArtifactNotifications: TaskArtifactNotifications | undefined;
|
|
73
75
|
protected _drivers: Drivers | undefined;
|
|
74
76
|
protected _cargos: Cargos | undefined;
|
|
@@ -99,6 +101,7 @@ export declare class ChrtClient {
|
|
|
99
101
|
get connections(): Connections;
|
|
100
102
|
get orgProfiles(): OrgProfiles;
|
|
101
103
|
get dev(): Dev;
|
|
104
|
+
get flights(): Flights;
|
|
102
105
|
get taskArtifactNotifications(): TaskArtifactNotifications;
|
|
103
106
|
get drivers(): Drivers;
|
|
104
107
|
get cargos(): Cargos;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import { ShipperPayCourierStatements } from "./api/resources/shipperPayCourierSt
|
|
|
15
15
|
import { Connections } from "./api/resources/connections/client/Client.mjs";
|
|
16
16
|
import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.mjs";
|
|
17
17
|
import { Dev } from "./api/resources/dev/client/Client.mjs";
|
|
18
|
+
import { Flights } from "./api/resources/flights/client/Client.mjs";
|
|
18
19
|
import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.mjs";
|
|
19
20
|
import { Drivers } from "./api/resources/drivers/client/Client.mjs";
|
|
20
21
|
import { Cargos } from "./api/resources/cargos/client/Client.mjs";
|
|
@@ -37,8 +38,8 @@ export class ChrtClient {
|
|
|
37
38
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
38
39
|
"X-Fern-Language": "JavaScript",
|
|
39
40
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
40
|
-
"X-Fern-SDK-Version": "1.
|
|
41
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
41
|
+
"X-Fern-SDK-Version": "1.333.0",
|
|
42
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.333.0",
|
|
42
43
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
43
44
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
44
45
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -91,6 +92,10 @@ export class ChrtClient {
|
|
|
91
92
|
var _a;
|
|
92
93
|
return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Dev(this._options)));
|
|
93
94
|
}
|
|
95
|
+
get flights() {
|
|
96
|
+
var _a;
|
|
97
|
+
return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Flights(this._options)));
|
|
98
|
+
}
|
|
94
99
|
get taskArtifactNotifications() {
|
|
95
100
|
var _a;
|
|
96
101
|
return ((_a = this._taskArtifactNotifications) !== null && _a !== void 0 ? _a : (this._taskArtifactNotifications = new TaskArtifactNotifications(this._options)));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../index.mjs";
|
|
7
|
+
export declare namespace Flights {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class Flights {
|
|
31
|
+
protected readonly _options: Flights.Options;
|
|
32
|
+
constructor(_options?: Flights.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskId
|
|
37
|
+
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.flights.getFlightInfoForTaskV1("task_id")
|
|
43
|
+
*/
|
|
44
|
+
getFlightInfoForTaskV1(taskId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
|
|
45
|
+
private __getFlightInfoForTaskV1;
|
|
46
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
* Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} taskId
|
|
26
|
+
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.flights.getFlightInfoForTaskV1("task_id")
|
|
32
|
+
*/
|
|
33
|
+
getFlightInfoForTaskV1(taskId, requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__getFlightInfoForTaskV1(taskId, requestOptions));
|
|
35
|
+
}
|
|
36
|
+
__getFlightInfoForTaskV1(taskId, requestOptions) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
|
+
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);
|
|
40
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
41
|
+
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/flight_info/for_task/v1/${encodeURIComponent(taskId)}`),
|
|
42
|
+
method: "GET",
|
|
43
|
+
headers: _headers,
|
|
44
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
46
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
});
|
|
49
|
+
if (_response.ok) {
|
|
50
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
51
|
+
}
|
|
52
|
+
if (_response.error.reason === "status-code") {
|
|
53
|
+
switch (_response.error.statusCode) {
|
|
54
|
+
case 422:
|
|
55
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
56
|
+
default:
|
|
57
|
+
throw new errors.ChrtError({
|
|
58
|
+
statusCode: _response.error.statusCode,
|
|
59
|
+
body: _response.error.body,
|
|
60
|
+
rawResponse: _response.rawResponse,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
switch (_response.error.reason) {
|
|
65
|
+
case "non-json":
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
statusCode: _response.error.statusCode,
|
|
68
|
+
body: _response.error.rawBody,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
});
|
|
71
|
+
case "timeout":
|
|
72
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /flights/flight_info/for_task/v1/{task_id}.");
|
|
73
|
+
case "unknown":
|
|
74
|
+
throw new errors.ChrtError({
|
|
75
|
+
message: _response.error.errorMessage,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
_getAuthorizationHeader() {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
84
|
+
if (bearer != null) {
|
|
85
|
+
return `Bearer ${bearer}`;
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,6 +14,7 @@ export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/inde
|
|
|
14
14
|
export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.mjs";
|
|
15
15
|
export * as orgProfiles from "./orgProfiles/index.mjs";
|
|
16
16
|
export * as dev from "./dev/index.mjs";
|
|
17
|
+
export * as flights from "./flights/index.mjs";
|
|
17
18
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
|
|
18
19
|
export * as drivers from "./drivers/index.mjs";
|
|
19
20
|
export * as cargos from "./cargos/index.mjs";
|
|
@@ -14,6 +14,7 @@ export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/inde
|
|
|
14
14
|
export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.mjs";
|
|
15
15
|
export * as orgProfiles from "./orgProfiles/index.mjs";
|
|
16
16
|
export * as dev from "./dev/index.mjs";
|
|
17
|
+
export * as flights from "./flights/index.mjs";
|
|
17
18
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mjs";
|
|
18
19
|
export * as drivers from "./drivers/index.mjs";
|
|
19
20
|
export * as cargos from "./cargos/index.mjs";
|