@chrt-inc/typescript-sdk 1.970.0 → 1.976.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 (60) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.d.ts +1 -0
  5. package/dist/cjs/api/resources/billingNew/resources/orders/client/Client.js +5 -1
  6. package/dist/cjs/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.ts +3 -0
  7. package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/resources/tasks/client/requests/OrderTemplateNewTaskClientCreate1.d.ts +1 -0
  8. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +13 -0
  9. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +59 -0
  10. package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.ts +1 -1
  11. package/dist/cjs/api/resources/shipping/resources/orders/resources/cargo/client/Client.js +1 -1
  12. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +1 -0
  13. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +5 -1
  14. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.ts +3 -0
  15. package/dist/cjs/api/resources/shipping/resources/orders/resources/task/client/Client.d.ts +1 -1
  16. package/dist/cjs/api/resources/shipping/resources/orders/resources/task/client/Client.js +1 -1
  17. package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.ts +5 -5
  18. package/dist/cjs/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.js +5 -5
  19. package/dist/cjs/api/types/DepartmentTypeEnum.d.ts +2 -1
  20. package/dist/cjs/api/types/DepartmentTypeEnum.js +1 -0
  21. package/dist/cjs/api/types/InvoiceExportListItem.d.ts +1 -1
  22. package/dist/cjs/api/types/OrderAndTaskGroupExpandedReq.d.ts +2 -0
  23. package/dist/cjs/api/types/OrderExpandedForProvider.d.ts +1 -0
  24. package/dist/cjs/api/types/OrderTemplateNewTask1.d.ts +1 -0
  25. package/dist/cjs/api/types/Task1.d.ts +1 -0
  26. package/dist/cjs/api/types/TaskClientCreate1.d.ts +1 -0
  27. package/dist/cjs/api/types/TaskGroupExpanded.d.ts +1 -0
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/Client.mjs +2 -2
  31. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.mts +1 -1
  32. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.mjs +1 -1
  33. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.d.mts +1 -0
  34. package/dist/esm/api/resources/billingNew/resources/orders/client/Client.mjs +5 -1
  35. package/dist/esm/api/resources/billingNew/resources/orders/client/requests/OrderBillingExpandedListReq.d.mts +3 -0
  36. package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/resources/tasks/client/requests/OrderTemplateNewTaskClientCreate1.d.mts +1 -0
  37. package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +13 -0
  38. package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +59 -0
  39. package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.d.mts +1 -1
  40. package/dist/esm/api/resources/shipping/resources/orders/resources/cargo/client/Client.mjs +1 -1
  41. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +1 -0
  42. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +5 -1
  43. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForProviderOperatorsV1Request.d.mts +3 -0
  44. package/dist/esm/api/resources/shipping/resources/orders/resources/task/client/Client.d.mts +1 -1
  45. package/dist/esm/api/resources/shipping/resources/orders/resources/task/client/Client.mjs +1 -1
  46. package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.d.mts +5 -5
  47. package/dist/esm/api/resources/shipping/resources/orders/resources/taskGroup/client/Client.mjs +5 -5
  48. package/dist/esm/api/types/DepartmentTypeEnum.d.mts +2 -1
  49. package/dist/esm/api/types/DepartmentTypeEnum.mjs +1 -0
  50. package/dist/esm/api/types/InvoiceExportListItem.d.mts +1 -1
  51. package/dist/esm/api/types/OrderAndTaskGroupExpandedReq.d.mts +2 -0
  52. package/dist/esm/api/types/OrderExpandedForProvider.d.mts +1 -0
  53. package/dist/esm/api/types/OrderTemplateNewTask1.d.mts +1 -0
  54. package/dist/esm/api/types/Task1.d.mts +1 -0
  55. package/dist/esm/api/types/TaskClientCreate1.d.mts +1 -0
  56. package/dist/esm/api/types/TaskGroupExpanded.d.mts +1 -0
  57. package/dist/esm/version.d.mts +1 -1
  58. package/dist/esm/version.mjs +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +73 -8
