@chrt-inc/typescript-sdk 0.0.205 → 0.0.216
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/README.md +1 -1
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.js +1 -1
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientCreate1.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientUpdate1.d.ts +1 -1
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.ts +2 -2
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.d.ts +1 -1
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +15 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.js +62 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.d.ts +18 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.js +5 -0
- package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/ClerkOrgData.d.ts +11 -0
- package/dist/cjs/api/types/ClerkOrgData.js +5 -0
- package/dist/cjs/api/types/CourierPayDriverRateSheet1.d.ts +1 -1
- package/dist/cjs/api/types/DecodedJwtWithOrgAndUserId.d.ts +5 -7
- package/dist/cjs/api/types/ShipperPayCourierRateSheet1.d.ts +1 -1
- package/dist/cjs/api/types/TaskExpanded.d.ts +13 -0
- package/dist/cjs/api/types/TaskExpanded.js +5 -0
- package/dist/cjs/api/types/TaskGroupExpanded.d.ts +11 -0
- package/dist/cjs/api/types/TaskGroupExpanded.js +5 -0
- package/dist/cjs/api/types/TaskGroupsExpandedRes.d.ts +10 -0
- package/dist/cjs/api/types/TaskGroupsExpandedRes.js +5 -0
- package/dist/cjs/api/types/UserPublicData6.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +4 -0
- package/dist/cjs/api/types/index.js +4 -0
- 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/courierPayDriverRateSheets/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.mjs +1 -1
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientCreate1.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/requests/CourierPayDriverRateSheetClientUpdate1.d.mts +1 -1
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientCreate1.d.mts +2 -2
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/requests/ShipperPayCourierRateSheetClientUpdate1.d.mts +1 -1
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +15 -0
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +62 -0
- package/dist/esm/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.d.mts +18 -0
- package/dist/esm/api/resources/taskGroups/client/requests/TaskGroupsExpandedReq.mjs +4 -0
- package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/ClerkOrgData.d.mts +11 -0
- package/dist/esm/api/types/ClerkOrgData.mjs +4 -0
- package/dist/esm/api/types/CourierPayDriverRateSheet1.d.mts +1 -1
- package/dist/esm/api/types/DecodedJwtWithOrgAndUserId.d.mts +5 -7
- package/dist/esm/api/types/ShipperPayCourierRateSheet1.d.mts +1 -1
- package/dist/esm/api/types/TaskExpanded.d.mts +13 -0
- package/dist/esm/api/types/TaskExpanded.mjs +4 -0
- package/dist/esm/api/types/TaskGroupExpanded.d.mts +11 -0
- package/dist/esm/api/types/TaskGroupExpanded.mjs +4 -0
- package/dist/esm/api/types/TaskGroupsExpandedRes.d.mts +10 -0
- package/dist/esm/api/types/TaskGroupsExpandedRes.mjs +4 -0
- package/dist/esm/api/types/UserPublicData6.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +4 -0
- package/dist/esm/api/types/index.mjs +4 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +68 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fchrt-inc%2Ftypescript-sdk)
|
|
4
4
|
[](https://www.npmjs.com/package/@chrt-inc/typescript-sdk)
|
|
5
5
|
|
|
6
|
-
The Chrt TypeScript library provides convenient access to the Chrt
|
|
6
|
+
The Chrt TypeScript library provides convenient access to the Chrt APIs from TypeScript.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
package/dist/cjs/Client.js
CHANGED
|
@@ -66,8 +66,8 @@ class ChrtClient {
|
|
|
66
66
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
67
67
|
"X-Fern-Language": "JavaScript",
|
|
68
68
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
69
|
-
"X-Fern-SDK-Version": "0.0.
|
|
70
|
-
"User-Agent": "@chrt-inc/typescript-sdk/0.0.
|
|
69
|
+
"X-Fern-SDK-Version": "0.0.216",
|
|
70
|
+
"User-Agent": "@chrt-inc/typescript-sdk/0.0.216",
|
|
71
71
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
72
72
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
73
73
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -68,7 +68,7 @@ export declare class CourierPayDriverRateSheets {
|
|
|
68
68
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
69
69
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
70
70
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
71
|
-
*
|
|
71
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
72
72
|
* wait_time_before_charge_minutes: 1.1,
|
|
73
73
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
74
74
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -178,7 +178,7 @@ class CourierPayDriverRateSheets {
|
|
|
178
178
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
179
179
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
180
180
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
181
|
-
*
|
|
181
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
182
182
|
* wait_time_before_charge_minutes: 1.1,
|
|
183
183
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
184
184
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -12,7 +12,7 @@ import * as Chrt from "../../../../index.js";
|
|
|
12
12
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
13
13
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
14
14
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
15
|
-
*
|
|
15
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
16
16
|
* wait_time_before_charge_minutes: 1.1,
|
|
17
17
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
18
18
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -39,7 +39,7 @@ export interface CourierPayDriverRateSheetClientCreate1 {
|
|
|
39
39
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
40
40
|
/** applies only to the additional miles */
|
|
41
41
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
42
|
-
|
|
42
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
43
43
|
wait_time_before_charge_minutes: number;
|
|
44
44
|
wait_time_rate_usd_per_minute: number;
|
|
45
45
|
extra_stop_rate_usd: number;
|
|
@@ -18,7 +18,7 @@ export interface CourierPayDriverRateSheetClientUpdate1 {
|
|
|
18
18
|
additional_mileage_rate_usd_per_mile?: number | null;
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge?: number | null;
|
|
20
20
|
long_distance_surcharge_rate_usd_per_mile?: number | null;
|
|
21
|
-
|
|
21
|
+
fuel_surcharge_rate_usd_per_mile?: number | null;
|
|
22
22
|
wait_time_before_charge_minutes?: number | null;
|
|
23
23
|
wait_time_rate_usd_per_minute?: number | null;
|
|
24
24
|
extra_stop_rate_usd?: number | null;
|
|
@@ -42,7 +42,7 @@ export declare class ShipperPayCourierPayments {
|
|
|
42
42
|
getById(shipperPayCourierPaymentId: string, requestOptions?: ShipperPayCourierPayments.RequestOptions): core.HttpResponsePromise<Chrt.ShipperPayCourierPayment1>;
|
|
43
43
|
private __getById;
|
|
44
44
|
/**
|
|
45
|
-
* Deletes a shipper-to-courier payment record. Only allowed if the
|
|
45
|
+
* Deletes a shipper-to-courier payment record. Only allowed if the `StripeConnectInvoiceStatusEnum` === "not_started".
|
|
46
46
|
*
|
|
47
47
|
* @param {string} shipperPayCourierPaymentId
|
|
48
48
|
* @param {ShipperPayCourierPayments.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -113,7 +113,7 @@ class ShipperPayCourierPayments {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Deletes a shipper-to-courier payment record. Only allowed if the
|
|
116
|
+
* Deletes a shipper-to-courier payment record. Only allowed if the `StripeConnectInvoiceStatusEnum` === "not_started".
|
|
117
117
|
*
|
|
118
118
|
* @param {string} shipperPayCourierPaymentId
|
|
119
119
|
* @param {ShipperPayCourierPayments.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -54,7 +54,7 @@ export declare class ShipperPayCourierRateSheets {
|
|
|
54
54
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
55
55
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
56
56
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
57
|
-
*
|
|
57
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
58
58
|
* wait_time_before_charge_minutes: 1.1,
|
|
59
59
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
60
60
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -120,7 +120,7 @@ class ShipperPayCourierRateSheets {
|
|
|
120
120
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
121
121
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
122
122
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
123
|
-
*
|
|
123
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
124
124
|
* wait_time_before_charge_minutes: 1.1,
|
|
125
125
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
126
126
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -11,7 +11,7 @@ import * as Chrt from "../../../../index.js";
|
|
|
11
11
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
12
12
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
13
13
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
14
|
-
*
|
|
14
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
15
15
|
* wait_time_before_charge_minutes: 1.1,
|
|
16
16
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
17
17
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -38,7 +38,7 @@ export interface ShipperPayCourierRateSheetClientCreate1 {
|
|
|
38
38
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
39
39
|
/** applies only to the additional miles */
|
|
40
40
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
41
|
-
|
|
41
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
42
42
|
wait_time_before_charge_minutes: number;
|
|
43
43
|
wait_time_rate_usd_per_minute: number;
|
|
44
44
|
extra_stop_rate_usd: number;
|
|
@@ -20,7 +20,7 @@ export interface ShipperPayCourierRateSheetClientUpdate1 {
|
|
|
20
20
|
additional_mileage_rate_usd_per_mile?: number | null;
|
|
21
21
|
long_distance_surcharge_miles_before_surcharge?: number | null;
|
|
22
22
|
long_distance_surcharge_rate_usd_per_mile?: number | null;
|
|
23
|
-
|
|
23
|
+
fuel_surcharge_rate_usd_per_mile?: number | null;
|
|
24
24
|
wait_time_before_charge_minutes?: number | null;
|
|
25
25
|
wait_time_rate_usd_per_minute?: number | null;
|
|
26
26
|
extra_stop_rate_usd?: number | null;
|
|
@@ -98,5 +98,20 @@ export declare class TaskGroups {
|
|
|
98
98
|
*/
|
|
99
99
|
start(id: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
100
100
|
private __start;
|
|
101
|
+
/**
|
|
102
|
+
* Fetches task groups by driver with optional expanded data including tasks, cargos, milestones, and shipper contact info.
|
|
103
|
+
*
|
|
104
|
+
* @param {Chrt.TaskGroupsExpandedReq} request
|
|
105
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* await client.taskGroups.getByDriverExpanded({
|
|
111
|
+
* task_group_statuses: ["not_started"]
|
|
112
|
+
* })
|
|
113
|
+
*/
|
|
114
|
+
getByDriverExpanded(request: Chrt.TaskGroupsExpandedReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupsExpandedRes>;
|
|
115
|
+
private __getByDriverExpanded;
|
|
101
116
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
102
117
|
}
|
|
@@ -347,6 +347,68 @@ class TaskGroups {
|
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Fetches task groups by driver with optional expanded data including tasks, cargos, milestones, and shipper contact info.
|
|
352
|
+
*
|
|
353
|
+
* @param {Chrt.TaskGroupsExpandedReq} request
|
|
354
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
355
|
+
*
|
|
356
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* await client.taskGroups.getByDriverExpanded({
|
|
360
|
+
* task_group_statuses: ["not_started"]
|
|
361
|
+
* })
|
|
362
|
+
*/
|
|
363
|
+
getByDriverExpanded(request, requestOptions) {
|
|
364
|
+
return core.HttpResponsePromise.fromPromise(this.__getByDriverExpanded(request, requestOptions));
|
|
365
|
+
}
|
|
366
|
+
__getByDriverExpanded(request, requestOptions) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
var _a, _b, _c, _d;
|
|
369
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
370
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/task_groups/by_driver/expanded"),
|
|
371
|
+
method: "POST",
|
|
372
|
+
headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
373
|
+
contentType: "application/json",
|
|
374
|
+
requestType: "json",
|
|
375
|
+
body: request,
|
|
376
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
377
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
378
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
379
|
+
});
|
|
380
|
+
if (_response.ok) {
|
|
381
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
382
|
+
}
|
|
383
|
+
if (_response.error.reason === "status-code") {
|
|
384
|
+
switch (_response.error.statusCode) {
|
|
385
|
+
case 422:
|
|
386
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
387
|
+
default:
|
|
388
|
+
throw new errors.ChrtError({
|
|
389
|
+
statusCode: _response.error.statusCode,
|
|
390
|
+
body: _response.error.body,
|
|
391
|
+
rawResponse: _response.rawResponse,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
switch (_response.error.reason) {
|
|
396
|
+
case "non-json":
|
|
397
|
+
throw new errors.ChrtError({
|
|
398
|
+
statusCode: _response.error.statusCode,
|
|
399
|
+
body: _response.error.rawBody,
|
|
400
|
+
rawResponse: _response.rawResponse,
|
|
401
|
+
});
|
|
402
|
+
case "timeout":
|
|
403
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/by_driver/expanded.");
|
|
404
|
+
case "unknown":
|
|
405
|
+
throw new errors.ChrtError({
|
|
406
|
+
message: _response.error.errorMessage,
|
|
407
|
+
rawResponse: _response.rawResponse,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
}
|
|
350
412
|
_getAuthorizationHeader() {
|
|
351
413
|
return __awaiter(this, void 0, void 0, function* () {
|
|
352
414
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* task_group_statuses: ["not_started"]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface TaskGroupsExpandedReq {
|
|
12
|
+
task_group_statuses: Chrt.TaskGroupStatusEnum1[];
|
|
13
|
+
driver_id?: string | null;
|
|
14
|
+
expand_tasks?: boolean;
|
|
15
|
+
expand_cargos?: boolean;
|
|
16
|
+
expand_milestones?: boolean;
|
|
17
|
+
expand_shipper_contact_info?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ClerkOrgData {
|
|
5
|
+
/** Must be a string starting with `org_` */
|
|
6
|
+
id?: string | null;
|
|
7
|
+
rol?: string | null;
|
|
8
|
+
slg?: string | null;
|
|
9
|
+
/** Accepts any additional properties */
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
@@ -19,7 +19,7 @@ export interface CourierPayDriverRateSheet1 {
|
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
20
20
|
/** applies only to the additional miles */
|
|
21
21
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
22
|
-
|
|
22
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
23
23
|
wait_time_before_charge_minutes: number;
|
|
24
24
|
wait_time_rate_usd_per_minute: number;
|
|
25
25
|
extra_stop_rate_usd: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
4
5
|
export interface DecodedJwtWithOrgAndUserId {
|
|
5
6
|
azp?: string | null;
|
|
6
7
|
exp?: number | null;
|
|
@@ -12,17 +13,14 @@ export interface DecodedJwtWithOrgAndUserId {
|
|
|
12
13
|
sid?: string | null;
|
|
13
14
|
/** Must be a string starting with `user_` */
|
|
14
15
|
sub?: string | null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
org_slug?: string | null;
|
|
18
|
-
email_verified?: boolean | null;
|
|
16
|
+
v?: number | null;
|
|
17
|
+
o?: Chrt.ClerkOrgData | null;
|
|
19
18
|
org_public_metadata?: Record<string, unknown> | null;
|
|
20
|
-
user_public_metadata?: Record<string, unknown> | null;
|
|
21
19
|
primary_email_address?: string | null;
|
|
22
|
-
/** Must be a string starting with `org_` */
|
|
23
|
-
org_id: string;
|
|
24
20
|
/** Must be a string starting with `user_` */
|
|
25
21
|
user_id: string;
|
|
22
|
+
/** Must be a string starting with `org_` */
|
|
23
|
+
org_id: string;
|
|
26
24
|
/** Accepts any additional properties */
|
|
27
25
|
[key: string]: any;
|
|
28
26
|
}
|
|
@@ -19,7 +19,7 @@ export interface ShipperPayCourierRateSheet1 {
|
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
20
20
|
/** applies only to the additional miles */
|
|
21
21
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
22
|
-
|
|
22
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
23
23
|
wait_time_before_charge_minutes: number;
|
|
24
24
|
wait_time_rate_usd_per_minute: number;
|
|
25
25
|
extra_stop_rate_usd: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Single task with optional expanded data
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskExpanded {
|
|
9
|
+
task: Chrt.Task1;
|
|
10
|
+
cargos?: Chrt.Cargo1[] | null;
|
|
11
|
+
milestones?: Chrt.Milestone1[] | null;
|
|
12
|
+
shipper_contact_info?: Chrt.ShipperContactInfo1[] | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Single task group with optional expanded tasks
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskGroupExpanded {
|
|
9
|
+
task_group: Chrt.TaskGroup1;
|
|
10
|
+
tasks?: Chrt.TaskExpanded[] | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Response containing list of task groups with expanded data
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskGroupsExpandedRes {
|
|
9
|
+
task_groups: Chrt.TaskGroupExpanded[];
|
|
10
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Cargo1.js";
|
|
2
2
|
export * from "./CargoClientCreate1.js";
|
|
3
3
|
export * from "./CargoTypeEnum1.js";
|
|
4
|
+
export * from "./ClerkOrgData.js";
|
|
4
5
|
export * from "./CourierNotificationEventEnum.js";
|
|
5
6
|
export * from "./CourierNotificationPreferences1.js";
|
|
6
7
|
export * from "./CourierOrgConnectionInfo1.js";
|
|
@@ -79,11 +80,14 @@ export * from "./Task1.js";
|
|
|
79
80
|
export * from "./TaskActionEnum1.js";
|
|
80
81
|
export * from "./TaskClientCreate1.js";
|
|
81
82
|
export * from "./TaskCreateBundle.js";
|
|
83
|
+
export * from "./TaskExpanded.js";
|
|
82
84
|
export * from "./TaskGroup1.js";
|
|
83
85
|
export * from "./TaskGroupDetailsResponse.js";
|
|
86
|
+
export * from "./TaskGroupExpanded.js";
|
|
84
87
|
export * from "./TaskGroupStatusEnum1.js";
|
|
85
88
|
export * from "./TaskGroupWithDetails.js";
|
|
86
89
|
export * from "./TaskGroupWithTasks.js";
|
|
90
|
+
export * from "./TaskGroupsExpandedRes.js";
|
|
87
91
|
export * from "./TaskWithDetails.js";
|
|
88
92
|
export * from "./TemplateRes.js";
|
|
89
93
|
export * from "./Tracker1.js";
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./Cargo1.js"), exports);
|
|
18
18
|
__exportStar(require("./CargoClientCreate1.js"), exports);
|
|
19
19
|
__exportStar(require("./CargoTypeEnum1.js"), exports);
|
|
20
|
+
__exportStar(require("./ClerkOrgData.js"), exports);
|
|
20
21
|
__exportStar(require("./CourierNotificationEventEnum.js"), exports);
|
|
21
22
|
__exportStar(require("./CourierNotificationPreferences1.js"), exports);
|
|
22
23
|
__exportStar(require("./CourierOrgConnectionInfo1.js"), exports);
|
|
@@ -95,11 +96,14 @@ __exportStar(require("./Task1.js"), exports);
|
|
|
95
96
|
__exportStar(require("./TaskActionEnum1.js"), exports);
|
|
96
97
|
__exportStar(require("./TaskClientCreate1.js"), exports);
|
|
97
98
|
__exportStar(require("./TaskCreateBundle.js"), exports);
|
|
99
|
+
__exportStar(require("./TaskExpanded.js"), exports);
|
|
98
100
|
__exportStar(require("./TaskGroup1.js"), exports);
|
|
99
101
|
__exportStar(require("./TaskGroupDetailsResponse.js"), exports);
|
|
102
|
+
__exportStar(require("./TaskGroupExpanded.js"), exports);
|
|
100
103
|
__exportStar(require("./TaskGroupStatusEnum1.js"), exports);
|
|
101
104
|
__exportStar(require("./TaskGroupWithDetails.js"), exports);
|
|
102
105
|
__exportStar(require("./TaskGroupWithTasks.js"), exports);
|
|
106
|
+
__exportStar(require("./TaskGroupsExpandedRes.js"), exports);
|
|
103
107
|
__exportStar(require("./TaskWithDetails.js"), exports);
|
|
104
108
|
__exportStar(require("./TemplateRes.js"), exports);
|
|
105
109
|
__exportStar(require("./Tracker1.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.216";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -30,8 +30,8 @@ export class ChrtClient {
|
|
|
30
30
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
31
31
|
"X-Fern-Language": "JavaScript",
|
|
32
32
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
33
|
-
"X-Fern-SDK-Version": "0.0.
|
|
34
|
-
"User-Agent": "@chrt-inc/typescript-sdk/0.0.
|
|
33
|
+
"X-Fern-SDK-Version": "0.0.216",
|
|
34
|
+
"User-Agent": "@chrt-inc/typescript-sdk/0.0.216",
|
|
35
35
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
36
36
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
37
37
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -68,7 +68,7 @@ export declare class CourierPayDriverRateSheets {
|
|
|
68
68
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
69
69
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
70
70
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
71
|
-
*
|
|
71
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
72
72
|
* wait_time_before_charge_minutes: 1.1,
|
|
73
73
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
74
74
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -142,7 +142,7 @@ export class CourierPayDriverRateSheets {
|
|
|
142
142
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
143
143
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
144
144
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
145
|
-
*
|
|
145
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
146
146
|
* wait_time_before_charge_minutes: 1.1,
|
|
147
147
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
148
148
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -12,7 +12,7 @@ import * as Chrt from "../../../../index.mjs";
|
|
|
12
12
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
13
13
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
14
14
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
15
|
-
*
|
|
15
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
16
16
|
* wait_time_before_charge_minutes: 1.1,
|
|
17
17
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
18
18
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -39,7 +39,7 @@ export interface CourierPayDriverRateSheetClientCreate1 {
|
|
|
39
39
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
40
40
|
/** applies only to the additional miles */
|
|
41
41
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
42
|
-
|
|
42
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
43
43
|
wait_time_before_charge_minutes: number;
|
|
44
44
|
wait_time_rate_usd_per_minute: number;
|
|
45
45
|
extra_stop_rate_usd: number;
|
|
@@ -18,7 +18,7 @@ export interface CourierPayDriverRateSheetClientUpdate1 {
|
|
|
18
18
|
additional_mileage_rate_usd_per_mile?: number | null;
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge?: number | null;
|
|
20
20
|
long_distance_surcharge_rate_usd_per_mile?: number | null;
|
|
21
|
-
|
|
21
|
+
fuel_surcharge_rate_usd_per_mile?: number | null;
|
|
22
22
|
wait_time_before_charge_minutes?: number | null;
|
|
23
23
|
wait_time_rate_usd_per_minute?: number | null;
|
|
24
24
|
extra_stop_rate_usd?: number | null;
|
|
@@ -42,7 +42,7 @@ export declare class ShipperPayCourierPayments {
|
|
|
42
42
|
getById(shipperPayCourierPaymentId: string, requestOptions?: ShipperPayCourierPayments.RequestOptions): core.HttpResponsePromise<Chrt.ShipperPayCourierPayment1>;
|
|
43
43
|
private __getById;
|
|
44
44
|
/**
|
|
45
|
-
* Deletes a shipper-to-courier payment record. Only allowed if the
|
|
45
|
+
* Deletes a shipper-to-courier payment record. Only allowed if the `StripeConnectInvoiceStatusEnum` === "not_started".
|
|
46
46
|
*
|
|
47
47
|
* @param {string} shipperPayCourierPaymentId
|
|
48
48
|
* @param {ShipperPayCourierPayments.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -77,7 +77,7 @@ export class ShipperPayCourierPayments {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
|
-
* Deletes a shipper-to-courier payment record. Only allowed if the
|
|
80
|
+
* Deletes a shipper-to-courier payment record. Only allowed if the `StripeConnectInvoiceStatusEnum` === "not_started".
|
|
81
81
|
*
|
|
82
82
|
* @param {string} shipperPayCourierPaymentId
|
|
83
83
|
* @param {ShipperPayCourierPayments.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -54,7 +54,7 @@ export declare class ShipperPayCourierRateSheets {
|
|
|
54
54
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
55
55
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
56
56
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
57
|
-
*
|
|
57
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
58
58
|
* wait_time_before_charge_minutes: 1.1,
|
|
59
59
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
60
60
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -84,7 +84,7 @@ export class ShipperPayCourierRateSheets {
|
|
|
84
84
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
85
85
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
86
86
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
87
|
-
*
|
|
87
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
88
88
|
* wait_time_before_charge_minutes: 1.1,
|
|
89
89
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
90
90
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -11,7 +11,7 @@ import * as Chrt from "../../../../index.mjs";
|
|
|
11
11
|
* additional_mileage_rate_usd_per_mile: 1.1,
|
|
12
12
|
* long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
13
13
|
* long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
14
|
-
*
|
|
14
|
+
* fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
15
15
|
* wait_time_before_charge_minutes: 1.1,
|
|
16
16
|
* wait_time_rate_usd_per_minute: 1.1,
|
|
17
17
|
* extra_stop_rate_usd: 1.1,
|
|
@@ -38,7 +38,7 @@ export interface ShipperPayCourierRateSheetClientCreate1 {
|
|
|
38
38
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
39
39
|
/** applies only to the additional miles */
|
|
40
40
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
41
|
-
|
|
41
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
42
42
|
wait_time_before_charge_minutes: number;
|
|
43
43
|
wait_time_rate_usd_per_minute: number;
|
|
44
44
|
extra_stop_rate_usd: number;
|
|
@@ -20,7 +20,7 @@ export interface ShipperPayCourierRateSheetClientUpdate1 {
|
|
|
20
20
|
additional_mileage_rate_usd_per_mile?: number | null;
|
|
21
21
|
long_distance_surcharge_miles_before_surcharge?: number | null;
|
|
22
22
|
long_distance_surcharge_rate_usd_per_mile?: number | null;
|
|
23
|
-
|
|
23
|
+
fuel_surcharge_rate_usd_per_mile?: number | null;
|
|
24
24
|
wait_time_before_charge_minutes?: number | null;
|
|
25
25
|
wait_time_rate_usd_per_minute?: number | null;
|
|
26
26
|
extra_stop_rate_usd?: number | null;
|
|
@@ -98,5 +98,20 @@ export declare class TaskGroups {
|
|
|
98
98
|
*/
|
|
99
99
|
start(id: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
100
100
|
private __start;
|
|
101
|
+
/**
|
|
102
|
+
* Fetches task groups by driver with optional expanded data including tasks, cargos, milestones, and shipper contact info.
|
|
103
|
+
*
|
|
104
|
+
* @param {Chrt.TaskGroupsExpandedReq} request
|
|
105
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* await client.taskGroups.getByDriverExpanded({
|
|
111
|
+
* task_group_statuses: ["not_started"]
|
|
112
|
+
* })
|
|
113
|
+
*/
|
|
114
|
+
getByDriverExpanded(request: Chrt.TaskGroupsExpandedReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<Chrt.TaskGroupsExpandedRes>;
|
|
115
|
+
private __getByDriverExpanded;
|
|
101
116
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
102
117
|
}
|
|
@@ -311,6 +311,68 @@ export class TaskGroups {
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Fetches task groups by driver with optional expanded data including tasks, cargos, milestones, and shipper contact info.
|
|
316
|
+
*
|
|
317
|
+
* @param {Chrt.TaskGroupsExpandedReq} request
|
|
318
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
319
|
+
*
|
|
320
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* await client.taskGroups.getByDriverExpanded({
|
|
324
|
+
* task_group_statuses: ["not_started"]
|
|
325
|
+
* })
|
|
326
|
+
*/
|
|
327
|
+
getByDriverExpanded(request, requestOptions) {
|
|
328
|
+
return core.HttpResponsePromise.fromPromise(this.__getByDriverExpanded(request, requestOptions));
|
|
329
|
+
}
|
|
330
|
+
__getByDriverExpanded(request, requestOptions) {
|
|
331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
332
|
+
var _a, _b, _c, _d;
|
|
333
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
334
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "oort/task_groups/by_driver/expanded"),
|
|
335
|
+
method: "POST",
|
|
336
|
+
headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
337
|
+
contentType: "application/json",
|
|
338
|
+
requestType: "json",
|
|
339
|
+
body: request,
|
|
340
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
341
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
342
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
343
|
+
});
|
|
344
|
+
if (_response.ok) {
|
|
345
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
346
|
+
}
|
|
347
|
+
if (_response.error.reason === "status-code") {
|
|
348
|
+
switch (_response.error.statusCode) {
|
|
349
|
+
case 422:
|
|
350
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
351
|
+
default:
|
|
352
|
+
throw new errors.ChrtError({
|
|
353
|
+
statusCode: _response.error.statusCode,
|
|
354
|
+
body: _response.error.body,
|
|
355
|
+
rawResponse: _response.rawResponse,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
switch (_response.error.reason) {
|
|
360
|
+
case "non-json":
|
|
361
|
+
throw new errors.ChrtError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.rawBody,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
case "timeout":
|
|
367
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/task_groups/by_driver/expanded.");
|
|
368
|
+
case "unknown":
|
|
369
|
+
throw new errors.ChrtError({
|
|
370
|
+
message: _response.error.errorMessage,
|
|
371
|
+
rawResponse: _response.rawResponse,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
}
|
|
314
376
|
_getAuthorizationHeader() {
|
|
315
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
316
378
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* task_group_statuses: ["not_started"]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface TaskGroupsExpandedReq {
|
|
12
|
+
task_group_statuses: Chrt.TaskGroupStatusEnum1[];
|
|
13
|
+
driver_id?: string | null;
|
|
14
|
+
expand_tasks?: boolean;
|
|
15
|
+
expand_cargos?: boolean;
|
|
16
|
+
expand_milestones?: boolean;
|
|
17
|
+
expand_shipper_contact_info?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface ClerkOrgData {
|
|
5
|
+
/** Must be a string starting with `org_` */
|
|
6
|
+
id?: string | null;
|
|
7
|
+
rol?: string | null;
|
|
8
|
+
slg?: string | null;
|
|
9
|
+
/** Accepts any additional properties */
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
@@ -19,7 +19,7 @@ export interface CourierPayDriverRateSheet1 {
|
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
20
20
|
/** applies only to the additional miles */
|
|
21
21
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
22
|
-
|
|
22
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
23
23
|
wait_time_before_charge_minutes: number;
|
|
24
24
|
wait_time_rate_usd_per_minute: number;
|
|
25
25
|
extra_stop_rate_usd: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
4
5
|
export interface DecodedJwtWithOrgAndUserId {
|
|
5
6
|
azp?: string | null;
|
|
6
7
|
exp?: number | null;
|
|
@@ -12,17 +13,14 @@ export interface DecodedJwtWithOrgAndUserId {
|
|
|
12
13
|
sid?: string | null;
|
|
13
14
|
/** Must be a string starting with `user_` */
|
|
14
15
|
sub?: string | null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
org_slug?: string | null;
|
|
18
|
-
email_verified?: boolean | null;
|
|
16
|
+
v?: number | null;
|
|
17
|
+
o?: Chrt.ClerkOrgData | null;
|
|
19
18
|
org_public_metadata?: Record<string, unknown> | null;
|
|
20
|
-
user_public_metadata?: Record<string, unknown> | null;
|
|
21
19
|
primary_email_address?: string | null;
|
|
22
|
-
/** Must be a string starting with `org_` */
|
|
23
|
-
org_id: string;
|
|
24
20
|
/** Must be a string starting with `user_` */
|
|
25
21
|
user_id: string;
|
|
22
|
+
/** Must be a string starting with `org_` */
|
|
23
|
+
org_id: string;
|
|
26
24
|
/** Accepts any additional properties */
|
|
27
25
|
[key: string]: any;
|
|
28
26
|
}
|
|
@@ -19,7 +19,7 @@ export interface ShipperPayCourierRateSheet1 {
|
|
|
19
19
|
long_distance_surcharge_miles_before_surcharge: number;
|
|
20
20
|
/** applies only to the additional miles */
|
|
21
21
|
long_distance_surcharge_rate_usd_per_mile: number;
|
|
22
|
-
|
|
22
|
+
fuel_surcharge_rate_usd_per_mile: number;
|
|
23
23
|
wait_time_before_charge_minutes: number;
|
|
24
24
|
wait_time_rate_usd_per_minute: number;
|
|
25
25
|
extra_stop_rate_usd: number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Single task with optional expanded data
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskExpanded {
|
|
9
|
+
task: Chrt.Task1;
|
|
10
|
+
cargos?: Chrt.Cargo1[] | null;
|
|
11
|
+
milestones?: Chrt.Milestone1[] | null;
|
|
12
|
+
shipper_contact_info?: Chrt.ShipperContactInfo1[] | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Single task group with optional expanded tasks
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskGroupExpanded {
|
|
9
|
+
task_group: Chrt.TaskGroup1;
|
|
10
|
+
tasks?: Chrt.TaskExpanded[] | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Response containing list of task groups with expanded data
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskGroupsExpandedRes {
|
|
9
|
+
task_groups: Chrt.TaskGroupExpanded[];
|
|
10
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Cargo1.mjs";
|
|
2
2
|
export * from "./CargoClientCreate1.mjs";
|
|
3
3
|
export * from "./CargoTypeEnum1.mjs";
|
|
4
|
+
export * from "./ClerkOrgData.mjs";
|
|
4
5
|
export * from "./CourierNotificationEventEnum.mjs";
|
|
5
6
|
export * from "./CourierNotificationPreferences1.mjs";
|
|
6
7
|
export * from "./CourierOrgConnectionInfo1.mjs";
|
|
@@ -79,11 +80,14 @@ export * from "./Task1.mjs";
|
|
|
79
80
|
export * from "./TaskActionEnum1.mjs";
|
|
80
81
|
export * from "./TaskClientCreate1.mjs";
|
|
81
82
|
export * from "./TaskCreateBundle.mjs";
|
|
83
|
+
export * from "./TaskExpanded.mjs";
|
|
82
84
|
export * from "./TaskGroup1.mjs";
|
|
83
85
|
export * from "./TaskGroupDetailsResponse.mjs";
|
|
86
|
+
export * from "./TaskGroupExpanded.mjs";
|
|
84
87
|
export * from "./TaskGroupStatusEnum1.mjs";
|
|
85
88
|
export * from "./TaskGroupWithDetails.mjs";
|
|
86
89
|
export * from "./TaskGroupWithTasks.mjs";
|
|
90
|
+
export * from "./TaskGroupsExpandedRes.mjs";
|
|
87
91
|
export * from "./TaskWithDetails.mjs";
|
|
88
92
|
export * from "./TemplateRes.mjs";
|
|
89
93
|
export * from "./Tracker1.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./Cargo1.mjs";
|
|
2
2
|
export * from "./CargoClientCreate1.mjs";
|
|
3
3
|
export * from "./CargoTypeEnum1.mjs";
|
|
4
|
+
export * from "./ClerkOrgData.mjs";
|
|
4
5
|
export * from "./CourierNotificationEventEnum.mjs";
|
|
5
6
|
export * from "./CourierNotificationPreferences1.mjs";
|
|
6
7
|
export * from "./CourierOrgConnectionInfo1.mjs";
|
|
@@ -79,11 +80,14 @@ export * from "./Task1.mjs";
|
|
|
79
80
|
export * from "./TaskActionEnum1.mjs";
|
|
80
81
|
export * from "./TaskClientCreate1.mjs";
|
|
81
82
|
export * from "./TaskCreateBundle.mjs";
|
|
83
|
+
export * from "./TaskExpanded.mjs";
|
|
82
84
|
export * from "./TaskGroup1.mjs";
|
|
83
85
|
export * from "./TaskGroupDetailsResponse.mjs";
|
|
86
|
+
export * from "./TaskGroupExpanded.mjs";
|
|
84
87
|
export * from "./TaskGroupStatusEnum1.mjs";
|
|
85
88
|
export * from "./TaskGroupWithDetails.mjs";
|
|
86
89
|
export * from "./TaskGroupWithTasks.mjs";
|
|
90
|
+
export * from "./TaskGroupsExpandedRes.mjs";
|
|
87
91
|
export * from "./TaskWithDetails.mjs";
|
|
88
92
|
export * from "./TemplateRes.mjs";
|
|
89
93
|
export * from "./Tracker1.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.216";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.216";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2086,7 +2086,7 @@ await client.courierPayDriverRateSheets.create({
|
|
|
2086
2086
|
additional_mileage_rate_usd_per_mile: 1.1,
|
|
2087
2087
|
long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
2088
2088
|
long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
2089
|
-
|
|
2089
|
+
fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
2090
2090
|
wait_time_before_charge_minutes: 1.1,
|
|
2091
2091
|
wait_time_rate_usd_per_minute: 1.1,
|
|
2092
2092
|
extra_stop_rate_usd: 1.1,
|
|
@@ -2418,7 +2418,7 @@ await client.shipperPayCourierRateSheets.create({
|
|
|
2418
2418
|
additional_mileage_rate_usd_per_mile: 1.1,
|
|
2419
2419
|
long_distance_surcharge_miles_before_surcharge: 1.1,
|
|
2420
2420
|
long_distance_surcharge_rate_usd_per_mile: 1.1,
|
|
2421
|
-
|
|
2421
|
+
fuel_surcharge_rate_usd_per_mile: 1.1,
|
|
2422
2422
|
wait_time_before_charge_minutes: 1.1,
|
|
2423
2423
|
wait_time_rate_usd_per_minute: 1.1,
|
|
2424
2424
|
extra_stop_rate_usd: 1.1,
|
|
@@ -3326,7 +3326,7 @@ await client.shipperPayCourierPayments.getById("shipper_pay_courier_payment_id")
|
|
|
3326
3326
|
<dl>
|
|
3327
3327
|
<dd>
|
|
3328
3328
|
|
|
3329
|
-
Deletes a shipper-to-courier payment record. Only allowed if the
|
|
3329
|
+
Deletes a shipper-to-courier payment record. Only allowed if the `StripeConnectInvoiceStatusEnum` === "not_started".
|
|
3330
3330
|
|
|
3331
3331
|
</dd>
|
|
3332
3332
|
</dl>
|
|
@@ -4388,6 +4388,71 @@ await client.taskGroups.start("id");
|
|
|
4388
4388
|
</dl>
|
|
4389
4389
|
</details>
|
|
4390
4390
|
|
|
4391
|
+
<details><summary><code>client.taskGroups.<a href="/src/api/resources/taskGroups/client/Client.ts">getByDriverExpanded</a>({ ...params }) -> Chrt.TaskGroupsExpandedRes</code></summary>
|
|
4392
|
+
<dl>
|
|
4393
|
+
<dd>
|
|
4394
|
+
|
|
4395
|
+
#### 📝 Description
|
|
4396
|
+
|
|
4397
|
+
<dl>
|
|
4398
|
+
<dd>
|
|
4399
|
+
|
|
4400
|
+
<dl>
|
|
4401
|
+
<dd>
|
|
4402
|
+
|
|
4403
|
+
Fetches task groups by driver with optional expanded data including tasks, cargos, milestones, and shipper contact info.
|
|
4404
|
+
|
|
4405
|
+
</dd>
|
|
4406
|
+
</dl>
|
|
4407
|
+
</dd>
|
|
4408
|
+
</dl>
|
|
4409
|
+
|
|
4410
|
+
#### 🔌 Usage
|
|
4411
|
+
|
|
4412
|
+
<dl>
|
|
4413
|
+
<dd>
|
|
4414
|
+
|
|
4415
|
+
<dl>
|
|
4416
|
+
<dd>
|
|
4417
|
+
|
|
4418
|
+
```typescript
|
|
4419
|
+
await client.taskGroups.getByDriverExpanded({
|
|
4420
|
+
task_group_statuses: ["not_started"],
|
|
4421
|
+
});
|
|
4422
|
+
```
|
|
4423
|
+
|
|
4424
|
+
</dd>
|
|
4425
|
+
</dl>
|
|
4426
|
+
</dd>
|
|
4427
|
+
</dl>
|
|
4428
|
+
|
|
4429
|
+
#### ⚙️ Parameters
|
|
4430
|
+
|
|
4431
|
+
<dl>
|
|
4432
|
+
<dd>
|
|
4433
|
+
|
|
4434
|
+
<dl>
|
|
4435
|
+
<dd>
|
|
4436
|
+
|
|
4437
|
+
**request:** `Chrt.TaskGroupsExpandedReq`
|
|
4438
|
+
|
|
4439
|
+
</dd>
|
|
4440
|
+
</dl>
|
|
4441
|
+
|
|
4442
|
+
<dl>
|
|
4443
|
+
<dd>
|
|
4444
|
+
|
|
4445
|
+
**requestOptions:** `TaskGroups.RequestOptions`
|
|
4446
|
+
|
|
4447
|
+
</dd>
|
|
4448
|
+
</dl>
|
|
4449
|
+
</dd>
|
|
4450
|
+
</dl>
|
|
4451
|
+
|
|
4452
|
+
</dd>
|
|
4453
|
+
</dl>
|
|
4454
|
+
</details>
|
|
4455
|
+
|
|
4391
4456
|
## ShipperContactInfo
|
|
4392
4457
|
|
|
4393
4458
|
<details><summary><code>client.shipperContactInfo.<a href="/src/api/resources/shipperContactInfo/client/Client.ts">getByJwtUserId</a>() -> Chrt.ShipperContactInfo1</code></summary>
|