@chrt-inc/typescript-sdk 1.749.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 (68) 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/taskGroup/client/Client.d.ts +8 -2
  5. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +8 -2
  6. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +8 -2
  7. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +8 -2
  8. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.ts +1 -1
  9. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.ts +1 -1
  10. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +0 -13
  11. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +0 -62
  12. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +0 -1
  13. package/dist/cjs/api/types/FlightInfoForTaskRes.d.ts +4 -3
  14. package/dist/cjs/api/types/FlightLeg1.d.ts +19 -0
  15. package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +16 -0
  16. package/dist/cjs/api/types/FlightLegProvenanceEnum1.d.ts +9 -0
  17. package/dist/cjs/api/types/FlightLegProvenanceEnum1.js +11 -0
  18. package/dist/cjs/api/types/FlightLegWebhookInfo.d.ts +22 -0
  19. package/dist/cjs/api/types/OrderSchedule1.d.ts +1 -0
  20. package/dist/cjs/api/types/OrderScheduleAboutRes.d.ts +1 -0
  21. package/dist/cjs/api/types/SetFlightInfoReq.d.ts +3 -4
  22. package/dist/cjs/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.ts +3 -4
  23. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -2
  24. package/dist/cjs/api/types/index.d.ts +4 -2
  25. package/dist/cjs/api/types/index.js +4 -2
  26. package/dist/cjs/version.d.ts +1 -1
  27. package/dist/cjs/version.js +1 -1
  28. package/dist/esm/Client.mjs +2 -2
  29. package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +13 -0
  30. package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +59 -0
  31. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +8 -2
  32. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +8 -2
  33. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +8 -2
  34. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +8 -2
  35. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForDriverForExecutorV1Request.d.mts +1 -1
  36. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForExecutorOperatorsV1Request.d.mts +1 -1
  37. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +0 -13
  38. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +0 -62
  39. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +0 -1
  40. package/dist/esm/api/types/FlightInfoForTaskRes.d.mts +4 -3
  41. package/dist/esm/api/types/FlightLeg1.d.mts +19 -0
  42. package/dist/esm/api/types/FlightLegClientCreate1.d.mts +16 -0
  43. package/dist/esm/api/types/FlightLegProvenanceEnum1.d.mts +9 -0
  44. package/dist/esm/api/types/FlightLegProvenanceEnum1.mjs +8 -0
  45. package/dist/esm/api/types/FlightLegWebhookInfo.d.mts +22 -0
  46. package/dist/esm/api/types/OrderSchedule1.d.mts +1 -0
  47. package/dist/esm/api/types/OrderScheduleAboutRes.d.mts +1 -0
  48. package/dist/esm/api/types/SetFlightInfoReq.d.mts +3 -4
  49. package/dist/esm/api/types/ShippingTaskGroupFlightInfoUpdatedWebhookPayload.d.mts +3 -4
  50. package/dist/esm/api/types/TaskGroup1.d.mts +1 -2
  51. package/dist/esm/api/types/index.d.mts +4 -2
  52. package/dist/esm/api/types/index.mjs +4 -2
  53. package/dist/esm/version.d.mts +1 -1
  54. package/dist/esm/version.mjs +1 -1
  55. package/package.json +1 -1
  56. package/reference.md +83 -67
  57. package/dist/cjs/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.ts +0 -13
  58. package/dist/cjs/api/types/ScheduleSpec.d.ts +0 -14
  59. package/dist/cjs/api/types/ScheduledPingRes.d.ts +0 -16
  60. package/dist/esm/api/resources/utils/resources/dev/client/requests/ScheduledPingReq.d.mts +0 -13
  61. package/dist/esm/api/types/ScheduleSpec.d.mts +0 -14
  62. package/dist/esm/api/types/ScheduledPingRes.d.mts +0 -16
  63. /package/dist/cjs/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.js → types/FlightLeg1.js} +0 -0
  64. /package/dist/cjs/api/types/{ScheduleSpec.js → FlightLegClientCreate1.js} +0 -0
  65. /package/dist/cjs/api/types/{ScheduledPingRes.js → FlightLegWebhookInfo.js} +0 -0
  66. /package/dist/esm/api/{resources/utils/resources/dev/client/requests/ScheduledPingReq.mjs → types/FlightLeg1.mjs} +0 -0
  67. /package/dist/esm/api/types/{ScheduleSpec.mjs → FlightLegClientCreate1.mjs} +0 -0
  68. /package/dist/esm/api/types/{ScheduledPingRes.mjs → FlightLegWebhookInfo.mjs} +0 -0
