@chrt-inc/typescript-sdk 1.810.0 → 1.824.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 (32) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/notifications/resources/adHoc/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverStatsReq.d.ts +0 -1
  7. package/dist/cjs/api/types/DriverAnalyticsDay.d.ts +15 -0
  8. package/dist/cjs/api/types/DriverAnalyticsDay.js +5 -0
  9. package/dist/cjs/api/types/DriverAnalyticsTaskGroup.d.ts +10 -0
  10. package/dist/cjs/api/types/DriverAnalyticsTaskGroup.js +5 -0
  11. package/dist/cjs/api/types/DriverStatsRes.d.ts +2 -10
  12. package/dist/cjs/api/types/index.d.ts +2 -0
  13. package/dist/cjs/api/types/index.js +2 -0
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/Client.mjs +2 -2
  17. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.d.mts +1 -1
  18. package/dist/esm/api/resources/notifications/resources/adHoc/client/Client.mjs +1 -1
  19. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +1 -1
  20. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +1 -1
  21. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverStatsReq.d.mts +0 -1
  22. package/dist/esm/api/types/DriverAnalyticsDay.d.mts +15 -0
  23. package/dist/esm/api/types/DriverAnalyticsDay.mjs +4 -0
  24. package/dist/esm/api/types/DriverAnalyticsTaskGroup.d.mts +10 -0
  25. package/dist/esm/api/types/DriverAnalyticsTaskGroup.mjs +4 -0
  26. package/dist/esm/api/types/DriverStatsRes.d.mts +2 -10
  27. package/dist/esm/api/types/index.d.mts +2 -0
  28. package/dist/esm/api/types/index.mjs +2 -0
  29. package/dist/esm/version.d.mts +1 -1
  30. package/dist/esm/version.mjs +1 -1
  31. package/package.json +1 -1
  32. package/reference.md +2 -2
@@ -57,8 +57,8 @@ class ChrtClient {
57
57
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
58
58
  "X-Fern-Language": "JavaScript",
59
59
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
60
- "X-Fern-SDK-Version": "1.810.0",
61
- "User-Agent": "@chrt-inc/typescript-sdk/1.810.0",
60
+ "X-Fern-SDK-Version": "1.824.0",
61
+ "User-Agent": "@chrt-inc/typescript-sdk/1.824.0",
62
62
  "X-Fern-Runtime": core.RUNTIME.type,
63
63
  "X-Fern-Runtime-Version": core.RUNTIME.version,
64
64
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -65,7 +65,7 @@ export declare class AdHoc {
65
65
  listBySessionIdV1(sessionId: string, request?: Chrt.notifications.AdHocListBySessionIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
66
66
  private __listBySessionIdV1;
67
67
  /**
68
- * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
68
+ * Creates or returns an existing ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
69
69
  *
70
70
  * @param {string} orderId
71
71
  * @param {Chrt.NotificationIntentAdHocClientCreate1} request
@@ -198,7 +198,7 @@ class AdHoc {
198
198
  });
199
199
  }
200
200
  /**
201
- * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
201
+ * Creates or returns an existing ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
202
202
  *
203
203
  * @param {string} orderId
204
204
  * @param {Chrt.NotificationIntentAdHocClientCreate1} request
@@ -34,7 +34,7 @@ export declare class Drivers {
34
34
  constructor(_options?: Drivers.Options);
35
35
  get complianceDocuments(): ComplianceDocuments;
36
36
  /**
37
- * Retrieves driver stats for a time window: overlap-corrected hours worked, total GPS mileage, and mileage restricted to worked task-group intervals. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
37
+ * Retrieves driver analytics for a time window. Daily rows are clipped to the requested UTC window; task-group rows include full in-progress mileage for task groups whose in-progress interval overlaps the requested window. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
38
38
  *
39
39
  * @param {string} driverId
40
40
  * @param {Chrt.shipping.DriverStatsReq} request
@@ -72,7 +72,7 @@ class Drivers {
72
72
  return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new Client_js_1.ComplianceDocuments(this._options)));
73
73
  }
74
74
  /**
75
- * Retrieves driver stats for a time window: overlap-corrected hours worked, total GPS mileage, and mileage restricted to worked task-group intervals. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
75
+ * Retrieves driver analytics for a time window. Daily rows are clipped to the requested UTC window; task-group rows include full in-progress mileage for task groups whose in-progress interval overlaps the requested window. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
76
76
  *
77
77
  * @param {string} driverId
78
78
  * @param {Chrt.shipping.DriverStatsReq} request
@@ -11,5 +11,4 @@
11
11
  export interface DriverStatsReq {
12
12
  start_timestamp: string;
13
13
  end_timestamp: string;
14
- excluded_task_group_ids?: string[];
15
14
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface DriverAnalyticsDay {
6
+ day: string;
7
+ /** Observed GPS mileage from same-day driver ping segments fetched inside merged task-group in-progress intervals. Cross-interval and cross-midnight segments are dropped. */
8
+ observed_mileage_order_in_progress_deduped: number;
9
+ /** Observed GPS mileage remaining after subtracting order in-progress mileage from total on this UTC day. Includes off-clock segments and cross-interval boundary segments. */
10
+ observed_mileage_order_not_in_progress: number;
11
+ /** Total observed GPS mileage from all same-day driver ping segments on this UTC day. Cross-midnight segments are dropped. */
12
+ observed_mileage_total: number;
13
+ /** Driver self-reported hours and mileage record for this UTC calendar day, if one exists. */
14
+ self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1 | null;
15
+ }
@@ -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 });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface DriverAnalyticsTaskGroup {
6
+ /** Task group assigned to the driver whose in-progress interval overlaps the requested analytics window. */
7
+ task_group: Chrt.TaskGroup1;
8
+ /** Observed GPS mileage for this task group from tracking.task_group_by_driver_timeseries across the full task-group in-progress interval, excluding outlier points. This can include mileage outside the requested analytics window when the task group overlaps the window but starts before it or ends after it. */
9
+ observed_mileage_order_in_progress: number;
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 });
@@ -3,14 +3,6 @@
3
3
  */
