@chrt-inc/typescript-sdk 1.762.0 → 1.788.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +18 -0
  3. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +67 -0
  4. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.d.ts +23 -0
  5. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/index.d.ts +1 -0
  6. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.d.ts +36 -2
  7. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.js +138 -1
  8. package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.d.ts +14 -0
  9. package/dist/cjs/api/resources/notifications/resources/adHoc/client/requests/index.d.ts +1 -1
  10. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.d.ts +46 -9
  11. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/Client.js +148 -16
  12. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.ts +1 -1
  13. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.ts +1 -1
  14. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.ts +0 -1
  15. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +2 -0
  16. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +1 -0
  17. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +1 -0
  18. package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +1 -0
  19. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +2 -2
  20. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +2 -2
  21. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.ts +3 -0
  22. package/dist/cjs/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.ts +4 -0
  23. package/dist/cjs/api/types/LineItem1.d.ts +1 -0
  24. package/dist/cjs/api/types/NotificationEventsForAdHocEnum.d.ts +4 -3
  25. package/dist/cjs/api/types/NotificationEventsForAdHocEnum.js +1 -0
  26. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +2 -1
  27. package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +1 -0
  28. package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +2 -1
  29. package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +1 -0
  30. package/dist/cjs/api/types/NotificationIntentAdHoc1.d.ts +2 -1
  31. package/dist/cjs/api/{resources/notifications/resources/adHoc/client/requests → types}/NotificationIntentAdHocClientCreate1.d.ts +1 -8
  32. package/dist/cjs/api/types/NotificationIntentAdHocClientCreate1.js +5 -0
  33. package/dist/cjs/api/types/OnboardCourierTaskActionEnum1.d.ts +1 -11
  34. package/dist/cjs/api/types/OnboardCourierTaskActionEnum1.js +0 -10
  35. package/dist/cjs/api/types/OperationsTaskListEntry1.d.ts +4 -12
  36. package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.d.ts +15 -0
  37. package/dist/cjs/api/types/OperationsTaskListEntryClientCreate1.js +5 -0
  38. package/dist/cjs/api/types/OrderTemplate1.d.ts +1 -0
  39. package/dist/cjs/api/types/OrderTemplateCore1.d.ts +1 -0
  40. package/dist/cjs/api/types/Session1.d.ts +3 -0
  41. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  42. package/dist/cjs/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.d.ts +10 -0
  43. package/dist/cjs/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.js +5 -0
  44. package/dist/cjs/api/types/index.d.ts +3 -0
  45. package/dist/cjs/api/types/index.js +3 -0
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/Client.mjs +2 -2
  49. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +18 -0
  50. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +67 -0
  51. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.d.mts +23 -0
  52. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/index.d.mts +1 -0
  53. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.d.mts +36 -2
  54. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.mjs +138 -1
  55. package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.d.mts +14 -0
  56. package/dist/esm/api/resources/notifications/resources/adHoc/client/requests/index.d.mts +1 -1
  57. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.d.mts +46 -9
  58. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/Client.mjs +148 -16
  59. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListClientCreate1.d.mts +1 -1
  60. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListReorderEntries1.d.mts +1 -1
  61. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/index.d.mts +0 -1
  62. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +2 -0
  63. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +1 -0
  64. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +1 -0
  65. package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +1 -0
  66. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +2 -2
  67. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +2 -2
  68. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientCreate1.d.mts +3 -0
  69. package/dist/esm/api/resources/tracking/resources/sessions/client/requests/SessionClientUpdate1.d.mts +4 -0
  70. package/dist/esm/api/types/LineItem1.d.mts +1 -0
  71. package/dist/esm/api/types/NotificationEventsForAdHocEnum.d.mts +4 -3
  72. package/dist/esm/api/types/NotificationEventsForAdHocEnum.mjs +1 -0
  73. package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +2 -1
  74. package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +1 -0
  75. package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +2 -1
  76. package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +1 -0
  77. package/dist/esm/api/types/NotificationIntentAdHoc1.d.mts +2 -1
  78. package/dist/esm/api/{resources/notifications/resources/adHoc/client/requests → types}/NotificationIntentAdHocClientCreate1.d.mts +1 -8
  79. package/dist/esm/api/types/NotificationIntentAdHocClientCreate1.mjs +4 -0
  80. package/dist/esm/api/types/OnboardCourierTaskActionEnum1.d.mts +1 -11
  81. package/dist/esm/api/types/OnboardCourierTaskActionEnum1.mjs +0 -10
  82. package/dist/esm/api/types/OperationsTaskListEntry1.d.mts +4 -12
  83. package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.d.mts +15 -0
  84. package/dist/esm/api/types/OperationsTaskListEntryClientCreate1.mjs +4 -0
  85. package/dist/esm/api/types/OrderTemplate1.d.mts +1 -0
  86. package/dist/esm/api/types/OrderTemplateCore1.d.mts +1 -0
  87. package/dist/esm/api/types/Session1.d.mts +3 -0
  88. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  89. package/dist/esm/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.d.mts +10 -0
  90. package/dist/esm/api/types/TrackingSessionDestinationGeofenceEnteredWebhookPayload.mjs +4 -0
  91. package/dist/esm/api/types/index.d.mts +3 -0
  92. package/dist/esm/api/types/index.mjs +3 -0
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
  96. package/reference.md +384 -10
  97. package/dist/cjs/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.ts +0 -11
  98. package/dist/esm/api/resources/operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.d.mts +0 -11
  99. /package/dist/cjs/api/resources/{notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.js → billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.js} +0 -0
  100. /package/dist/cjs/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.js → notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.js} +0 -0
  101. /package/dist/esm/api/resources/{notifications/resources/adHoc/client/requests/NotificationIntentAdHocClientCreate1.mjs → billing/resources/lineItemGroups/client/requests/LineItemGroupSharedTaskGroupMileageCreateClientReq.mjs} +0 -0
  102. /package/dist/esm/api/resources/{operations/resources/operationsTaskLists/client/requests/OperationsTaskListSetEntries1.mjs → notifications/resources/adHoc/client/requests/AdHocListBySessionIdV1Request.mjs} +0 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TrackingSessionDestinationGeofenceEnteredWebhookPayload {
5
+ event_type?: "tracking.session.destination_geofence_entered";
6
+ /** UTC timestamp when the event occurred */
7
+ event_timestamp: string;
8
+ /** The tracking session whose tracker entered the destination geofence */
9
+ session_id: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -210,6 +210,7 @@ export * from "./NotificationGroupLimitedForDriver1.js";
210
210
  export * from "./NotificationGroupListRes.js";
211
211
  export * from "./NotificationGroupUserListRes.js";
212
212
  export * from "./NotificationIntentAdHoc1.js";
213
+ export * from "./NotificationIntentAdHocClientCreate1.js";
213
214
  export * from "./NotificationUserPreferences1.js";
214
215
  export * from "./OffChrtProviderOrg1.js";
215
216
  export * from "./OffChrtProviderOrgListRes.js";
@@ -228,6 +229,7 @@ export * from "./OperationsTask1.js";
228
229
  export * from "./OperationsTaskComment1.js";
229
230
  export * from "./OperationsTaskList1.js";
230
231
  export * from "./OperationsTaskListEntry1.js";
232
+ export * from "./OperationsTaskListEntryClientCreate1.js";
231
233
  export * from "./OperationsTaskListListRes.js";
232
234
  export * from "./OperationsTaskListRemoveFromCaseRes1.js";
233
235
  export * from "./OperationsTaskListRes.js";
@@ -405,6 +407,7 @@ export * from "./TiveTimeseriesRes.js";
405
407
  export * from "./TiveTimeseriesSyncRes.js";
406
408
  export * from "./TrackingDeviceTypeEnum1.js";
407
409
  export * from "./TrackingOrgScopeEnum.js";
410
+ export * from "./TrackingSessionDestinationGeofenceEnteredWebhookPayload.js";
408
411
  export * from "./TrackingSharingSettingsRes.js";
409
412
  export * from "./TrackingTypeaheadFieldEnum.js";
410
413
  export * from "./TrackingTypeaheadResult.js";
@@ -226,6 +226,7 @@ __exportStar(require("./NotificationGroupLimitedForDriver1.js"), exports);
226
226
  __exportStar(require("./NotificationGroupListRes.js"), exports);
227
227
  __exportStar(require("./NotificationGroupUserListRes.js"), exports);
228
228
  __exportStar(require("./NotificationIntentAdHoc1.js"), exports);
229
+ __exportStar(require("./NotificationIntentAdHocClientCreate1.js"), exports);
229
230
  __exportStar(require("./NotificationUserPreferences1.js"), exports);
230
231
  __exportStar(require("./OffChrtProviderOrg1.js"), exports);
231
232
  __exportStar(require("./OffChrtProviderOrgListRes.js"), exports);
@@ -244,6 +245,7 @@ __exportStar(require("./OperationsTask1.js"), exports);
244
245
  __exportStar(require("./OperationsTaskComment1.js"), exports);
245
246
  __exportStar(require("./OperationsTaskList1.js"), exports);
246
247
  __exportStar(require("./OperationsTaskListEntry1.js"), exports);
248
+ __exportStar(require("./OperationsTaskListEntryClientCreate1.js"), exports);
247
249
  __exportStar(require("./OperationsTaskListListRes.js"), exports);
248
250
  __exportStar(require("./OperationsTaskListRemoveFromCaseRes1.js"), exports);
249
251
  __exportStar(require("./OperationsTaskListRes.js"), exports);
@@ -421,6 +423,7 @@ __exportStar(require("./TiveTimeseriesRes.js"), exports);
421
423
  __exportStar(require("./TiveTimeseriesSyncRes.js"), exports);
422
424
  __exportStar(require("./TrackingDeviceTypeEnum1.js"), exports);
423
425
  __exportStar(require("./TrackingOrgScopeEnum.js"), exports);
426
+ __exportStar(require("./TrackingSessionDestinationGeofenceEnteredWebhookPayload.js"), exports);
424
427
  __exportStar(require("./TrackingSharingSettingsRes.js"), exports);
425
428
  __exportStar(require("./TrackingTypeaheadFieldEnum.js"), exports);
426
429
  __exportStar(require("./TrackingTypeaheadResult.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.762.0";
1
+ export declare const SDK_VERSION = "1.788.0";
@@ -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 = "1.762.0";
4
+ exports.SDK_VERSION = "1.788.0";
@@ -20,8 +20,8 @@ export class ChrtClient {
20
20
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
23
- "X-Fern-SDK-Version": "1.762.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.762.0",
23
+ "X-Fern-SDK-Version": "1.788.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.788.0",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -268,5 +268,23 @@ export declare class LineItemGroups {
268
268
  */
269
269
  fromRateSheetCreateForProviderPayDriverV1(request: Chrt.CreateLigFromRateSheetForVectorClientReq, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroup1>;
270
270
  private __fromRateSheetCreateForProviderPayDriverV1;
271
+ /**
272
+ * Prices a single driver's combined trip across several task groups once. Recomputes route mileage from the ordered task locations (plus optional start/end legs), applies the CHRT-ground rate sheet, and atomically creates an OrderGroup-anchored LineItemGroup, its mileage LineItems, and the LineItemCalculation that records how the charges were derived. The LIG is detached on create (task_group_id is None) — attach to a Statement afterwards. | authz: allowed_org_types=[provider], min_org_role=operator | (LineItemGroupSharedTaskGroupMileageCreateClientReq) -> (LineItemGroup1)
273
+ *
274
+ * @param {Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq} request
275
+ * @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
276
+ *
277
+ * @throws {@link Chrt.UnprocessableEntityError}
278
+ *
279
+ * @example
280
+ * await client.billing.lineItemGroups.sharedTaskGroupMileageCreateV1({
281
+ * order_group_id: "order_group_id",
282
+ * rate_sheet_id: "rate_sheet_id",
283
+ * payment_destination_driver_id: "payment_destination_driver_id",
284
+ * task_ids: ["task_ids"]
285
+ * })
286
+ */
287
+ sharedTaskGroupMileageCreateV1(request: Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq, requestOptions?: LineItemGroups.RequestOptions): core.HttpResponsePromise<Chrt.LineItemGroup1>;
288
+ private __sharedTaskGroupMileageCreateV1;
271
289
  protected _getAuthorizationHeader(): Promise<string | undefined>;
272
290
  }
@@ -1021,6 +1021,73 @@ export class LineItemGroups {
1021
1021
  }
1022
1022
  });
1023
1023
  }
1024
+ /**
1025
+ * Prices a single driver's combined trip across several task groups once. Recomputes route mileage from the ordered task locations (plus optional start/end legs), applies the CHRT-ground rate sheet, and atomically creates an OrderGroup-anchored LineItemGroup, its mileage LineItems, and the LineItemCalculation that records how the charges were derived. The LIG is detached on create (task_group_id is None) — attach to a Statement afterwards. | authz: allowed_org_types=[provider], min_org_role=operator | (LineItemGroupSharedTaskGroupMileageCreateClientReq) -> (LineItemGroup1)
1026
+ *
1027
+ * @param {Chrt.billing.LineItemGroupSharedTaskGroupMileageCreateClientReq} request
1028
+ * @param {LineItemGroups.RequestOptions} requestOptions - Request-specific configuration.
1029
+ *
1030
+ * @throws {@link Chrt.UnprocessableEntityError}
1031
+ *
1032
+ * @example
1033
+ * await client.billing.lineItemGroups.sharedTaskGroupMileageCreateV1({
1034
+ * order_group_id: "order_group_id",
1035
+ * rate_sheet_id: "rate_sheet_id",
1036
+ * payment_destination_driver_id: "payment_destination_driver_id",
1037
+ * task_ids: ["task_ids"]
1038
+ * })
1039
+ */
1040
+ sharedTaskGroupMileageCreateV1(request, requestOptions) {
1041
+ return core.HttpResponsePromise.fromPromise(this.__sharedTaskGroupMileageCreateV1(request, requestOptions));
1042
+ }
1043
+ __sharedTaskGroupMileageCreateV1(request, requestOptions) {
1044
+ return __awaiter(this, void 0, void 0, function* () {
1045
+ var _a, _b, _c, _d;
1046
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1047
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1048
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "billing/line_item_groups/shared_task_group_mileage/create/v1"),
1049
+ method: "POST",
1050
+ headers: _headers,
1051
+ contentType: "application/json",
1052
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1053
+ requestType: "json",
1054
+ body: request,
1055
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1056
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1057
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1058
+ });
1059
+ if (_response.ok) {
1060
+ return { data: _response.body, rawResponse: _response.rawResponse };
1061
+ }
1062
+ if (_response.error.reason === "status-code") {
1063
+ switch (_response.error.statusCode) {
1064
+ case 422:
1065
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1066
+ default:
1067
+ throw new errors.ChrtError({
1068
+ statusCode: _response.error.statusCode,
1069
+ body: _response.error.body,
1070
+ rawResponse: _response.rawResponse,
1071
+ });
1072
+ }
1073
+ }
1074
+ switch (_response.error.reason) {
1075
+ case "non-json":
1076
+ throw new errors.ChrtError({
1077
+ statusCode: _response.error.statusCode,
1078
+ body: _response.error.rawBody,
1079
+ rawResponse: _response.rawResponse,
1080
+ });
1081
+ case "timeout":
1082
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/line_item_groups/shared_task_group_mileage/create/v1.");
1083
+ case "unknown":
1084
+ throw new errors.ChrtError({
1085
+ message: _response.error.errorMessage,
1086
+ rawResponse: _response.rawResponse,
1087
+ });
1088
+ }
1089
+ });
1090
+ }
1024
1091
  _getAuthorizationHeader() {
1025
1092
  return __awaiter(this, void 0, void 0, function* () {
1026
1093
  const bearer = yield core.Supplier.get(this._options.token);
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * order_group_id: "order_group_id",
9
+ * rate_sheet_id: "rate_sheet_id",
10
+ * payment_destination_driver_id: "payment_destination_driver_id",
11
+ * task_ids: ["task_ids"]
12
+ * }
13
+ */
14
+ export interface LineItemGroupSharedTaskGroupMileageCreateClientReq {
15
+ order_group_id: string;
16
+ rate_sheet_id: string;
17
+ payment_destination_driver_id: string;
18
+ task_ids: string[];
19
+ start_location?: Chrt.LocationFeature | null;
20
+ start_location_label?: string | null;
21
+ end_location?: Chrt.LocationFeature | null;
22
+ end_location_label?: string | null;
23
+ }
@@ -1,2 +1,3 @@
1
1
  export { type LineItemGroupsListV1Request } from "./LineItemGroupsListV1Request.mjs";
2
2
  export { type LineItemGroupAdHocCreateClientReq } from "./LineItemGroupAdHocCreateClientReq.mjs";
3
+ export { type LineItemGroupSharedTaskGroupMileageCreateClientReq } from "./LineItemGroupSharedTaskGroupMileageCreateClientReq.mjs";
@@ -47,11 +47,28 @@ export declare class AdHoc {
47
47
  */
48
48
  listByOrderIdV1(orderId: string, request?: Chrt.notifications.AdHocListByOrderIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
49
49
  private __listByOrderIdV1;
50
+ /**
51
+ * Lists all ad-hoc notification intents for a tracking session. | authz: min_org_role=operator | () -> (NotificationAdHocListRes)
52
+ *
53
+ * @param {string} sessionId
54
+ * @param {Chrt.notifications.AdHocListBySessionIdV1Request} request
55
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link Chrt.UnprocessableEntityError}
58
+ *
59
+ * @example
60
+ * await client.notifications.adHoc.listBySessionIdV1("session_id", {
61
+ * page: 1,
62
+ * page_size: 1
63
+ * })
64
+ */
65
+ listBySessionIdV1(sessionId: string, request?: Chrt.notifications.AdHocListBySessionIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
66
+ private __listBySessionIdV1;
50
67
  /**
51
68
  * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
52
69
  *
53
70
  * @param {string} orderId
54
- * @param {Chrt.notifications.NotificationIntentAdHocClientCreate1} request
71
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
55
72
  * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
56
73
  *
57
74
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -62,8 +79,25 @@ export declare class AdHoc {
62
79
  * directory_entry_id: "directory_entry_id"
63
80
  * })
64
81
  */
65
- createV1(orderId: string, request: Chrt.notifications.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
82
+ createV1(orderId: string, request: Chrt.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
66
83
  private __createV1;
84
+ /**
85
+ * Creates a new ad-hoc notification intent for a tracking session. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
86
+ *
87
+ * @param {string} sessionId
88
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
89
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
90
+ *
91
+ * @throws {@link Chrt.UnprocessableEntityError}
92
+ *
93
+ * @example
94
+ * await client.notifications.adHoc.createForSessionV1("session_id", {
95
+ * schema_version: 1,
96
+ * directory_entry_id: "directory_entry_id"
97
+ * })
98
+ */
99
+ createForSessionV1(sessionId: string, request: Chrt.NotificationIntentAdHocClientCreate1, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<string>;
100
+ private __createForSessionV1;
67
101
  /**
68
102
  * Deletes an ad-hoc notification intent. | authz: min_org_role=operator | () -> (bool)
69
103
  *
@@ -90,11 +90,82 @@ export class AdHoc {
90
90
  }
91
91
  });
92
92
  }
93
+ /**
94
+ * Lists all ad-hoc notification intents for a tracking session. | authz: min_org_role=operator | () -> (NotificationAdHocListRes)
95
+ *
96
+ * @param {string} sessionId
97
+ * @param {Chrt.notifications.AdHocListBySessionIdV1Request} request
98
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
99
+ *
100
+ * @throws {@link Chrt.UnprocessableEntityError}
101
+ *
102
+ * @example
103
+ * await client.notifications.adHoc.listBySessionIdV1("session_id", {
104
+ * page: 1,
105
+ * page_size: 1
106
+ * })
107
+ */
108
+ listBySessionIdV1(sessionId, request = {}, requestOptions) {
109
+ return core.HttpResponsePromise.fromPromise(this.__listBySessionIdV1(sessionId, request, requestOptions));
110
+ }
111
+ __listBySessionIdV1(sessionId_1) {
112
+ return __awaiter(this, arguments, void 0, function* (sessionId, request = {}, requestOptions) {
113
+ var _a, _b, _c, _d, _e, _f;
114
+ const { page, page_size: pageSize } = request;
115
+ const _queryParams = {};
116
+ if (page !== undefined) {
117
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
118
+ }
119
+ if (pageSize !== undefined) {
120
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
121
+ }
122
+ let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
123
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
124
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, `notifications/ad_hoc/list_by_session_id/v1/${encodeURIComponent(sessionId)}`),
125
+ method: "GET",
126
+ headers: _headers,
127
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
128
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
129
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
130
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
131
+ });
132
+ if (_response.ok) {
133
+ return { data: _response.body, rawResponse: _response.rawResponse };
134
+ }
135
+ if (_response.error.reason === "status-code") {
136
+ switch (_response.error.statusCode) {
137
+ case 422:
138
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
139
+ default:
140
+ throw new errors.ChrtError({
141
+ statusCode: _response.error.statusCode,
142
+ body: _response.error.body,
143
+ rawResponse: _response.rawResponse,
144
+ });
145
+ }
146
+ }
147
+ switch (_response.error.reason) {
148
+ case "non-json":
149
+ throw new errors.ChrtError({
150
+ statusCode: _response.error.statusCode,
151
+ body: _response.error.rawBody,
152
+ rawResponse: _response.rawResponse,
153
+ });
154
+ case "timeout":
155
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /notifications/ad_hoc/list_by_session_id/v1/{session_id}.");
156
+ case "unknown":
157
+ throw new errors.ChrtError({
158
+ message: _response.error.errorMessage,
159
+ rawResponse: _response.rawResponse,
160
+ });
161
+ }
162
+ });
163
+ }
93
164
  /**
94
165
  * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
95
166
  *
96
167
  * @param {string} orderId
97
- * @param {Chrt.notifications.NotificationIntentAdHocClientCreate1} request
168
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
98
169
  * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
99
170
  *
100
171
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -156,6 +227,72 @@ export class AdHoc {
156
227
  }
157
228
  });
158
229
  }
230
+ /**
231
+ * Creates a new ad-hoc notification intent for a tracking session. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
232
+ *
233
+ * @param {string} sessionId
234
+ * @param {Chrt.NotificationIntentAdHocClientCreate1} request
235
+ * @param {AdHoc.RequestOptions} requestOptions - Request-specific configuration.
236
+ *
237
+ * @throws {@link Chrt.UnprocessableEntityError}
238
+ *
239
+ * @example
240
+ * await client.notifications.adHoc.createForSessionV1("session_id", {
241
+ * schema_version: 1,
242
+ * directory_entry_id: "directory_entry_id"
243
+ * })
244
+ */
245
+ createForSessionV1(sessionId, request, requestOptions) {
246
+ return core.HttpResponsePromise.fromPromise(this.__createForSessionV1(sessionId, request, requestOptions));
247
+ }
248
+ __createForSessionV1(sessionId, request, requestOptions) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ var _a, _b, _c, _d;
251
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
252
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
253
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `notifications/ad_hoc/create_for_session/v1/${encodeURIComponent(sessionId)}`),
254
+ method: "POST",
255
+ headers: _headers,
256
+ contentType: "application/json",
257
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
258
+ requestType: "json",
259
+ body: request,
260
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
261
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
262
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
263
+ });
264
+ if (_response.ok) {
265
+ return { data: _response.body, rawResponse: _response.rawResponse };
266
+ }
267
+ if (_response.error.reason === "status-code") {
268
+ switch (_response.error.statusCode) {
269
+ case 422:
270
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
271
+ default:
272
+ throw new errors.ChrtError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.body,
275
+ rawResponse: _response.rawResponse,
276
+ });
277
+ }
278
+ }
279
+ switch (_response.error.reason) {
280
+ case "non-json":
281
+ throw new errors.ChrtError({
282
+ statusCode: _response.error.statusCode,
283
+ body: _response.error.rawBody,
284
+ rawResponse: _response.rawResponse,
285
+ });
286
+ case "timeout":
287
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /notifications/ad_hoc/create_for_session/v1/{session_id}.");
288
+ case "unknown":
289
+ throw new errors.ChrtError({
290
+ message: _response.error.errorMessage,
291
+ rawResponse: _response.rawResponse,
292
+ });
293
+ }
294
+ });
295
+ }
159
296
  /**
160
297
  * Deletes an ad-hoc notification intent. | authz: min_org_role=operator | () -> (bool)
161
298
  *
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * page: 1,
8
+ * page_size: 1
9
+ * }
10
+ */
11
+ export interface AdHocListBySessionIdV1Request {
12
+ page?: number | null;
13
+ page_size?: number | null;
14
+ }
@@ -1,2 +1,2 @@
1
1
  export { type AdHocListByOrderIdV1Request } from "./AdHocListByOrderIdV1Request.mjs";
