@chrt-inc/typescript-sdk 1.746.0 → 1.751.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 (142) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +13 -0
  3. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +59 -0
  4. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.ts +1 -1
  5. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.ts +1 -1
  6. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.ts +1 -1
  7. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +8 -2
  8. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +8 -2
  9. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +1 -1
  10. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.d.ts +25 -41
  11. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/Client.js +51 -125
  12. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/requests/OrderSchedulesListV1Request.d.ts +2 -4
  13. package/dist/cjs/api/resources/shipping/resources/orderSchedules/client/requests/index.d.ts +0 -2
  14. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/Client.d.ts +64 -0
  15. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/Client.js +196 -0
  16. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/index.js +17 -0
  18. package/dist/cjs/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientCreate1.d.ts +4 -6
  19. package/dist/cjs/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientUpdate1.d.ts +2 -2
  20. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/index.d.ts +2 -0
  21. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/draft/index.js +17 -0
  24. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/shipping/resources/orderSchedules/resources/index.js +6 -1
  26. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +8 -2
  27. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +8 -2
  28. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.ts +1 -1
  29. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +1 -1
  30. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +0 -13
  31. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +0 -62
  32. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +0 -1
  33. package/dist/cjs/api/types/Cargo1.d.ts +1 -3
  34. package/dist/cjs/api/types/CargoManifest1.d.ts +6 -0
  35. package/dist/cjs/api/types/FlightInfoForTaskRes.d.ts +4 -3
  36. package/dist/cjs/api/types/FlightLeg1.d.ts +19 -0
  37. package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +16 -0
  38. package/dist/cjs/api/types/FlightLegProvenanceEnum1.d.ts +9 -0
  39. package/dist/cjs/api/types/FlightLegProvenanceEnum1.js +11 -0
  40. package/dist/cjs/api/types/FlightLegWebhookInfo.d.ts +22 -0
  41. package/dist/cjs/api/types/OrderManifest1.d.ts +2 -2
  42. package/dist/cjs/api/types/OrderSchedule1.d.ts +6 -7
  43. package/dist/cjs/api/types/OrderScheduleAboutRes.d.ts +1 -1
  44. package/dist/cjs/api/types/OrderScheduleOrchestratorScheduleStatus.d.ts +0 -1
  45. package/dist/cjs/api/types/OrderScheduleSortByEnum.d.ts +2 -2
  46. package/dist/cjs/api/types/OrderScheduleSortByEnum.js +1 -1
  47. package/dist/cjs/api/types/OrderScheduleSpec1.d.ts +11 -0
  48. package/dist/cjs/api/types/OrderScheduleSpec1.js +5 -0
  49. package/dist/cjs/api/types/SetFlightInfoReq.d.ts +3 -4
  50. package/dist/cjs/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.ts +3 -4
  51. package/dist/cjs/api/types/Task1.d.ts +2 -4
  52. package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -3
  53. package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -1
  54. package/dist/cjs/api/types/TaskGroup1.d.ts +2 -5
  55. package/dist/cjs/api/types/TaskGroupManifest1.d.ts +1 -1
  56. package/dist/cjs/api/types/TaskManifest1.d.ts +13 -4
  57. package/dist/cjs/api/types/index.d.ts +5 -3
  58. package/dist/cjs/api/types/index.js +5 -3
  59. package/dist/cjs/version.d.ts +1 -1
  60. package/dist/cjs/version.js +1 -1
  61. package/dist/esm/Client.mjs +2 -2
  62. package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +13 -0
  63. package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +59 -0
  64. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/cargo/client/requests/OrderDraftAddCargoReq.d.mts +1 -1
  65. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/task/client/requests/OrderDraftAddTaskReqV1.d.mts +1 -1
  66. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskArtifact/client/requests/OrderDraftAddTaskArtifactReq.d.mts +1 -1
  67. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +8 -2
  68. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +8 -2
  69. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +1 -1
  70. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.d.mts +25 -41
  71. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/Client.mjs +49 -123
  72. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/requests/OrderSchedulesListV1Request.d.mts +2 -4
  73. package/dist/esm/api/resources/shipping/resources/orderSchedules/client/requests/index.d.mts +0 -2
  74. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/Client.d.mts +64 -0
  75. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/Client.mjs +159 -0
  76. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/index.d.mts +2 -0
  77. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/index.mjs +1 -0
  78. package/dist/esm/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientCreate1.d.mts +4 -6
  79. package/dist/esm/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientUpdate1.d.mts +2 -2
  80. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/index.d.mts +2 -0
  81. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/client/requests/index.mjs +1 -0
  82. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/index.d.mts +1 -0
  83. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/draft/index.mjs +1 -0
  84. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.d.mts +2 -0
  85. package/dist/esm/api/resources/shipping/resources/orderSchedules/resources/index.mjs +2 -0
  86. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +8 -2
  87. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +8 -2
  88. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.mts +1 -1
  89. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +1 -1
  90. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +0 -13
  91. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +0 -62
  92. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +0 -1
  93. package/dist/esm/api/types/Cargo1.d.mts +1 -3
  94. package/dist/esm/api/types/CargoManifest1.d.mts +6 -0
  95. package/dist/esm/api/types/FlightInfoForTaskRes.d.mts +4 -3
  96. package/dist/esm/api/types/FlightLeg1.d.mts +19 -0
  97. package/dist/esm/api/types/FlightLegClientCreate1.d.mts +16 -0
  98. package/dist/esm/api/types/FlightLegProvenanceEnum1.d.mts +9 -0
  99. package/dist/esm/api/types/FlightLegProvenanceEnum1.mjs +8 -0
  100. package/dist/esm/api/types/FlightLegWebhookInfo.d.mts +22 -0
  101. package/dist/esm/api/types/OrderManifest1.d.mts +2 -2
  102. package/dist/esm/api/types/OrderSchedule1.d.mts +6 -7
  103. package/dist/esm/api/types/OrderScheduleAboutRes.d.mts +1 -1
  104. package/dist/esm/api/types/OrderScheduleOrchestratorScheduleStatus.d.mts +0 -1
  105. package/dist/esm/api/types/OrderScheduleSortByEnum.d.mts +2 -2
  106. package/dist/esm/api/types/OrderScheduleSortByEnum.mjs +1 -1
  107. package/dist/esm/api/types/OrderScheduleSpec1.d.mts +11 -0
  108. package/dist/esm/api/types/OrderScheduleSpec1.mjs +4 -0
  109. package/dist/esm/api/types/SetFlightInfoReq.d.mts +3 -4
  110. package/dist/esm/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.mts +3 -4
  111. package/dist/esm/api/types/Task1.d.mts +2 -4
  112. package/dist/esm/api/types/TaskArtifact1.d.mts +1 -3
  113. package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -1
  114. package/dist/esm/api/types/TaskGroup1.d.mts +2 -5
  115. package/dist/esm/api/types/TaskGroupManifest1.d.mts +1 -1
  116. package/dist/esm/api/types/TaskManifest1.d.mts +13 -4
  117. package/dist/esm/api/types/index.d.mts +5 -3
  118. package/dist/esm/api/types/index.mjs +5 -3
  119. package/dist/esm/version.d.mts +1 -1
  120. package/dist/esm/version.mjs +1 -1
  121. package/package.json +1 -1
  122. package/reference.md +239 -160
  123. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.ts +0 -13
  124. package/dist/cjs/api/types/OrderScheduleOrchestratorScheduleStatusEnum1.d.ts +0 -10
  125. package/dist/cjs/api/types/OrderScheduleOrchestratorScheduleStatusEnum1.js +0 -12
  126. package/dist/cjs/api/types/ScheduleSpec.d.ts +0 -14
  127. package/dist/cjs/api/types/ScheduledPingRes.d.ts +0 -16
  128. package/dist/esm/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.mts +0 -13
  129. package/dist/esm/api/types/OrderScheduleOrchestratorScheduleStatusEnum1.d.mts +0 -10
  130. package/dist/esm/api/types/OrderScheduleOrchestratorScheduleStatusEnum1.mjs +0 -9
  131. package/dist/esm/api/types/ScheduleSpec.d.mts +0 -14
  132. package/dist/esm/api/types/ScheduledPingRes.d.mts +0 -16
  133. /package/dist/cjs/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientCreate1.js +0 -0
  134. /package/dist/cjs/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientUpdate1.js +0 -0
  135. /package/dist/cjs/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.js → types/FlightLeg1.js} +0 -0
  136. /package/dist/cjs/api/types/{ScheduleSpec.js → FlightLegClientCreate1.js} +0 -0
  137. /package/dist/cjs/api/types/{ScheduledPingRes.js → FlightLegWebhookInfo.js} +0 -0
  138. /package/dist/esm/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientCreate1.mjs +0 -0
  139. /package/dist/esm/api/resources/shipping/resources/orderSchedules/{client → resources/draft/client}/requests/OrderScheduleClientUpdate1.mjs +0 -0
  140. /package/dist/esm/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.mjs → types/FlightLeg1.mjs} +0 -0
  141. /package/dist/esm/api/types/{ScheduleSpec.mjs → FlightLegClientCreate1.mjs} +0 -0
  142. /package/dist/esm/api/types/{ScheduledPingRes.mjs → FlightLegWebhookInfo.mjs} +0 -0
