@chrt-inc/typescript-sdk 0.0.186 → 0.0.187

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.
Files changed (74) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.d.ts +6 -5
  3. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/Client.js +20 -47
  4. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.ts +24 -0
  5. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.ts +27 -0
  6. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +2 -2
  7. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.ts +2 -2
  8. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.js +1 -1
  9. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.ts → CourierPayDriverLineItemGroupAddLineItemsReq.d.ts} +1 -1
  10. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.ts +1 -1
  11. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.ts +2 -2
  12. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.js +1 -1
  13. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.ts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.ts} +1 -1
  14. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.ts +1 -1
  15. package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -3
  16. package/dist/cjs/api/resources/notifications/client/Client.js +3 -3
  17. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.ts +12 -12
  18. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.js +13 -13
  19. package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -2
  20. package/dist/cjs/api/resources/notifications/resources/index.js +3 -3
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/Client.mjs +2 -2
  24. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +6 -5
  25. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.mjs +20 -47
  26. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateReq.d.mts +24 -0
  27. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewReq.d.mts +27 -0
  28. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +2 -2
  29. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.d.mts +2 -2
  30. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/Client.mjs +1 -1
  31. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.d.mts → CourierPayDriverLineItemGroupAddLineItemsReq.d.mts} +1 -1
  32. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/index.d.mts +1 -1
  33. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.d.mts +2 -2
  34. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/Client.mjs +1 -1
  35. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.d.mts → CourierPayDriverLineItemGroupRemoveLineItemsReq.d.mts} +1 -1
  36. package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/index.d.mts +1 -1
  37. package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -3
  38. package/dist/esm/api/resources/notifications/client/Client.mjs +3 -3
  39. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.mts +12 -12
  40. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.mjs +11 -11
  41. package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -2
  42. package/dist/esm/api/resources/notifications/resources/index.mjs +2 -2
  43. package/dist/esm/version.d.mts +1 -1
  44. package/dist/esm/version.mjs +1 -1
  45. package/package.json +1 -1
  46. package/reference.md +12 -11
  47. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts +0 -18
  48. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts +0 -18
  49. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts +0 -18
  50. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts +0 -18
  51. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.js → CourierPayDriverLineItemGroupCreateReq.js} +0 -0
  52. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.js → CourierPayDriverLineItemGroupPreviewReq.js} +0 -0
  53. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.js → CourierPayDriverLineItemGroupAddLineItemsReq.js} +0 -0
  54. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.js → CourierPayDriverLineItemGroupRemoveLineItemsReq.js} +0 -0
  55. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.ts +0 -0
  56. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.js +0 -0
  57. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -0
  58. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
  59. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.ts +0 -0
  60. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.js +0 -0
  61. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.d.ts +0 -0
  62. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.js +0 -0
  63. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.mjs → CourierPayDriverLineItemGroupCreateReq.mjs} +0 -0
  64. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.mjs → CourierPayDriverLineItemGroupPreviewReq.mjs} +0 -0
  65. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/addLineItems/client/requests/{AddLineItemsReq.mjs → CourierPayDriverLineItemGroupAddLineItemsReq.mjs} +0 -0
  66. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/resources/removeLineItems/client/requests/{RemoveLineItemsReq.mjs → CourierPayDriverLineItemGroupRemoveLineItemsReq.mjs} +0 -0
  67. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.mts +0 -0
  68. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.mjs +0 -0
  69. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -0
  70. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
  71. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.mts +0 -0
  72. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.mjs +0 -0
  73. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.d.mts +0 -0
  74. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.mjs +0 -0