@@ -56,8 +56,8 @@ class ChrtClient {
56
56
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
59
- "X-Fern-SDK-Version": "1.749.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.749.0",
59
+ "X-Fern-SDK-Version": "1.751.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.751.0",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -43,5 +43,18 @@ export declare class Flights {
43
43
  */
44
44
  getFlightInfoForTaskV1(taskId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
45
45
  private __getFlightInfoForTaskV1;
46
+ /**
47
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
48
+ *
49
+ * @param {string} taskGroupId
50
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
56
+ */
57
+ getFlightLegsForTaskGroupV1(taskGroupId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
58
+ private __getFlightLegsForTaskGroupV1;
46
59
  protected _getAuthorizationHeader(): Promise<string | undefined>;
47
60
  }
@@ -114,6 +114,65 @@ class Flights {
114
114
  }
115
115
  });
116
116
  }
117
+ /**
118
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
119
+ *
120
+ * @param {string} taskGroupId
121
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Chrt.UnprocessableEntityError}
124
+ *
125
+ * @example
126
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
127
+ */
128
+ getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
129
+ return core.HttpResponsePromise.fromPromise(this.__getFlightLegsForTaskGroupV1(taskGroupId, requestOptions));
130
+ }
131
+ __getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ var _a, _b, _c, _d;
134
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
135
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
136
+ 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/flights/for_task_group/v1/${encodeURIComponent(taskGroupId)}`),
137
+ method: "GET",
138
+ headers: _headers,
139
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
140
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
141
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
142
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
143
+ });
144
+ if (_response.ok) {
145
+ return { data: _response.body, rawResponse: _response.rawResponse };
146
+ }
147
+ if (_response.error.reason === "status-code") {
148
+ switch (_response.error.statusCode) {
149
+ case 422:
150
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
151
+ default:
152
+ throw new errors.ChrtError({
153
+ statusCode: _response.error.statusCode,
154
+ body: _response.error.body,
155
+ rawResponse: _response.rawResponse,
156
+ });
157
+ }
158
+ }
159
+ switch (_response.error.reason) {
160
+ case "non-json":
161
+ throw new errors.ChrtError({
162
+ statusCode: _response.error.statusCode,
163
+ body: _response.error.rawBody,
164
+ rawResponse: _response.rawResponse,
165
+ });
166
+ case "timeout":
167
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/for_task_group/v1/{task_group_id}.");
168
+ case "unknown":
169
+ throw new errors.ChrtError({
170
+ message: _response.error.errorMessage,
171
+ rawResponse: _response.rawResponse,
172
+ });
173
+ }
174
+ });
175
+ }
117
176
  _getAuthorizationHeader() {
118
177
  return __awaiter(this, void 0, void 0, function* () {
119
178
  const bearer = yield core.Supplier.get(this._options.token);
@@ -47,7 +47,7 @@ export declare class TaskGroup {
47
47
  addV1(request: Chrt.shipping.orderDrafts.OrderDraftAddTaskGroupReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<string>;
48
48
  private __addV1;
49
49
  /**
50
- * Sets the flight number and/or fa_flight_ids on a draft task group. | (SetFlightInfoReq) -> (bool)
50
+ * Replaces the ordered list of flights on a draft task group. | (SetFlightInfoReq) -> (bool)
51
51
  *
52
52
  * @param {string} taskGroupId
53
53
  * @param {Chrt.SetFlightInfoReq} request
@@ -56,7 +56,13 @@ export declare class TaskGroup {
56
56
  * @throws {@link Chrt.UnprocessableEntityError}
57
57
  *
58
58
  * @example
59
- * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
59
+ * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {
60
+ * flight_legs: [{
61
+ * schema_version: 1,
62
+ * flight_number: "flight_number",
63
+ * provenance: "manual"
64
+ * }]
65
+ * })
60
66
  */
61
67
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
62
68
  private __setFlightInfoV1;
@@ -121,7 +121,7 @@ class TaskGroup {
121
121
  });
122
122
  }
123
123
  /**
124
- * Sets the flight number and/or fa_flight_ids on a draft task group. | (SetFlightInfoReq) -> (bool)
124
+ * Replaces the ordered list of flights on a draft task group. | (SetFlightInfoReq) -> (bool)
125
125
  *
126
126
  * @param {string} taskGroupId
127
127
  * @param {Chrt.SetFlightInfoReq} request
@@ -130,7 +130,13 @@ class TaskGroup {
130
130
  * @throws {@link Chrt.UnprocessableEntityError}
131
131
  *
132
132
  * @example
133
- * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
133
+ * await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {
134
+ * flight_legs: [{
135
+ * schema_version: 1,
136
+ * flight_number: "flight_number",
137
+ * provenance: "manual"
138
+ * }]
139
+ * })
134
140
  */
135
141
  setFlightInfoV1(taskGroupId, request, requestOptions) {
136
142
  return core.HttpResponsePromise.fromPromise(this.__setFlightInfoV1(taskGroupId, request, requestOptions));
@@ -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;
@@ -509,7 +509,7 @@ class TaskGroups {
509
509
  });
510
510
  }
511
511
  /**
512
- * Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
512
+ * Replaces the ordered list of flights on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
513
513
  *
514
514
  * @param {string} taskGroupId
515
515
  * @param {Chrt.SetFlightInfoReq} request
@@ -518,7 +518,13 @@ class TaskGroups {
518
518
  * @throws {@link Chrt.UnprocessableEntityError}
519
519
  *
520
520
  * @example
521
- * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {})
521
+ * await client.shipping.taskGroups.setFlightInfoV1("task_group_id", {
522
+ * flight_legs: [{
523
+ * schema_version: 1,
524
+ * flight_number: "flight_number",
525
+ * provenance: "manual"
526
+ * }]
527
+ * })
522
528
  */
523
529
  setFlightInfoV1(taskGroupId, request, requestOptions) {
524
530
  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
  *
@@ -55,68 +55,6 @@ class Dev {
55
55
  constructor(_options = {}) {
56
56
  this._options = _options;
57
57
  }
58
- /**
59
- * Creates or updates a Temporal Schedule that runs the scheduled ping workflow for developer diagnostics. | authz: min_org_role=administrator | (ScheduledPingReq) -> (ScheduledPingRes)
60
- *
61
- * @param {Chrt.utils.ScheduledPingReq} request
62
- * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
63
- *
64
- * @throws {@link Chrt.UnprocessableEntityError}
65
- *
66
- * @example
67
- * await client.utils.dev.postAgentPingScheduleV1()
68
- */
69
- postAgentPingScheduleV1(request = {}, requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__postAgentPingScheduleV1(request, requestOptions));
71
- }
72
- __postAgentPingScheduleV1() {
73
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
74
- var _a, _b, _c, _d;
75
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
76
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
77
- 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"),
78
- method: "POST",
79
- headers: _headers,
80
- contentType: "application/json",
81
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
82
- requestType: "json",
83
- body: request,
84
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
- });
88
- if (_response.ok) {
89
- return { data: _response.body, rawResponse: _response.rawResponse };
90
- }
91
- if (_response.error.reason === "status-code") {
92
- switch (_response.error.statusCode) {
93
- case 422:
94
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
95
- default:
96
- throw new errors.ChrtError({
97
- statusCode: _response.error.statusCode,
98
- body: _response.error.body,
99
- rawResponse: _response.rawResponse,
100
- });
101
- }
102
- }
103
- switch (_response.error.reason) {
104
- case "non-json":
105
- throw new errors.ChrtError({
106
- statusCode: _response.error.statusCode,
107
- body: _response.error.rawBody,
108
- rawResponse: _response.rawResponse,
109
- });
110
- case "timeout":
111
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/ping-schedule/v1.");
112
- case "unknown":
113
- throw new errors.ChrtError({
114
- message: _response.error.errorMessage,
115
- rawResponse: _response.rawResponse,
116
- });
117
- }
118
- });
119
- }
120
58
  /**
121
59
  * Runs a minimal Temporal workflow that sends a prompt to OpenAI and returns the response. | (PingOpenAIReq) -> (PingOpenAIRes)
122
60
  *
@@ -1,4 +1,3 @@
1
- export { type ScheduledPingReq } from "./ScheduledPingReq.js";
2
1
  export { type PingOpenAiReq } from "./PingOpenAiReq.js";
3
2
  export { type PingReq } from "./PingReq.js";
4
3
  export { type TemplateReq } from "./TemplateReq.js";
@@ -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.js";
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.js";
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.js";
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,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FlightLegProvenanceEnum1 = void 0;
7
+ exports.FlightLegProvenanceEnum1 = {
8
+ Manual: "manual",
9
+ Cirium: "cirium",
10
+ Flightaware: "flightaware",
11
+ };
@@ -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
+ }
@@ -9,6 +9,7 @@ export interface OrderSchedule1 {
9
9
  order_manifest?: Chrt.OrderManifest1 | null;
10
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_` */
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Chrt from "../index.js";
5
5
  export interface OrderScheduleAboutRes {
6
+ short_id: string;
6
7
  orders_created_count: number;
7
8
  orchestrator_schedule_status: Chrt.OrderScheduleOrchestratorScheduleStatus;
8
9
  }
@@ -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.js";
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.js";
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
  }
@@ -39,8 +39,7 @@ export interface TaskGroup1 {
39
39
  mileage_observed?: number | null;
40
40
  wait_time_total_minutes?: number | null;
41
41
  mileage_asserted?: boolean;
42
- flight_number?: string | null;
43
- fa_flight_ids?: string[];
42
+ flight_leg_ids?: string[];
44
43
  messages?: Chrt.TaskGroupMessage1[];
45
44
  shipper_pay_provider_rate_sheet_id?: string | null;
46
45
  shipper_pay_provider_line_item_group_id?: string | null;
@@ -148,6 +148,10 @@ export * from "./FlightAwareAlertFlight.js";
148
148
  export * from "./FlightAwareAlertPayload.js";
149
149
  export * from "./FlightAwareWebhookResponse.js";
150
150
  export * from "./FlightInfoForTaskRes.js";
151
+ export * from "./FlightLeg1.js";
152
+ export * from "./FlightLegClientCreate1.js";
153
+ export * from "./FlightLegProvenanceEnum1.js";
154
+ export * from "./FlightLegWebhookInfo.js";
151
155
  export * from "./FlightStatusEnum.js";
152
156
  export * from "./GeometryCollectionGeometriesItem.js";
153
157
  export * from "./GeometryCollection.js";
@@ -294,9 +298,7 @@ export * from "./ScanPayloadKindEnum.js";
294
298
  export * from "./ScheduleCalendarSpec.js";
295
299
  export * from "./ScheduleIntervalSpec.js";
296
300
  export * from "./ScheduleRange.js";
297
- export * from "./ScheduleSpec.js";
298
301
  export * from "./ScheduledOrdersNewDraftReq.js";
299
- export * from "./ScheduledPingRes.js";
300
302
  export * from "./Session1.js";
301
303
  export * from "./SessionByDeviceDataPoint1.js";
302
304
  export * from "./SessionByDeviceDataPointMetadata1.js";
@@ -164,6 +164,10 @@ __exportStar(require("./FlightAwareAlertFlight.js"), exports);
164
164
  __exportStar(require("./FlightAwareAlertPayload.js"), exports);
165
165
  __exportStar(require("./FlightAwareWebhookResponse.js"), exports);
166
166
  __exportStar(require("./FlightInfoForTaskRes.js"), exports);
167
+ __exportStar(require("./FlightLeg1.js"), exports);
168
+ __exportStar(require("./FlightLegClientCreate1.js"), exports);
169
+ __exportStar(require("./FlightLegProvenanceEnum1.js"), exports);
170
+ __exportStar(require("./FlightLegWebhookInfo.js"), exports);
167
171
  __exportStar(require("./FlightStatusEnum.js"), exports);
168
172
  __exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
169
173
  __exportStar(require("./GeometryCollection.js"), exports);
@@ -310,9 +314,7 @@ __exportStar(require("./ScanPayloadKindEnum.js"), exports);
310
314
  __exportStar(require("./ScheduleCalendarSpec.js"), exports);
311
315
  __exportStar(require("./ScheduleIntervalSpec.js"), exports);
312
316
  __exportStar(require("./ScheduleRange.js"), exports);
313
- __exportStar(require("./ScheduleSpec.js"), exports);
314
317
  __exportStar(require("./ScheduledOrdersNewDraftReq.js"), exports);
315
- __exportStar(require("./ScheduledPingRes.js"), exports);
316
318
  __exportStar(require("./Session1.js"), exports);
317
319
  __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
318
320
  __exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.749.0";
1
+ export declare const SDK_VERSION = "1.751.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.749.0";
4
+ exports.SDK_VERSION = "1.751.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.749.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.749.0",
23
+ "X-Fern-SDK-Version": "1.751.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.751.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) });
@@ -43,5 +43,18 @@ export declare class Flights {
43
43
  */
44
44
  getFlightInfoForTaskV1(taskId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
45
45
  private __getFlightInfoForTaskV1;
46
+ /**
47
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
48
+ *
49
+ * @param {string} taskGroupId
50
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Chrt.UnprocessableEntityError}
53
+ *
54
+ * @example
55
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
56
+ */
57
+ getFlightLegsForTaskGroupV1(taskGroupId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
58
+ private __getFlightLegsForTaskGroupV1;
46
59
  protected _getAuthorizationHeader(): Promise<string | undefined>;
47
60
  }
@@ -78,6 +78,65 @@ export class Flights {
78
78
  }
79
79
  });
80
80
  }