@@ -0,0 +1,2 @@
1
+ export { type OrderScheduleClientCreate1 } from "./OrderScheduleClientCreate1.mjs";
2
+ export { type OrderScheduleClientUpdate1 } from "./OrderScheduleClientUpdate1.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -1 +1,3 @@
1
+ export * as draft from "./draft/index.mjs";
1
2
  export * as orderManifest from "./orderManifest/index.mjs";
3
+ export * from "./draft/client/requests/index.mjs";
@@ -1 +1,3 @@
1
+ export * as draft from "./draft/index.mjs";
1
2
  export * as orderManifest from "./orderManifest/index.mjs";
3
+ export * from "./draft/client/requests/index.mjs";
@@ -141,7 +141,7 @@ export declare class TaskGroups {
141
141
  removeExecutorV1(taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
142
142
  private __removeExecutorV1;
143
143
  /**
144
- * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
144
+ * Replaces the ordered list of flights on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
145
145
  *
146
146
  * @param {string} taskGroupId
147
147
  * @param {Chrt.SetFlightInfoReq} request
@@ -150,7 +150,13 @@ export declare class TaskGroups {
150
150
  * @throws {@link Chrt.UnprocessableEntityError}
151
151
  *
152
152
  * @example
153
- * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {})
153
+ * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
154
+ * flight_legs: [{
155
+ * schema_version: 1,
156
+ * flight_number: "flight_number",
157
+ * provenance: "manual"
158
+ * }]
159
+ * })
154
160
  */
155
161
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
156
162
  private __setFlightInfoV1;
@@ -473,7 +473,7 @@ export class TaskGroups {
473
473
  });
474
474
  }
