@chrt-inc/typescript-sdk 0.0.186 → 0.0.187-c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +6 -5
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.js +20 -47
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.ts +24 -0
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.ts +27 -0
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.js +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.ts → CourierPayDriverLineItemGroupAddLineItemsReq.d.ts} +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.js +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.ts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.ts} +1 -1
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/notifications/client/Client.js +3 -3
- package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.ts +12 -12
- package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.js +13 -13
- package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/index.js +3 -3
- 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/courierPayDriverLineItemGroup/client/Client.d.mts +6 -5
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.mjs +20 -47
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.mts +24 -0
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.mts +27 -0
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.mjs +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.mts → CourierPayDriverLineItemGroupAddLineItemsReq.d.mts} +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.mjs +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.mts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.mts} +1 -1
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/notifications/client/Client.mjs +3 -3
- package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.mts +12 -12
- package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.mjs +11 -11
- package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +12 -11
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts +0 -18
- package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts +0 -18
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts +0 -18
- package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts +0 -18
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.js → CourierPayDriverLineItemGroupCreateReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.js → CourierPayDriverLineItemGroupPreviewReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.js → CourierPayDriverLineItemGroupAddLineItemsReq.js} +0 -0
- /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.js → CourierPayDriverLineItemGroupRemoveLineItemsReq.js} +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.js +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.mjs → CourierPayDriverLineItemGroupCreateReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.mjs → CourierPayDriverLineItemGroupPreviewReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.mjs → CourierPayDriverLineItemGroupAddLineItemsReq.mjs} +0 -0
- /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.mjs → CourierPayDriverLineItemGroupRemoveLineItemsReq.mjs} +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.d.mts +0 -0
- /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.mjs +0 -0
|
@@ -32,7 +32,7 @@ export class CourierPayDriverLineItemGroup {
|
|
|
32
32
|
/**
|
|
33
33
|
* Previews calculated line items for a driver based on rate sheet and task group without creating the group.
|
|
34
34
|
*
|
|
35
|
-
* @param {Chrt.
|
|
35
|
+
* @param {Chrt.CourierPayDriverLineItemGroupPreviewReq} request
|
|
36
36
|
* @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
38
38
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -40,7 +40,8 @@ export class CourierPayDriverLineItemGroup {
|
|
|
40
40
|
* @example
|
|
41
41
|
* await client.courierPayDriverLineItemGroup.preview({
|
|
42
42
|
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
43
|
-
* task_group_id: "task_group_id"
|
|
43
|
+
* task_group_id: "task_group_id",
|
|
44
|
+
* driver_id: "driver_id"
|
|
44
45
|
* })
|
|
45
46
|
*/
|
|
46
47
|
preview(request, requestOptions) {
|
|
@@ -48,28 +49,14 @@ export class CourierPayDriverLineItemGroup {
|
|
|
48
49
|
}
|
|
49
50
|
__preview(request, requestOptions) {
|
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
var _a, _b, _c, _d
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (holiday !== undefined) {
|
|
60
|
-
_queryParams["holiday"] = (_b = holiday === null || holiday === void 0 ? void 0 : holiday.toString()) !== null && _b !== void 0 ? _b : null;
|
|
61
|
-
}
|
|
62
|
-
if (weekend !== undefined) {
|
|
63
|
-
_queryParams["weekend"] = (_c = weekend === null || weekend === void 0 ? void 0 : weekend.toString()) !== null && _c !== void 0 ? _c : null;
|
|
64
|
-
}
|
|
65
|
-
if (afterHours !== undefined) {
|
|
66
|
-
_queryParams["after_hours"] = (_d = afterHours === null || afterHours === void 0 ? void 0 : afterHours.toString()) !== null && _d !== void 0 ? _d : null;
|
|
67
|
-
}
|
|
68
|
-
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
69
|
-
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "oort/courier_pay_driver_line_item_groups/preview"),
|
|
70
|
-
method: "GET",
|
|
71
|
-
headers: mergeHeaders((_h = this._options) === null || _h === void 0 ? void 0 : _h.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
72
|
-
queryParameters: _queryParams,
|
|
52
|
+
var _a, _b, _c, _d;
|
|
53
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
54
|
+
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/courier_pay_driver_line_item_groups/preview"),
|
|
55
|
+
method: "POST",
|
|
56
|
+
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),
|
|
57
|
+
contentType: "application/json",
|
|
58
|
+
requestType: "json",
|
|
59
|
+
body: request,
|
|
73
60
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
61
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
62
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -100,7 +87,7 @@ export class CourierPayDriverLineItemGroup {
|
|
|
100
87
|
rawResponse: _response.rawResponse,
|
|
101
88
|
});
|
|
102
89
|
case "timeout":
|
|
103
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
90
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/courier_pay_driver_line_item_groups/preview.");
|
|
104
91
|
case "unknown":
|
|
105
92
|
throw new errors.ChrtError({
|
|
106
93
|
message: _response.error.errorMessage,
|
|
@@ -226,7 +213,7 @@ export class CourierPayDriverLineItemGroup {
|
|
|
226
213
|
/**
|
|
227
214
|
* Creates a courier driver line item group by calculating items from rate sheet and task group.
|
|
228
215
|
*
|
|
229
|
-
* @param {Chrt.
|
|
216
|
+
* @param {Chrt.CourierPayDriverLineItemGroupCreateReq} request
|
|
230
217
|
* @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
|
|
231
218
|
*
|
|
232
219
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -242,28 +229,14 @@ export class CourierPayDriverLineItemGroup {
|
|
|
242
229
|
}
|
|
243
230
|
__create(request, requestOptions) {
|
|
244
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
-
var _a, _b, _c, _d
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
_queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
|
|
249
|
-
_queryParams["task_group_id"] = taskGroupId;
|
|
250
|
-
if (dangerousGoods !== undefined) {
|
|
251
|
-
_queryParams["dangerous_goods"] = (_a = dangerousGoods === null || dangerousGoods === void 0 ? void 0 : dangerousGoods.toString()) !== null && _a !== void 0 ? _a : null;
|
|
252
|
-
}
|
|
253
|
-
if (holiday !== undefined) {
|
|
254
|
-
_queryParams["holiday"] = (_b = holiday === null || holiday === void 0 ? void 0 : holiday.toString()) !== null && _b !== void 0 ? _b : null;
|
|
255
|
-
}
|
|
256
|
-
if (weekend !== undefined) {
|
|
257
|
-
_queryParams["weekend"] = (_c = weekend === null || weekend === void 0 ? void 0 : weekend.toString()) !== null && _c !== void 0 ? _c : null;
|
|
258
|
-
}
|
|
259
|
-
if (afterHours !== undefined) {
|
|
260
|
-
_queryParams["after_hours"] = (_d = afterHours === null || afterHours === void 0 ? void 0 : afterHours.toString()) !== null && _d !== void 0 ? _d : null;
|
|
261
|
-
}
|
|
262
|
-
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
263
|
-
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.ChrtEnvironment.Local, "oort/courier_pay_driver_line_item_groups/create"),
|
|
232
|
+
var _a, _b, _c, _d;
|
|
233
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
234
|
+
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/courier_pay_driver_line_item_groups/create"),
|
|
264
235
|
method: "POST",
|
|
265
|
-
headers: mergeHeaders((
|
|
266
|
-
|
|
236
|
+
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),
|
|
237
|
+
contentType: "application/json",
|
|
238
|
+
requestType: "json",
|
|
239
|
+
body: request,
|
|
267
240
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
268
241
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
269
242
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
+
* task_group_id: "task_group_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface CourierPayDriverLineItemGroupCreateReq {
|
|
12
|
+
/** ID of the courier pay driver rate sheet */
|
|
13
|
+
courier_pay_driver_rate_sheet_id: string;
|
|
14
|
+
/** ID of the task group */
|
|
15
|
+
task_group_id: string;
|
|
16
|
+
/** Whether the shipment contains dangerous goods */
|
|
17
|
+
dangerous_goods?: boolean;
|
|
18
|
+
/** Whether the delivery is on a holiday */
|
|
19
|
+
holiday?: boolean;
|
|
20
|
+
/** Whether the delivery is on a weekend */
|
|
21
|
+
weekend?: boolean;
|
|
22
|
+
/** Whether the delivery is after hours */
|
|
23
|
+
after_hours?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
+
* task_group_id: "task_group_id",
|
|
9
|
+
* driver_id: "driver_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CourierPayDriverLineItemGroupPreviewReq {
|
|
13
|
+
/** ID of the courier pay driver rate sheet */
|
|
14
|
+
courier_pay_driver_rate_sheet_id: string;
|
|
15
|
+
/** ID of the task group */
|
|
16
|
+
task_group_id: string;
|
|
17
|
+
/** ID of the driver */
|
|
18
|
+
driver_id: string;
|
|
19
|
+
/** Whether the shipment contains dangerous goods */
|
|
20
|
+
dangerous_goods?: boolean;
|
|
21
|
+
/** Whether the delivery is on a holiday */
|
|
22
|
+
holiday?: boolean;
|
|
23
|
+
/** Whether the delivery is on a weekend */
|
|
24
|
+
weekend?: boolean;
|
|
25
|
+
/** Whether the delivery is after hours */
|
|
26
|
+
after_hours?: boolean;
|
|
27
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type
|
|
2
|
-
export { type
|
|
1
|
+
export { type CourierPayDriverLineItemGroupPreviewReq } from "./CourierPayDriverLineItemGroupPreviewReq.mjs";
|
|
2
|
+
export { type CourierPayDriverLineItemGroupCreateReq } from "./CourierPayDriverLineItemGroupCreateReq.mjs";
|
|
@@ -32,7 +32,7 @@ export declare class AddLineItems {
|
|
|
32
32
|
* Adds additional line items to an existing courier driver line item group.
|
|
33
33
|
*
|
|
34
34
|
* @param {string} id
|
|
35
|
-
* @param {Chrt.courierPayDriverLineItemGroup.
|
|
35
|
+
* @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupAddLineItemsReq} request
|
|
36
36
|
* @param {AddLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
38
38
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -47,7 +47,7 @@ export declare class AddLineItems {
|
|
|
47
47
|
* }]
|
|
48
48
|
* })
|
|
49
49
|
*/
|
|
50
|
-
byId(id: string, request: Chrt.courierPayDriverLineItemGroup.
|
|
50
|
+
byId(id: string, request: Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupAddLineItemsReq, requestOptions?: AddLineItems.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroup1>;
|
|
51
51
|
private __byId;
|
|
52
52
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
53
53
|
}
|
|
@@ -23,7 +23,7 @@ export class AddLineItems {
|
|
|
23
23
|
* Adds additional line items to an existing courier driver line item group.
|
|
24
24
|
*
|
|
25
25
|
* @param {string} id
|
|
26
|
-
* @param {Chrt.courierPayDriverLineItemGroup.
|
|
26
|
+
* @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupAddLineItemsReq} request
|
|
27
27
|
* @param {AddLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type CourierPayDriverLineItemGroupAddLineItemsReq } from "./CourierPayDriverLineItemGroupAddLineItemsReq.mjs";
|
|
@@ -32,7 +32,7 @@ export declare class RemoveLineItems {
|
|
|
32
32
|
* Removes specific line items from a courier driver line item group by exact match.
|
|
33
33
|
*
|
|
34
34
|
* @param {string} id
|
|
35
|
-
* @param {Chrt.courierPayDriverLineItemGroup.
|
|
35
|
+
* @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupRemoveLineItemsReq} request
|
|
36
36
|
* @param {RemoveLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
38
38
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -47,7 +47,7 @@ export declare class RemoveLineItems {
|
|
|
47
47
|
* }]
|
|
48
48
|
* })
|
|
49
49
|
*/
|
|
50
|
-
byId(id: string, request: Chrt.courierPayDriverLineItemGroup.
|
|
50
|
+
byId(id: string, request: Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupRemoveLineItemsReq, requestOptions?: RemoveLineItems.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroup1>;
|
|
51
51
|
private __byId;
|
|
52
52
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
53
53
|
}
|
|
@@ -23,7 +23,7 @@ export class RemoveLineItems {
|
|
|
23
23
|
* Removes specific line items from a courier driver line item group by exact match.
|
|
24
24
|
*
|
|
25
25
|
* @param {string} id
|
|
26
|
-
* @param {Chrt.courierPayDriverLineItemGroup.
|
|
26
|
+
* @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupRemoveLineItemsReq} request
|
|
27
27
|
* @param {RemoveLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -13,7 +13,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
13
13
|
* }]
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
|
-
export interface
|
|
16
|
+
export interface CourierPayDriverLineItemGroupRemoveLineItemsReq {
|
|
17
17
|
/** Exact line items to remove (must match exactly) */
|
|
18
18
|
line_items: Chrt.LineItem1[];
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type CourierPayDriverLineItemGroupRemoveLineItemsReq } from "./CourierPayDriverLineItemGroupRemoveLineItemsReq.mjs";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import { Shipper } from "../resources/shipper/client/Client.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { Courier } from "../resources/courier/client/Client.mjs";
|
|
8
8
|
export declare namespace Notifications {
|
|
9
9
|
interface Options {
|
|
10
10
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -19,8 +19,8 @@ export declare namespace Notifications {
|
|
|
19
19
|
export declare class Notifications {
|
|
20
20
|
protected readonly _options: Notifications.Options;
|
|
21
21
|
protected _shipper: Shipper | undefined;
|
|
22
|
-
protected
|
|
22
|
+
protected _courier: Courier | undefined;
|
|
23
23
|
constructor(_options?: Notifications.Options);
|
|
24
24
|
get shipper(): Shipper;
|
|
25
|
-
get
|
|
25
|
+
get courier(): Courier;
|
|
26
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import { Shipper } from "../resources/shipper/client/Client.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { Courier } from "../resources/courier/client/Client.mjs";
|
|
6
6
|
export class Notifications {
|
|
7
7
|
constructor(_options = {}) {
|
|
8
8
|
this._options = _options;
|
|
@@ -11,8 +11,8 @@ export class Notifications {
|
|
|
11
11
|
var _a;
|
|
12
12
|
return ((_a = this._shipper) !== null && _a !== void 0 ? _a : (this._shipper = new Shipper(this._options)));
|
|
13
13
|
}
|
|
14
|
-
get
|
|
14
|
+
get courier() {
|
|
15
15
|
var _a;
|
|
16
|
-
return ((_a = this.
|
|
16
|
+
return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Courier(this._options)));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.mjs";
|
|
5
5
|
import * as core from "../../../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
-
export declare namespace
|
|
7
|
+
export declare namespace Courier {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
@@ -25,33 +25,33 @@ export declare namespace CourierPreferences {
|
|
|
25
25
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
export declare class
|
|
29
|
-
protected readonly _options:
|
|
30
|
-
constructor(_options?:
|
|
28
|
+
export declare class Courier {
|
|
29
|
+
protected readonly _options: Courier.Options;
|
|
30
|
+
constructor(_options?: Courier.Options);
|
|
31
31
|
/**
|
|
32
32
|
* Retrieves notification preferences for the authenticated courier organization.
|
|
33
33
|
*
|
|
34
|
-
* @param {
|
|
34
|
+
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
|
-
* await client.notifications.
|
|
37
|
+
* await client.notifications.courier.getPreferences()
|
|
38
38
|
*/
|
|
39
|
-
|
|
40
|
-
private
|
|
39
|
+
getPreferences(requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
|
|
40
|
+
private __getPreferences;
|
|
41
41
|
/**
|
|
42
42
|
* Creates or updates notification preferences for the authenticated courier organization.
|
|
43
43
|
*
|
|
44
44
|
* @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
|
|
45
|
-
* @param {
|
|
45
|
+
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
46
|
*
|
|
47
47
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
|
-
* await client.notifications.
|
|
50
|
+
* await client.notifications.courier.upsertPreferences({
|
|
51
51
|
* schema_version: 1
|
|
52
52
|
* })
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
|
-
private
|
|
54
|
+
upsertPreferences(request: Chrt.notifications.CourierNotificationPreferencesClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
|
|
55
|
+
private __upsertPreferences;
|
|
56
56
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
57
57
|
}
|
|
@@ -15,22 +15,22 @@ import * as core from "../../../../../../core/index.mjs";
|
|
|
15
15
|
import * as Chrt from "../../../../../index.mjs";
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
-
export class
|
|
18
|
+
export class Courier {
|
|
19
19
|
constructor(_options = {}) {
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves notification preferences for the authenticated courier organization.
|
|
24
24
|
*
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* await client.notifications.
|
|
28
|
+
* await client.notifications.courier.getPreferences()
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
30
|
+
getPreferences(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__getPreferences(requestOptions));
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
__getPreferences(requestOptions) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
var _a, _b, _c, _d;
|
|
36
36
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -72,19 +72,19 @@ export class CourierPreferences {
|
|
|
72
72
|
* Creates or updates notification preferences for the authenticated courier organization.
|
|
73
73
|
*
|
|
74
74
|
* @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
|
|
75
|
-
* @param {
|
|
75
|
+
* @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
76
|
*
|
|
77
77
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
80
|
-
* await client.notifications.
|
|
80
|
+
* await client.notifications.courier.upsertPreferences({
|
|
81
81
|
* schema_version: 1
|
|
82
82
|
* })
|
|
83
83
|
*/
|
|
84
|
-
|
|
85
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
84
|
+
upsertPreferences(request, requestOptions) {
|
|
85
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertPreferences(request, requestOptions));
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
__upsertPreferences(request, requestOptions) {
|
|
88
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
89
|
var _a, _b, _c, _d;
|
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as shipper from "./shipper/index.mjs";
|
|
2
|
-
export * as
|
|
2
|
+
export * as courier from "./courier/index.mjs";
|
|
3
3
|
export * from "./shipper/client/requests/index.mjs";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./courier/client/requests/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as shipper from "./shipper/index.mjs";
|
|
2
|
-
export * as
|
|
2
|
+
export * as courier from "./courier/index.mjs";
|
|
3
3
|
export * from "./shipper/client/requests/index.mjs";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./courier/client/requests/index.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.187-c";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.187-c";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2359,6 +2359,7 @@ Previews calculated line items for a driver based on rate sheet and task group w
|
|
|
2359
2359
|
await client.courierPayDriverLineItemGroup.preview({
|
|
2360
2360
|
courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
2361
2361
|
task_group_id: "task_group_id",
|
|
2362
|
+
driver_id: "driver_id",
|
|
2362
2363
|
});
|
|
2363
2364
|
```
|
|
2364
2365
|
|
|
@@ -2375,7 +2376,7 @@ await client.courierPayDriverLineItemGroup.preview({
|
|
|
2375
2376
|
<dl>
|
|
2376
2377
|
<dd>
|
|
2377
2378
|
|
|
2378
|
-
**request:** `Chrt.
|
|
2379
|
+
**request:** `Chrt.CourierPayDriverLineItemGroupPreviewReq`
|
|
2379
2380
|
|
|
2380
2381
|
</dd>
|
|
2381
2382
|
</dl>
|
|
@@ -2567,7 +2568,7 @@ await client.courierPayDriverLineItemGroup.create({
|
|
|
2567
2568
|
<dl>
|
|
2568
2569
|
<dd>
|
|
2569
2570
|
|
|
2570
|
-
**request:** `Chrt.
|
|
2571
|
+
**request:** `Chrt.CourierPayDriverLineItemGroupCreateReq`
|
|
2571
2572
|
|
|
2572
2573
|
</dd>
|
|
2573
2574
|
</dl>
|
|
@@ -5139,7 +5140,7 @@ await client.courierPayDriverLineItemGroup.addLineItems.byId("id", {
|
|
|
5139
5140
|
<dl>
|
|
5140
5141
|
<dd>
|
|
5141
5142
|
|
|
5142
|
-
**request:** `Chrt.courierPayDriverLineItemGroup.
|
|
5143
|
+
**request:** `Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupAddLineItemsReq`
|
|
5143
5144
|
|
|
5144
5145
|
</dd>
|
|
5145
5146
|
</dl>
|
|
@@ -5221,7 +5222,7 @@ await client.courierPayDriverLineItemGroup.removeLineItems.byId("id", {
|
|
|
5221
5222
|
<dl>
|
|
5222
5223
|
<dd>
|
|
5223
5224
|
|
|
5224
|
-
**request:** `Chrt.courierPayDriverLineItemGroup.
|
|
5225
|
+
**request:** `Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupRemoveLineItemsReq`
|
|
5225
5226
|
|
|
5226
5227
|
</dd>
|
|
5227
5228
|
</dl>
|
|
@@ -5628,9 +5629,9 @@ await client.notifications.shipper.upsertPreferences({
|
|
|
5628
5629
|
</dl>
|
|
5629
5630
|
</details>
|
|
5630
5631
|
|
|
5631
|
-
## Notifications
|
|
5632
|
+
## Notifications Courier
|
|
5632
5633
|
|
|
5633
|
-
<details><summary><code>client.notifications.
|
|
5634
|
+
<details><summary><code>client.notifications.courier.<a href="/src/api/resources/notifications/resources/courier/client/Client.ts">getPreferences</a>() -> Chrt.CourierNotificationPreferences1</code></summary>
|
|
5634
5635
|
<dl>
|
|
5635
5636
|
<dd>
|
|
5636
5637
|
|
|
@@ -5658,7 +5659,7 @@ Retrieves notification preferences for the authenticated courier organization.
|
|
|
5658
5659
|
<dd>
|
|
5659
5660
|
|
|
5660
5661
|
```typescript
|
|
5661
|
-
await client.notifications.
|
|
5662
|
+
await client.notifications.courier.getPreferences();
|
|
5662
5663
|
```
|
|
5663
5664
|
|
|
5664
5665
|
</dd>
|
|
@@ -5674,7 +5675,7 @@ await client.notifications.courierPreferences.get();
|
|
|
5674
5675
|
<dl>
|
|
5675
5676
|
<dd>
|
|
5676
5677
|
|
|
5677
|
-
**requestOptions:** `
|
|
5678
|
+
**requestOptions:** `Courier.RequestOptions`
|
|
5678
5679
|
|
|
5679
5680
|
</dd>
|
|
5680
5681
|
</dl>
|
|
@@ -5685,7 +5686,7 @@ await client.notifications.courierPreferences.get();
|
|
|
5685
5686
|
</dl>
|
|
5686
5687
|
</details>
|
|
5687
5688
|
|
|
5688
|
-
<details><summary><code>client.notifications.
|
|
5689
|
+
<details><summary><code>client.notifications.courier.<a href="/src/api/resources/notifications/resources/courier/client/Client.ts">upsertPreferences</a>({ ...params }) -> string</code></summary>
|
|
5689
5690
|
<dl>
|
|
5690
5691
|
<dd>
|
|
5691
5692
|
|
|
@@ -5713,7 +5714,7 @@ Creates or updates notification preferences for the authenticated courier organi
|
|
|
5713
5714
|
<dd>
|
|
5714
5715
|
|
|
5715
5716
|
```typescript
|
|
5716
|
-
await client.notifications.
|
|
5717
|
+
await client.notifications.courier.upsertPreferences({
|
|
5717
5718
|
schema_version: 1,
|
|
5718
5719
|
});
|
|
5719
5720
|
```
|
|
@@ -5739,7 +5740,7 @@ await client.notifications.courierPreferences.upsert({
|
|
|
5739
5740
|
<dl>
|
|
5740
5741
|
<dd>
|
|
5741
5742
|
|
|
5742
|
-
**requestOptions:** `
|
|
5743
|
+
**requestOptions:** `Courier.RequestOptions`
|
|
5743
5744
|
|
|
5744
5745
|
</dd>
|
|
5745
5746
|
</dl>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
-
* task_group_id: "task_group_id"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface CourierPayDriverLineItemGroupCreateRequest {
|
|
12
|
-
courier_pay_driver_rate_sheet_id: string;
|
|
13
|
-
task_group_id: string;
|
|
14
|
-
dangerous_goods?: boolean | null;
|
|
15
|
-
holiday?: boolean | null;
|
|
16
|
-
weekend?: boolean | null;
|
|
17
|
-
after_hours?: boolean | null;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
-
* task_group_id: "task_group_id"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface CourierPayDriverLineItemGroupPreviewRequest {
|
|
12
|
-
courier_pay_driver_rate_sheet_id: string;
|
|
13
|
-
task_group_id: string;
|
|
14
|
-
dangerous_goods?: boolean | null;
|
|
15
|
-
holiday?: boolean | null;
|
|
16
|
-
weekend?: boolean | null;
|
|
17
|
-
after_hours?: boolean | null;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
-
* task_group_id: "task_group_id"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface CourierPayDriverLineItemGroupCreateRequest {
|
|
12
|
-
courier_pay_driver_rate_sheet_id: string;
|
|
13
|
-
task_group_id: string;
|
|
14
|
-
dangerous_goods?: boolean | null;
|
|
15
|
-
holiday?: boolean | null;
|
|
16
|
-
weekend?: boolean | null;
|
|
17
|
-
after_hours?: boolean | null;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
|
|
8
|
-
* task_group_id: "task_group_id"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface CourierPayDriverLineItemGroupPreviewRequest {
|
|
12
|
-
courier_pay_driver_rate_sheet_id: string;
|
|
13
|
-
task_group_id: string;
|
|
14
|
-
dangerous_goods?: boolean | null;
|
|
15
|
-
holiday?: boolean | null;
|
|
16
|
-
weekend?: boolean | null;
|
|
17
|
-
after_hours?: boolean | null;
|
|
18
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|