4
4
  import * as Chrt from "../index.js";
5
5
  export interface DriverStatsRes {
6
- task_groups: Chrt.TaskGroup1[];
7
- excluded_task_groups: Chrt.TaskGroup1[];
8
- /** Summed from task group in-progress intervals merged to eliminate double-counting of overlapping task groups. */
9
- deduped_task_group_driver_hours: number;
10
- overlapping_task_groups_detected: boolean;
11
- /** Total mileage recorded for this driver across all tracked pings that fall within the requested query window. Independent of task group filtering or deduplication. i.e. includes pings inside and outside of task group time windows */
12
- total_driver_mileage_tracked?: number | null;
13
- /** Total mileage from pings that fall within task group in-progress merged intervals. i.e. excludes pings outside of merged task group time windows */
14
- deduped_task_group_driver_mileage_tracked?: number | null;
15
- self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1[];
6
+ driver_analytics_days?: Chrt.DriverAnalyticsDay[];
7
+ driver_analytics_task_groups?: Chrt.DriverAnalyticsTaskGroup[];
16
8
  }
@@ -146,6 +146,8 @@ export * from "./DirectoryEntry1.js";
146
146
  export * from "./DirectoryEntryListRes.js";
147
147
  export * from "./DirectoryEntrySortByEnum.js";
148
148
  export * from "./Driver1.js";
149
+ export * from "./DriverAnalyticsDay.js";
150
+ export * from "./DriverAnalyticsTaskGroup.js";
149
151
  export * from "./DriverBiddingGroup1.js";
150
152
  export * from "./DriverBiddingGroupListRes.js";
151
153
  export * from "./DriverBiddingGroupSortByEnum.js";
@@ -162,6 +162,8 @@ __exportStar(require("./DirectoryEntry1.js"), exports);
162
162
  __exportStar(require("./DirectoryEntryListRes.js"), exports);
163
163
  __exportStar(require("./DirectoryEntrySortByEnum.js"), exports);
164
164
  __exportStar(require("./Driver1.js"), exports);
165
+ __exportStar(require("./DriverAnalyticsDay.js"), exports);
166
+ __exportStar(require("./DriverAnalyticsTaskGroup.js"), exports);
165
167
  __exportStar(require("./DriverBiddingGroup1.js"), exports);