475
475
  /**
476
- * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
476
+ * Replaces the ordered list of flights on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
477
477
  *
478
478
  * @param {string} taskGroupId
479
479
  * @param {Chrt.SetFlightInfoReq} request
@@ -482,7 +482,13 @@ export class TaskGroups {
482
482
  * @throws {@link Chrt.UnprocessableEntityError}
483
483
  *
484
484
  * @example
485
- * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {})
485
+ * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
486
+ * flight_legs: [{
487
+ * schema_version: 1,
488
+ * flight_number: "flight_number",
489
+ * provenance: "manual"
490
+ * }]
491
+ * })
486
492
  */
487
493
  setFlightInfoV1(taskGroupId, request, requestOptions) {
488
494
  return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(taskGroupId, request, requestOptions));
@@ -36,7 +36,7 @@ export interface ExpandedListForDriverForExecutorV1Request {
36
36
  sort_order?: Chrt.SortOrderEnum | null;
37
37
  page?: number | null;
38
38
  page_size?: number | null;
39
- /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
39
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id) */
40
40
  search?: string | null;
41
41
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
42
42
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -37,7 +37,7 @@ export interface ExpandedListForExecutorOperatorsV1Request {
37
37
  sort_order?: Chrt.SortOrderEnum | null;
38
38
  page?: number | null;
39
39
  page_size?: number | null;
40
- /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
40
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id) */
41
41
  search?: string | null;