2
- export { type NotificationIntentAdHocClientCreate1 } from "./NotificationIntentAdHocClientCreate1.mjs";
2
+ export { type AdHocListBySessionIdV1Request } from "./AdHocListBySessionIdV1Request.mjs";
@@ -93,21 +93,58 @@ export declare class OperationsTaskLists {
93
93
  createV1(request: Chrt.operations.OperationsTaskListClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string>;
94
94
  private __createV1;
95
95
  /**
96
- * Replaces an OperationsTaskList's `entries` array wholesale covering add, remove, reorder, and edit in one operation. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListSetEntries1) -> (bool)
96
+ * Appends a new entry to an OperationsTaskList's `entries` array. The server assigns a fresh UUID and returns it. Order is load-bearing for from_previous_task-anchored deadlines. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (str)
97
97
  *
98
98
  * @param {string} taskListId
99
- * @param {Chrt.operations.OperationsTaskListSetEntries1} request
99
+ * @param {Chrt.OperationsTaskListEntryClientCreate1} request
100
100
  * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
101
101
  *
102
102
  * @throws {@link Chrt.UnprocessableEntityError}
103
103
  *
104
104
  * @example
105
- * await client.operations.operationsTaskLists.setEntriesV1("task_list_id")
105
+ * await client.operations.operationsTaskLists.addEntryV1("task_list_id", {
106
+ * task_type: "review_order_details",
107
+ * title: "title",
108
+ * description: "description"
109
+ * })
110
+ */
111
+ addEntryV1(taskListId: string, request: Chrt.OperationsTaskListEntryClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<string>;
112
+ private __addEntryV1;
113
+ /**
114
+ * Replaces the entry with the given uuid in an OperationsTaskList's `entries` array. The stored uuid is preserved regardless of the request body. 404 if no entry matches. | authz: min_org_role=operator | (OperationsTaskListEntryClientCreate1) -> (bool)
115
+ *
116
+ * @param {string} taskListId
117
+ * @param {string} entryUuid
118
+ * @param {Chrt.OperationsTaskListEntryClientCreate1} request
119
+ * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
120
+ *
121
+ * @throws {@link Chrt.UnprocessableEntityError}
122
+ *
123
+ * @example
124
+ * await client.operations.operationsTaskLists.editEntryV1("task_list_id", "entry_uuid", {
125
+ * task_type: "review_order_details",
126
+ * title: "title",
127
+ * description: "description"
128
+ * })
129
+ */
130
+ editEntryV1(taskListId: string, entryUuid: string, request: Chrt.OperationsTaskListEntryClientCreate1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
131
+ private __editEntryV1;
132
+ /**
133
+ * Removes the entry with the given uuid from an OperationsTaskList's `entries` array, closing the gap in order. 404 if no entry matches. | authz: min_org_role=operator | () -> (bool)
134
+ *
135
+ * @param {string} taskListId
136
+ * @param {string} entryUuid
137
+ * @param {OperationsTaskLists.RequestOptions} requestOptions - Request-specific configuration.
138
+ *
139
+ * @throws {@link Chrt.UnprocessableEntityError}
140
+ *
141
+ * @example
142
+ * await client.operations.operationsTaskLists.removeEntryV1("task_list_id", "entry_uuid")
106
143
  */
107
- setEntriesV1(taskListId: string, request?: Chrt.operations.OperationsTaskListSetEntries1, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
108
- private __setEntriesV1;
144
+ removeEntryV1(taskListId: string, entryUuid: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<boolean>;
145
+ private __removeEntryV1;
109
146
  /**
110
- * Reorders an OperationsTaskList's existing entries. `entry_ids` must be an exact permutation of the list's current entry ids (every id present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
147
+ * Reorders an OperationsTaskList's existing entries. `entry_uuids` must be an exact permutation of the list's current entry uuids (every uuid present, no extras, no duplicates), so a reorder can never drop, add, or mutate an entry. | authz: min_org_role=operator | (OperationsTaskListReorderEntries1) -> (bool)
111
148
  *
112
149
  * @param {string} taskListId
113
150
  * @param {Chrt.operations.OperationsTaskListReorderEntries1} request
@@ -173,9 +210,9 @@ export declare class OperationsTaskLists {
173
210
  * @throws {@link Chrt.UnprocessableEntityError}
174
211
  *
175
212
  * @example
176
- * await client.operations.operationsTaskLists.removeFromCaseV1("task_list_id", "case_id")
213
+ * await client.operations.operationsTaskLists.removeNotStartedTasksFromCaseV1("task_list_id", "case_id")
177
214
  */
178
- removeFromCaseV1(taskListId: string, caseId: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<Chrt.OperationsTaskListRemoveFromCaseRes1>;
179
- private __removeFromCaseV1;
215
+ removeNotStartedTasksFromCaseV1(taskListId: string, caseId: string, requestOptions?: OperationsTaskLists.RequestOptions): core.HttpResponsePromise<Chrt.OperationsTaskListRemoveFromCaseRes1>;
216
+ private __removeNotStartedTasksFromCaseV1;
180
217
  protected _getAuthorizationHeader(): Promise<string | undefined>;
181
218
  }