@chrt-inc/typescript-sdk 1.540.0 → 1.559.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 (130) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +2 -0
  3. package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +10 -2
  4. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +3 -0
  5. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +3 -0
  6. package/dist/cjs/api/resources/shipping/client/Client.d.ts +3 -0
  7. package/dist/cjs/api/resources/shipping/client/Client.js +21 -16
  8. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.d.ts +50 -0
  9. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.js +133 -0
  10. package/dist/cjs/api/resources/shipping/resources/docs/client/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/shipping/resources/docs/client/index.js +17 -0
  12. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.ts +15 -0
  13. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.js +2 -0
  15. package/dist/cjs/api/resources/shipping/resources/docs/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/shipping/resources/docs/index.js +17 -0
  17. package/dist/cjs/api/resources/shipping/resources/index.d.ts +3 -0
  18. package/dist/cjs/api/resources/shipping/resources/index.js +4 -1
  19. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.d.ts +5 -6
  20. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/Client.js +9 -10
  21. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.ts +5 -6
  22. package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +1 -0
  23. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +15 -0
  24. package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +66 -0
  25. package/dist/cjs/api/resources/shipping/resources/orders/client/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/shipping/resources/orders/client/index.js +15 -0
  27. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.d.ts +11 -0
  28. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.js +5 -0
  29. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.js +2 -0
  31. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +1 -1
  32. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +1 -1
  33. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +1 -1
  34. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +1 -1
  35. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +1 -1
  36. package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +1 -1
  37. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -1
  38. package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +1 -1
  39. package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +18 -2
  40. package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +66 -1
  41. package/dist/cjs/api/resources/utils/resources/dev/client/requests/index.d.ts +0 -1
  42. package/dist/cjs/api/types/LineItemGroup1.d.ts +1 -0
  43. package/dist/cjs/api/types/Order1.d.ts +1 -0
  44. package/dist/cjs/api/{resources/utils/resources/dev/client/requests → types}/OrderBuilderReq.d.ts +0 -7
  45. package/dist/cjs/api/types/OrderBuilderReq.js +5 -0
  46. package/dist/cjs/api/types/OrderBuilderRes.d.ts +2 -0
  47. package/dist/cjs/api/types/OrderDraftIssueCategoryEnum.d.ts +11 -0
  48. package/dist/cjs/api/types/OrderDraftIssueCategoryEnum.js +13 -0
  49. package/dist/cjs/api/types/OrderDraftValidationIssue.d.ts +12 -0
  50. package/dist/cjs/api/types/OrderDraftValidationIssue.js +5 -0
  51. package/dist/cjs/api/types/OrderDraftValidationResult.d.ts +8 -0
  52. package/dist/cjs/api/types/OrderDraftValidationResult.js +5 -0
  53. package/dist/cjs/api/types/OrdersDraftUpdateRes.d.ts +1 -0
  54. package/dist/cjs/api/types/OrdersUpdateOffChrtReferenceIdRes.d.ts +6 -0
  55. package/dist/cjs/api/types/OrdersUpdateOffChrtReferenceIdRes.js +5 -0
  56. package/dist/cjs/api/types/ShippingDocTemplateEnum.d.ts +8 -0
  57. package/dist/cjs/api/types/ShippingDocTemplateEnum.js +10 -0
  58. package/dist/cjs/api/types/Statement1.d.ts +1 -0
  59. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  60. package/dist/cjs/api/types/index.d.ts +6 -0
  61. package/dist/cjs/api/types/index.js +6 -0
  62. package/dist/cjs/version.d.ts +1 -1
  63. package/dist/cjs/version.js +1 -1
  64. package/dist/esm/Client.mjs +2 -2
  65. package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +2 -0
  66. package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +10 -2
  67. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +3 -0
  68. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +3 -0
  69. package/dist/esm/api/resources/shipping/client/Client.d.mts +3 -0
  70. package/dist/esm/api/resources/shipping/client/Client.mjs +5 -0
  71. package/dist/esm/api/resources/shipping/resources/docs/client/Client.d.mts +50 -0
  72. package/dist/esm/api/resources/shipping/resources/docs/client/Client.mjs +96 -0
  73. package/dist/esm/api/resources/shipping/resources/docs/client/index.d.mts +2 -0
  74. package/dist/esm/api/resources/shipping/resources/docs/client/index.mjs +1 -0
  75. package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts +15 -0
  76. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.d.mts +1 -0
  77. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.mjs +1 -0
  78. package/dist/esm/api/resources/shipping/resources/docs/index.d.mts +1 -0
  79. package/dist/esm/api/resources/shipping/resources/docs/index.mjs +1 -0
  80. package/dist/esm/api/resources/shipping/resources/index.d.mts +3 -0
  81. package/dist/esm/api/resources/shipping/resources/index.mjs +3 -0
  82. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.d.mts +5 -6
  83. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/Client.mjs +9 -10
  84. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersDraftUpdateReq.d.mts +5 -6
  85. package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +1 -0
  86. package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +15 -0
  87. package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +66 -0
  88. package/dist/esm/api/resources/shipping/resources/orders/client/index.d.mts +1 -0
  89. package/dist/esm/api/resources/shipping/resources/orders/client/index.mjs +1 -1
  90. package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.d.mts +11 -0
  91. package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateOffChrtReferenceIdReq.mjs +4 -0
  92. package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +1 -0
  93. package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.mjs +1 -0
  94. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +1 -1
  95. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +1 -1
  96. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +1 -1
  97. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +1 -1
  98. package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +1 -1
  99. package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +1 -1
  100. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -1
  101. package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +1 -1
  102. package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +18 -2
  103. package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +66 -1
  104. package/dist/esm/api/resources/utils/resources/dev/client/requests/index.d.mts +0 -1
  105. package/dist/esm/api/types/LineItemGroup1.d.mts +1 -0
  106. package/dist/esm/api/types/Order1.d.mts +1 -0
  107. package/dist/esm/api/{resources/utils/resources/dev/client/requests → types}/OrderBuilderReq.d.mts +0 -7
  108. package/dist/esm/api/types/OrderBuilderReq.mjs +4 -0
  109. package/dist/esm/api/types/OrderBuilderRes.d.mts +2 -0
  110. package/dist/esm/api/types/OrderDraftIssueCategoryEnum.d.mts +11 -0
  111. package/dist/esm/api/types/OrderDraftIssueCategoryEnum.mjs +10 -0
  112. package/dist/esm/api/types/OrderDraftValidationIssue.d.mts +12 -0
  113. package/dist/esm/api/types/OrderDraftValidationIssue.mjs +4 -0
  114. package/dist/esm/api/types/OrderDraftValidationResult.d.mts +8 -0
  115. package/dist/esm/api/types/OrderDraftValidationResult.mjs +4 -0
  116. package/dist/esm/api/types/OrdersDraftUpdateRes.d.mts +1 -0
  117. package/dist/esm/api/types/OrdersUpdateOffChrtReferenceIdRes.d.mts +6 -0
  118. package/dist/esm/api/types/OrdersUpdateOffChrtReferenceIdRes.mjs +4 -0
  119. package/dist/esm/api/types/ShippingDocTemplateEnum.d.mts +8 -0
  120. package/dist/esm/api/types/ShippingDocTemplateEnum.mjs +7 -0
  121. package/dist/esm/api/types/Statement1.d.mts +1 -0
  122. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  123. package/dist/esm/api/types/index.d.mts +6 -0
  124. package/dist/esm/api/types/index.mjs +6 -0
  125. package/dist/esm/version.d.mts +1 -1
  126. package/dist/esm/version.mjs +1 -1
  127. package/package.json +1 -1
  128. package/reference.md +222 -9
  129. /package/dist/cjs/api/resources/{utils/resources/dev/client/requests/OrderBuilderReq.js → shipping/resources/docs/client/requests/GenerateShippingDocReq.js} +0 -0
  130. /package/dist/esm/api/resources/{utils/resources/dev/client/requests/OrderBuilderReq.mjs → shipping/resources/docs/client/requests/GenerateShippingDocReq.mjs} +0 -0
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments.js";
5
5
  import * as core from "../../../../../../core/index.js";
