@chrt-inc/typescript-sdk 1.331.0 → 1.334.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +41 -36
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +0 -24
- package/dist/cjs/api/resources/drivers/client/Client.js +0 -73
- package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +0 -1
- 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 +17 -17
- 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/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.js +10 -10
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.js +8 -8
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.js +10 -10
- package/dist/cjs/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.js +8 -8
- 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/drivers/client/Client.d.mts +0 -24
- package/dist/esm/api/resources/drivers/client/Client.mjs +0 -73
- package/dist/esm/api/resources/drivers/client/requests/index.d.mts +0 -1
- 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 +15 -15
- 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/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.mjs +10 -10
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.mjs +8 -8
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.mjs +10 -10
- package/dist/esm/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.mjs +8 -8
- 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 -115
- package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +0 -23
- 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/taskGroups/client/requests/SetFlightNumberReq.js +0 -5
- 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/drivers/client/requests/DriverLastSeenReq.d.mts +0 -23
- 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/taskGroups/client/requests/SetFlightNumberReq.mjs +0 -4
- 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/drivers/client/requests/DriverLastSeenReq.js → types/FlightInfoForTaskRes.js} +0 -0
- /package/dist/cjs/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.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/drivers/client/requests/DriverLastSeenReq.mjs → types/FlightInfoForTaskRes.mjs} +0 -0
- /package/dist/esm/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.mjs → types/SetFlightInfoReq.mjs} +0 -0
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { ShipperPayCourierStatements } from "./api/resources/shipperPayCourierSt
|
|
|
15
15
|
import { Connections } from "./api/resources/connections/client/Client.js";
|
|
16
16
|
import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.js";
|
|
17
17
|
import { Dev } from "./api/resources/dev/client/Client.js";
|
|
18
|
+
import { Flights } from "./api/resources/flights/client/Client.js";
|
|
18
19
|
import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.js";
|
|
19
20
|
import { Drivers } from "./api/resources/drivers/client/Client.js";
|
|
20
21
|
import { Cargos } from "./api/resources/cargos/client/Client.js";
|
|
@@ -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/cjs/Client.js
CHANGED
|
@@ -51,30 +51,31 @@ const Client_js_9 = require("./api/resources/shipperPayCourierStatements/client/
|
|
|
51
51
|
const Client_js_10 = require("./api/resources/connections/client/Client.js");
|
|
52
52
|
const Client_js_11 = require("./api/resources/orgProfiles/client/Client.js");
|
|
53
53
|
const Client_js_12 = require("./api/resources/dev/client/Client.js");
|
|
54
|
-
const Client_js_13 = require("./api/resources/
|
|
55
|
-
const Client_js_14 = require("./api/resources/
|
|
56
|
-
const Client_js_15 = require("./api/resources/
|
|
57
|
-
const Client_js_16 = require("./api/resources/
|
|
58
|
-
const Client_js_17 = require("./api/resources/
|
|
59
|
-
const Client_js_18 = require("./api/resources/
|
|
60
|
-
const Client_js_19 = require("./api/resources/
|
|
61
|
-
const Client_js_20 = require("./api/resources/
|
|
62
|
-
const Client_js_21 = require("./api/resources/
|
|
63
|
-
const Client_js_22 = require("./api/resources/
|
|
64
|
-
const Client_js_23 = require("./api/resources/
|
|
65
|
-
const Client_js_24 = require("./api/resources/
|
|
66
|
-
const Client_js_25 = require("./api/resources/
|
|
67
|
-
const Client_js_26 = require("./api/resources/
|
|
68
|
-
const Client_js_27 = require("./api/resources/
|
|
69
|
-
const Client_js_28 = require("./api/resources/
|
|
70
|
-
const Client_js_29 = require("./api/resources/
|
|
54
|
+
const Client_js_13 = require("./api/resources/flights/client/Client.js");
|
|
55
|
+
const Client_js_14 = require("./api/resources/taskArtifactNotifications/client/Client.js");
|
|
56
|
+
const Client_js_15 = require("./api/resources/drivers/client/Client.js");
|
|
57
|
+
const Client_js_16 = require("./api/resources/cargos/client/Client.js");
|
|
58
|
+
const Client_js_17 = require("./api/resources/taskArtifacts/client/Client.js");
|
|
59
|
+
const Client_js_18 = require("./api/resources/offChrtShipperOrg/client/Client.js");
|
|
60
|
+
const Client_js_19 = require("./api/resources/orders/client/Client.js");
|
|
61
|
+
const Client_js_20 = require("./api/resources/orderDrafts/client/Client.js");
|
|
62
|
+
const Client_js_21 = require("./api/resources/taskGroups/client/Client.js");
|
|
63
|
+
const Client_js_22 = require("./api/resources/tasks/client/Client.js");
|
|
64
|
+
const Client_js_23 = require("./api/resources/shipperContactInfo/client/Client.js");
|
|
65
|
+
const Client_js_24 = require("./api/resources/orgs/client/Client.js");
|
|
66
|
+
const Client_js_25 = require("./api/resources/root/client/Client.js");
|
|
67
|
+
const Client_js_26 = require("./api/resources/users/client/Client.js");
|
|
68
|
+
const Client_js_27 = require("./api/resources/utils/client/Client.js");
|
|
69
|
+
const Client_js_28 = require("./api/resources/notifications/client/Client.js");
|
|
70
|
+
const Client_js_29 = require("./api/resources/orgInfoForConnections/client/Client.js");
|
|
71
|
+
const Client_js_30 = require("./api/resources/tracking/client/Client.js");
|
|
71
72
|
class ChrtClient {
|
|
72
73
|
constructor(_options = {}) {
|
|
73
74
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
74
75
|
"X-Fern-Language": "JavaScript",
|
|
75
76
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
76
|
-
"X-Fern-SDK-Version": "1.
|
|
77
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
77
|
+
"X-Fern-SDK-Version": "1.334.0",
|
|
78
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.334.0",
|
|
78
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
81
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -127,73 +128,77 @@ class ChrtClient {
|
|
|
127
128
|
var _a;
|
|
128
129
|
return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Client_js_12.Dev(this._options)));
|
|
129
130
|
}
|
|
131
|
+
get flights() {
|
|
132
|
+
var _a;
|
|
133
|
+
return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Client_js_13.Flights(this._options)));
|
|
134
|
+
}
|
|
130
135
|
get taskArtifactNotifications() {
|
|
131
136
|
var _a;
|
|
132
|
-
return ((_a = this._taskArtifactNotifications) !== null && _a !== void 0 ? _a : (this._taskArtifactNotifications = new
|
|
137
|
+
return ((_a = this._taskArtifactNotifications) !== null && _a !== void 0 ? _a : (this._taskArtifactNotifications = new Client_js_14.TaskArtifactNotifications(this._options)));
|
|
133
138
|
}
|
|
134
139
|
get drivers() {
|
|
135
140
|
var _a;
|
|
136
|
-
return ((_a = this._drivers) !== null && _a !== void 0 ? _a : (this._drivers = new
|
|
141
|
+
return ((_a = this._drivers) !== null && _a !== void 0 ? _a : (this._drivers = new Client_js_15.Drivers(this._options)));
|
|
137
142
|
}
|
|
138
143
|
get cargos() {
|
|
139
144
|
var _a;
|
|
140
|
-
return ((_a = this._cargos) !== null && _a !== void 0 ? _a : (this._cargos = new
|
|
145
|
+
return ((_a = this._cargos) !== null && _a !== void 0 ? _a : (this._cargos = new Client_js_16.Cargos(this._options)));
|
|
141
146
|
}
|
|
142
147
|
get taskArtifacts() {
|
|
143
148
|
var _a;
|
|
144
|
-
return ((_a = this._taskArtifacts) !== null && _a !== void 0 ? _a : (this._taskArtifacts = new
|
|
149
|
+
return ((_a = this._taskArtifacts) !== null && _a !== void 0 ? _a : (this._taskArtifacts = new Client_js_17.TaskArtifacts(this._options)));
|
|
145
150
|
}
|
|
146
151
|
get offChrtShipperOrg() {
|
|
147
152
|
var _a;
|
|
148
|
-
return ((_a = this._offChrtShipperOrg) !== null && _a !== void 0 ? _a : (this._offChrtShipperOrg = new
|
|
153
|
+
return ((_a = this._offChrtShipperOrg) !== null && _a !== void 0 ? _a : (this._offChrtShipperOrg = new Client_js_18.OffChrtShipperOrg(this._options)));
|
|
149
154
|
}
|
|
150
155
|
get orders() {
|
|
151
156
|
var _a;
|
|
152
|
-
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new
|
|
157
|
+
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_19.Orders(this._options)));
|
|
153
158
|
}
|
|
154
159
|
get orderDrafts() {
|
|
155
160
|
var _a;
|
|
156
|
-
return ((_a = this._orderDrafts) !== null && _a !== void 0 ? _a : (this._orderDrafts = new
|
|
161
|
+
return ((_a = this._orderDrafts) !== null && _a !== void 0 ? _a : (this._orderDrafts = new Client_js_20.OrderDrafts(this._options)));
|
|
157
162
|
}
|
|
158
163
|
get taskGroups() {
|
|
159
164
|
var _a;
|
|
160
|
-
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new
|
|
165
|
+
return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new Client_js_21.TaskGroups(this._options)));
|
|
161
166
|
}
|
|
162
167
|
get tasks() {
|
|
163
168
|
var _a;
|
|
164
|
-
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new
|
|
169
|
+
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_22.Tasks(this._options)));
|
|
165
170
|
}
|
|
166
171
|
get shipperContactInfo() {
|
|
167
172
|
var _a;
|
|
168
|
-
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new
|
|
173
|
+
return ((_a = this._shipperContactInfo) !== null && _a !== void 0 ? _a : (this._shipperContactInfo = new Client_js_23.ShipperContactInfo(this._options)));
|
|
169
174
|
}
|
|
170
175
|
get orgs() {
|
|
171
176
|
var _a;
|
|
172
|
-
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new
|
|
177
|
+
return ((_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Client_js_24.Orgs(this._options)));
|
|
173
178
|
}
|
|
174
179
|
get root() {
|
|
175
180
|
var _a;
|
|
176
|
-
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new
|
|
181
|
+
return ((_a = this._root) !== null && _a !== void 0 ? _a : (this._root = new Client_js_25.Root(this._options)));
|
|
177
182
|
}
|
|
178
183
|
get users() {
|
|
179
184
|
var _a;
|
|
180
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
185
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_26.Users(this._options)));
|
|
181
186
|
}
|
|
182
187
|
get utils() {
|
|
183
188
|
var _a;
|
|
184
|
-
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new
|
|
189
|
+
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_27.Utils(this._options)));
|
|
185
190
|
}
|
|
186
191
|
get notifications() {
|
|
187
192
|
var _a;
|
|
188
|
-
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new
|
|
193
|
+
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_28.Notifications(this._options)));
|
|
189
194
|
}
|
|
190
195
|
get orgInfoForConnections() {
|
|
191
196
|
var _a;
|
|
192
|
-
return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new
|
|
197
|
+
return ((_a = this._orgInfoForConnections) !== null && _a !== void 0 ? _a : (this._orgInfoForConnections = new Client_js_29.OrgInfoForConnections(this._options)));
|
|
193
198
|
}
|
|
194
199
|
get tracking() {
|
|
195
200
|
var _a;
|
|
196
|
-
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new
|
|
201
|
+
return ((_a = this._tracking) !== null && _a !== void 0 ? _a : (this._tracking = new Client_js_30.Tracking(this._options)));
|
|
197
202
|
}
|
|
198
203
|
}
|
|
199
204
|
exports.ChrtClient = ChrtClient;
|
|
@@ -115,30 +115,6 @@ export declare class Drivers {
|
|
|
115
115
|
*/
|
|
116
116
|
updateV1(driverId: string, request?: Chrt.DriverClientUpdate1, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
117
117
|
private __updateV1;
|
|
118
|
-
/**
|
|
119
|
-
* Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
|
|
120
|
-
*
|
|
121
|
-
* @param {Chrt.DriverLastSeenReq} request
|
|
122
|
-
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
-
*
|
|
124
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* await client.drivers.updateLastSeenV1({
|
|
128
|
-
* location: {
|
|
129
|
-
* type: "Feature",
|
|
130
|
-
* geometry: {
|
|
131
|
-
* type: "GeometryCollection",
|
|
132
|
-
* geometries: [{
|
|
133
|
-
* type: "LineString",
|
|
134
|
-
* coordinates: [[]]
|
|
135
|
-
* }]
|
|
136
|
-
* }
|
|
137
|
-
* }
|
|
138
|
-
* })
|
|
139
|
-
*/
|
|
140
|
-
updateLastSeenV1(request: Chrt.DriverLastSeenReq, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
141
|
-
private __updateLastSeenV1;
|
|
142
118
|
/**
|
|
143
119
|
* Clears the driver's last known location and timestamp. | () -> (bool)
|
|
144
120
|
*
|
|
@@ -449,79 +449,6 @@ class Drivers {
|
|
|
449
449
|
}
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
|
-
/**
|
|
453
|
-
* Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
|
|
454
|
-
*
|
|
455
|
-
* @param {Chrt.DriverLastSeenReq} request
|
|
456
|
-
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
457
|
-
*
|
|
458
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
459
|
-
*
|
|
460
|
-
* @example
|
|
461
|
-
* await client.drivers.updateLastSeenV1({
|
|
462
|
-
* location: {
|
|
463
|
-
* type: "Feature",
|
|
464
|
-
* geometry: {
|
|
465
|
-
* type: "GeometryCollection",
|
|
466
|
-
* geometries: [{
|
|
467
|
-
* type: "LineString",
|
|
468
|
-
* coordinates: [[]]
|
|
469
|
-
* }]
|
|
470
|
-
* }
|
|
471
|
-
* }
|
|
472
|
-
* })
|
|
473
|
-
*/
|
|
474
|
-
updateLastSeenV1(request, requestOptions) {
|
|
475
|
-
return core.HttpResponsePromise.fromPromise(this.__updateLastSeenV1(request, requestOptions));
|
|
476
|
-
}
|
|
477
|
-
__updateLastSeenV1(request, requestOptions) {
|
|
478
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
479
|
-
var _a, _b, _c, _d;
|
|
480
|
-
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);
|
|
481
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
482
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "oort/drivers/last_seen/update/v1"),
|
|
483
|
-
method: "POST",
|
|
484
|
-
headers: _headers,
|
|
485
|
-
contentType: "application/json",
|
|
486
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
487
|
-
requestType: "json",
|
|
488
|
-
body: request,
|
|
489
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
490
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
491
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
492
|
-
});
|
|
493
|
-
if (_response.ok) {
|
|
494
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
495
|
-
}
|
|
496
|
-
if (_response.error.reason === "status-code") {
|
|
497
|
-
switch (_response.error.statusCode) {
|
|
498
|
-
case 422:
|
|
499
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
500
|
-
default:
|
|
501
|
-
throw new errors.ChrtError({
|
|
502
|
-
statusCode: _response.error.statusCode,
|
|
503
|
-
body: _response.error.body,
|
|
504
|
-
rawResponse: _response.rawResponse,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
switch (_response.error.reason) {
|
|
509
|
-
case "non-json":
|
|
510
|
-
throw new errors.ChrtError({
|
|
511
|
-
statusCode: _response.error.statusCode,
|
|
512
|
-
body: _response.error.rawBody,
|
|
513
|
-
rawResponse: _response.rawResponse,
|
|
514
|
-
});
|
|
515
|
-
case "timeout":
|
|
516
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/update/v1.");
|
|
517
|
-
case "unknown":
|
|
518
|
-
throw new errors.ChrtError({
|
|
519
|
-
message: _response.error.errorMessage,
|
|
520
|
-
rawResponse: _response.rawResponse,
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
452
|
/**
|
|
526
453
|
* Clears the driver's last known location and timestamp. | () -> (bool)
|
|
527
454
|
*
|
|
@@ -2,4 +2,3 @@ export { type DriversListOrgMembersAndDriversV1Request } from "./DriversListOrgM
|
|
|
2
2
|
export { type DriversListV1Request } from "./DriversListV1Request.js";
|
|
3
3
|
export { type DriverClientCreate1 } from "./DriverClientCreate1.js";
|
|
4
4
|
export { type DriverClientUpdate1 } from "./DriverClientUpdate1.js";
|
|
5
|
-
export { type DriverLastSeenReq } from "./DriverLastSeenReq.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
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 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,127 @@
|
|
|
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.Flights = 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 Flights {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 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)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} taskId
|
|
62
|
+
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.flights.getFlightInfoForTaskV1("task_id")
|
|
68
|
+
*/
|
|
69
|
+
getFlightInfoForTaskV1(taskId, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__getFlightInfoForTaskV1(taskId, requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__getFlightInfoForTaskV1(taskId, requestOptions) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b, _c, _d;
|
|
75
|
+
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);
|
|
76
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
77
|
+
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)}`),
|
|
78
|
+
method: "GET",
|
|
79
|
+
headers: _headers,
|
|
80
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
81
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
+
});
|
|
85
|
+
if (_response.ok) {
|
|
86
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
87
|
+
}
|
|
88
|
+
if (_response.error.reason === "status-code") {
|
|
89
|
+
switch (_response.error.statusCode) {
|
|
90
|
+
case 422:
|
|
91
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
92
|
+
default:
|
|
93
|
+
throw new errors.ChrtError({
|
|
94
|
+
statusCode: _response.error.statusCode,
|
|
95
|
+
body: _response.error.body,
|
|
96
|
+
rawResponse: _response.rawResponse,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
switch (_response.error.reason) {
|
|
101
|
+
case "non-json":
|
|
102
|
+
throw new errors.ChrtError({
|
|
103
|
+
statusCode: _response.error.statusCode,
|
|
104
|
+
body: _response.error.rawBody,
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
});
|
|
107
|
+
case "timeout":
|
|
108
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /flights/flight_info/for_task/v1/{task_id}.");
|
|
109
|
+
case "unknown":
|
|
110
|
+
throw new errors.ChrtError({
|
|
111
|
+
message: _response.error.errorMessage,
|
|
112
|
+
rawResponse: _response.rawResponse,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
_getAuthorizationHeader() {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
120
|
+
if (bearer != null) {
|
|
121
|
+
return `Bearer ${bearer}`;
|
|
122
|
+
}
|
|
123
|
+
return undefined;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.Flights = Flights;
|
|
@@ -14,6 +14,7 @@ export * as shipperPayCourierRateSheets from "./shipperPayCourierRateSheets/inde
|
|
|
14
14
|
export * as shipperPayCourierStatements from "./shipperPayCourierStatements/index.js";
|
|
15
15
|
export * as orgProfiles from "./orgProfiles/index.js";
|
|
16
16
|
export * as dev from "./dev/index.js";
|
|
17
|
+
export * as flights from "./flights/index.js";
|
|
17
18
|
export * as taskArtifactNotifications from "./taskArtifactNotifications/index.js";
|
|
18
19
|
export * as drivers from "./drivers/index.js";
|
|
19
20
|
export * as cargos from "./cargos/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.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.tasks = exports.offChrtShipperOrg = exports.taskArtifacts = exports.cargos = exports.drivers = exports.taskArtifactNotifications = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.connections = void 0;
|
|
39
|
+
exports.tracking = exports.orgInfoForConnections = exports.notifications = exports.utils = exports.users = exports.root = exports.orgs = exports.shipperContactInfo = exports.tasks = exports.offChrtShipperOrg = exports.taskArtifacts = exports.cargos = exports.drivers = exports.taskArtifactNotifications = exports.flights = exports.dev = exports.orgProfiles = exports.shipperPayCourierStatements = exports.shipperPayCourierRateSheets = exports.shipperPayCourierPayments = exports.shipperPayCourierLineItemGroups = exports.courierPayDriverStatements = exports.courierPayDriverRateSheets = exports.courierPayDriverPayouts = exports.courierPayDriverLineItemGroups = exports.payments = exports.taskGroups = exports.orders = exports.orderDrafts = exports.connections = void 0;
|
|
40
40
|
exports.connections = __importStar(require("./connections/index.js"));
|
|
41
41
|
__exportStar(require("./connections/types/index.js"), exports);
|
|
42
42
|
exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
|
|
@@ -53,6 +53,7 @@ exports.shipperPayCourierRateSheets = __importStar(require("./shipperPayCourierR
|
|
|
53
53
|
exports.shipperPayCourierStatements = __importStar(require("./shipperPayCourierStatements/index.js"));
|
|
54
54
|
exports.orgProfiles = __importStar(require("./orgProfiles/index.js"));
|
|
55
55
|
exports.dev = __importStar(require("./dev/index.js"));
|
|
56
|
+
exports.flights = __importStar(require("./flights/index.js"));
|
|
56
57
|
exports.taskArtifactNotifications = __importStar(require("./taskArtifactNotifications/index.js"));
|
|
57
58
|
exports.drivers = __importStar(require("./drivers/index.js"));
|
|
58
59
|
exports.cargos = __importStar(require("./cargos/index.js"));
|
|
@@ -47,21 +47,19 @@ export declare class TaskGroup {
|
|
|
47
47
|
addV1(request: Chrt.orderDrafts.OrderDraftAddTaskGroupReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<string>;
|
|
48
48
|
private __addV1;
|
|
49
49
|
/**
|
|
50
|
-
* Sets the flight number on a draft task group. | (
|
|
50
|
+
* Sets the flight number and/or fa_flight_id on a draft task group. | (SetFlightInfoReq) -> (bool)
|
|
51
51
|
*
|
|
52
52
|
* @param {string} taskGroupId
|
|
53
|
-
* @param {Chrt.
|
|
53
|
+
* @param {Chrt.SetFlightInfoReq} request
|
|
54
54
|
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
55
|
*
|
|
56
56
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
* await client.orderDrafts.taskGroup.
|
|
60
|
-
* flight_number: "flight_number"
|
|
61
|
-
* })
|
|
59
|
+
* await client.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
|
|
62
60
|
*/
|
|
63
|
-
|
|
64
|
-
private
|
|
61
|
+
setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
62
|
+
private __setFlightInfoV1;
|
|
65
63
|
/**
|
|
66
64
|
* Updates the courier organization assigned to a draft task group. | (UpdateCourierOrgDraftReq) -> (bool)
|
|
67
65
|
*
|
|
@@ -121,28 +121,26 @@ class TaskGroup {
|
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Sets the flight number on a draft task group. | (
|
|
124
|
+
* Sets the flight number and/or fa_flight_id on a draft task group. | (SetFlightInfoReq) -> (bool)
|
|
125
125
|
*
|
|
126
126
|
* @param {string} taskGroupId
|
|
127
|
-
* @param {Chrt.
|
|
127
|
+
* @param {Chrt.SetFlightInfoReq} request
|
|
128
128
|
* @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
129
|
*
|
|
130
130
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
131
131
|
*
|
|
132
132
|
* @example
|
|
133
|
-
* await client.orderDrafts.taskGroup.
|
|
134
|
-
* flight_number: "flight_number"
|
|
135
|
-
* })
|
|
133
|
+
* await client.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
|
|
136
134
|
*/
|
|
137
|
-
|
|
138
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
135
|
+
setFlightInfoV1(taskGroupId, request, requestOptions) {
|
|
136
|
+
return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(taskGroupId, request, requestOptions));
|
|
139
137
|
}
|
|
140
|
-
|
|
138
|
+
__setFlightInfoV1(taskGroupId, request, requestOptions) {
|
|
141
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
140
|
var _a, _b, _c, _d;
|
|
143
141
|
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);
|
|
144
142
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
145
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/order_drafts/task_group/
|
|
143
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `oort/order_drafts/task_group/set_flight_info/v1/${encodeURIComponent(taskGroupId)}`),
|
|
146
144
|
method: "PATCH",
|
|
147
145
|
headers: _headers,
|
|
148
146
|
contentType: "application/json",
|
|
@@ -176,7 +174,7 @@ class TaskGroup {
|
|
|
176
174
|
rawResponse: _response.rawResponse,
|
|
177
175
|
});
|
|
178
176
|
case "timeout":
|
|
179
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/
|
|
177
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/order_drafts/task_group/set_flight_info/v1/{task_group_id}.");
|
|
180
178
|
case "unknown":
|
|
181
179
|
throw new errors.ChrtError({
|
|
182
180
|
message: _response.error.errorMessage,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { type OrderDraftAddTaskGroupReq } from "./OrderDraftAddTaskGroupReq.js";
|
|
2
|
-
export { type SetFlightNumberDraftReq } from "./SetFlightNumberDraftReq.js";
|
|
3
2
|
export { type UpdateCourierOrgDraftReq } from "./UpdateCourierOrgDraftReq.js";
|
|
4
3
|
export { type SetTaskOrderingDraftReq } from "./SetTaskOrderingDraftReq.js";
|
|
@@ -69,21 +69,19 @@ export declare class TaskGroups {
|
|
|
69
69
|
setTaskOrderingV1(taskGroupId: string, request: Chrt.SetTaskOrderingReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
70
70
|
private __setTaskOrderingV1;
|
|
71
71
|
/**
|
|
72
|
-
* Sets the flight number
|
|
72
|
+
* Sets the flight number and/or fa_flight_id on a task group. | authz_personas=[lig_org_operators] | (SetFlightInfoReq) -> (bool)
|
|
73
73
|
*
|
|
74
74
|
* @param {string} taskGroupId
|
|
75
|
-
* @param {Chrt.
|
|
75
|
+
* @param {Chrt.SetFlightInfoReq} request
|
|
76
76
|
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
77
|
*
|
|
78
78
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
79
79
|
*
|
|
80
80
|
* @example
|
|
81
|
-
* await client.taskGroups.
|
|
82
|
-
* flight_number: "flight_number"
|
|
83
|
-
* })
|
|
81
|
+
* await client.taskGroups.setFlightInfoV1("task_group_id", {})
|
|
84
82
|
*/
|
|
85
|
-
|
|
86
|
-
private
|
|
83
|
+
setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
84
|
+
private __setFlightInfoV1;
|
|
87
85
|
/**
|
|
88
86
|
* Updates the driver assigned to a task group. | authz_personas=[courier_org_operators] | (UpdateDriverReq) -> (bool)
|
|
89
87
|
*
|