@chrt-inc/typescript-sdk 1.685.0 → 1.689.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 (34) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +14 -0
  3. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +63 -0
  4. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.ts +1 -0
  5. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/SetVehicleTypeReq.d.ts +12 -0
  6. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/SetVehicleTypeReq.js +5 -0
  7. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.d.ts +3 -2
  9. package/dist/cjs/api/resources/shipping/resources/tasks/client/Client.js +9 -5
  10. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/AttemptTaskReq.d.ts +11 -0
  11. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/AttemptTaskReq.js +5 -0
  12. package/dist/cjs/api/resources/shipping/resources/tasks/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  14. package/dist/cjs/api/types/TaskGroupManifest1.d.ts +1 -0
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/Client.mjs +2 -2
  18. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +14 -0
  19. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +63 -0
  20. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/OrderDraftAddTaskGroupReq.d.mts +1 -0
  21. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/SetVehicleTypeReq.d.mts +12 -0
  22. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/SetVehicleTypeReq.mjs +4 -0
  23. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +1 -0
  24. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.d.mts +3 -2
  25. package/dist/esm/api/resources/shipping/resources/tasks/client/Client.mjs +9 -5
  26. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/AttemptTaskReq.d.mts +11 -0
  27. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/AttemptTaskReq.mjs +4 -0
  28. package/dist/esm/api/resources/shipping/resources/tasks/client/requests/index.d.mts +1 -0
  29. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  30. package/dist/esm/api/types/TaskGroupManifest1.d.mts +1 -0
  31. package/dist/esm/version.d.mts +1 -1
  32. package/dist/esm/version.mjs +1 -1
  33. package/package.json +1 -1
  34. package/reference.md +81 -2