166
168
  __exportStar(require("./DriverBiddingGroupListRes.js"), exports);
167
169
  __exportStar(require("./DriverBiddingGroupSortByEnum.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.810.0";
1
+ export declare const SDK_VERSION = "1.824.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.810.0";
4
+ exports.SDK_VERSION = "1.824.0";
@@ -21,8 +21,8 @@ export class ChrtClient {
21
21
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
22
22
  "X-Fern-Language": "JavaScript",
23
23
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
24
- "X-Fern-SDK-Version": "1.810.0",
25
- "User-Agent": "@chrt-inc/typescript-sdk/1.810.0",
24
+ "X-Fern-SDK-Version": "1.824.0",
25
+ "User-Agent": "@chrt-inc/typescript-sdk/1.824.0",
26
26
  "X-Fern-Runtime": core.RUNTIME.type,
27
27
  "X-Fern-Runtime-Version": core.RUNTIME.version,
28
28
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -65,7 +65,7 @@ export declare class AdHoc {
65
65
  listBySessionIdV1(sessionId: string, request?: Chrt.notifications.AdHocListBySessionIdV1Request, requestOptions?: AdHoc.RequestOptions): core.HttpResponsePromise<Chrt.NotificationAdHocListRes>;
66
66
  private __listBySessionIdV1;
67
67
  /**
68
- * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
68
+ * Creates or returns an existing ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
69
69
  *
70
70
  * @param {string} orderId
71
71
  * @param {Chrt.NotificationIntentAdHocClientCreate1} request
@@ -162,7 +162,7 @@ export class AdHoc {
162
162
  });
163
163
  }
164
164
  /**
165
- * Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
165
+ * Creates or returns an existing ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
166
166
  *
167
167
  * @param {string} orderId
168
168
  * @param {Chrt.NotificationIntentAdHocClientCreate1} request
@@ -34,7 +34,7 @@ export declare class Drivers {
34
34
  constructor(_options?: Drivers.Options);
35
35
  get complianceDocuments(): ComplianceDocuments;
36
36
  /**
37
- * Retrieves driver stats for a time window: overlap-corrected hours worked, total GPS mileage, and mileage restricted to worked task-group intervals. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
37
+ * Retrieves driver analytics for a time window. Daily rows are clipped to the requested UTC window; task-group rows include full in-progress mileage for task groups whose in-progress interval overlaps the requested window. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
38
38
  *
39
39
  * @param {string} driverId
40
40
  * @param {Chrt.shipping.DriverStatsReq} request
@@ -36,7 +36,7 @@ export class Drivers {
36
36
  return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new ComplianceDocuments(this._options)));
37
37
  }
38
38
  /**
39
- * Retrieves driver stats for a time window: overlap-corrected hours worked, total GPS mileage, and mileage restricted to worked task-group intervals. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
39
+ * Retrieves driver analytics for a time window. Daily rows are clipped to the requested UTC window; task-group rows include full in-progress mileage for task groups whose in-progress interval overlaps the requested window. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
40
40
  *
41
41
  * @param {string} driverId
42
42
  * @param {Chrt.shipping.DriverStatsReq} request
@@ -11,5 +11,4 @@
11
11
  export interface DriverStatsReq {
12
12
  start_timestamp: string;
13
13
  end_timestamp: string;
14
- excluded_task_group_ids?: string[];
15
14
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface DriverAnalyticsDay {
6
+ day: string;
7
+ /** Observed GPS mileage from same-day driver ping segments fetched inside merged task-group in-progress intervals. Cross-interval and cross-midnight segments are dropped. */
8
+ observed_mileage_order_in_progress_deduped: number;
9
+ /** Observed GPS mileage remaining after subtracting order in-progress mileage from total on this UTC day. Includes off-clock segments and cross-interval boundary segments. */
10
+ observed_mileage_order_not_in_progress: number;
11
+ /** Total observed GPS mileage from all same-day driver ping segments on this UTC day. Cross-midnight segments are dropped. */
12
+ observed_mileage_total: number;
13
+ /** Driver self-reported hours and mileage record for this UTC calendar day, if one exists. */
14
+ self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1 | null;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface DriverAnalyticsTaskGroup {
6
+ /** Task group assigned to the driver whose in-progress interval overlaps the requested analytics window. */
7
+ task_group: Chrt.TaskGroup1;
8
+ /** Observed GPS mileage for this task group from tracking.task_group_by_driver_timeseries across the full task-group in-progress interval, excluding outlier points. This can include mileage outside the requested analytics window when the task group overlaps the window but starts before it or ends after it. */
9
+ observed_mileage_order_in_progress: number;
10
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -3,14 +3,6 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface DriverStatsRes {
6
- task_groups: Chrt.TaskGroup1[];
7
- excluded_task_groups: Chrt.TaskGroup1[];
8
- /** Summed from task group in-progress intervals merged to eliminate double-counting of overlapping task groups. */
9
- deduped_task_group_driver_hours: number;
10
- overlapping_task_groups_detected: boolean;
11
- /** Total mileage recorded for this driver across all tracked pings that fall within the requested query window. Independent of task group filtering or deduplication. i.e. includes pings inside and outside of task group time windows */
12
- total_driver_mileage_tracked?: number | null;
13
- /** Total mileage from pings that fall within task group in-progress merged intervals. i.e. excludes pings outside of merged task group time windows */
14
- deduped_task_group_driver_mileage_tracked?: number | null;
15
- self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1[];
6
+ driver_analytics_days?: Chrt.DriverAnalyticsDay[];
7
+ driver_analytics_task_groups?: Chrt.DriverAnalyticsTaskGroup[];
16
8
  }
@@ -146,6 +146,8 @@ export * from "./DirectoryEntry1.mjs";
146
146
  export * from "./DirectoryEntryListRes.mjs";
147
147
  export * from "./DirectoryEntrySortByEnum.mjs";
148
148
  export * from "./Driver1.mjs";
149
+ export * from "./DriverAnalyticsDay.mjs";
150
+ export * from "./DriverAnalyticsTaskGroup.mjs";
149
151
  export * from "./DriverBiddingGroup1.mjs";
150
152
  export * from "./DriverBiddingGroupListRes.mjs";
151
153
  export * from "./DriverBiddingGroupSortByEnum.mjs";
@@ -146,6 +146,8 @@ export * from "./DirectoryEntry1.mjs";
146
146
  export * from "./DirectoryEntryListRes.mjs";
147
147
  export * from "./DirectoryEntrySortByEnum.mjs";
148
148
  export * from "./Driver1.mjs";
149
+ export * from "./DriverAnalyticsDay.mjs";
150
+ export * from "./DriverAnalyticsTaskGroup.mjs";
149
151
  export * from "./DriverBiddingGroup1.mjs";
150
152
  export * from "./DriverBiddingGroupListRes.mjs";
151
153
  export * from "./DriverBiddingGroupSortByEnum.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.810.0";
1
+ export declare const SDK_VERSION = "1.824.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.810.0";
1
+ export const SDK_VERSION = "1.824.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.810.0",
3
+ "version": "1.824.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -9885,7 +9885,7 @@ await client.notifications.adHoc.listBySessionIdV1("session_id", {
9885
9885
  <dl>
9886
9886
  <dd>
9887
9887
 
9888
- Creates a new ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
9888
+ Creates or returns an existing ad-hoc notification intent for an order. | authz: min_org_role=operator | (NotificationIntentAdHocClientCreate1) -> (PydanticObjectId)
9889
9889
 
9890
9890
  </dd>
9891
9891
  </dl>
@@ -17570,7 +17570,7 @@ await client.orgs.orgInfoForConnections.provider.updateV1();
17570
17570
  <dl>
17571
17571
  <dd>
17572
17572
 
17573
- Retrieves driver stats for a time window: overlap-corrected hours worked, total GPS mileage, and mileage restricted to worked task-group intervals. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
17573
+ Retrieves driver analytics for a time window. Daily rows are clipped to the requested UTC window; task-group rows include full in-progress mileage for task groups whose in-progress interval overlaps the requested window. | authz: allowed_org_types=[provider], min_org_role=operator | (DriverStatsReq) -> (DriverStatsRes)
17574
17574
 
17575
17575
  </dd>
17576
17576
  </dl>