81
+ /**
82
+ * Returns the ordered list of flight legs for a task group. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
83
+ *
84
+ * @param {string} taskGroupId
85
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Chrt.UnprocessableEntityError}
88
+ *
89
+ * @example
90
+ * await client.shipping.flights.getFlightLegsForTaskGroupV1("task_group_id")
91
+ */
92
+ getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
93
+ return core.HttpResponsePromise.fromPromise(this.__getFlightLegsForTaskGroupV1(taskGroupId, requestOptions));
94
+ }
95
+ __getFlightLegsForTaskGroupV1(taskGroupId, requestOptions) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ var _a, _b, _c, _d;
98
+ 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);
99
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
100
+ 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/flights/for_task_group/v1/${encodeURIComponent(taskGroupId)}`),
101
+ method: "GET",
102
+ headers: _headers,
103
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
104
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
105
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
106
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
107
+ });
108
+ if (_response.ok) {
109
+ return { data: _response.body, rawResponse: _response.rawResponse };
110
+ }
111
+ if (_response.error.reason === "status-code") {
112
+ switch (_response.error.statusCode) {
113
+ case 422:
114
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
115
+ default:
116
+ throw new errors.ChrtError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ }
123
+ switch (_response.error.reason) {
124
+ case "non-json":
125
+ throw new errors.ChrtError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.rawBody,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ case "timeout":
131
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/flights/for_task_group/v1/{task_group_id}.");
132
+ case "unknown":
133
+ throw new errors.ChrtError({
134
+ message: _response.error.errorMessage,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ });
139
+ }
81
140
  _getAuthorizationHeader() {
82
141
  return __awaiter(this, void 0, void 0, function* () {
83
142
  const bearer = yield core.Supplier.get(this._options.token);