@chrt-inc/typescript-sdk 0.0.184 → 0.0.186-b

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 (54) 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/CreateLineItemGroupReq.d.ts +24 -0
  5. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/PreviewLineItemGroupReq.d.ts +27 -0
  6. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.ts +2 -2
  7. package/dist/cjs/api/resources/notifications/client/Client.d.ts +3 -3
  8. package/dist/cjs/api/resources/notifications/client/Client.js +3 -3
  9. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.ts +12 -12
  10. package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.js +13 -13
  11. package/dist/cjs/api/resources/notifications/resources/index.d.ts +2 -2
  12. package/dist/cjs/api/resources/notifications/resources/index.js +3 -3
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/Client.mjs +2 -2
  16. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.d.mts +6 -5
  17. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/Client.mjs +20 -47
  18. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CreateLineItemGroupReq.d.mts +24 -0
  19. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/PreviewLineItemGroupReq.d.mts +27 -0
  20. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/index.d.mts +2 -2
  21. package/dist/esm/api/resources/notifications/client/Client.d.mts +3 -3
  22. package/dist/esm/api/resources/notifications/client/Client.mjs +3 -3
  23. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.d.mts +12 -12
  24. package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/Client.mjs +11 -11
  25. package/dist/esm/api/resources/notifications/resources/index.d.mts +2 -2
  26. package/dist/esm/api/resources/notifications/resources/index.mjs +2 -2
  27. package/dist/esm/version.d.mts +1 -1
  28. package/dist/esm/version.mjs +1 -1
  29. package/package.json +1 -1
  30. package/reference.md +10 -9
  31. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.ts +0 -18
  32. package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.ts +0 -18
  33. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupCreateRequest.d.mts +0 -18
  34. package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/CourierPayDriverLineItemGroupPreviewRequest.d.mts +0 -18
  35. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.js → CreateLineItemGroupReq.js} +0 -0
  36. /package/dist/cjs/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.js → PreviewLineItemGroupReq.js} +0 -0
  37. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.ts +0 -0
  38. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/index.js +0 -0
  39. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.ts +0 -0
  40. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.js +0 -0
  41. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.ts +0 -0
  42. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.js +0 -0
  43. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.d.ts +0 -0
  44. /package/dist/cjs/api/resources/notifications/resources/{courierPreferences → courier}/index.js +0 -0
  45. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupCreateRequest.mjs → CreateLineItemGroupReq.mjs} +0 -0
  46. /package/dist/esm/api/resources/courierPayDriverLineItemGroup/client/requests/{CourierPayDriverLineItemGroupPreviewRequest.mjs → PreviewLineItemGroupReq.mjs} +0 -0
  47. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.d.mts +0 -0
  48. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/index.mjs +0 -0
  49. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.d.mts +0 -0
  50. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/CourierNotificationPreferencesClientCreate1.mjs +0 -0
  51. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.d.mts +0 -0
  52. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/client/requests/index.mjs +0 -0
  53. /package/dist/esm/api/resources/notifications/resources/{courierPreferences → courier}/index.d.mts +0 -0
  54. /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.184",
67
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.184",
66
+ "X-Fern-SDK-Version": "0.0.186-b",
67
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.186-b",
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.PreviewLineItemGroupReq} 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.PreviewLineItemGroupReq, 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.CreateLineItemGroupReq} 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.CreateLineItemGroupReq, 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.PreviewLineItemGroupReq} 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.CreateLineItemGroupReq} 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 CreateLineItemGroupReq {
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 PreviewLineItemGroupReq {
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 PreviewLineItemGroupReq } from "./PreviewLineItemGroupReq.js";
2
+ export { type CreateLineItemGroupReq } from "./CreateLineItemGroupReq.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.184";
1
+ export declare const SDK_VERSION = "0.0.186-b";
@@ -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.184";
4
+ exports.SDK_VERSION = "0.0.186-b";
@@ -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.184",
31
- "User-Agent": "@chrt-inc/typescript-sdk/0.0.184",
30
+ "X-Fern-SDK-Version": "0.0.186-b",
31
+ "User-Agent": "@chrt-inc/typescript-sdk/0.0.186-b",
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.PreviewLineItemGroupReq} 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.PreviewLineItemGroupReq, 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.CreateLineItemGroupReq} 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.CreateLineItemGroupReq, requestOptions?: CourierPayDriverLineItemGroup.RequestOptions): core.HttpResponsePromise<string>;
94
95
  private __create;
95
96
  protected _getAuthorizationHeader(): Promise<string | undefined>;
96
97
  }