42
42
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
43
43
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -30,19 +30,6 @@ export declare namespace Dev {
30
30
  export declare class Dev {
31
31
  protected readonly _options: Dev.Options;
32
32
  constructor(_options?: Dev.Options);
33
- /**
34
- * Creates or updates a Temporal Schedule that runs the scheduled ping workflow for developer diagnostics. | authz: min_org_role=administrator | (ScheduledPingReq) -> (ScheduledPingRes)
35
- *
36
- * @param {Chrt.utils.ScheduledPingReq} request
37
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
38
- *
39
- * @throws {@link Chrt.UnprocessableEntityError}
40
- *
41
- * @example
42
- * await client.utils.dev.postAgentPingScheduleV1()
43
- */
44
- postAgentPingScheduleV1(request?: Chrt.utils.ScheduledPingReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.ScheduledPingRes>;
45
- private __postAgentPingScheduleV1;
46
33
  /**
47
34
  * Runs a minimal Temporal workflow that sends a prompt to OpenAI and returns the response. | (PingOpenAIReq) -> (PingOpenAIRes)
48
35
  *
@@ -19,68 +19,6 @@ export class Dev {
19
19
  constructor(_options = {}) {
20
20
  this._options = _options;
21
21
  }
22
- /**
23
- * Creates or updates a Temporal Schedule that runs the scheduled ping workflow for developer diagnostics. | authz: min_org_role=administrator | (ScheduledPingReq) -> (ScheduledPingRes)
24
- *
25
- * @param {Chrt.utils.ScheduledPingReq} request
26
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
27
- *
28
- * @throws {@link Chrt.UnprocessableEntityError}
29
- *
30
- * @example
31
- * await client.utils.dev.postAgentPingScheduleV1()
32
- */
33
- postAgentPingScheduleV1(request = {}, requestOptions) {
34
- return core.HttpResponsePromise.fromPromise(this.__postAgentPingScheduleV1(request, requestOptions));
35
- }
36
- __postAgentPingScheduleV1() {
37
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
38
- var _a, _b, _c, _d;
39
- 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);
40
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
41
- 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, "dev/agent/ping-schedule/v1"),
42
- method: "POST",
43
- headers: _headers,
44
- contentType: "application/json",
45
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
46
- requestType: "json",
47
- body: request,
48
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
49
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
50
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
51
- });
52
- if (_response.ok) {
53
- return { data: _response.body, rawResponse: _response.rawResponse };
54
- }
55
- if (_response.error.reason === "status-code") {
56
- switch (_response.error.statusCode) {
57
- case 422:
58
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
59
- default:
60
- throw new errors.ChrtError({
61
- statusCode: _response.error.statusCode,
62
- body: _response.error.body,
63
- rawResponse: _response.rawResponse,
64
- });
65
- }
66
- }
67
- switch (_response.error.reason) {
68
- case "non-json":
69
- throw new errors.ChrtError({
70
- statusCode: _response.error.statusCode,
71
- body: _response.error.rawBody,
72
- rawResponse: _response.rawResponse,
73
- });
74
- case "timeout":
75
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/ping-schedule/v1.");
76
- case "unknown":
77
- throw new errors.ChrtError({
78
- message: _response.error.errorMessage,
79
- rawResponse: _response.rawResponse,
80
- });
81
- }
82
- });
83
- }
84
22
  /**
85
23
  * Runs a minimal Temporal workflow that sends a prompt to OpenAI and returns the response. | (PingOpenAIReq) -> (PingOpenAIRes)
86
24
  *
@@ -1,4 +1,3 @@
1
- export { type ScheduledPingReq } from "./ScheduledPingReq.mjs";
2
1
  export { type PingOpenAiReq } from "./PingOpenAiReq.mjs";
3
2
  export { type PingReq } from "./PingReq.mjs";
4
3
  export { type TemplateReq } from "./TemplateReq.mjs";
@@ -18,9 +18,7 @@ export interface Cargo1 {
18
18
  _id: string;
19
19
  order_id: string;
20
20
  order_short_id: string;
21
- order_schedule_id?: string | null;
22
- order_schedule_run_idempotency_key?: string | null;
23
- order_schedule_template_path?: string | null;
21
+ order_schedule_template_path_idempotency_key?: string | null;
24
22
  /** Must be a string starting with `org_` */
25
23
  created_by_org_id: string;
26
24
  /** Must be a string starting with `user_` */
@@ -4,6 +4,10 @@
4
4
  import * as Chrt from "../index.mjs";
5
5
  /**
6
6
  * Cargo template used when generating a scheduled order.
7
+ *
8
+ * Reuses the cargo create shape verbatim (CargoClientCreate1) so the manifest
9
+ * cannot drift from the real cargo model. A scheduled cargo carries no
10
+ * template-specific fields of its own.
7
11
  */