6
+ import * as Chrt from "../../../../../index.js";
6
7
  import { Expanded } from "../resources/expanded/client/Client.js";
7
8
  export declare namespace Orders {
8
9
  interface Options {
@@ -45,6 +46,20 @@ export declare class Orders {
45
46
  */
46
47
  stageV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
47
48
  private __stageV1;
49
+ /**
50
+ * Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
51
+ *
52
+ * @param {string} orderId
53
+ * @param {Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq} request
54
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
55
+ *
56
+ * @throws {@link Chrt.UnprocessableEntityError}
57
+ *
58
+ * @example
59
+ * await client.shipping.orders.updateOffChrtReferenceIdV1("order_id")
60
+ */
61
+ updateOffChrtReferenceIdV1(orderId: string, request?: Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OrdersUpdateOffChrtReferenceIdRes>;
62
+ private __updateOffChrtReferenceIdV1;
48
63
  /**
49
64
  * Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_owner_operators] | () -> (bool)
50
65
  *
@@ -119,6 +119,72 @@ class Orders {
119
119
  }
120
120
  });
121
121
  }
122
+ /**
123
+ * Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
124
+ *
125
+ * @param {string} orderId
126
+ * @param {Chrt.shipping.OrdersUpdateOffChrtReferenceIdReq} request
127
+ * @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @throws {@link Chrt.UnprocessableEntityError}
130
+ *
131
+ * @example
132
+ * await client.shipping.orders.updateOffChrtReferenceIdV1("order_id")
133
+ */
134
+ updateOffChrtReferenceIdV1(orderId, request = {}, requestOptions) {
135
+ return core.HttpResponsePromise.fromPromise(this.__updateOffChrtReferenceIdV1(orderId, request, requestOptions));
136
+ }
137
+ __updateOffChrtReferenceIdV1(orderId_1) {
138
+ return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
139
+ var _a, _b, _c, _d;
140
+ 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);
141
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
142
+ 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/update_off_chrt_reference_id/v1/${encodeURIComponent(orderId)}`),
143
+ method: "PATCH",
144
+ headers: _headers,
145
+ contentType: "application/json",
146
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
147
+ requestType: "json",
148
+ body: request,
149
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
150
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
151
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
152
+ });
153
+ if (_response.ok) {
154
+ return {
155
+ data: _response.body,
156
+ rawResponse: _response.rawResponse,
157
+ };
158
+ }
159
+ if (_response.error.reason === "status-code") {
160
+ switch (_response.error.statusCode) {
161
+ case 422:
162
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
163
+ default:
164
+ throw new errors.ChrtError({
165
+ statusCode: _response.error.statusCode,
166
+ body: _response.error.body,
167
+ rawResponse: _response.rawResponse,
168
+ });
169
+ }
170
+ }
171
+ switch (_response.error.reason) {
172
+ case "non-json":
173
+ throw new errors.ChrtError({
174
+ statusCode: _response.error.statusCode,
175
+ body: _response.error.rawBody,
176
+ rawResponse: _response.rawResponse,
177
+ });
178
+ case "timeout":
179
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_off_chrt_reference_id/v1/{order_id}.");
180
+ case "unknown":
181
+ throw new errors.ChrtError({
182
+ message: _response.error.errorMessage,
183
+ rawResponse: _response.rawResponse,
184
+ });
185
+ }
186
+ });
187
+ }
122
188
  /**
123
189
  * Cancels an order and all related task groups and tasks in a transaction. | authz_personas=[lig_owner_operators] | () -> (bool)
124
190
  *
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -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 OrdersUpdateOffChrtReferenceIdReq {
9
+ off_chrt_reference_id?: string | null;
10
+ off_chrt_reference_id__set_to_None?: boolean;
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 });
@@ -0,0 +1 @@
1
+ export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -31,7 +31,7 @@ export interface ExpandedListForForwarderOperatorsV1Request {
31
31
  sort_order?: Chrt.SortOrderEnum | null;
32
32
  page?: number | null;
33
33
  page_size?: number | null;
34
- /** Full-text search query (searches order short_id) */
34
+ /** Full-text search query (searches order short_id and off_chrt_reference_id) */
35
35
  search?: string | null;
36
36
  filter_status?: (Chrt.OrderStatusEnum1 | null) | (Chrt.OrderStatusEnum1 | null)[];
37
37
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -31,7 +31,7 @@ export interface ExpandedListForShipperOperatorsV1Request {
31
31
  sort_order?: Chrt.SortOrderEnum | null;
32
32
  page?: number | null;
33
33
  page_size?: number | null;
34
- /** Full-text search query (searches order short_id) */
34
+ /** Full-text search query (searches order short_id and off_chrt_reference_id) */
35
35
  search?: string | null;
36
36
  filter_status?: (Chrt.OrderStatusEnum1 | null) | (Chrt.OrderStatusEnum1 | null)[];
37
37
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -31,7 +31,7 @@ export interface ExpandedListForCourierDriverV1Request {
31
31
  sort_order?: Chrt.SortOrderEnum | null;
32
32
  page?: number | null;
33
33
  page_size?: number | null;
34
- /** Full-text search query (searches order_short_id, flight_number) */
34
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
35
35
  search?: string | null;
36
36
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
37
37
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -31,7 +31,7 @@ export interface ExpandedListForCourierOperatorsV1Request {
31
31
  sort_order?: Chrt.SortOrderEnum | null;
32
32
  page?: number | null;
33
33
  page_size?: number | null;
34
- /** Full-text search query (searches order_short_id, flight_number) */
34
+ /** Full-text search query (searches order_short_id, order_off_chrt_reference_id, flight_number) */
35
35
  search?: string | null;
36
36
  filter_status?: (Chrt.TaskGroupStatusEnum1 | null) | (Chrt.TaskGroupStatusEnum1 | null)[];
37
37
  filter_draft_started_at_timestamp_lte?: string | null;
@@ -31,7 +31,7 @@ export declare class Devices {
31
31
  protected readonly _options: Devices.Options;
32
32
  constructor(_options?: Devices.Options);
33
33
  /**
34
- * Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | (DeviceClientCreate1) -> (PydanticObjectId)
34
+ * Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | auth: api_key | (DeviceClientCreate1) -> (PydanticObjectId)
35
35
  *
36
36
  * @param {Chrt.tracking.DeviceClientCreate1} request
37
37
  * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
@@ -67,7 +67,7 @@ class Devices {
67
67
  this._options = _options;
68
68
  }
69
69
  /**
70
- * Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | (DeviceClientCreate1) -> (PydanticObjectId)
70
+ * Registers a tracking device to the caller's organization. If the device is already registered to a different organization, returns 409 Conflict. | auth: api_key | (DeviceClientCreate1) -> (PydanticObjectId)
71
71
  *
72
72
  * @param {Chrt.tracking.DeviceClientCreate1} request
73
73
  * @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
@@ -96,7 +96,7 @@ export declare class Sessions {
96
96
  typeaheadV1(request: Chrt.tracking.SessionsTypeaheadV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<Chrt.TrackingTypeaheadResult[]>;
97
97
  private __typeaheadV1;
98
98
  /**
99
- * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | (SessionClientCreate1) -> (PydanticObjectId)
99
+ * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
100
100
  *
101
101
  * @param {Chrt.tracking.SessionClientCreate1} request
102
102
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -341,7 +341,7 @@ class Sessions {
341
341
  });
342
342
  }
343
343
  /**
344
- * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | (SessionClientCreate1) -> (PydanticObjectId)
344
+ * Creates a new tracking session for a device and automatically starts recording data points. The caller must be the device owner or belong to an org the device is shared with. The device owner remains the session owner (org_id). The device's shared_with_org_ids are copied to the session. The device must not have an active session. Auto-termination is scheduled for ~3 days out at 8 PM PT. Prevent auto termination with `no_auto_termination=True` | auth: api_key | (SessionClientCreate1) -> (PydanticObjectId)
345
345
  *
346
346
  * @param {Chrt.tracking.SessionClientCreate1} request
347
347
  * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
@@ -61,7 +61,7 @@ export declare class Dev {
61
61
  /**
62
62
  * Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
63
63
  *
64
- * @param {Chrt.utils.OrderBuilderReq} request
64
+ * @param {Chrt.OrderBuilderReq} request
65
65
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
66
66
  *
67
67
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -72,8 +72,24 @@ export declare class Dev {
72
72
  * text: "text"
73
73
  * })
74
74
  */
75
- postAgentOrderBuilderV1(request: Chrt.utils.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.OrderBuilderRes>;
75
+ postAgentOrderBuilderV1(request: Chrt.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.OrderBuilderRes>;
76
76
  private __postAgentOrderBuilderV1;
77
+ /**
78
+ * Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
79
+ *
80
+ * @param {Chrt.OrderBuilderReq} request
81
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
82
+ *
83
+ * @throws {@link Chrt.UnprocessableEntityError}
84
+ *
85
+ * @example
86
+ * await client.utils.dev.postAgentOrderBuilderStreamV1({
87
+ * order_short_id: "order_short_id",
88
+ * text: "text"
89
+ * })
90
+ */
91
+ postAgentOrderBuilderStreamV1(request: Chrt.OrderBuilderReq, requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<void>;
92
+ private __postAgentOrderBuilderStreamV1;
77
93
  /**
78
94
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
79
95
  *
@@ -184,7 +184,7 @@ class Dev {
184
184
  /**
185
185
  * Populates an existing order draft with cargo, task groups, and tasks parsed from natural language. The frontend must create the draft first via /shipping/order_drafts/new/v1. | (OrderBuilderReq) -> (OrderBuilderRes)
186
186
  *
187
- * @param {Chrt.utils.OrderBuilderReq} request
187
+ * @param {Chrt.OrderBuilderReq} request
188
188
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
189
189
  *
190
190
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -246,6 +246,71 @@ class Dev {
246
246
  }
247
247
  });
248
248
  }
249
+ /**
250
+ * Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
251
+ *
252
+ * @param {Chrt.OrderBuilderReq} request
253
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
254
+ *
255
+ * @throws {@link Chrt.UnprocessableEntityError}
256
+ *
257
+ * @example
258
+ * await client.utils.dev.postAgentOrderBuilderStreamV1({
259
+ * order_short_id: "order_short_id",
260
+ * text: "text"
261
+ * })
262
+ */
263
+ postAgentOrderBuilderStreamV1(request, requestOptions) {
264
+ return core.HttpResponsePromise.fromPromise(this.__postAgentOrderBuilderStreamV1(request, requestOptions));
265
+ }
266
+ __postAgentOrderBuilderStreamV1(request, requestOptions) {
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ var _a, _b, _c, _d;
269
+ 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);
270
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
271
+ 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/order-builder/stream/v1"),
272
+ method: "POST",
273
+ headers: _headers,
274
+ contentType: "application/json",
275
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
276
+ requestType: "json",
277
+ body: request,
278
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
279
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
280
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
281
+ });
282
+ if (_response.ok) {
283
+ return { data: undefined, rawResponse: _response.rawResponse };
284
+ }
285
+ if (_response.error.reason === "status-code") {
286
+ switch (_response.error.statusCode) {
287
+ case 422:
288
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
289
+ default:
290
+ throw new errors.ChrtError({
291
+ statusCode: _response.error.statusCode,
292
+ body: _response.error.body,
293
+ rawResponse: _response.rawResponse,
294
+ });
295
+ }
296
+ }
297
+ switch (_response.error.reason) {
298
+ case "non-json":
299
+ throw new errors.ChrtError({
300
+ statusCode: _response.error.statusCode,
301
+ body: _response.error.rawBody,
302
+ rawResponse: _response.rawResponse,
303
+ });
304
+ case "timeout":
305
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order-builder/stream/v1.");
306
+ case "unknown":
307
+ throw new errors.ChrtError({
308
+ message: _response.error.errorMessage,
309
+ rawResponse: _response.rawResponse,
310
+ });
311
+ }
312
+ });
313
+ }
249
314
  /**
250
315
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
251
316
  *
@@ -1,4 +1,3 @@
1
1
  export { type AgentReq } from "./AgentReq.js";
2
2
  export { type ReadOrderAgentReq } from "./ReadOrderAgentReq.js";
3
- export { type OrderBuilderReq } from "./OrderBuilderReq.js";
4
3
  export { type TemplateReq } from "./TemplateReq.js";
@@ -9,6 +9,7 @@ export interface LineItemGroup1 {
9
9
  task_group_id?: string | null;
10
10
  order_id?: string | null;
11
11
  order_short_id?: string | null;
12
+ order_off_chrt_reference_id?: string | null;
12
13
  rate_sheet_id?: string | null;
13
14
  line_items: Chrt.LineItem1[];
14
15
  line_item_group_s3_object_metadata_ids?: string[];
@@ -7,6 +7,7 @@ export interface Order1 {
7
7
  _id: string;
8
8
  short_id: string;
9
9
  task_group_ids?: string[];
10
+ off_chrt_reference_id?: string | null;
10
11
  created_by_org_type: Chrt.OrgTypeEnum;
11
12
  /** Must be a string starting with `org_` */
12
13
  created_by_org_id: string;
@@ -1,13 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- /**
5
- * @example
6
- * {
7
- * order_short_id: "order_short_id",
8
- * text: "text"
9
- * }
10
- */
11
4
  export interface OrderBuilderReq {
12
5
  order_short_id: string;
13
6
  text: string;
@@ -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 });
@@ -6,4 +6,6 @@ export interface OrderBuilderRes {
6
6
  order_short_id: string;
7
7
  summary: string;
8
8
  validation_passed?: boolean;
9
+ validation_issues?: string[];
10
+ notes?: string[];
9
11
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type OrderDraftIssueCategoryEnum = "status" | "structure" | "action_type" | "sequence" | "assignment";
5
+ export declare const OrderDraftIssueCategoryEnum: {
6
+ readonly Status: "status";
7
+ readonly Structure: "structure";
8
+ readonly ActionType: "action_type";
9
+ readonly Sequence: "sequence";
10
+ readonly Assignment: "assignment";
11
+ };
@@ -0,0 +1,13 @@
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.OrderDraftIssueCategoryEnum = void 0;
7
+ exports.OrderDraftIssueCategoryEnum = {
8
+ Status: "status",
9
+ Structure: "structure",
10
+ ActionType: "action_type",
11
+ Sequence: "sequence",
12
+ Assignment: "assignment",
13
+ };
@@ -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
+ export interface OrderDraftValidationIssue {
6
+ issue_key: string;
7
+ category: Chrt.OrderDraftIssueCategoryEnum;
8
+ message: string;
9
+ entity_type?: string | null;
10
+ entity_id?: string | null;
11
+ task_group_id?: string | null;
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 });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface OrderDraftValidationResult {
6
+ is_valid: boolean;
7
+ issues?: Chrt.OrderDraftValidationIssue[];
8
+ }
@@ -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 });
@@ -9,4 +9,5 @@ export interface OrdersDraftUpdateRes {
9
9
  /** Must be a string starting with `org_` */
10
10
  shipper_org_id?: string | null;
11
11
  off_chrt_shipper_org_id?: string | null;
12
+ off_chrt_reference_id?: string | null;
12
13
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface OrdersUpdateOffChrtReferenceIdRes {
5
+ off_chrt_reference_id?: string | null;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ShippingDocTemplateEnum = "pod" | "bol";
5
+ export declare const ShippingDocTemplateEnum: {
6
+ readonly Pod: "pod";
7
+ readonly Bol: "bol";
8
+ };
@@ -0,0 +1,10 @@
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.ShippingDocTemplateEnum = void 0;
7
+ exports.ShippingDocTemplateEnum = {
8
+ Pod: "pod",
9
+ Bol: "bol",
10
+ };
@@ -8,6 +8,7 @@ export interface Statement1 {
8
8
  line_item_group_ids?: string[];
9
9
  order_ids?: string[];
10
10
  order_short_ids?: string[];
11
+ order_off_chrt_reference_ids?: string[];
11
12
  amount?: number | null;
12
13
  units?: Chrt.UnitsEnum;
13
14
  /** Must be a string starting with `user_` */
@@ -7,6 +7,7 @@ export interface TaskGroup1 {
7
7
  _id: string;
8
8
  order_id: string;
9
9
  order_short_id: string;
10
+ order_off_chrt_reference_id?: string | null;
10
11
  task_ids?: string[];
11
12
  /** Must be a string starting with `org_` */
12
13
  created_by_org_id: string;
@@ -138,16 +138,21 @@ export * from "./OffChrtShipperOrgListRes.js";
138
138
  export * from "./OnboardCourierTaskActionEnum1.js";
139
139
  export * from "./Order1.js";
140
140
  export * from "./OrderAndTaskGroupExpandedReq.js";
141
+ export * from "./OrderBuilderReq.js";
141
142
  export * from "./OrderBuilderRes.js";
142
143
  export * from "./OrderDraftExpanded.js";
143
144
  export * from "./OrderDraftExpandedListRes.js";
145
+ export * from "./OrderDraftIssueCategoryEnum.js";
144
146
  export * from "./OrderDraftSortByEnum.js";
147
+ export * from "./OrderDraftValidationIssue.js";
148
+ export * from "./OrderDraftValidationResult.js";
145
149
  export * from "./OrderExpanded.js";
146
150
  export * from "./OrderSortByEnum.js";
147
151
  export * from "./OrderStatusEnum1.js";
148
152
  export * from "./OrdersDraftUpdateRes.js";
149
153
  export * from "./OrdersExpandedListRes.js";
150
154
  export * from "./OrdersNewDraftRes.js";
155
+ export * from "./OrdersUpdateOffChrtReferenceIdRes.js";
151
156
  export * from "./OrgInfoResponse.js";
152
157
  export * from "./OrgMemberDetails.js";
153
158
  export * from "./OrgMemberListRes.js";
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.js";
188
193
  export * from "./ShipperCourierConnection1.js";
189
194
  export * from "./ShipperForwarderConnection1.js";
190
195
  export * from "./ShipperOrgInfoForConnections1.js";
196
+ export * from "./ShippingDocTemplateEnum.js";
191
197
  export * from "./ShippingOrderCancelledWebhookPayload.js";
192
198
  export * from "./ShippingOrderCompletedWebhookPayload.js";
193
199
  export * from "./ShippingOrderStagedWebhookPayload.js";
@@ -154,16 +154,21 @@ __exportStar(require("./OffChrtShipperOrgListRes.js"), exports);
154
154
  __exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
155
155
  __exportStar(require("./Order1.js"), exports);
156
156
  __exportStar(require("./OrderAndTaskGroupExpandedReq.js"), exports);
157
+ __exportStar(require("./OrderBuilderReq.js"), exports);
157
158
  __exportStar(require("./OrderBuilderRes.js"), exports);
158
159
  __exportStar(require("./OrderDraftExpanded.js"), exports);
159
160
  __exportStar(require("./OrderDraftExpandedListRes.js"), exports);
161
+ __exportStar(require("./OrderDraftIssueCategoryEnum.js"), exports);
160
162
  __exportStar(require("./OrderDraftSortByEnum.js"), exports);
163
+ __exportStar(require("./OrderDraftValidationIssue.js"), exports);
164
+ __exportStar(require("./OrderDraftValidationResult.js"), exports);
161
165
  __exportStar(require("./OrderExpanded.js"), exports);
162
166
  __exportStar(require("./OrderSortByEnum.js"), exports);
163
167
  __exportStar(require("./OrderStatusEnum1.js"), exports);
164
168
  __exportStar(require("./OrdersDraftUpdateRes.js"), exports);
165
169
  __exportStar(require("./OrdersExpandedListRes.js"), exports);
166
170
  __exportStar(require("./OrdersNewDraftRes.js"), exports);
171
+ __exportStar(require("./OrdersUpdateOffChrtReferenceIdRes.js"), exports);
167
172
  __exportStar(require("./OrgInfoResponse.js"), exports);
168
173
  __exportStar(require("./OrgMemberDetails.js"), exports);
169
174
  __exportStar(require("./OrgMemberListRes.js"), exports);
@@ -204,6 +209,7 @@ __exportStar(require("./ShipperConnectionRes.js"), exports);
204
209
  __exportStar(require("./ShipperCourierConnection1.js"), exports);
205
210
  __exportStar(require("./ShipperForwarderConnection1.js"), exports);
206
211
  __exportStar(require("./ShipperOrgInfoForConnections1.js"), exports);
212
+ __exportStar(require("./ShippingDocTemplateEnum.js"), exports);
207
213
  __exportStar(require("./ShippingOrderCancelledWebhookPayload.js"), exports);
208
214
  __exportStar(require("./ShippingOrderCompletedWebhookPayload.js"), exports);
209
215
  __exportStar(require("./ShippingOrderStagedWebhookPayload.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.540.0";
1
+ export declare const SDK_VERSION = "1.559.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.540.0";
4
+ exports.SDK_VERSION = "1.559.0";
@@ -17,8 +17,8 @@ export class ChrtClient {
17
17
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
18
18
  "X-Fern-Language": "JavaScript",
19
19
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
20
- "X-Fern-SDK-Version": "1.540.0",
21
- "User-Agent": "@chrt-inc/typescript-sdk/1.540.0",
20
+ "X-Fern-SDK-Version": "1.559.0",
21
+ "User-Agent": "@chrt-inc/typescript-sdk/1.559.0",
22
22
  "X-Fern-Runtime": core.RUNTIME.type,
23
23
  "X-Fern-Runtime-Version": core.RUNTIME.version,
24
24
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });