@chrt-inc/typescript-sdk 1.723.0 → 1.726.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 (132) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.d.ts +3 -3
  3. package/dist/cjs/api/resources/analytics/resources/shipping/client/Client.js +2 -2
  4. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/{AnalyticsTimePeriodRequest.d.ts → AnalyticsTimePeriodReq.d.ts} +1 -1
  5. package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/index.d.ts +1 -1
  6. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +17 -0
  7. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +66 -0
  8. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverStatsReq.d.ts +15 -0
  9. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.d.ts +15 -0
  11. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.js +64 -0
  12. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftDeleteManyReq.d.ts +12 -0
  13. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftDeleteManyReq.js +5 -0
  14. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +57 -1
  16. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +247 -1
  17. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.d.ts +13 -0
  18. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.js +5 -0
  19. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.d.ts +13 -0
  20. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.js +5 -0
  21. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +16 -1
  23. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +65 -1
  24. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersCancelManyReq.d.ts +12 -0
  25. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersCancelManyReq.js +5 -0
  26. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +4 -6
  28. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +26 -34
  29. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.ts +4 -6
  30. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +4 -6
  31. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.ts +4 -2
  32. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.js +26 -18
  33. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.ts +4 -2
  34. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +4 -2
  35. package/dist/cjs/api/types/{AnalyticsTimeBucketResponse.d.ts → AnalyticsTimeBucketRes.d.ts} +1 -1
  36. package/dist/cjs/api/types/AnalyticsTimeBucketRes.js +5 -0
  37. package/dist/cjs/api/types/Cargo1.d.ts +1 -0
  38. package/dist/cjs/api/types/CargoStatusEnum1.d.ts +2 -1
  39. package/dist/cjs/api/types/CargoStatusEnum1.js +1 -0
  40. package/dist/cjs/api/types/DriverStatsRes.d.ts +11 -0
  41. package/dist/cjs/api/types/DriverStatsRes.js +5 -0
  42. package/dist/cjs/api/types/Order1.d.ts +1 -2
  43. package/dist/cjs/api/types/OrderDraftValidationRequirements.d.ts +1 -0
  44. package/dist/cjs/api/types/OrderManifestValidationRequirements.d.ts +1 -0
  45. package/dist/cjs/api/types/OrderSortByEnum.d.ts +2 -2
  46. package/dist/cjs/api/types/OrderSortByEnum.js +1 -1
  47. package/dist/cjs/api/types/OrderStatusEnum1.d.ts +2 -1
  48. package/dist/cjs/api/types/OrderStatusEnum1.js +1 -0
  49. package/dist/cjs/api/types/Task1.d.ts +1 -1
  50. package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -0
  51. package/dist/cjs/api/types/TaskArtifactStatusEnum1.d.ts +2 -1
  52. package/dist/cjs/api/types/TaskArtifactStatusEnum1.js +1 -0
  53. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -1
  54. package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +2 -1
  55. package/dist/cjs/api/types/TaskGroupSortByEnum.js +1 -0
  56. package/dist/cjs/api/types/TaskGroupStatusEnum1.d.ts +2 -1
  57. package/dist/cjs/api/types/TaskGroupStatusEnum1.js +1 -0
  58. package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
  59. package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
  60. package/dist/cjs/api/types/index.d.ts +2 -1
  61. package/dist/cjs/api/types/index.js +2 -1
  62. package/dist/cjs/version.d.ts +1 -1
  63. package/dist/cjs/version.js +1 -1
  64. package/dist/esm/Client.mjs +2 -2
  65. package/dist/esm/api/resources/analytics/resources/shipping/client/Client.d.mts +3 -3
  66. package/dist/esm/api/resources/analytics/resources/shipping/client/Client.mjs +2 -2
  67. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/{AnalyticsTimePeriodRequest.d.mts → AnalyticsTimePeriodReq.d.mts} +1 -1
  68. package/dist/esm/api/resources/analytics/resources/shipping/client/requests/index.d.mts +1 -1
  69. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +17 -0
  70. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +66 -0
  71. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverStatsReq.d.mts +15 -0
  72. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/index.d.mts +1 -0
  73. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.d.mts +15 -0
  74. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.mjs +64 -0
  75. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftDeleteManyReq.d.mts +12 -0
  76. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftDeleteManyReq.mjs +4 -0
  77. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/index.d.mts +1 -0
  78. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +57 -1
  79. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +247 -1
  80. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.d.mts +13 -0
  81. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddExecutorReq.mjs +4 -0
  82. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.d.mts +13 -0
  83. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftUpdateDriverReq.mjs +4 -0
  84. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +2 -0
  85. package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +16 -1
  86. package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +65 -1
  87. package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersCancelManyReq.d.mts +12 -0
  88. package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersCancelManyReq.mjs +4 -0
  89. package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +1 -0
  90. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +4 -6
  91. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +26 -34
  92. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForCoordinatorOperatorsV1Request.d.mts +4 -6
  93. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +4 -6
  94. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts +4 -2
  95. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs +26 -18
  96. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.mts +4 -2
  97. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +4 -2
  98. package/dist/esm/api/types/{AnalyticsTimeBucketResponse.d.mts → AnalyticsTimeBucketRes.d.mts} +1 -1
  99. package/dist/esm/api/types/AnalyticsTimeBucketRes.mjs +4 -0
  100. package/dist/esm/api/types/Cargo1.d.mts +1 -0
  101. package/dist/esm/api/types/CargoStatusEnum1.d.mts +2 -1
  102. package/dist/esm/api/types/CargoStatusEnum1.mjs +1 -0
  103. package/dist/esm/api/types/DriverStatsRes.d.mts +11 -0
  104. package/dist/esm/api/types/DriverStatsRes.mjs +4 -0
  105. package/dist/esm/api/types/Order1.d.mts +1 -2
  106. package/dist/esm/api/types/OrderDraftValidationRequirements.d.mts +1 -0
  107. package/dist/esm/api/types/OrderManifestValidationRequirements.d.mts +1 -0
  108. package/dist/esm/api/types/OrderSortByEnum.d.mts +2 -2
  109. package/dist/esm/api/types/OrderSortByEnum.mjs +1 -1
  110. package/dist/esm/api/types/OrderStatusEnum1.d.mts +2 -1
  111. package/dist/esm/api/types/OrderStatusEnum1.mjs +1 -0
  112. package/dist/esm/api/types/Task1.d.mts +1 -1
  113. package/dist/esm/api/types/TaskArtifact1.d.mts +1 -0
  114. package/dist/esm/api/types/TaskArtifactStatusEnum1.d.mts +2 -1
  115. package/dist/esm/api/types/TaskArtifactStatusEnum1.mjs +1 -0
  116. package/dist/esm/api/types/TaskGroup1.d.mts +1 -1
  117. package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +2 -1
  118. package/dist/esm/api/types/TaskGroupSortByEnum.mjs +1 -0
  119. package/dist/esm/api/types/TaskGroupStatusEnum1.d.mts +2 -1
  120. package/dist/esm/api/types/TaskGroupStatusEnum1.mjs +1 -0
  121. package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
  122. package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
  123. package/dist/esm/api/types/index.d.mts +2 -1
  124. package/dist/esm/api/types/index.mjs +2 -1
  125. package/dist/esm/version.d.mts +1 -1
  126. package/dist/esm/version.mjs +1 -1
  127. package/package.json +1 -1
  128. package/reference.md +487 -13
  129. /package/dist/cjs/api/resources/analytics/resources/shipping/client/requests/{AnalyticsTimePeriodRequest.js → AnalyticsTimePeriodReq.js} +0 -0
  130. /package/dist/cjs/api/{types/AnalyticsTimeBucketResponse.js → resources/shipping/resources/drivers/client/requests/DriverStatsReq.js} +0 -0
  131. /package/dist/esm/api/resources/analytics/resources/shipping/client/requests/{AnalyticsTimePeriodRequest.mjs → AnalyticsTimePeriodReq.mjs} +0 -0
  132. /package/dist/esm/api/{types/AnalyticsTimeBucketResponse.mjs → resources/shipping/resources/drivers/client/requests/DriverStatsReq.mjs} +0 -0
@@ -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 });
@@ -30,5 +30,6 @@ export interface Cargo1 {
30
30
  in_transit_at_timestamp?: string | null;
31
31
  delivered_at_timestamp?: string | null;
32
32
  skipped_at_timestamp?: string | null;
33
+ cancelled_at_timestamp?: string | null;
33
34
  exception_at_timestamp?: string | null;
34
35
  }
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type CargoStatusEnum1 = "draft" | "staged" | "in_transit" | "delivered" | "skipped" | "exception";
4
+ export type CargoStatusEnum1 = "draft" | "staged" | "in_transit" | "delivered" | "skipped" | "cancelled" | "exception";
5
5
  export declare const CargoStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly InTransit: "in_transit";
9
9
  readonly Delivered: "delivered";
10
10
  readonly Skipped: "skipped";
11
+ readonly Cancelled: "cancelled";
11
12
  readonly Exception: "exception";
12
13
  };
@@ -10,5 +10,6 @@ exports.CargoStatusEnum1 = {
10
10
  InTransit: "in_transit",
11
11
  Delivered: "delivered",
12
12
  Skipped: "skipped",
13
+ Cancelled: "cancelled",
13
14
  Exception: "exception",
14
15
  };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface DriverStatsRes {
6
+ task_groups: Chrt.TaskGroup1[];
7
+ excluded_task_groups: Chrt.TaskGroup1[];
8
+ cleaned_task_group_duration_hours: number;
9
+ overlap_detected: boolean;
10
+ total_mileage_observed?: number | null;
11
+ }
@@ -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 });
@@ -27,7 +27,6 @@ export interface Order1 {
27
27
  staged_at_timestamp?: string | null;
28
28
  in_progress_at_timestamp?: string | null;
29
29
  completed_at_timestamp?: string | null;
30
+ cancelled_at_timestamp?: string | null;
30
31
  exception_at_timestamp?: string | null;
31
- order_cancelled?: boolean;
32
- order_cancelled_at_timestamp?: string | null;
33
32
  }
@@ -9,5 +9,6 @@ export interface OrderDraftValidationRequirements {
9
9
  task_groups_have_valid_task_sequence?: boolean | null;
10
10
  tasks_have_valid_cargo?: boolean | null;
11
11
  cargos_have_valid_lifecycle?: boolean | null;
12
+ order_has_shipper?: boolean | null;
12
13
  order_has_coordinator?: boolean | null;
13
14
  }
@@ -8,5 +8,6 @@ export interface OrderManifestValidationRequirements {
8
8
  task_groups_have_valid_task_sequence?: boolean | null;
9
9
  tasks_have_valid_cargo?: boolean | null;
10
10
  cargos_have_valid_lifecycle?: boolean | null;
11
+ order_has_shipper?: boolean | null;
11
12
  order_has_coordinator?: boolean | null;
12
13
  }
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type OrderSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "exception_at_timestamp" | "order_cancelled_at_timestamp";
4
+ export type OrderSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "cancelled_at_timestamp" | "exception_at_timestamp";
5
5
  export declare const OrderSortByEnum: {
6
6
  readonly DraftStartedAtTimestamp: "draft_started_at_timestamp";
7
7
  readonly StagedAtTimestamp: "staged_at_timestamp";
8
8
  readonly InProgressAtTimestamp: "in_progress_at_timestamp";
9
9
  readonly CompletedAtTimestamp: "completed_at_timestamp";
10
+ readonly CancelledAtTimestamp: "cancelled_at_timestamp";
10
11
  readonly ExceptionAtTimestamp: "exception_at_timestamp";
11
- readonly OrderCancelledAtTimestamp: "order_cancelled_at_timestamp";
12
12
  };
@@ -9,6 +9,6 @@ exports.OrderSortByEnum = {
9
9
  StagedAtTimestamp: "staged_at_timestamp",
10
10
  InProgressAtTimestamp: "in_progress_at_timestamp",
11
11
  CompletedAtTimestamp: "completed_at_timestamp",
12
+ CancelledAtTimestamp: "cancelled_at_timestamp",
12
13
  ExceptionAtTimestamp: "exception_at_timestamp",
13
- OrderCancelledAtTimestamp: "order_cancelled_at_timestamp",
14
14
  };
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type OrderStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "exception";
4
+ export type OrderStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "cancelled" | "exception";
5
5
  export declare const OrderStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly InProgress: "in_progress";
9
9
  readonly Completed: "completed";
10
+ readonly Cancelled: "cancelled";
10
11
  readonly Exception: "exception";
11
12
  };
@@ -9,5 +9,6 @@ exports.OrderStatusEnum1 = {
9
9
  Staged: "staged",
10
10
  InProgress: "in_progress",
11
11
  Completed: "completed",
12
+ Cancelled: "cancelled",
12
13
  Exception: "exception",
13
14
  };
@@ -34,6 +34,7 @@ export interface Task1 {
34
34
  completed_at_timestamp?: string | null;
35
35
  skipped_at_timestamp?: string | null;
36
36
  attempted_at_timestamp?: string | null;
37
+ cancelled_at_timestamp?: string | null;
37
38
  exception_at_timestamp?: string | null;
38
39
  wait_time_start_timestamp?: string | null;
39
40
  wait_time_end_timestamp?: string | null;
@@ -41,7 +42,6 @@ export interface Task1 {
41
42
  wait_time_validated?: boolean | null;
42
43
  /** Must be a string starting with `user_` */
43
44
  wait_time_validated_by_user_id?: string | null;
44
- order_cancelled?: boolean;
45
45
  }
46
46
  export declare namespace Task1 {
47
47
  type Action = Chrt.ChrtGroundProviderTaskActionEnum1 | Chrt.CargoOnFlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
@@ -33,5 +33,6 @@ export interface TaskArtifact1 {
33
33
  staged_at_timestamp?: string | null;
34
34
  completed_at_timestamp?: string | null;
35
35
  skipped_at_timestamp?: string | null;
36
+ cancelled_at_timestamp?: string | null;
36
37
  exception_at_timestamp?: string | null;
37
38
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskArtifactStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "exception";
4
+ export type TaskArtifactStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "cancelled" | "exception";
5
5
  export declare const TaskArtifactStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly Completed: "completed";
9
9
  readonly Skipped: "skipped";
10
+ readonly Cancelled: "cancelled";
10
11
  readonly Exception: "exception";
11
12
  };
@@ -9,5 +9,6 @@ exports.TaskArtifactStatusEnum1 = {
9
9
  Staged: "staged",
10
10
  Completed: "completed",
11
11
  Skipped: "skipped",
12
+ Cancelled: "cancelled",
12
13
  Exception: "exception",
13
14
  };
@@ -28,12 +28,12 @@ export interface TaskGroup1 {
28
28
  driver_id?: string | null;
29
29
  task_group_s3_object_metadata_ids?: string[];
30
30
  status?: Chrt.TaskGroupStatusEnum1;
31
- order_cancelled?: boolean;
32
31
  draft_started_at_timestamp: string;
33
32
  staged_at_timestamp?: string | null;
34
33
  in_progress_at_timestamp?: string | null;
35
34
  completed_at_timestamp?: string | null;
36
35
  skipped_at_timestamp?: string | null;
36
+ cancelled_at_timestamp?: string | null;
37
37
  exception_at_timestamp?: string | null;
38
38
  task_group_type: Chrt.TaskGroupTypeEnum1;
39
39
  vehicle_type?: Chrt.VehicleTypeEnum | null;
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskGroupSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "skipped_at_timestamp" | "exception_at_timestamp";
4
+ export type TaskGroupSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "skipped_at_timestamp" | "cancelled_at_timestamp" | "exception_at_timestamp";
5
5
  export declare const TaskGroupSortByEnum: {
6
6
  readonly DraftStartedAtTimestamp: "draft_started_at_timestamp";
7
7
  readonly StagedAtTimestamp: "staged_at_timestamp";
8
8
  readonly InProgressAtTimestamp: "in_progress_at_timestamp";
9
9
  readonly CompletedAtTimestamp: "completed_at_timestamp";
10
10
  readonly SkippedAtTimestamp: "skipped_at_timestamp";
11
+ readonly CancelledAtTimestamp: "cancelled_at_timestamp";
11
12
  readonly ExceptionAtTimestamp: "exception_at_timestamp";
12
13
  };
@@ -10,5 +10,6 @@ exports.TaskGroupSortByEnum = {
10
10
  InProgressAtTimestamp: "in_progress_at_timestamp",
11
11
  CompletedAtTimestamp: "completed_at_timestamp",
12
12
  SkippedAtTimestamp: "skipped_at_timestamp",
13
+ CancelledAtTimestamp: "cancelled_at_timestamp",
13
14
  ExceptionAtTimestamp: "exception_at_timestamp",
14
15
  };
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskGroupStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "skipped" | "exception";
4
+ export type TaskGroupStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "skipped" | "cancelled" | "exception";
5
5
  export declare const TaskGroupStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly InProgress: "in_progress";
9
9
  readonly Completed: "completed";
10
10
  readonly Skipped: "skipped";
11
+ readonly Cancelled: "cancelled";
11
12
  readonly Exception: "exception";
12
13
  };
@@ -10,5 +10,6 @@ exports.TaskGroupStatusEnum1 = {
10
10
  InProgress: "in_progress",
11
11
  Completed: "completed",
12
12
  Skipped: "skipped",
13
+ Cancelled: "cancelled",
13
14
  Exception: "exception",
14
15
  };
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "attempt" | "exception";
4
+ export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "attempt" | "cancelled" | "exception";
5
5
  export declare const TaskStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly Completed: "completed";
9
9
  readonly Skipped: "skipped";
10
10
  readonly Attempt: "attempt";
11
+ readonly Cancelled: "cancelled";
11
12
  readonly Exception: "exception";
12
13
  };
@@ -10,5 +10,6 @@ exports.TaskStatusEnum1 = {
10
10
  Completed: "completed",
11
11
  Skipped: "skipped",
12
12
  Attempt: "attempt",
13
+ Cancelled: "cancelled",
13
14
  Exception: "exception",
14
15
  };
@@ -1,5 +1,5 @@
1
1
  export * from "./AiImageDescription.js";
2
- export * from "./AnalyticsTimeBucketResponse.js";
2
+ export * from "./AnalyticsTimeBucketRes.js";
3
3
  export * from "./AttachBillingLedgerPeriodReq.js";
4
4
  export * from "./AttachLigToVectorClientReq.js";
5
5
  export * from "./Bid.js";
@@ -128,6 +128,7 @@ export * from "./DriverComplianceDocument1.js";
128
128
  export * from "./DriverComplianceDocumentS3ObjectMetadata1.js";
129
129
  export * from "./DriverComplianceDocumentTypeEnum1.js";
130
130
  export * from "./DriverListRes.js";
131
+ export * from "./DriverStatsRes.js";
131
132
  export * from "./DriverStatusEnum.js";
132
133
  export * from "./DriverUpdateAvailabilityReq.js";
133
134
  export * from "./DriverUpdateRes.js";
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AiImageDescription.js"), exports);
18
- __exportStar(require("./AnalyticsTimeBucketResponse.js"), exports);
18
+ __exportStar(require("./AnalyticsTimeBucketRes.js"), exports);
19
19
  __exportStar(require("./AttachBillingLedgerPeriodReq.js"), exports);
20
20
  __exportStar(require("./AttachLigToVectorClientReq.js"), exports);
21
21
  __exportStar(require("./Bid.js"), exports);
@@ -144,6 +144,7 @@ __exportStar(require("./DriverComplianceDocument1.js"), exports);
144
144
  __exportStar(require("./DriverComplianceDocumentS3ObjectMetadata1.js"), exports);
145
145
  __exportStar(require("./DriverComplianceDocumentTypeEnum1.js"), exports);
146
146
  __exportStar(require("./DriverListRes.js"), exports);
147
+ __exportStar(require("./DriverStatsRes.js"), exports);
147
148
  __exportStar(require("./DriverStatusEnum.js"), exports);
148
149
  __exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
149
150
  __exportStar(require("./DriverUpdateRes.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.723.0";
1
+ export declare const SDK_VERSION = "1.726.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.723.0";
4
+ exports.SDK_VERSION = "1.726.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.723.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.723.0",
23
+ "X-Fern-SDK-Version": "1.726.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.726.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) });
@@ -31,9 +31,9 @@ export declare class Shipping {
31
31
  protected readonly _options: Shipping.Options;
32
32
  constructor(_options?: Shipping.Options);
33
33
  /**
34
- * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
34
+ * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodReq) -> (AnalyticsTimeBucketRes)
35
35
  *
36
- * @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
36
+ * @param {Chrt.analytics.AnalyticsTimePeriodReq} request
37
37
  * @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
38
38
  *
39
39
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -44,7 +44,7 @@ export declare class Shipping {
44
44
  * end: "2024-01-15T09:30:00Z"
45
45
  * })
46
46
  */
47
- retrieveOrdersCountV1(request: Chrt.analytics.AnalyticsTimePeriodRequest, requestOptions?: Shipping.RequestOptions): core.HttpResponsePromise<Chrt.AnalyticsTimeBucketResponse>;
47
+ retrieveOrdersCountV1(request: Chrt.analytics.AnalyticsTimePeriodReq, requestOptions?: Shipping.RequestOptions): core.HttpResponsePromise<Chrt.AnalyticsTimeBucketRes>;
48
48
  private __retrieveOrdersCountV1;
49
49
  protected _getAuthorizationHeader(): Promise<string | undefined>;
50
50
  }
@@ -20,9 +20,9 @@ export class Shipping {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodRequest) -> (AnalyticsTimeBucketResponse)
23
+ * Retrieves order counts bucketed by time period. | (AnalyticsTimePeriodReq) -> (AnalyticsTimeBucketRes)
24
24
  *
25
- * @param {Chrt.analytics.AnalyticsTimePeriodRequest} request
25
+ * @param {Chrt.analytics.AnalyticsTimePeriodReq} request
26
26
  * @param {Shipping.RequestOptions} requestOptions - Request-specific configuration.
27
27
  *
28
28
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -9,7 +9,7 @@ import * as Chrt from "../../../../../../index.mjs";
9
9
  * end: "2024-01-15T09:30:00Z"
10
10
  * }
11
11
  */
12
- export interface AnalyticsTimePeriodRequest {
12
+ export interface AnalyticsTimePeriodReq {
13
13
  start: string;
14
14
  end: string;
15
15
  granularity?: Chrt.TimeGranularity;
@@ -1 +1 @@
1
- export { type AnalyticsTimePeriodRequest } from "./AnalyticsTimePeriodRequest.mjs";
1
+ export { type AnalyticsTimePeriodReq } from "./AnalyticsTimePeriodReq.mjs";
@@ -33,6 +33,23 @@ export declare class Drivers {
33
33
  protected _complianceDocuments: ComplianceDocuments | undefined;
34
34
  constructor(_options?: Drivers.Options);
35
35
  get complianceDocuments(): ComplianceDocuments;
36
+ /**
37
+ * Retrieves driver stats (hours worked + observed mileage) with overlap-corrected duration. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
38
+ *
39
+ * @param {string} driverId
40
+ * @param {Chrt.shipping.DriverStatsReq} request
41
+ * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
42
+ *
43
+ * @throws {@link Chrt.UnprocessableEntityError}
44
+ *
45
+ * @example
46
+ * await client.shipping.drivers.getStatsV1("driver_id", {
47
+ * start_timestamp: "2024-01-15T09:30:00Z",
48
+ * end_timestamp: "2024-01-15T09:30:00Z"
49
+ * })
50
+ */
51
+ getStatsV1(driverId: string, request: Chrt.shipping.DriverStatsReq, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverStatsRes>;
52
+ private __getStatsV1;
36
53
  /**
37
54
  * Retrieves driver information for the caller within their organization. | () -> (Driver1)
38
55
  *
@@ -35,6 +35,72 @@ export class Drivers {
35
35
  var _a;
36
36
  return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new ComplianceDocuments(this._options)));
37
37
  }
38
+ /**
39
+ * Retrieves driver stats (hours worked + observed mileage) with overlap-corrected duration. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
40
+ *
41
+ * @param {string} driverId
42
+ * @param {Chrt.shipping.DriverStatsReq} request
43
+ * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
44
+ *
45
+ * @throws {@link Chrt.UnprocessableEntityError}
46
+ *
47
+ * @example
48
+ * await client.shipping.drivers.getStatsV1("driver_id", {
49
+ * start_timestamp: "2024-01-15T09:30:00Z",
50
+ * end_timestamp: "2024-01-15T09:30:00Z"
51
+ * })
52
+ */
53
+ getStatsV1(driverId, request, requestOptions) {
54
+ return core.HttpResponsePromise.fromPromise(this.__getStatsV1(driverId, request, requestOptions));
55
+ }
56
+ __getStatsV1(driverId, request, requestOptions) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ var _a, _b, _c, _d;
59
+ 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);
60
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
61
+ 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, `shipping/drivers/stats/v1/${encodeURIComponent(driverId)}`),
62
+ method: "POST",
63
+ headers: _headers,
64
+ contentType: "application/json",
65
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
66
+ requestType: "json",
67
+ body: request,
68
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
69
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
70
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
+ });
72
+ if (_response.ok) {
73
+ return { data: _response.body, rawResponse: _response.rawResponse };
74
+ }
75
+ if (_response.error.reason === "status-code") {
76
+ switch (_response.error.statusCode) {
77
+ case 422:
78
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
79
+ default:
80
+ throw new errors.ChrtError({
81
+ statusCode: _response.error.statusCode,
82
+ body: _response.error.body,
83
+ rawResponse: _response.rawResponse,
84
+ });
85
+ }
86
+ }
87
+ switch (_response.error.reason) {
88
+ case "non-json":
89
+ throw new errors.ChrtError({
90
+ statusCode: _response.error.statusCode,
91
+ body: _response.error.rawBody,
92
+ rawResponse: _response.rawResponse,
93
+ });
94
+ case "timeout":
95
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/drivers/stats/v1/{driver_id}.");
96
+ case "unknown":
97
+ throw new errors.ChrtError({
98
+ message: _response.error.errorMessage,
99
+ rawResponse: _response.rawResponse,
100
+ });
101
+ }
102
+ });
103
+ }
38
104
  /**
39
105
  * Retrieves driver information for the caller within their organization. | () -> (Driver1)
40
106
  *
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * start_timestamp: "2024-01-15T09:30:00Z",
8
+ * end_timestamp: "2024-01-15T09:30:00Z"
9
+ * }
10
+ */
11
+ export interface DriverStatsReq {
12
+ start_timestamp: string;
13
+ end_timestamp: string;
14
+ excluded_task_group_ids?: string[];
15
+ }
@@ -1,3 +1,4 @@
1
+ export { type DriverStatsReq } from "./DriverStatsReq.mjs";
1
2
  export { type DriversListOrgMembersAndDriversV1Request } from "./DriversListOrgMembersAndDriversV1Request.mjs";
2
3
  export { type DriversListV1Request } from "./DriversListV1Request.mjs";
3
4
  export { type DriverClientCreate1 } from "./DriverClientCreate1.mjs";
@@ -88,6 +88,21 @@ export declare class OrderDrafts {
88
88
  */
89
89
  deleteV1(orderId: string, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<boolean>;
90
90
  private __deleteV1;
91
+ /**
92
+ * Deletes multiple draft orders and associated entities. | (OrdersDraftDeleteManyReq) -> (bool)
93
+ *
94
+ * @param {Chrt.shipping.OrdersDraftDeleteManyReq} request
95
+ * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
96
+ *
97
+ * @throws {@link Chrt.UnprocessableEntityError}
98
+ *
99
+ * @example
100
+ * await client.shipping.orderDrafts.deleteManyV1({
101
+ * order_ids: ["order_ids"]
102
+ * })
103
+ */
104
+ deleteManyV1(request: Chrt.shipping.OrdersDraftDeleteManyReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<boolean>;
105
+ private __deleteManyV1;
91
106
  /**
92
107
  * Converts an order screenshot into lightly structured text for the AI order builder. | (UploadFile) -> (str)
93
108
  *
@@ -233,6 +233,70 @@ export class OrderDrafts {
233
233
  }
234
234
  });
235
235
  }
236
+ /**
237
+ * Deletes multiple draft orders and associated entities. | (OrdersDraftDeleteManyReq) -> (bool)
238
+ *
239
+ * @param {Chrt.shipping.OrdersDraftDeleteManyReq} request
240
+ * @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
241
+ *
242
+ * @throws {@link Chrt.UnprocessableEntityError}
243
+ *
244
+ * @example
245
+ * await client.shipping.orderDrafts.deleteManyV1({
246
+ * order_ids: ["order_ids"]
247
+ * })
248
+ */
249
+ deleteManyV1(request, requestOptions) {
250
+ return core.HttpResponsePromise.fromPromise(this.__deleteManyV1(request, requestOptions));
251
+ }
252
+ __deleteManyV1(request, requestOptions) {
253
+ return __awaiter(this, void 0, void 0, function* () {
254
+ var _a, _b, _c, _d;
255
+ 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);
256
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
257
+ 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, "shipping/order_drafts/delete_many/v1"),
258
+ method: "DELETE",
259
+ headers: _headers,
260
+ contentType: "application/json",
261
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
262
+ requestType: "json",
263
+ body: request,
264
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
265
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
266
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
267
+ });
268
+ if (_response.ok) {
269
+ return { data: _response.body, rawResponse: _response.rawResponse };
270
+ }
271
+ if (_response.error.reason === "status-code") {
272
+ switch (_response.error.statusCode) {
273
+ case 422:
274
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
275
+ default:
276
+ throw new errors.ChrtError({
277
+ statusCode: _response.error.statusCode,
278
+ body: _response.error.body,
279
+ rawResponse: _response.rawResponse,
280
+ });
281
+ }
282
+ }
283
+ switch (_response.error.reason) {
284
+ case "non-json":
285
+ throw new errors.ChrtError({
286
+ statusCode: _response.error.statusCode,
287
+ body: _response.error.rawBody,
288
+ rawResponse: _response.rawResponse,
289
+ });
290
+ case "timeout":
291
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /shipping/order_drafts/delete_many/v1.");
292
+ case "unknown":
293
+ throw new errors.ChrtError({
294
+ message: _response.error.errorMessage,
295
+ rawResponse: _response.rawResponse,
296
+ });
297
+ }
298
+ });
299
+ }
236
300
  /**
237
301
  * Converts an order screenshot into lightly structured text for the AI order builder. | (UploadFile) -> (str)
238
302
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * order_ids: ["order_ids"]
8
+ * }
9
+ */
10
+ export interface OrdersDraftDeleteManyReq {
11
+ order_ids: string[];
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,3 +1,4 @@
1
1
  export { type OrdersNewDraftReq } from "./OrdersNewDraftReq.mjs";
2
2
  export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.mjs";
3
+ export { type OrdersDraftDeleteManyReq } from "./OrdersDraftDeleteManyReq.mjs";
3
4
  export { type BodyPostShippingOrderDraftsImageToTextV1ShippingOrderDraftsImageToTextV1Post } from "./BodyPostShippingOrderDraftsImageToTextV1ShippingOrderDraftsImageToTextV1Post.mjs";