@@ -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.685.0",
60
- "User-Agent": "@chrt-inc/typescript-sdk/1.685.0",
59
+ "X-Fern-SDK-Version": "1.689.0",
60
+ "User-Agent": "@chrt-inc/typescript-sdk/1.689.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) });
@@ -60,6 +60,20 @@ export declare class TaskGroup {
60
60
  */
61
61
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
62
62
  private __setFlightInfoV1;
63
+ /**
64
+ * Sets the vehicle type on a draft task group. | authz_personas=[draft_creator_org_operator] | (SetVehicleTypeReq) -> (bool)
65
+ *
66
+ * @param {string} taskGroupId
67
+ * @param {Chrt.shipping.orderDrafts.SetVehicleTypeReq} request
68
+ * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link Chrt.UnprocessableEntityError}
71
+ *
72
+ * @example
73
+ * await client.shipping.orderDrafts.taskGroup.setVehicleTypeV1("task_group_id")
74
+ */
75
+ setVehicleTypeV1(taskGroupId: string, request?: Chrt.shipping.orderDrafts.SetVehicleTypeReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
76
+ private __setVehicleTypeV1;
63
77
  /**
64
78
  * Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
65
79
  *
@@ -183,6 +183,69 @@ class TaskGroup {
183
183
  }
184
184
  });
185
185
  }
186
+ /**
187
+ * Sets the vehicle type on a draft task group. | authz_personas=[draft_creator_org_operator] | (SetVehicleTypeReq) -> (bool)
188
+ *
189
+ * @param {string} taskGroupId
190
+ * @param {Chrt.shipping.orderDrafts.SetVehicleTypeReq} request
191
+ * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
192
+ *
193
+ * @throws {@link Chrt.UnprocessableEntityError}
194
+ *
195
+ * @example
196
+ * await client.shipping.orderDrafts.taskGroup.setVehicleTypeV1("task_group_id")
197
+ */
198
+ setVehicleTypeV1(taskGroupId, request = {}, requestOptions) {
199
+ return core.HttpResponsePromise.fromPromise(this.__setVehicleTypeV1(taskGroupId, request, requestOptions));
200
+ }
201
+ __setVehicleTypeV1(taskGroupId_1) {
202
+ return __awaiter(this, arguments, void 0, function* (taskGroupId, request = {}, requestOptions) {
203
+ var _a, _b, _c, _d;
204
+ 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);
205
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
206
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/order_drafts/task_group/set_vehicle_type/v1/${encodeURIComponent(taskGroupId)}`),
207
+ method: "PATCH",
208
+ headers: _headers,
209
+ contentType: "application/json",
210
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
211
+ requestType: "json",
212
+ body: request,
213
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
214
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
215
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
216
+ });
217
+ if (_response.ok) {
218
+ return { data: _response.body, rawResponse: _response.rawResponse };
219
+ }
220
+ if (_response.error.reason === "status-code") {
221
+ switch (_response.error.statusCode) {
222
+ case 422:
223
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
224
+ default:
225
+ throw new errors.ChrtError({
226
+ statusCode: _response.error.statusCode,
227
+ body: _response.error.body,
228
+ rawResponse: _response.rawResponse,
229
+ });
230
+ }
231
+ }
232
+ switch (_response.error.reason) {
233
+ case "non-json":
234
+ throw new errors.ChrtError({
235
+ statusCode: _response.error.statusCode,
236
+ body: _response.error.rawBody,
237
+ rawResponse: _response.rawResponse,
238
+ });
239
+ case "timeout":
240
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/order_drafts/task_group/set_vehicle_type/v1/{task_group_id}.");
241
+ case "unknown":
242
+ throw new errors.ChrtError({
243
+ message: _response.error.errorMessage,
244
+ rawResponse: _response.rawResponse,
245
+ });
246
+ }
247
+ });
248
+ }
186
249
  /**
187
250
  * Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
188
251
  *
@@ -13,4 +13,5 @@ export interface OrderDraftAddTaskGroupReq {
13
13
  task_group_type: Chrt.TaskGroupTypeEnum1;
14
14
  order_id: string;
15
15
  order_schedule_template_path?: string | null;
16
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
16
17
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface SetVehicleTypeReq {
10
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
11
+ vehicle_type__set_to_None?: boolean;
12
+ }
@@ -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 });
@@ -1,3 +1,4 @@
1
1
  export { type OrderDraftAddTaskGroupReq } from "./OrderDraftAddTaskGroupReq.js";
2
+ export { type SetVehicleTypeReq } from "./SetVehicleTypeReq.js";
2
3
  export { type SetTaskOrderingDraftReq } from "./SetTaskOrderingDraftReq.js";
3
4
  export { type SetRateSheetsReq } from "./SetRateSheetsReq.js";
@@ -94,9 +94,10 @@ export declare class Tasks {
94
94
  skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
95
95
  private __skipV1;
96
96
  /**
97
- * Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
97
+ * Marks a task as ATTEMPT with an optional executor organization note. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | (AttemptTaskReq) -> (bool)
98
98
  *
99
99
  * @param {string} taskId
100
+ * @param {Chrt.shipping.AttemptTaskReq} request
100
101
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
101
102
  *
102
103
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -104,7 +105,7 @@ export declare class Tasks {
104
105
  * @example
105
106
  * await client.shipping.tasks.attemptV1("task_id")
106
107
  */
107
- attemptV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
108
+ attemptV1(taskId: string, request?: Chrt.shipping.AttemptTaskReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
108
109
  private __attemptV1;
109
110
  /**
110
111
  * Deletes a task. Task must be in STAGED status. | authz_personas=[lig_owner_operators] | () -> (bool)
@@ -311,9 +311,10 @@ class Tasks {
311
311
  });
312
312
  }
313
313
  /**
314
- * Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
314
+ * Marks a task as ATTEMPT with an optional executor organization note. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | (AttemptTaskReq) -> (bool)
315
315
  *
316
316
  * @param {string} taskId
317
+ * @param {Chrt.shipping.AttemptTaskReq} request
317
318
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
318
319
  *
319
320
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -321,18 +322,21 @@ class Tasks {
321
322
  * @example
322
323
  * await client.shipping.tasks.attemptV1("task_id")
323
324
  */
324
- attemptV1(taskId, requestOptions) {
325
- return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, requestOptions));
325
+ attemptV1(taskId, request = {}, requestOptions) {
326
+ return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, request, requestOptions));
326
327
  }
327
- __attemptV1(taskId, requestOptions) {
328
- return __awaiter(this, void 0, void 0, function* () {
328
+ __attemptV1(taskId_1) {
329
+ return __awaiter(this, arguments, void 0, function* (taskId, request = {}, requestOptions) {
329
330
  var _a, _b, _c, _d;
330
331
  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);
331
332
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
332
333
  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/tasks/attempt/v1/${encodeURIComponent(taskId)}`),
333
334
  method: "PUT",
334
335
  headers: _headers,
336
+ contentType: "application/json",
335
337
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
338
+ requestType: "json",
339
+ body: request,
336
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
337
341
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
338
342
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface AttemptTaskReq {
9
+ /** Optional executor organization note for the task attempt. */
10
+ executor_org_note?: string | null;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export { type AddTaskToGroupReq } from "./AddTaskToGroupReq.js";
2
+ export { type AttemptTaskReq } from "./AttemptTaskReq.js";
@@ -36,6 +36,7 @@ export interface TaskGroup1 {
36
36
  skipped_at_timestamp?: string | null;
37
37
  exception_at_timestamp?: string | null;
38
38
  task_group_type: Chrt.TaskGroupTypeEnum1;
39
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
39
40
  mileage_estimated?: number | null;
40
41
  mileage_observed?: number | null;
41
42
  mileage_asserted?: boolean;
@@ -7,6 +7,7 @@ import * as Chrt from "../index.js";
7
7
  */
8
8
  export interface TaskGroupManifest1 {
9
9
  task_group_type: "chrt_ground_provider";
10
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
10
11
  /** Must be a string starting with `org_` */
11
12
  executor_org_id?: string | null;
12
13
  driver_id?: string | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.685.0";
1
+ export declare const SDK_VERSION = "1.689.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.685.0";
4
+ exports.SDK_VERSION = "1.689.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.685.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.685.0",
23
+ "X-Fern-SDK-Version": "1.689.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.689.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) });
@@ -60,6 +60,20 @@ export declare class TaskGroup {
60
60
  */
61
61
  setFlightInfoV1(taskGroupId: string, request: Chrt.SetFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
62
62
  private __setFlightInfoV1;
63
+ /**
64
+ * Sets the vehicle type on a draft task group. | authz_personas=[draft_creator_org_operator] | (SetVehicleTypeReq) -> (bool)
65
+ *
66
+ * @param {string} taskGroupId
67
+ * @param {Chrt.shipping.orderDrafts.SetVehicleTypeReq} request
68
+ * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link Chrt.UnprocessableEntityError}
71
+ *
72
+ * @example
73
+ * await client.shipping.orderDrafts.taskGroup.setVehicleTypeV1("task_group_id")
74
+ */
75
+ setVehicleTypeV1(taskGroupId: string, request?: Chrt.shipping.orderDrafts.SetVehicleTypeReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
76
+ private __setVehicleTypeV1;
63
77
  /**
64
78
  * Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
65
79
  *
@@ -147,6 +147,69 @@ export class TaskGroup {
147
147
  }
148
148
  });
149
149
  }
150
+ /**
151
+ * Sets the vehicle type on a draft task group. | authz_personas=[draft_creator_org_operator] | (SetVehicleTypeReq) -> (bool)
152
+ *
153
+ * @param {string} taskGroupId
154
+ * @param {Chrt.shipping.orderDrafts.SetVehicleTypeReq} request
155
+ * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
156
+ *
157
+ * @throws {@link Chrt.UnprocessableEntityError}
158
+ *
159
+ * @example
160
+ * await client.shipping.orderDrafts.taskGroup.setVehicleTypeV1("task_group_id")
161
+ */
162
+ setVehicleTypeV1(taskGroupId, request = {}, requestOptions) {
163
+ return core.HttpResponsePromise.fromPromise(this.__setVehicleTypeV1(taskGroupId, request, requestOptions));
164
+ }
165
+ __setVehicleTypeV1(taskGroupId_1) {
166
+ return __awaiter(this, arguments, void 0, function* (taskGroupId, request = {}, requestOptions) {
167
+ var _a, _b, _c, _d;
168
+ 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);
169
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
170
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping/order_drafts/task_group/set_vehicle_type/v1/${encodeURIComponent(taskGroupId)}`),
171
+ method: "PATCH",
172
+ headers: _headers,
173
+ contentType: "application/json",
174
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
175
+ requestType: "json",
176
+ body: request,
177
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
178
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
179
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
180
+ });
181
+ if (_response.ok) {
182
+ return { data: _response.body, rawResponse: _response.rawResponse };
183
+ }
184
+ if (_response.error.reason === "status-code") {
185
+ switch (_response.error.statusCode) {
186
+ case 422:
187
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
188
+ default:
189
+ throw new errors.ChrtError({
190
+ statusCode: _response.error.statusCode,
191
+ body: _response.error.body,
192
+ rawResponse: _response.rawResponse,
193
+ });
194
+ }
195
+ }
196
+ switch (_response.error.reason) {
197
+ case "non-json":
198
+ throw new errors.ChrtError({
199
+ statusCode: _response.error.statusCode,
200
+ body: _response.error.rawBody,
201
+ rawResponse: _response.rawResponse,
202
+ });
203
+ case "timeout":
204
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/order_drafts/task_group/set_vehicle_type/v1/{task_group_id}.");
205
+ case "unknown":
206
+ throw new errors.ChrtError({
207
+ message: _response.error.errorMessage,
208
+ rawResponse: _response.rawResponse,
209
+ });
210
+ }
211
+ });
212
+ }
150
213
  /**
151
214
  * Sets the ordering of tasks within a draft task group. Must provide all task IDs with no duplicates. | (SetTaskOrderingDraftReq) -> (bool)
152
215
  *
@@ -13,4 +13,5 @@ export interface OrderDraftAddTaskGroupReq {
13
13
  task_group_type: Chrt.TaskGroupTypeEnum1;
14
14
  order_id: string;
15
15
  order_schedule_template_path?: string | null;
16
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
16
17
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface SetVehicleTypeReq {
10
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
11
+ vehicle_type__set_to_None?: boolean;
12
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,3 +1,4 @@
1
1
  export { type OrderDraftAddTaskGroupReq } from "./OrderDraftAddTaskGroupReq.mjs";
2
+ export { type SetVehicleTypeReq } from "./SetVehicleTypeReq.mjs";
2
3
  export { type SetTaskOrderingDraftReq } from "./SetTaskOrderingDraftReq.mjs";
3
4
  export { type SetRateSheetsReq } from "./SetRateSheetsReq.mjs";
@@ -94,9 +94,10 @@ export declare class Tasks {
94
94
  skipV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
95
95
  private __skipV1;
96
96
  /**
97
- * Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
97
+ * Marks a task as ATTEMPT with an optional executor organization note. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | (AttemptTaskReq) -> (bool)
98
98
  *
99
99
  * @param {string} taskId
100
+ * @param {Chrt.shipping.AttemptTaskReq} request
100
101
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
101
102
  *
102
103
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -104,7 +105,7 @@ export declare class Tasks {
104
105
  * @example
105
106
  * await client.shipping.tasks.attemptV1("task_id")
106
107
  */
107
- attemptV1(taskId: string, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
108
+ attemptV1(taskId: string, request?: Chrt.shipping.AttemptTaskReq, requestOptions?: Tasks.RequestOptions): core.HttpResponsePromise<boolean>;
108
109
  private __attemptV1;
109
110
  /**
110
111
  * Deletes a task. Task must be in STAGED status. | authz_personas=[lig_owner_operators] | () -> (bool)
@@ -275,9 +275,10 @@ export class Tasks {
275
275
  });
276
276
  }
277
277
  /**
278
- * Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
278
+ * Marks a task as ATTEMPT with an optional executor organization note. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | (AttemptTaskReq) -> (bool)
279
279
  *
280
280
  * @param {string} taskId
281
+ * @param {Chrt.shipping.AttemptTaskReq} request
281
282
  * @param {Tasks.RequestOptions} requestOptions - Request-specific configuration.
282
283
  *
283
284
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -285,18 +286,21 @@ export class Tasks {
285
286
  * @example
286
287
  * await client.shipping.tasks.attemptV1("task_id")
287
288
  */
288
- attemptV1(taskId, requestOptions) {
289
- return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, requestOptions));
289
+ attemptV1(taskId, request = {}, requestOptions) {
290
+ return core.HttpResponsePromise.fromPromise(this.__attemptV1(taskId, request, requestOptions));
290
291
  }
291
- __attemptV1(taskId, requestOptions) {
292
- return __awaiter(this, void 0, void 0, function* () {
292
+ __attemptV1(taskId_1) {
293
+ return __awaiter(this, arguments, void 0, function* (taskId, request = {}, requestOptions) {
293
294
  var _a, _b, _c, _d;
294
295
  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);
295
296
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
296
297
  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/tasks/attempt/v1/${encodeURIComponent(taskId)}`),
297
298
  method: "PUT",
298
299
  headers: _headers,
300
+ contentType: "application/json",
299
301
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
302
+ requestType: "json",
303
+ body: request,
300
304
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
301
305
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
302
306
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface AttemptTaskReq {
9
+ /** Optional executor organization note for the task attempt. */
10
+ executor_org_note?: string | null;
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1 +1,2 @@
1
1
  export { type AddTaskToGroupReq } from "./AddTaskToGroupReq.mjs";
2
+ export { type AttemptTaskReq } from "./AttemptTaskReq.mjs";
@@ -36,6 +36,7 @@ export interface TaskGroup1 {
36
36
  skipped_at_timestamp?: string | null;
37
37
  exception_at_timestamp?: string | null;
38
38
  task_group_type: Chrt.TaskGroupTypeEnum1;
39
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
39
40
  mileage_estimated?: number | null;
40
41
  mileage_observed?: number | null;
41
42
  mileage_asserted?: boolean;
@@ -7,6 +7,7 @@ import * as Chrt from "../index.mjs";
7
7
  */
8
8
  export interface TaskGroupManifest1 {
9
9
  task_group_type: "chrt_ground_provider";
10
+ vehicle_type?: Chrt.VehicleTypeEnum | null;
10
11
  /** Must be a string starting with `org_` */
11
12
  executor_org_id?: string | null;
12
13
  driver_id?: string | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.685.0";
1
+ export declare const SDK_VERSION = "1.689.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.685.0";
1
+ export const SDK_VERSION = "1.689.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.685.0",
3
+ "version": "1.689.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -19070,7 +19070,7 @@ await client.shipping.tasks.skipV1("task_id");
19070
19070
  </dl>
19071
19071
  </details>
19072
19072
 
19073
- <details><summary><code>client.shipping.tasks.<a href="/src/api/resources/shipping/resources/tasks/client/Client.ts">attemptV1</a>(taskId) -> boolean</code></summary>
19073
+ <details><summary><code>client.shipping.tasks.<a href="/src/api/resources/shipping/resources/tasks/client/Client.ts">attemptV1</a>(taskId, { ...params }) -> boolean</code></summary>
19074
19074
  <dl>
19075
19075
  <dd>
19076
19076
 
@@ -19082,7 +19082,7 @@ await client.shipping.tasks.skipV1("task_id");
19082
19082
  <dl>
19083
19083
  <dd>
19084
19084
 
19085
- Marks a task as ATTEMPT. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | () -> (bool)
19085
+ Marks a task as ATTEMPT with an optional executor organization note. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators] (depending on type) | (AttemptTaskReq) -> (bool)
19086
19086
 
19087
19087
  </dd>
19088
19088
  </dl>
@@ -19122,6 +19122,14 @@ await client.shipping.tasks.attemptV1("task_id");
19122
19122
  <dl>
19123
19123
  <dd>
19124
19124
 
19125
+ **request:** `Chrt.shipping.AttemptTaskReq`
19126
+
19127
+ </dd>
19128
+ </dl>
19129
+
19130
+ <dl>
19131
+ <dd>
19132
+
19125
19133
  **requestOptions:** `Tasks.RequestOptions`
19126
19134
 
19127
19135
  </dd>
@@ -19940,6 +19948,77 @@ await client.shipping.orderDrafts.taskGroup.setFlightInfoV1("task_group_id", {})
19940
19948
  </dl>
19941
19949
  </details>
19942
19950
 
19951
+ <details><summary><code>client.shipping.orderDrafts.taskGroup.<a href="/src/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.ts">setVehicleTypeV1</a>(taskGroupId, { ...params }) -> boolean</code></summary>
19952
+ <dl>
19953
+ <dd>
19954
+
19955
+ #### 📝 Description
19956
+
19957
+ <dl>
19958
+ <dd>
19959
+
19960
+ <dl>
19961
+ <dd>
19962
+
19963
+ Sets the vehicle type on a draft task group. | authz_personas=[draft_creator_org_operator] | (SetVehicleTypeReq) -> (bool)
19964
+
19965
+ </dd>
19966
+ </dl>
19967
+ </dd>
19968
+ </dl>
19969
+
19970
+ #### 🔌 Usage
19971
+
19972
+ <dl>
19973
+ <dd>
19974
+
19975
+ <dl>
19976
+ <dd>
19977
+
19978
+ ```typescript
19979
+ await client.shipping.orderDrafts.taskGroup.setVehicleTypeV1("task_group_id");
19980
+ ```
19981
+
19982
+ </dd>
19983
+ </dl>
19984
+ </dd>
19985
+ </dl>
19986
+
19987
+ #### ⚙️ Parameters
19988
+
19989
+ <dl>
19990
+ <dd>
19991
+
19992
+ <dl>
19993
+ <dd>
19994
+
19995
+ **taskGroupId:** `string`
19996
+
19997
+ </dd>
19998
+ </dl>
19999
+
20000
+ <dl>
20001
+ <dd>
20002
+
20003
+ **request:** `Chrt.shipping.orderDrafts.SetVehicleTypeReq`
20004
+
20005
+ </dd>
20006
+ </dl>
20007
+
20008
+ <dl>
20009
+ <dd>
20010
+
20011
+ **requestOptions:** `TaskGroup.RequestOptions`
20012
+
20013
+ </dd>
20014
+ </dl>
20015
+ </dd>
20016
+ </dl>
20017
+
20018
+ </dd>
20019
+ </dl>
20020
+ </details>
20021
+
19943
20022
  <details><summary><code>client.shipping.orderDrafts.taskGroup.<a href="/src/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.ts">setTaskOrderingV1</a>(taskGroupId, { ...params }) -> boolean</code></summary>
19944
20023
  <dl>
19945
20024
  <dd>