@@ -63,8 +63,8 @@ class ChrtClient {
63
63
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
64
64
  "X-Fern-Language": "JavaScript",
65
65
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
66
- "X-Fern-SDK-Version": "0.0.186",
67
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.186",
66
+ "X-Fern-SDK-Version": "0.0.187",
67
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.187",
68
68
  "X-Fern-Runtime": core.RUNTIME.type,
69
69
  "X-Fern-Runtime-Version": core.RUNTIME.version,
70
70
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -37,7 +37,7 @@ export declare class CourierPayDriverLineItemGroup {
37
37
  /**
38
38
  * Previews calculated line items for a driver based on rate sheet and task group without creating the group.
39
39
  *
40
- * @param {Chrt.CourierPayDriverLineItemGroupPreviewRequest} request
40
+ * @param {Chrt.CourierPayDriverLineItemGroupPreviewReq} request
41
41
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
42
42
  *
43
43
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -45,10 +45,11 @@ export declare class CourierPayDriverLineItemGroup {
45
45
  * @example
46
46
  * await client.courierPayDriverLineItemGroup.preview({
47
47
  * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
48
- * task_group_id: "task_group_id"
48
+ * task_group_id: "task_group_id",
49
+ * driver_id: "driver_id"
49
50
  * })
50
51
  */
51
- preview(request: Chrt.CourierPayDriverLineItemGroupPreviewRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
+ preview(request: Chrt.CourierPayDriverLineItemGroupPreviewReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
53
  private __preview;
53
54
  /**
54
55
  * Retrieves a courier driver line item group by its ID.
@@ -79,7 +80,7 @@ export declare class CourierPayDriverLineItemGroup {
79
80
  /**
80
81
  * Creates a courier driver line item group by calculating items from rate sheet and task group.
81
82
  *
82
- * @param {Chrt.CourierPayDriverLineItemGroupCreateRequest} request
83
+ * @param {Chrt.CourierPayDriverLineItemGroupCreateReq} request
83
84
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
84
85
  *
85
86
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -90,7 +91,7 @@ export declare class CourierPayDriverLineItemGroup {
90
91
  * task_group_id: "task_group_id"
91
92
  * })
92
93
  */
93
- create(request: Chrt.CourierPayDriverLineItemGroupCreateRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
+ create(request: Chrt.CourierPayDriverLineItemGroupCreateReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
95
  private __create;
95
96
  protected _getAuthorizationHeader(): Promise<string | undefined>;
96
97
  }
@@ -68,7 +68,7 @@ class CourierPayDriverLineItemGroup {
68
68
  /**
69
69
  * Previews calculated line items for a driver based on rate sheet and task group without creating the group.
70
70
  *
71
- * @param {Chrt.CourierPayDriverLineItemGroupPreviewRequest} request
71
+ * @param {Chrt.CourierPayDriverLineItemGroupPreviewReq} request
72
72
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
73
73
  *
74
74
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -76,7 +76,8 @@ class CourierPayDriverLineItemGroup {
76
76
  * @example
77
77
  * await client.courierPayDriverLineItemGroup.preview({
78
78
  * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
79
- * task_group_id: "task_group_id"
79
+ * task_group_id: "task_group_id",
80
+ * driver_id: "driver_id"
80
81
  * })
81
82
  */
82
83
  preview(request, requestOptions) {
@@ -84,28 +85,14 @@ class CourierPayDriverLineItemGroup {
84
85
  }
85
86
  __preview(request, requestOptions) {
86
87
  return __awaiter(this, void 0, void 0, function* () {
87
- var _a, _b, _c, _d, _e, _f, _g, _h;
88
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
89
- const _queryParams = {};
90
- _queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
91
- _queryParams["task_group_id"] = taskGroupId;
92
- if (dangerousGoods !== undefined) {
93
- _queryParams["dangerous_goods"] = (_a = dangerousGoods === null || dangerousGoods === void 0 ? void 0 : dangerousGoods.toString()) !== null && _a !== void 0 ? _a : null;
94
- }
95
- if (holiday !== undefined) {
96
- _queryParams["holiday"] = (_b = holiday === null || holiday === void 0 ? void 0 : holiday.toString()) !== null && _b !== void 0 ? _b : null;
97
- }
98
- if (weekend !== undefined) {
99
- _queryParams["weekend"] = (_c = weekend === null || weekend === void 0 ? void 0 : weekend.toString()) !== null && _c !== void 0 ? _c : null;
100
- }
101
- if (afterHours !== undefined) {
102
- _queryParams["after_hours"] = (_d = afterHours === null || afterHours === void 0 ? void 0 : afterHours.toString()) !== null && _d !== void 0 ? _d : null;
103
- }
104
- const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
105
- 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"),
106
- method: "GET",
107
- headers: (0, headers_js_1.mergeHeaders)((_h = this._options) === null || _h === void 0 ? void 0 : _h.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
108
- queryParameters: _queryParams,
88
+ var _a, _b, _c, _d;
89
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
90
+ 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"),
91
+ method: "POST",
92
+ 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),
93
+ contentType: "application/json",
94
+ requestType: "json",
95
+ body: request,
109
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
110
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
111
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -136,7 +123,7 @@ class CourierPayDriverLineItemGroup {
136
123
  rawResponse: _response.rawResponse,
137
124
  });
138
125
  case "timeout":
139
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/courier_pay_driver_line_item_groups/preview.");
126
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/courier_pay_driver_line_item_groups/preview.");
140
127
  case "unknown":
141
128
  throw new errors.ChrtError({
142
129
  message: _response.error.errorMessage,
@@ -262,7 +249,7 @@ class CourierPayDriverLineItemGroup {
262
249
  /**
263
250
  * Creates a courier driver line item group by calculating items from rate sheet and task group.
264
251
  *
265
- * @param {Chrt.CourierPayDriverLineItemGroupCreateRequest} request
252
+ * @param {Chrt.CourierPayDriverLineItemGroupCreateReq} request
266
253
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
267
254
  *
268
255
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -278,28 +265,14 @@ class CourierPayDriverLineItemGroup {
278
265
  }
279
266
  __create(request, requestOptions) {
280
267
  return __awaiter(this, void 0, void 0, function* () {
281
- var _a, _b, _c, _d, _e, _f, _g, _h;
282
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
283
- const _queryParams = {};
284
- _queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
285
- _queryParams["task_group_id"] = taskGroupId;
286
- if (dangerousGoods !== undefined) {
287
- _queryParams["dangerous_goods"] = (_a = dangerousGoods === null || dangerousGoods === void 0 ? void 0 : dangerousGoods.toString()) !== null && _a !== void 0 ? _a : null;
288
- }
289
- if (holiday !== undefined) {
290
- _queryParams["holiday"] = (_b = holiday === null || holiday === void 0 ? void 0 : holiday.toString()) !== null && _b !== void 0 ? _b : null;
291
- }
292
- if (weekend !== undefined) {
293
- _queryParams["weekend"] = (_c = weekend === null || weekend === void 0 ? void 0 : weekend.toString()) !== null && _c !== void 0 ? _c : null;
294
- }
295
- if (afterHours !== undefined) {
296
- _queryParams["after_hours"] = (_d = afterHours === null || afterHours === void 0 ? void 0 : afterHours.toString()) !== null && _d !== void 0 ? _d : null;
297
- }
298
- const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
299
- 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"),
268
+ var _a, _b, _c, _d;
269
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
+ 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"),
300
271
  method: "POST",
301
- headers: (0, headers_js_1.mergeHeaders)((_h = this._options) === null || _h === void 0 ? void 0 : _h.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
- queryParameters: _queryParams,
272
+ 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),
273
+ contentType: "application/json",
274
+ requestType: "json",
275
+ body: request,
303
276
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
304
277
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
305
278
  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 CourierPayDriverLineItemGroupPreviewRequest } from "./CourierPayDriverLineItemGroupPreviewRequest.js";
2
- export { type CourierPayDriverLineItemGroupCreateRequest } from "./CourierPayDriverLineItemGroupCreateRequest.js";
1
+ export { type CourierPayDriverLineItemGroupPreviewReq } from "./CourierPayDriverLineItemGroupPreviewReq.js";
2
+ export { type CourierPayDriverLineItemGroupCreateReq } from "./CourierPayDriverLineItemGroupCreateReq.js";
@@ -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.AddLineItemsReq} request
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.AddLineItemsReq, requestOptions?: AddLineItems.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroup1>;
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
  }
@@ -59,7 +59,7 @@ class AddLineItems {
59
59
  * Adds additional line items to an existing courier driver line item group.
60
60
  *
61
61
  * @param {string} id
62
- * @param {Chrt.courierPayDriverLineItemGroup.AddLineItemsReq} request
62
+ * @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupAddLineItemsReq} request
63
63
  * @param {AddLineItems.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
65
65
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -13,7 +13,7 @@ import * as Chrt from "../../../../../../index.js";
13
13
  * }]
14
14
  * }
15
15
  */
16
- export interface AddLineItemsReq {
16
+ export interface CourierPayDriverLineItemGroupAddLineItemsReq {
17
17
  /** Line items to add to the group */
18
18
  line_items: Chrt.LineItem1[];
19
19
  }
@@ -1 +1 @@
1
- export { type AddLineItemsReq } from "./AddLineItemsReq.js";
1
+ export { type CourierPayDriverLineItemGroupAddLineItemsReq } from "./CourierPayDriverLineItemGroupAddLineItemsReq.js";
@@ -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.RemoveLineItemsReq} request
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.RemoveLineItemsReq, requestOptions?: RemoveLineItems.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroup1>;
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
  }
@@ -59,7 +59,7 @@ class RemoveLineItems {
59
59
  * Removes specific line items from a courier driver line item group by exact match.
60
60
  *
61
61
  * @param {string} id
62
- * @param {Chrt.courierPayDriverLineItemGroup.RemoveLineItemsReq} request
62
+ * @param {Chrt.courierPayDriverLineItemGroup.CourierPayDriverLineItemGroupRemoveLineItemsReq} request
63
63
  * @param {RemoveLineItems.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
65
65
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -13,7 +13,7 @@ import * as Chrt from "../../../../../../index.js";
13
13
  * }]
14
14
  * }
15
15
  */
16
- export interface RemoveLineItemsReq {
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 RemoveLineItemsReq } from "./RemoveLineItemsReq.js";
1
+ export { type CourierPayDriverLineItemGroupRemoveLineItemsReq } from "./CourierPayDriverLineItemGroupRemoveLineItemsReq.js";
@@ -4,7 +4,7 @@
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
6
  import { Shipper } from "../resources/shipper/client/Client.js";
7
- import { CourierPreferences } from "../resources/courierPreferences/client/Client.js";
7
+ import { Courier } from "../resources/courier/client/Client.js";
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 _courierPreferences: CourierPreferences | undefined;
22
+ protected _courier: Courier | undefined;
23
23
  constructor(_options?: Notifications.Options);
24
24
  get shipper(): Shipper;
25
- get courierPreferences(): CourierPreferences;
25
+ get courier(): Courier;
26
26
  }
@@ -5,7 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Notifications = void 0;
7
7
  const Client_js_1 = require("../resources/shipper/client/Client.js");
8
- const Client_js_2 = require("../resources/courierPreferences/client/Client.js");
8
+ const Client_js_2 = require("../resources/courier/client/Client.js");
9
9
  class Notifications {
10
10
  constructor(_options = {}) {
11
11
  this._options = _options;
@@ -14,9 +14,9 @@ class Notifications {
14
14
  var _a;
15
15
  return ((_a = this._shipper) !== null && _a !== void 0 ? _a : (this._shipper = new Client_js_1.Shipper(this._options)));
16
16
  }
17
- get courierPreferences() {
17
+ get courier() {
18
18
  var _a;
19
- return ((_a = this._courierPreferences) !== null && _a !== void 0 ? _a : (this._courierPreferences = new Client_js_2.CourierPreferences(this._options)));
19
+ return ((_a = this._courier) !== null && _a !== void 0 ? _a : (this._courier = new Client_js_2.Courier(this._options)));
20
20
  }
21
21
  }
22
22
  exports.Notifications = Notifications;
@@ -4,7 +4,7 @@
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
6
  import * as Chrt from "../../../../../index.js";
7
- export declare namespace CourierPreferences {
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 CourierPreferences {
29
- protected readonly _options: CourierPreferences.Options;
30
- constructor(_options?: CourierPreferences.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 {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
34
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
35
35
  *
36
36
  * @example
37
- * await client.notifications.courierPreferences.get()
37
+ * await client.notifications.courier.getPreferences()
38
38
  */
39
- get(requestOptions?: CourierPreferences.RequestOptions): core.HttpResponsePromise<Chrt.CourierNotificationPreferences1>;
40
- private __get;
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 {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
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.courierPreferences.upsert({
50
+ * await client.notifications.courier.upsertPreferences({
51
51
  * schema_version: 1
52
52
  * })
53
53
  */
54
- upsert(request: Chrt.notifications.CourierNotificationPreferencesClientCreate1, requestOptions?: CourierPreferences.RequestOptions): core.HttpResponsePromise<string>;
55
- private __upsert;
54
+ upsertPreferences(request: Chrt.notifications.CourierNotificationPreferencesClientCreate1, requestOptions?: Courier.RequestOptions): core.HttpResponsePromise<string>;
55
+ private __upsertPreferences;
56
56
  protected _getAuthorizationHeader(): Promise<string | undefined>;
57
57
  }
@@ -45,28 +45,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  });
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.CourierPreferences = void 0;
48
+ exports.Courier = void 0;
49
49
  const environments = __importStar(require("../../../../../../environments.js"));
50
50
  const core = __importStar(require("../../../../../../core/index.js"));
51
51
  const Chrt = __importStar(require("../../../../../index.js"));
52
52
  const headers_js_1 = require("../../../../../../core/headers.js");
53
53
  const errors = __importStar(require("../../../../../../errors/index.js"));
54
- class CourierPreferences {
54
+ class Courier {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
59
  * Retrieves notification preferences for the authenticated courier organization.
60
60
  *
61
- * @param {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
61
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
62
62
  *
63
63
  * @example
64
- * await client.notifications.courierPreferences.get()
64
+ * await client.notifications.courier.getPreferences()
65
65
  */
66
- get(requestOptions) {
67
- return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
66
+ getPreferences(requestOptions) {
67
+ return core.HttpResponsePromise.fromPromise(this.__getPreferences(requestOptions));
68
68
  }
69
- __get(requestOptions) {
69
+ __getPreferences(requestOptions) {
70
70
  return __awaiter(this, void 0, void 0, function* () {
71
71
  var _a, _b, _c, _d;
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -108,19 +108,19 @@ class CourierPreferences {
108
108
  * Creates or updates notification preferences for the authenticated courier organization.
109
109
  *
110
110
  * @param {Chrt.notifications.CourierNotificationPreferencesClientCreate1} request
111
- * @param {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
111
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
112
112
  *
113
113
  * @throws {@link Chrt.UnprocessableEntityError}
114
114
  *
115
115
  * @example
116
- * await client.notifications.courierPreferences.upsert({
116
+ * await client.notifications.courier.upsertPreferences({
117
117
  * schema_version: 1
118
118
  * })
119
119
  */
120
- upsert(request, requestOptions) {
121
- return core.HttpResponsePromise.fromPromise(this.__upsert(request, requestOptions));
120
+ upsertPreferences(request, requestOptions) {
121
+ return core.HttpResponsePromise.fromPromise(this.__upsertPreferences(request, requestOptions));
122
122
  }
123
- __upsert(request, requestOptions) {
123
+ __upsertPreferences(request, requestOptions) {
124
124
  return __awaiter(this, void 0, void 0, function* () {
125
125
  var _a, _b, _c, _d;
126
126
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
@@ -176,4 +176,4 @@ class CourierPreferences {
176
176
  });
177
177
  }
178
178
  }
179
- exports.CourierPreferences = CourierPreferences;
179
+ exports.Courier = Courier;
@@ -1,4 +1,4 @@
1
1
  export * as shipper from "./shipper/index.js";
2
- export * as courierPreferences from "./courierPreferences/index.js";
2
+ export * as courier from "./courier/index.js";
3
3
  export * from "./shipper/client/requests/index.js";
4
- export * from "./courierPreferences/client/requests/index.js";
4
+ export * from "./courier/client/requests/index.js";
@@ -36,8 +36,8 @@ 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.courierPreferences = exports.shipper = void 0;
39
+ exports.courier = exports.shipper = void 0;
40
40
  exports.shipper = __importStar(require("./shipper/index.js"));
41
- exports.courierPreferences = __importStar(require("./courierPreferences/index.js"));
41
+ exports.courier = __importStar(require("./courier/index.js"));
42
42
  __exportStar(require("./shipper/client/requests/index.js"), exports);
43
- __exportStar(require("./courierPreferences/client/requests/index.js"), exports);
43
+ __exportStar(require("./courier/client/requests/index.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.186";
1
+ export declare const SDK_VERSION = "0.0.187";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.186";
4
+ exports.SDK_VERSION = "0.0.187";
@@ -27,8 +27,8 @@ export class ChrtClient {
27
27
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
28
28
  "X-Fern-Language": "JavaScript",
29
29
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
30
- "X-Fern-SDK-Version": "0.0.186",
31
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.186",
30
+ "X-Fern-SDK-Version": "0.0.187",
31
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.187",
32
32
  "X-Fern-Runtime": core.RUNTIME.type,
33
33
  "X-Fern-Runtime-Version": core.RUNTIME.version,
34
34
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -37,7 +37,7 @@ export declare class CourierPayDriverLineItemGroup {
37
37
  /**
38
38
  * Previews calculated line items for a driver based on rate sheet and task group without creating the group.
39
39
  *
40
- * @param {Chrt.CourierPayDriverLineItemGroupPreviewRequest} request
40
+ * @param {Chrt.CourierPayDriverLineItemGroupPreviewReq} request
41
41
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
42
42
  *
43
43
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -45,10 +45,11 @@ export declare class CourierPayDriverLineItemGroup {
45
45
  * @example
46
46
  * await client.courierPayDriverLineItemGroup.preview({
47
47
  * courier_pay_driver_rate_sheet_id: "courier_pay_driver_rate_sheet_id",
48
- * task_group_id: "task_group_id"
48
+ * task_group_id: "task_group_id",
49
+ * driver_id: "driver_id"
49
50
  * })
50
51
  */
51
- preview(request: Chrt.CourierPayDriverLineItemGroupPreviewRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
+ preview(request: Chrt.CourierPayDriverLineItemGroupPreviewReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<Chrt.CourierPayDriverLineItemGroupClientCreate1>;
52
53
  private __preview;
53
54
  /**
54
55
  * Retrieves a courier driver line item group by its ID.
@@ -79,7 +80,7 @@ export declare class CourierPayDriverLineItemGroup {
79
80
  /**
80
81
  * Creates a courier driver line item group by calculating items from rate sheet and task group.
81
82
  *
82
- * @param {Chrt.CourierPayDriverLineItemGroupCreateRequest} request
83
+ * @param {Chrt.CourierPayDriverLineItemGroupCreateReq} request
83
84
  * @param {CourierPayDriverLineItemGroup.RequestOptions} requestOptions - Request-specific configuration.
84
85
  *
85
86
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -90,7 +91,7 @@ export declare class CourierPayDriverLineItemGroup {
90
91
  * task_group_id: "task_group_id"
91
92
  * })
92
93
  */
93
- create(request: Chrt.CourierPayDriverLineItemGroupCreateRequest, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
+ create(request: Chrt.CourierPayDriverLineItemGroupCreateReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
95
  private __create;
95
96
  protected _getAuthorizationHeader(): Promise<string | undefined>;
96
97
  }