@@ -248,6 +248,19 @@ export declare class Orders {
248
248
  */
249
249
  unassignV1(orderId: string, request: Chrt.shipping.OrdersUnassignReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
250
250
  private __unassignV1;
251
+ /**
252
+ * Reopens a cancelled order, restaging every cancelled task group, task, task artifact, operations task, and cargo on it regardless of when each was cancelled, then re-deriving order, cargo, and driver status from the surviving work. | authz_personas=[task_group_operating_org_operators] | () -> (bool)
253
+ *
254
+ * @param {string} orderId
255
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
256
+ *
257
+ * @throws {@link Chrt.UnprocessableEntityError}
258
+ *
259
+ * @example
260
+ * await client.shipping.orders.undoCancelV1("order_id")
261
+ */
262
+ undoCancelV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
263
+ private __undoCancelV1;
251
264
  /**
252
265
  * Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
253
266
  *
@@ -886,6 +886,65 @@ export class Orders {
886
886
  }
887
887
  });
888
888
  }
889
+ /**
890
+ * Reopens a cancelled order, restaging every cancelled task group, task, task artifact, operations task, and cargo on it regardless of when each was cancelled, then re-deriving order, cargo, and driver status from the surviving work. | authz_personas=[task_group_operating_org_operators] | () -> (bool)
891
+ *
892
+ * @param {string} orderId
893
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
894
+ *
895
+ * @throws {@link Chrt.UnprocessableEntityError}
896
+ *
897
+ * @example
898
+ * await client.shipping.orders.undoCancelV1("order_id")
899
+ */
900
+ undoCancelV1(orderId, requestOptions) {
901
+ return core.HttpResponsePromise.fromPromise(this.__undoCancelV1(orderId, requestOptions));
902
+ }
903
+ __undoCancelV1(orderId, requestOptions) {
904
+ return __awaiter(this, void 0, void 0, function* () {
905
+ var _a, _b, _c, _d;
906
+ 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);
907
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
908
+ 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/orders/undo_cancel/v1/${encodeURIComponent(orderId)}`),
909
+ method: "PUT",
910
+ headers: _headers,
911
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
912
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
913
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
914
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
915
+ });
916
+ if (_response.ok) {
917
+ return { data: _response.body, rawResponse: _response.rawResponse };
918
+ }
919
+ if (_response.error.reason === "status-code") {
920
+ switch (_response.error.statusCode) {
921
+ case 422:
922
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
923
+ default:
924
+ throw new errors.ChrtError({
925
+ statusCode: _response.error.statusCode,
926
+ body: _response.error.body,
927
+ rawResponse: _response.rawResponse,
928
+ });
929
+ }
930
+ }
931
+ switch (_response.error.reason) {
932
+ case "non-json":
933
+ throw new errors.ChrtError({
934
+ statusCode: _response.error.statusCode,
935
+ body: _response.error.rawBody,
936
+ rawResponse: _response.rawResponse,
937
+ });
938
+ case "timeout":
939
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PUT /shipping/orders/undo_cancel/v1/{order_id}.");
940
+ case "unknown":
941
+ throw new errors.ChrtError({
942
+ message: _response.error.errorMessage,
943
+ rawResponse: _response.rawResponse,
944
+ });
945
+ }
946
+ });
947
+ }
889
948
  /**
890
949
  * Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
891
950
  *
@@ -67,7 +67,7 @@ export declare class Cargo {
67
67
  associateWithTaskV1(request: Chrt.shipping.orders.OrdersAssociateCargoWithTaskReq, requestOptions?: Cargo.RequestOptions): core.HttpResponsePromise<boolean>;
68
68
  private __associateWithTaskV1;
69
69
  /**
70
- * Deletes active cargo without completed task associations and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
70
+ * Deletes cargo in any lifecycle state, removes task associations, and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
71
71
  *
72
72
  * @param {string} cargoId
73
73
  * @param {Cargo.RequestOptions} requestOptions - Request-specific configuration.
@@ -154,7 +154,7 @@ export class Cargo {
154
154
  });
155
155
  }
156
156
  /**
157
- * Deletes active cargo without completed task associations and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
157
+ * Deletes cargo in any lifecycle state, removes task associations, and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
158
158
  *
159
159
  * @param {string} cargoId
160
160
  * @param {Cargo.RequestOptions} requestOptions - Request-specific configuration.
@@ -92,6 +92,7 @@ export declare class Expanded {
92
92
  * filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
93
93
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
94
94
  * filter_executor_org_id: "filter_executor_org_id",
95
+ * filter_executor_department_id: "filter_executor_department_id",
95
96
  * filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
96
97
  * filter_coordinator_org_id: "filter_coordinator_org_id",
97
98
  * filter_shipper_org_id: "filter_shipper_org_id",
@@ -179,6 +179,7 @@ export class Expanded {
179
179
  * filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
180
180
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
181
181
  * filter_executor_org_id: "filter_executor_org_id",
182
+ * filter_executor_department_id: "filter_executor_department_id",
182
183
  * filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
183
184
  * filter_coordinator_org_id: "filter_coordinator_org_id",
184
185
  * filter_shipper_org_id: "filter_shipper_org_id",
@@ -196,7 +197,7 @@ export class Expanded {
196
197
  __listForProviderOperatorsV1(request, requestOptions) {
197
198
  return __awaiter(this, void 0, void 0, function* () {
198
199
  var _a, _b, _c, _d, _e, _f, _g;
199
- const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_service_line: filterServiceLine, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_has_invoice: filterHasInvoice, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
200
+ const { provider_role: providerRole, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_status: filterStatus, filter_service_line: filterServiceLine, filter_order_classification_by_task_group_type: filterOrderClassificationByTaskGroupType, filter_awb_number: filterAwbNumber, filter_has_invoice: filterHasInvoice, filter_draft_started_at_timestamp_lte: filterDraftStartedAtTimestampLte, filter_draft_started_at_timestamp_gte: filterDraftStartedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_in_progress_at_timestamp_lte: filterInProgressAtTimestampLte, filter_in_progress_at_timestamp_gte: filterInProgressAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_cancelled_at_timestamp_lte: filterCancelledAtTimestampLte, filter_cancelled_at_timestamp_gte: filterCancelledAtTimestampGte, filter_exception_at_timestamp_lte: filterExceptionAtTimestampLte, filter_exception_at_timestamp_gte: filterExceptionAtTimestampGte, filter_executor_org_id: filterExecutorOrgId, filter_executor_department_id: filterExecutorDepartmentId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, filter_coordinator_department_id: filterCoordinatorDepartmentId, filter_coordinator_assigned_user_ids: filterCoordinatorAssignedUserIds, filter_coordinator_label: filterCoordinatorLabel, body: _body, } = request;
200
201
  const _queryParams = {};
201
202
  if (providerRole !== undefined) {
202
203
  _queryParams["provider_role"] = providerRole;
@@ -287,6 +288,9 @@ export class Expanded {
287
288
  if (filterExecutorOrgId !== undefined) {
288
289
  _queryParams["filter_executor_org_id"] = filterExecutorOrgId;
289
290
  }
291
+ if (filterExecutorDepartmentId !== undefined) {
292
+ _queryParams["filter_executor_department_id"] = filterExecutorDepartmentId;
293
+ }
290
294
  if (filterOffChrtExecutorOrgDataId !== undefined) {
291
295
  _queryParams["filter_off_chrt_executor_org_data_id"] = filterOffChrtExecutorOrgDataId;
292
296
  }
@@ -29,6 +29,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
29
29
  * filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
30
30
  * filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
31
31
  * filter_executor_org_id: "filter_executor_org_id",
32
+ * filter_executor_department_id: "filter_executor_department_id",
32
33
  * filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
33
34
  * filter_coordinator_org_id: "filter_coordinator_org_id",
34
35
  * filter_shipper_org_id: "filter_shipper_org_id",
@@ -71,6 +72,8 @@ export interface ExpandedListForProviderOperatorsV1Request {
71
72
  filter_exception_at_timestamp_lte?: string | null;
72
73
  filter_exception_at_timestamp_gte?: string | null;
73
74
  filter_executor_org_id?: string | null;
75
+ /** Filter by executor department ID */
76
+ filter_executor_department_id?: string | null;
74
77
  /** Filter by off-CHRT executor org data ID */
75
78
  filter_off_chrt_executor_org_data_id?: string | null;
76
79
  filter_coordinator_org_id?: string | null;
@@ -49,7 +49,7 @@ export declare class Task {
49
49
  addV1(request: Chrt.shipping.orders.OrdersAddTaskReq, requestOptions?: Task.RequestOptions): core.HttpResponsePromise<string>;
50
50
  private __addV1;
51
51
  /**
52
- * Deletes a task, recalculates task-group mileage, and rejects operational deletion while artifacts remain. | () -> (bool)
52
+ * Deletes a task in any lifecycle state and synchronizes affected shipping state. | () -> (bool)
53
53
  *
54
54
  * @param {string} taskId
55
55
  * @param {Task.RequestOptions} requestOptions - Request-specific configuration.
@@ -87,7 +87,7 @@ export class Task {
87
87
  });
88
88
  }
89
89
  /**
90
- * Deletes a task, recalculates task-group mileage, and rejects operational deletion while artifacts remain. | () -> (bool)
90
+ * Deletes a task in any lifecycle state and synchronizes affected shipping state. | () -> (bool)
91
91
  *
92
92
  * @param {string} taskId
93
93
  * @param {Task.RequestOptions} requestOptions - Request-specific configuration.
@@ -31,7 +31,7 @@ export declare class TaskGroup {
31
31
  protected readonly _options: TaskGroup.Options;
32
32
  constructor(_options?: TaskGroup.Options);
33
33
  /**
34
- * Adds a task group to a non-terminal order. Groups added to DRAFT orders are DRAFT; groups added to STAGED or IN_PROGRESS orders are STAGED. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
34
+ * Adds a task group to an order. Draft groups are DRAFT; all later lifecycle groups are STAGED and parent state is synchronized. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
35
35
  *
36
36
  * @param {Chrt.shipping.orders.OrdersAddTaskGroupReq} request
37
37
  * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
@@ -61,7 +61,7 @@ export declare class TaskGroup {
61
61
  addExecutorV1(taskGroupId: string, request?: Chrt.shipping.orders.OrdersAddTaskGroupExecutorReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
62
62
  private __addExecutorV1;
63
63
  /**
64
- * Deletes a task group from an active order and synchronizes affected order, driver, cargo, and account state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
64
+ * Deletes a task group in any lifecycle state and synchronizes affected shipping state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
65
65
  *
66
66
  * @param {string} taskGroupId
67
67
  * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
@@ -100,7 +100,7 @@ export declare class TaskGroup {
100
100
  removeExecutorV1(taskGroupId: string, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
101
101
  private __removeExecutorV1;
102
102
  /**
103
- * Replaces the ordered flight legs on an order task group. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
103
+ * Replaces the ordered flight legs on an order task group. A submitted leg that is the same physical flight (carrier, flight number, origin, destination, UTC departure date) as an existing leg keeps its id, so tasks reporting on it stay attached. Changing any of those five details is a different flight: the old leg is deleted and any task referencing it has its flight_leg_id cleared. Because flight_leg_id is not editable, re-attaching such a task requires deleting and recreating it. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
104
104
  *
105
105
  * @param {string} taskGroupId
106
106
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupFlightInfoReq} request
@@ -124,7 +124,7 @@ export declare class TaskGroup {
124
124
  setFlightInfoV1(taskGroupId: string, request: Chrt.shipping.orders.OrdersSetTaskGroupFlightInfoReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
125
125
  private __setFlightInfoV1;
126
126
  /**
127
- * Sets the ordering of tasks within an order task group and recalculates estimated mileage. DRAFT orders require draft_creator_org_operator; operational orders require task_group_operating_org_operators and a STAGED or IN_PROGRESS task group. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
127
+ * Sets task ordering in any lifecycle state, recalculating mileage and affected cargo state. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
128
128
  *
129
129
  * @param {string} taskGroupId
130
130
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupTaskOrderingReq} request
@@ -140,7 +140,7 @@ export declare class TaskGroup {
140
140
  setTaskOrderingV1(taskGroupId: string, request: Chrt.shipping.orders.OrdersSetTaskGroupTaskOrderingReq, requestOptions?: TaskGroup.RequestOptions): core.HttpResponsePromise<boolean>;
141
141
  private __setTaskOrderingV1;
142
142
  /**
143
- * Sets the vehicle type until the task group reaches a terminal status. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
143
+ * Sets the task-group vehicle type in any lifecycle state. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
144
144
  *
145
145
  * @param {string} taskGroupId
146
146
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupVehicleTypeReq} request
@@ -20,7 +20,7 @@ export class TaskGroup {
20
20
  this._options = _options;
21
21
  }
22
22
  /**
23
- * Adds a task group to a non-terminal order. Groups added to DRAFT orders are DRAFT; groups added to STAGED or IN_PROGRESS orders are STAGED. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
23
+ * Adds a task group to an order. Draft groups are DRAFT; all later lifecycle groups are STAGED and parent state is synchronized. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
24
24
  *
25
25
  * @param {Chrt.shipping.orders.OrdersAddTaskGroupReq} request
26
26
  * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
@@ -148,7 +148,7 @@ export class TaskGroup {
148
148
  });
149
149
  }
150
150
  /**
151
- * Deletes a task group from an active order and synchronizes affected order, driver, cargo, and account state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
151
+ * Deletes a task group in any lifecycle state and synchronizes affected shipping state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
152
152
  *
153
153
  * @param {string} taskGroupId
154
154
  * @param {TaskGroup.RequestOptions} requestOptions - Request-specific configuration.
@@ -325,7 +325,7 @@ export class TaskGroup {
325
325
  });
326
326
  }
327
327
  /**
328
- * Replaces the ordered flight legs on an order task group. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
328
+ * Replaces the ordered flight legs on an order task group. A submitted leg that is the same physical flight (carrier, flight number, origin, destination, UTC departure date) as an existing leg keeps its id, so tasks reporting on it stay attached. Changing any of those five details is a different flight: the old leg is deleted and any task referencing it has its flight_leg_id cleared. Because flight_leg_id is not editable, re-attaching such a task requires deleting and recreating it. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
329
329
  *
330
330
  * @param {string} taskGroupId
331
331
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupFlightInfoReq} request
@@ -398,7 +398,7 @@ export class TaskGroup {
398
398
  });
399
399
  }
400
400
  /**
401
- * Sets the ordering of tasks within an order task group and recalculates estimated mileage. DRAFT orders require draft_creator_org_operator; operational orders require task_group_operating_org_operators and a STAGED or IN_PROGRESS task group. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
401
+ * Sets task ordering in any lifecycle state, recalculating mileage and affected cargo state. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
402
402
  *
403
403
  * @param {string} taskGroupId
404
404
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupTaskOrderingReq} request
@@ -463,7 +463,7 @@ export class TaskGroup {
463
463
  });
464
464
  }
465
465
  /**
466
- * Sets the vehicle type until the task group reaches a terminal status. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
466
+ * Sets the task-group vehicle type in any lifecycle state. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
467
467
  *
468
468
  * @param {string} taskGroupId
469
469
  * @param {Chrt.shipping.orders.OrdersSetTaskGroupVehicleTypeReq} request
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type DepartmentTypeEnum = "aerospace" | "agriculture" | "automotive" | "chemicals" | "electronics" | "energy" | "food_and_beverage" | "general" | "healthcare" | "industrials" | "life_sciences" | "live_animals" | "manufacturing" | "pharmaceutical" | "radiopharma" | "retail" | "semiconductor";
4
+ export type DepartmentTypeEnum = "aerospace" | "agriculture" | "automotive" | "chemicals" | "electronics" | "energy" | "food_and_beverage" | "general" | "healthcare" | "industrials" | "life_sciences" | "live_animals" | "manufacturing" | "marine" | "pharmaceutical" | "radiopharma" | "retail" | "semiconductor";
5
5
  export declare const DepartmentTypeEnum: {
6
6
  readonly Aerospace: "aerospace";
7
7
  readonly Agriculture: "agriculture";
@@ -16,6 +16,7 @@ export declare const DepartmentTypeEnum: {
16
16
  readonly LifeSciences: "life_sciences";
17
17
  readonly LiveAnimals: "live_animals";
18
18
  readonly Manufacturing: "manufacturing";
19
+ readonly Marine: "marine";
19
20
  readonly Pharmaceutical: "pharmaceutical";
20
21
  readonly Radiopharma: "radiopharma";
21
22
  readonly Retail: "retail";
@@ -15,6 +15,7 @@ export const DepartmentTypeEnum = {
15
15
  LifeSciences: "life_sciences",
16
16
  LiveAnimals: "live_animals",
17
17
  Manufacturing: "manufacturing",
18
+ Marine: "marine",
18
19
  Pharmaceutical: "pharmaceutical",
19
20
  Radiopharma: "radiopharma",
20
21
  Retail: "retail",
@@ -21,7 +21,7 @@ export interface InvoiceExportListItem {
21
21
  delivery_stops_on_order?: number | null;
22
22
  destination_iata?: string | null;
23
23
  flight_numbers?: string[];
24
- invoice_approval_timestamp: string;
24
+ invoice_approval_timestamp?: string | null;
25
25
  invoice_number: string;
26
26
  mileage_estimated?: number | null;
27
27
  net_billing: number;
@@ -5,10 +5,12 @@ export interface OrderAndTaskGroupExpandedReq {
5
5
  expand_accounts?: boolean;
6
6
  expand_cargos?: boolean;
7
7
  expand_contacts?: boolean;
8
+ expand_coordinator_department?: boolean;
8
9
  expand_coordinator_org_company_name?: boolean;
9
10
  expand_coordinator_org_handle?: boolean;
10
11
  expand_coordinator_task_lists_to_apply_at_order_staging?: boolean;
11
12
  expand_driver?: boolean;
13
+ expand_executor_department?: boolean;
12
14
  expand_executor_org_company_name?: boolean;
13
15
  expand_executor_org_handle?: boolean;
14
16
  expand_notification_intents_ad_hoc?: boolean;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as Chrt from "../index.mjs";
5
5
  export interface OrderExpandedForProvider {
6
+ coordinator_department?: Chrt.Department1 | null;
6
7
  coordinator_org_company_name?: string | null;
7
8
  /** Must be a string starting with `@`. May only contain a-z, A-Z, 0-9, _, -. May not be longer than 30 characters. */
8
9
  coordinator_org_handle?: string | null;
@@ -8,6 +8,7 @@ export interface OrderTemplateNewTask1 {
8
8
  contact_ids?: string[];
9
9
  coordinator_shipper_account_ids?: string[];
10
10
  datetime_windows_dateparser_str?: Chrt.OrderTemplateNewDateTimeWindow1[];
11
+ flight_leg_id?: string | null;
11
12
  geofence_distance_miles?: number;
12
13
  location?: Chrt.LocationFeature | null;
13
14
  order_placer_comments?: string | null;
@@ -24,6 +24,7 @@ export interface Task1 {
24
24
  draft_started_at_timestamp: string;
25
25
  exception_at_timestamp?: string | null;
26
26
  executor_org_notes?: Chrt.TaskExecutorOrgNote1[];
27
+ flight_leg_id?: string | null;
27
28
  geofence_distance_miles?: number;
28
29
  location?: Chrt.LocationFeature | null;
29
30
  order_id: string;
@@ -7,6 +7,7 @@ export interface TaskClientCreate1 {
7
7
  contact_ids?: string[];
8
8
  coordinator_shipper_account_ids?: string[];
9
9
  datetime_windows?: Chrt.DateTimeWindow1[];
10
+ flight_leg_id?: string | null;
10
11
  geofence_distance_miles?: number;
11
12
  location?: Chrt.LocationFeature | null;
12
13
  order_placer_comments?: string | null;
@@ -10,6 +10,7 @@ export interface TaskGroupExpanded {
10
10
  /** Must be a string starting with `org_` */
11
11
  coordinator_org_id?: string | null;
12
12
  driver?: Chrt.Driver1 | null;
13
+ executor_department?: Chrt.Department1 | null;
13
14
  executor_org_company_name?: string | null;
14
15
  /** Must be a string starting with `@`. May only contain a-z, A-Z, 0-9, _, -. May not be longer than 30 characters. */
15
16
  executor_org_handle?: string | null;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.970.0";
1
+ export declare const SDK_VERSION = "1.976.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.970.0";
1
+ export const SDK_VERSION = "1.976.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.970.0",
3
+ "version": "1.976.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -3891,6 +3891,7 @@ await client.billingNew.orders.listExpandedForCoordinatorOperatorsV1({
3891
3891
  filter_off_chrt_shipper_org_data_id: "filter_off_chrt_shipper_org_data_id",
3892
3892
  filter_coordinator_shipper_account_ids: ["filter_coordinator_shipper_account_ids"],
3893
3893
  filter_executor_org_id: "filter_executor_org_id",
3894
+ filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
3894
3895
  filter_coordinator_label: "filter_coordinator_label",
3895
3896
  filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
3896
3897
  filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
@@ -3953,7 +3954,7 @@ await client.billingNew.orders.listExpandedForCoordinatorOperatorsV1({
3953
3954
  <dl>
3954
3955
  <dd>
3955
3956
 
3956
- Lists up to 1,000 shipment-level export rows for one approved accounts-receivable invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
3957
+ Lists up to 1,000 shipment-level export rows for one accounts-receivable invoice owned by the caller's organization, regardless of invoice status. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
3957
3958
 
3958
3959
  </dd>
3959
3960
  </dl>
@@ -17607,6 +17608,69 @@ await client.shipping.orders.unassignV1("order_id", {
17607
17608
  </dl>
17608
17609
  </details>
17609
17610
 
17611
+ <details><summary><code>client.shipping.orders.<a href="/src/api/resources/shipping/resources/orders/client/Client.ts">undoCancelV1</a>(orderId) -> boolean</code></summary>
17612
+ <dl>
17613
+ <dd>
17614
+
17615
+ #### 📝 Description
17616
+
17617
+ <dl>
17618
+ <dd>
17619
+
17620
+ <dl>
17621
+ <dd>
17622
+
17623
+ Reopens a cancelled order, restaging every cancelled task group, task, task artifact, operations task, and cargo on it regardless of when each was cancelled, then re-deriving order, cargo, and driver status from the surviving work. | authz_personas=[task_group_operating_org_operators] | () -> (bool)
17624
+
17625
+ </dd>
17626
+ </dl>
17627
+ </dd>
17628
+ </dl>
17629
+
17630
+ #### 🔌 Usage
17631
+
17632
+ <dl>
17633
+ <dd>
17634
+
17635
+ <dl>
17636
+ <dd>
17637
+
17638
+ ```typescript
17639
+ await client.shipping.orders.undoCancelV1("order_id");
17640
+ ```
17641
+
17642
+ </dd>
17643
+ </dl>
17644
+ </dd>
17645
+ </dl>
17646
+
17647
+ #### ⚙️ Parameters
17648
+
17649
+ <dl>
17650
+ <dd>
17651
+
17652
+ <dl>
17653
+ <dd>
17654
+
17655
+ **orderId:** `string`
17656
+
17657
+ </dd>
17658
+ </dl>
17659
+
17660
+ <dl>
17661
+ <dd>
17662
+
17663
+ **requestOptions:** `Orders.RequestOptions`
17664
+
17665
+ </dd>
17666
+ </dl>
17667
+ </dd>
17668
+ </dl>
17669
+
17670
+ </dd>
17671
+ </dl>
17672
+ </details>
17673
+
17610
17674
  <details><summary><code>client.shipping.orders.<a href="/src/api/resources/shipping/resources/orders/client/Client.ts">updateDepartmentV1</a>(orderId, { ...params }) -> boolean</code></summary>
17611
17675
  <dl>
17612
17676
  <dd>
@@ -21317,7 +21381,7 @@ await client.shipping.orders.cargo.associateWithTaskV1({
21317
21381
  <dl>
21318
21382
  <dd>
21319
21383
 
21320
- Deletes active cargo without completed task associations and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
21384
+ Deletes cargo in any lifecycle state, removes task associations, and resynchronizes the order AWB cache. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
21321
21385
 
21322
21386
  </dd>
21323
21387
  </dl>
@@ -21894,6 +21958,7 @@ await client.shipping.orders.expanded.listForProviderOperatorsV1({
21894
21958
  filter_exception_at_timestamp_lte: "2024-01-15T09:30:00Z",
21895
21959
  filter_exception_at_timestamp_gte: "2024-01-15T09:30:00Z",
21896
21960
  filter_executor_org_id: "filter_executor_org_id",
21961
+ filter_executor_department_id: "filter_executor_department_id",
21897
21962
  filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
21898
21963
  filter_coordinator_org_id: "filter_coordinator_org_id",
21899
21964
  filter_shipper_org_id: "filter_shipper_org_id",
@@ -22255,7 +22320,7 @@ await client.shipping.orders.task.addV1({
22255
22320
  <dl>
22256
22321
  <dd>
22257
22322
 
22258
- Deletes a task, recalculates task-group mileage, and rejects operational deletion while artifacts remain. | () -> (bool)
22323
+ Deletes a task in any lifecycle state and synchronizes affected shipping state. | () -> (bool)
22259
22324
 
22260
22325
  </dd>
22261
22326
  </dl>
@@ -22532,7 +22597,7 @@ await client.shipping.orders.taskArtifact.deleteV1("task_artifact_id");
22532
22597
  <dl>
22533
22598
  <dd>
22534
22599
 
22535
- Adds a task group to a non-terminal order. Groups added to DRAFT orders are DRAFT; groups added to STAGED or IN_PROGRESS orders are STAGED. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
22600
+ Adds a task group to an order. Draft groups are DRAFT; all later lifecycle groups are STAGED and parent state is synchronized. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersAddTaskGroupReq) -> (PydanticObjectId)
22536
22601
 
22537
22602
  </dd>
22538
22603
  </dl>
@@ -22669,7 +22734,7 @@ await client.shipping.orders.taskGroup.addExecutorV1("task_group_id");
22669
22734
  <dl>
22670
22735
  <dd>
22671
22736
 
22672
- Deletes a task group from an active order and synchronizes affected order, driver, cargo, and account state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
22737
+ Deletes a task group in any lifecycle state and synchronizes affected shipping state. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (bool)
22673
22738
 
22674
22739
  </dd>
22675
22740
  </dl>
@@ -22858,7 +22923,7 @@ await client.shipping.orders.taskGroup.removeExecutorV1("task_group_id");
22858
22923
  <dl>
22859
22924
  <dd>
22860
22925
 
22861
- Replaces the ordered flight legs on an order task group. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
22926
+ Replaces the ordered flight legs on an order task group. A submitted leg that is the same physical flight (carrier, flight number, origin, destination, UTC departure date) as an existing leg keeps its id, so tasks reporting on it stay attached. Changing any of those five details is a different flight: the old leg is deleted and any task referencing it has its flight_leg_id cleared. Because flight_leg_id is not editable, re-attaching such a task requires deleting and recreating it. | (OrdersSetTaskGroupFlightInfoReq) -> (bool)
22862
22927
 
22863
22928
  </dd>
22864
22929
  </dl>
@@ -22941,7 +23006,7 @@ await client.shipping.orders.taskGroup.setFlightInfoV1("task_group_id", {
22941
23006
  <dl>
22942
23007
  <dd>
22943
23008
 
22944
- Sets the ordering of tasks within an order task group and recalculates estimated mileage. DRAFT orders require draft_creator_org_operator; operational orders require task_group_operating_org_operators and a STAGED or IN_PROGRESS task group. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
23009
+ Sets task ordering in any lifecycle state, recalculating mileage and affected cargo state. | authz_personas=[draft_creator_org_operator, task_group_operating_org_operators] | (OrdersSetTaskGroupTaskOrderingReq) -> (bool)
22945
23010
 
22946
23011
  </dd>
22947
23012
  </dl>
@@ -23014,7 +23079,7 @@ await client.shipping.orders.taskGroup.setTaskOrderingV1("task_group_id", {
23014
23079
  <dl>
23015
23080
  <dd>
23016
23081
 
23017
- Sets the vehicle type until the task group reaches a terminal status. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
23082
+ Sets the task-group vehicle type in any lifecycle state. | authz_personas=[draft_creator_org_operator, task_group_coordinator_operators] | (OrdersSetTaskGroupVehicleTypeReq) -> (bool)
23018
23083
 
23019
23084
  </dd>
23020
23085
  </dl>