8
12
  export interface CargoManifest1 {
9
13
  schema_version: number;
@@ -16,4 +20,6 @@ export interface CargoManifest1 {
16
20
  turnable?: boolean | null;
17
21
  stackable?: boolean | null;
18
22
  description?: string | null;
23
+ /** IATA Air Waybill number: 3-digit airline prefix + 8-digit serial, e.g. '020-12345678'. */
24
+ awb_number?: string | null;
19
25
  }
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../index.mjs";
4
5
  /**
5
- * Response model for flight info lookup by task.
6
+ * Response model for flight info lookup by task — the ordered flight legs
7
+ * of the adjacent CARGO_ON_FLIGHT task group.
6
8
  */
7
9
  export interface FlightInfoForTaskRes {
8
- flight_number?: string | null;
9
- fa_flight_ids?: string[];
10
+ flight_legs?: Chrt.FlightLeg1[];
10
11
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface FlightLeg1 {
6
+ schema_version: number;
7
+ _id: string;
8
+ order_id: string;
9
+ task_group_id: string;
10
+ flight_number: string;
11
+ provenance: Chrt.FlightLegProvenanceEnum1;
12
+ carrier_iata?: string | null;
13
+ carrier_icao?: string | null;
14
+ origin_iata?: string | null;
15
+ destination_iata?: string | null;
16
+ scheduled_departure_utc?: string | null;
17
+ scheduled_arrival_utc?: string | null;
18
+ fa_flight_ids?: string[];
19
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface FlightLegClientCreate1 {
6
+ schema_version: number;
7
+ flight_number: string;
8
+ provenance: Chrt.FlightLegProvenanceEnum1;
9
+ carrier_iata?: string | null;
10
+ carrier_icao?: string | null;
11
+ origin_iata?: string | null;
12
+ destination_iata?: string | null;
13
+ scheduled_departure_utc?: string | null;
14
+ scheduled_arrival_utc?: string | null;
15
+ fa_flight_ids?: string[];
16
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type FlightLegProvenanceEnum1 = "manual" | "cirium" | "flightaware";
5
+ export declare const FlightLegProvenanceEnum1: {
6
+ readonly Manual: "manual";
7
+ readonly Cirium: "cirium";
8
+ readonly Flightaware: "flightaware";
9
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const FlightLegProvenanceEnum1 = {
5
+ Manual: "manual",
6
+ Cirium: "cirium",
7
+ Flightaware: "flightaware",
8
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A single flight leg in a task group's ordered flight legs.
6
+ */
7
+ export interface FlightLegWebhookInfo {
8
+ /** The flight number */
9
+ flight_number: string;
10
+ /** Carrier IATA code */
11
+ carrier_iata?: string | null;
12
+ /** Origin airport IATA code */
13
+ origin_iata?: string | null;
14
+ /** Destination airport IATA code */
15
+ destination_iata?: string | null;
16
+ /** Scheduled departure (UTC) */
17
+ scheduled_departure_utc?: string | null;
18
+ /** Scheduled arrival (UTC) */
19
+ scheduled_arrival_utc?: string | null;
20
+ /** FlightAware flight UUIDs associated with this leg */
21
+ fa_flight_ids?: string[];
22
+ }
@@ -13,7 +13,7 @@ export interface OrderManifest1 {
13
13
  off_chrt_shipper_org_id?: string | null;
14
14
  /** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
15
15
  off_chrt_reference_id?: string | null;
16
- cargos?: Chrt.CargoManifest1[];
17
- task_groups?: Chrt.TaskGroupManifest1[];
16
+ cargo_manifests?: Chrt.CargoManifest1[];
17
+ task_group_manifests?: Chrt.TaskGroupManifest1[];
18
18
  auto_stage?: boolean;
19
19
  }
@@ -6,9 +6,10 @@ export interface OrderSchedule1 {
6
6
  schema_version: number;
7
7
  name: string;
8
8
  description?: string | null;
9
- order_manifest: Chrt.OrderManifest1;
10
- schedule_spec: Chrt.ScheduleSpec;
9
+ order_manifest?: Chrt.OrderManifest1 | null;
10
+ schedule_spec?: Chrt.OrderScheduleSpec1 | null;
11
11
  _id: string;
12
+ short_id: string;
12
13
  /** Must be a string starting with `user_` */
13
14
  owned_by_user_id: string;
14
15
  /** Must be a string starting with `org_` */
@@ -16,9 +17,7 @@ export interface OrderSchedule1 {
16
17
  owned_by_org_type: Chrt.OrgTypeEnum;
17
18
  created_at_timestamp: string;
18
19
  last_edited_at_timestamp: string;
19
- status?: Chrt.OrderScheduleStatusEnum1;
20
- orchestrator_schedule_status?: Chrt.OrderScheduleOrchestratorScheduleStatusEnum1;
21
- orchestrator_schedule_id: string;
22
- orchestrator_schedule_paused?: boolean | null;
23
- orchestrator_schedule_created_at_timestamp?: string | null;
20
+ intended_status?: Chrt.OrderScheduleStatusEnum1;
21
+ orchestrator_schedule_id?: string | null;
22
+ orchestrator_schedule_paused?: boolean;
24
23
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface OrderScheduleAboutRes {
6
- order_schedule: Chrt.OrderSchedule1;
6
+ short_id: string;
7
7
  orders_created_count: number;
8
8
  orchestrator_schedule_status: Chrt.OrderScheduleOrchestratorScheduleStatus;
9
9
  }
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface OrderScheduleOrchestratorScheduleStatus {
6
- status: Chrt.OrderScheduleOrchestratorScheduleStatusEnum1;
7
6
  exists: boolean;
8
7
  paused?: boolean | null;
9
8
  actions_count?: number | null;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type OrderScheduleSortByEnum = "created_at_timestamp" | "last_edited_at_timestamp" | "name" | "status";
4
+ export type OrderScheduleSortByEnum = "created_at_timestamp" | "last_edited_at_timestamp" | "name" | "intended_status";
5
5
  export declare const OrderScheduleSortByEnum: {
6
6
  readonly CreatedAtTimestamp: "created_at_timestamp";
7
7
  readonly LastEditedAtTimestamp: "last_edited_at_timestamp";
8
8
  readonly Name: "name";
9
- readonly Status: "status";
9
+ readonly IntendedStatus: "intended_status";
10
10
  };
@@ -5,5 +5,5 @@ export const OrderScheduleSortByEnum = {
5
5
  CreatedAtTimestamp: "created_at_timestamp",
6
6
  LastEditedAtTimestamp: "last_edited_at_timestamp",
7
7
  Name: "name",
8
- Status: "status",
8
+ IntendedStatus: "intended_status",
9
9
  };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface OrderScheduleSpec1 {
6
+ schedule_calendar_spec?: Chrt.ScheduleCalendarSpec | null;
7
+ start_at?: string | null;
8
+ end_at?: string | null;
9
+ /** IANA time zone name (e.g. `America/New_York`). */
10
+ time_zone_name: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../index.mjs";
4
5
  export interface SetFlightInfoReq {
5
- /** Flight number to set on the task group */
6
- flight_number?: string | null;
7
- /** Flight Aware's uuid for flights */
8
- fa_flight_ids?: string[] | null;
6
+ /** Ordered list of flight legs for the task group. Replaces any existing flight legs. Pass an empty list to clear all flight legs. */
7
+ flight_legs: Chrt.FlightLegClientCreate1[];
9
8
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Chrt from "../index.mjs";
4
5
  export interface ShippingTaskGroupFlightInfoUpdatedWebhookPayload {
5
6
  event_type?: "shipping.task_group.flight_info_updated";
6
7
  /** UTC timestamp when the event occurred */
@@ -9,8 +10,6 @@ export interface ShippingTaskGroupFlightInfoUpdatedWebhookPayload {
9
10
  order_id: string;
10
11
  /** The task group whose flight info was updated */
11
12
  task_group_id: string;
12
- /** The flight number (if set) */
13
- flight_number?: string | null;
14
- /** FlightAware flight UUIDs associated with this task group */
15
- fa_flight_ids: string[];
13
+ /** The task group's ordered flight legs */
14
+ flight_legs: Chrt.FlightLegWebhookInfo[];
16
15
  }
@@ -7,16 +7,14 @@ export interface Task1 {
7
7
  location?: Chrt.LocationFeature | null;
8
8
  geofence_distance_miles?: number;
9
9
  action?: Task1.Action | null;
10
- datetime_windows?: Chrt.DateTimeWindow1[];
11
10
  order_placer_comments?: string | null;
12
11
  directory_entry_ids?: string[];
12
+ datetime_windows?: Chrt.DateTimeWindow1[];
13
13
  _id: string;
14
14
  order_id: string;
15
15
  order_short_id: string;
16
16
  task_group_id: string;
17
- order_schedule_id?: string | null;
18
- order_schedule_run_idempotency_key?: string | null;
19
- order_schedule_template_path?: string | null;
17
+ order_schedule_template_path_idempotency_key?: string | null;
20
18
  /** Must be a string starting with `org_` */
21
19
  created_by_org_id: string;
22
20
  /** Must be a string starting with `user_` */
@@ -11,9 +11,7 @@ export interface TaskArtifact1 {
11
11
  order_short_id: string;
12
12
  task_group_id: string;
13
13
  task_id: string;
14
- order_schedule_id?: string | null;
15
- order_schedule_run_idempotency_key?: string | null;
16
- order_schedule_template_path?: string | null;
14
+ order_schedule_template_path_idempotency_key?: string | null;
17
15
  task_artifact_s3_object_metadata_ids?: string[];
18
16
  /** Must be a string starting with `org_` */
19
17
  created_by_org_id: string;
@@ -7,9 +7,9 @@ export interface TaskClientCreate1 {
7
7
  location?: Chrt.LocationFeature | null;
8
8
  geofence_distance_miles?: number;
9
9
  action?: TaskClientCreate1.Action | null;
10
- datetime_windows?: Chrt.DateTimeWindow1[];
11
10
  order_placer_comments?: string | null;
12
11
  directory_entry_ids?: string[];
12
+ datetime_windows?: Chrt.DateTimeWindow1[];
13
13
  }
14
14
  export declare namespace TaskClientCreate1 {
15
15
  type Action = Chrt.ChrtGroundProviderTaskActionEnum1 | Chrt.CargoOnFlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
@@ -10,9 +10,7 @@ export interface TaskGroup1 {
10
10
  /** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
11
11
  order_off_chrt_reference_id?: string | null;
12
12
  task_ids?: string[];
13
- order_schedule_id?: string | null;
14
- order_schedule_run_idempotency_key?: string | null;
15
- order_schedule_template_path?: string | null;
13
+ order_schedule_template_path_idempotency_key?: string | null;
16
14
  /** Must be a string starting with `user_` */
17
15
  created_by_user_id?: string | null;
18
16
  /** Must be a string starting with `org_` */
@@ -41,8 +39,7 @@ export interface TaskGroup1 {
41
39
  mileage_observed?: number | null;
42
40
  wait_time_total_minutes?: number | null;
43
41
  mileage_asserted?: boolean;
44
- flight_number?: string | null;
45
- fa_flight_ids?: string[];
42
+ flight_leg_ids?: string[];
46
43
  messages?: Chrt.TaskGroupMessage1[];
47
44
  shipper_pay_provider_rate_sheet_id?: string | null;
48
45
  shipper_pay_provider_line_item_group_id?: string | null;
@@ -11,5 +11,5 @@ export interface TaskGroupManifest1 {
11
11
  /** Must be a string starting with `org_` */
12
12
  executor_org_id?: string | null;
13
13
  driver_id?: string | null;
14
- tasks: Chrt.TaskManifest1[];
14
+ task_manifests: Chrt.TaskManifest1[];
15
15
  }
@@ -3,15 +3,24 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  /**
6
- * Task template plus cargo/artifact references within an order manifest.
6
+ * Task template within an order manifest.
7
+ *
8
+ * Inherits the shared task core (TaskCore1) so the physical fields cannot drift
9
+ * from the real task, and adds the template-only fields: relative time windows
10
+ * (resolved against the fire time at build), positional task->cargo references,
11
+ * and the artifact types to create for the task.
7
12
  */
8
13
  export interface TaskManifest1 {
9
14
  schema_version: number;
10
15
  location?: Chrt.LocationFeature | null;
11
- action?: Chrt.ChrtGroundProviderTaskActionEnum1 | null;
12
- time_windows?: Chrt.TimeWindow1[];
16
+ geofence_distance_miles?: number;
17
+ action?: TaskManifest1.Action | null;
13
18
  order_placer_comments?: string | null;
14
19
  directory_entry_ids?: string[];
15
- cargo_template_indices?: number[];
20
+ time_windows?: Chrt.TimeWindow1[];
21
+ cargo_manifest_indices?: number[];
16
22
  task_artifact_types?: Chrt.TaskArtifactTypeEnum1[];
17
23
  }
24
+ export declare namespace TaskManifest1 {
25
+ type Action = Chrt.ChrtGroundProviderTaskActionEnum1 | Chrt.CargoOnFlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
26
+ }
@@ -148,6 +148,10 @@ export * from "./FlightAwareAlertFlight.mjs";
148
148
  export * from "./FlightAwareAlertPayload.mjs";
149
149
  export * from "./FlightAwareWebhookResponse.mjs";
150
150
  export * from "./FlightInfoForTaskRes.mjs";
151
+ export * from "./FlightLeg1.mjs";
152
+ export * from "./FlightLegClientCreate1.mjs";
153
+ export * from "./FlightLegProvenanceEnum1.mjs";
154
+ export * from "./FlightLegWebhookInfo.mjs";
151
155
  export * from "./FlightStatusEnum.mjs";
152
156
  export * from "./GeometryCollectionGeometriesItem.mjs";
153
157
  export * from "./GeometryCollection.mjs";
@@ -240,8 +244,8 @@ export * from "./OrderScheduleAboutRes.mjs";
240
244
  export * from "./OrderScheduleListRes.mjs";
241
245
  export * from "./OrderScheduleOrchestratorScheduleActionResult.mjs";
242
246
  export * from "./OrderScheduleOrchestratorScheduleStatus.mjs";
243
- export * from "./OrderScheduleOrchestratorScheduleStatusEnum1.mjs";
244
247
  export * from "./OrderScheduleSortByEnum.mjs";
248
+ export * from "./OrderScheduleSpec1.mjs";
245
249
  export * from "./OrderScheduleStatusEnum1.mjs";
246
250
  export * from "./OrderSortByEnum.mjs";
247
251
  export * from "./OrderStatusEnum1.mjs";
@@ -294,9 +298,7 @@ export * from "./ScanPayloadKindEnum.mjs";
294
298
  export * from "./ScheduleCalendarSpec.mjs";
295
299
  export * from "./ScheduleIntervalSpec.mjs";
296
300
  export * from "./ScheduleRange.mjs";
297
- export * from "./ScheduleSpec.mjs";
298
301
  export * from "./ScheduledOrdersNewDraftReq.mjs";
299
- export * from "./ScheduledPingRes.mjs";
300
302
  export * from "./Session1.mjs";
301
303
  export * from "./SessionByDeviceDataPoint1.mjs";
302
304
  export * from "./SessionByDeviceDataPointMetadata1.mjs";
@@ -148,6 +148,10 @@ export * from "./FlightAwareAlertFlight.mjs";
148
148
  export * from "./FlightAwareAlertPayload.mjs";
149
149
  export * from "./FlightAwareWebhookResponse.mjs";
150
150
  export * from "./FlightInfoForTaskRes.mjs";
151
+ export * from "./FlightLeg1.mjs";
152
+ export * from "./FlightLegClientCreate1.mjs";
153
+ export * from "./FlightLegProvenanceEnum1.mjs";
154
+ export * from "./FlightLegWebhookInfo.mjs";
151
155
  export * from "./FlightStatusEnum.mjs";
152
156
  export * from "./GeometryCollectionGeometriesItem.mjs";
153
157
  export * from "./GeometryCollection.mjs";
@@ -240,8 +244,8 @@ export * from "./OrderScheduleAboutRes.mjs";
240
244
  export * from "./OrderScheduleListRes.mjs";
241
245
  export * from "./OrderScheduleOrchestratorScheduleActionResult.mjs";
242
246
  export * from "./OrderScheduleOrchestratorScheduleStatus.mjs";
243
- export * from "./OrderScheduleOrchestratorScheduleStatusEnum1.mjs";
244
247
  export * from "./OrderScheduleSortByEnum.mjs";
248
+ export * from "./OrderScheduleSpec1.mjs";
245
249
  export * from "./OrderScheduleStatusEnum1.mjs";
246
250
  export * from "./OrderSortByEnum.mjs";
247
251
  export * from "./OrderStatusEnum1.mjs";
@@ -294,9 +298,7 @@ export * from "./ScanPayloadKindEnum.mjs";
294
298
  export * from "./ScheduleCalendarSpec.mjs";
295
299
  export * from "./ScheduleIntervalSpec.mjs";
296
300
  export * from "./ScheduleRange.mjs";
297
- export * from "./ScheduleSpec.mjs";
298
301
  export * from "./ScheduledOrdersNewDraftReq.mjs";
299
- export * from "./ScheduledPingRes.mjs";
300
302
  export * from "./Session1.mjs";
301
303
  export * from "./SessionByDeviceDataPoint1.mjs";
302
304
  export * from "./SessionByDeviceDataPointMetadata1.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.746.0";
1
+ export declare const SDK_VERSION = "1.751.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.746.0";
1
+ export const SDK_VERSION = "1.751.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.746.0",
3
+ "version": "1.751.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",