@@ -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.CourierPayDriverLineItemGroupPreviewRequest} request
35
+ * @param {Chrt.PreviewLineItemGroupReq} 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, _e, _f, _g, _h;
52
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
53
- const _queryParams = {};
54
- _queryParams["courier_pay_driver_rate_sheet_id"] = courierPayDriverRateSheetId;
55
- _queryParams["task_group_id"] = taskGroupId;
56
- if (dangerousGoods !== undefined) {
57
- _queryParams["dangerous_goods"] = (_a = dangerousGoods === null || dangerousGoods === void 0 ? void 0 : dangerousGoods.toString()) !== null && _a !== void 0 ? _a : null;
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 GET /oort/courier_pay_driver_line_item_groups/preview.");
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.CourierPayDriverLineItemGroupCreateRequest} request
216
+ * @param {Chrt.CreateLineItemGroupReq} 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, _e, _f, _g, _h;
246
- const { courier_pay_driver_rate_sheet_id: courierPayDriverRateSheetId, task_group_id: taskGroupId, dangerous_goods: dangerousGoods, holiday, weekend, after_hours: afterHours, } = request;
247
- const _queryParams = {};
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((_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),
266
- queryParameters: _queryParams,
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 CreateLineItemGroupReq {
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 PreviewLineItemGroupReq {
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.mjs";
2
- export { type CourierPayDriverLineItemGroupCreateRequest } from "./CourierPayDriverLineItemGroupCreateRequest.mjs";
1
+ export { type PreviewLineItemGroupReq } from "./PreviewLineItemGroupReq.mjs";
2
+ export { type CreateLineItemGroupReq } from "./CreateLineItemGroupReq.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 { CourierPreferences } from "../resources/courierPreferences/client/Client.mjs";
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 _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
  }
@@ -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 { CourierPreferences } from "../resources/courierPreferences/client/Client.mjs";
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 courierPreferences() {
14
+ get courier() {
15
15
  var _a;
16
- return ((_a = this._courierPreferences) !== null && _a !== void 0 ? _a : (this._courierPreferences = new CourierPreferences(this._options)));
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 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
  }
@@ -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 CourierPreferences {
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 {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
25
+ * @param {Courier.RequestOptions} requestOptions - Request-specific configuration.
26
26
  *
27
27
  * @example
28
- * await client.notifications.courierPreferences.get()
28
+ * await client.notifications.courier.getPreferences()
29
29
  */
30
- get(requestOptions) {
31
- return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
30
+ getPreferences(requestOptions) {
31
+ return core.HttpResponsePromise.fromPromise(this.__getPreferences(requestOptions));
32
32
  }
33
- __get(requestOptions) {
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 {CourierPreferences.RequestOptions} requestOptions - Request-specific configuration.
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.courierPreferences.upsert({
80
+ * await client.notifications.courier.upsertPreferences({
81
81
  * schema_version: 1
82
82
  * })
83
83
  */
84
- upsert(request, requestOptions) {
85
- return core.HttpResponsePromise.fromPromise(this.__upsert(request, requestOptions));
84
+ upsertPreferences(request, requestOptions) {
85
+ return core.HttpResponsePromise.fromPromise(this.__upsertPreferences(request, requestOptions));
86
86
  }
87
- __upsert(request, requestOptions) {
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 courierPreferences from "./courierPreferences/index.mjs";
2
+ export * as courier from "./courier/index.mjs";
3
3
  export * from "./shipper/client/requests/index.mjs";
4
- export * from "./courierPreferences/client/requests/index.mjs";
4
+ export * from "./courier/client/requests/index.mjs";
@@ -1,4 +1,4 @@
1
1
  export * as shipper from "./shipper/index.mjs";
2
- export * as courierPreferences from "./courierPreferences/index.mjs";
2
+ export * as courier from "./courier/index.mjs";
3
3
  export * from "./shipper/client/requests/index.mjs";
4
- export * from "./courierPreferences/client/requests/index.mjs";
4
+ export * from "./courier/client/requests/index.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.184";
1
+ export declare const SDK_VERSION = "0.0.186-b";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.184";
1
+ export const SDK_VERSION = "0.0.186-b";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "0.0.184",
3
+ "version": "0.0.186-b",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
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.CourierPayDriverLineItemGroupPreviewRequest`
2379
+ **request:** `Chrt.PreviewLineItemGroupReq`
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.CourierPayDriverLineItemGroupCreateRequest`
2571
+ **request:** `Chrt.CreateLineItemGroupReq`
2571
2572
 
2572
2573
  </dd>
2573
2574
  </dl>
@@ -5628,9 +5629,9 @@ await client.notifications.shipper.upsertPreferences({
5628
5629
  </dl>
5629
5630
  </details>
5630
5631
 
5631
- ## Notifications CourierPreferences
5632
+ ## Notifications Courier
5632
5633
 
5633
- <details><summary><code>client.notifications.courierPreferences.<a href="/src/api/resources/notifications/resources/courierPreferences/client/Client.ts">get</a>() -> Chrt.CourierNotificationPreferences1</code></summary>
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.courierPreferences.get();
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:** `CourierPreferences.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.courierPreferences.<a href="/src/api/resources/notifications/resources/courierPreferences/client/Client.ts">upsert</a>({ ...params }) -> string</code></summary>
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.courierPreferences.upsert({
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:** `CourierPreferences.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
- }