@chrt-inc/typescript-sdk 1.540.0 → 1.562.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
@@ -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.
@@ -31,7 +31,7 @@ export class Devices {
31
31
  this._options = _options;
32
32
  }
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.
@@ -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.
@@ -305,7 +305,7 @@ export class Sessions {
305
305
  });
306
306
  }
307
307
  /**
308
- * 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)
308
+ * 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)
309
309
  *
310
310
  * @param {Chrt.tracking.SessionClientCreate1} request
311
311
  * @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
  *
@@ -148,7 +148,7 @@ export class Dev {
148
148
  /**
149
149
  * 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)
150
150
  *
151
- * @param {Chrt.utils.OrderBuilderReq} request
151
+ * @param {Chrt.OrderBuilderReq} request
152
152
  * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
153
153
  *
154
154
  * @throws {@link Chrt.UnprocessableEntityError}
@@ -210,6 +210,71 @@ export class Dev {
210
210
  }
211
211
  });
212
212
  }
213
+ /**
214
+ * Same as /agent/order-builder/v1 but streams progress events via SSE as each workflow step completes. | (OrderBuilderReq) -> SSE stream of OrderBuilderProgressEvent, final OrderBuilderRes
215
+ *
216
+ * @param {Chrt.OrderBuilderReq} request
217
+ * @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
218
+ *
219
+ * @throws {@link Chrt.UnprocessableEntityError}
220
+ *
221
+ * @example
222
+ * await client.utils.dev.postAgentOrderBuilderStreamV1({
223
+ * order_short_id: "order_short_id",
224
+ * text: "text"
225
+ * })
226
+ */
227
+ postAgentOrderBuilderStreamV1(request, requestOptions) {
228
+ return core.HttpResponsePromise.fromPromise(this.__postAgentOrderBuilderStreamV1(request, requestOptions));
229
+ }
230
+ __postAgentOrderBuilderStreamV1(request, requestOptions) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ var _a, _b, _c, _d;
233
+ 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);
234
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
235
+ 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"),
236
+ method: "POST",
237
+ headers: _headers,
238
+ contentType: "application/json",
239
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
240
+ requestType: "json",
241
+ body: request,
242
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
243
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ });
246
+ if (_response.ok) {
247
+ return { data: undefined, rawResponse: _response.rawResponse };
248
+ }
249
+ if (_response.error.reason === "status-code") {
250
+ switch (_response.error.statusCode) {
251
+ case 422:
252
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
253
+ default:
254
+ throw new errors.ChrtError({
255
+ statusCode: _response.error.statusCode,
256
+ body: _response.error.body,
257
+ rawResponse: _response.rawResponse,
258
+ });
259
+ }
260
+ }
261
+ switch (_response.error.reason) {
262
+ case "non-json":
263
+ throw new errors.ChrtError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.rawBody,
266
+ rawResponse: _response.rawResponse,
267
+ });
268
+ case "timeout":
269
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /dev/agent/order-builder/stream/v1.");
270
+ case "unknown":
271
+ throw new errors.ChrtError({
272
+ message: _response.error.errorMessage,
273
+ rawResponse: _response.rawResponse,
274
+ });
275
+ }
276
+ });
277
+ }
213
278
  /**
214
279
  * (DEPRECATED) Extracts and returns the user ID from the authenticated request's JWT token. | () -> (str)
215
280
  *
@@ -1,4 +1,3 @@
1
1
  export { type AgentReq } from "./AgentReq.mjs";
2
2
  export { type ReadOrderAgentReq } from "./ReadOrderAgentReq.mjs";
3
- export { type OrderBuilderReq } from "./OrderBuilderReq.mjs";
4
3
  export { type TemplateReq } from "./TemplateReq.mjs";
@@ -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,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const OrderDraftIssueCategoryEnum = {
5
+ Status: "status",
6
+ Structure: "structure",
7
+ ActionType: "action_type",
8
+ Sequence: "sequence",
9
+ Assignment: "assignment",
10
+ };
@@ -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
+ 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,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface OrderDraftValidationResult {
6
+ is_valid: boolean;
7
+ issues?: Chrt.OrderDraftValidationIssue[];
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const ShippingDocTemplateEnum = {
5
+ Pod: "pod",
6
+ Bol: "bol",
7
+ };
@@ -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.mjs";
138
138
  export * from "./OnboardCourierTaskActionEnum1.mjs";
139
139
  export * from "./Order1.mjs";
140
140
  export * from "./OrderAndTaskGroupExpandedReq.mjs";
141
+ export * from "./OrderBuilderReq.mjs";
141
142
  export * from "./OrderBuilderRes.mjs";
142
143
  export * from "./OrderDraftExpanded.mjs";
143
144
  export * from "./OrderDraftExpandedListRes.mjs";
145
+ export * from "./OrderDraftIssueCategoryEnum.mjs";
144
146
  export * from "./OrderDraftSortByEnum.mjs";
147
+ export * from "./OrderDraftValidationIssue.mjs";
148
+ export * from "./OrderDraftValidationResult.mjs";
145
149
  export * from "./OrderExpanded.mjs";
146
150
  export * from "./OrderSortByEnum.mjs";
147
151
  export * from "./OrderStatusEnum1.mjs";
148
152
  export * from "./OrdersDraftUpdateRes.mjs";
149
153
  export * from "./OrdersExpandedListRes.mjs";
150
154
  export * from "./OrdersNewDraftRes.mjs";
155
+ export * from "./OrdersUpdateOffChrtReferenceIdRes.mjs";
151
156
  export * from "./OrgInfoResponse.mjs";
152
157
  export * from "./OrgMemberDetails.mjs";
153
158
  export * from "./OrgMemberListRes.mjs";
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.mjs";
188
193
  export * from "./ShipperCourierConnection1.mjs";
189
194
  export * from "./ShipperForwarderConnection1.mjs";
190
195
  export * from "./ShipperOrgInfoForConnections1.mjs";
196
+ export * from "./ShippingDocTemplateEnum.mjs";
191
197
  export * from "./ShippingOrderCancelledWebhookPayload.mjs";
192
198
  export * from "./ShippingOrderCompletedWebhookPayload.mjs";
193
199
  export * from "./ShippingOrderStagedWebhookPayload.mjs";
@@ -138,16 +138,21 @@ export * from "./OffChrtShipperOrgListRes.mjs";
138
138
  export * from "./OnboardCourierTaskActionEnum1.mjs";
139
139
  export * from "./Order1.mjs";
140
140
  export * from "./OrderAndTaskGroupExpandedReq.mjs";
141
+ export * from "./OrderBuilderReq.mjs";
141
142
  export * from "./OrderBuilderRes.mjs";
142
143
  export * from "./OrderDraftExpanded.mjs";
143
144
  export * from "./OrderDraftExpandedListRes.mjs";
145
+ export * from "./OrderDraftIssueCategoryEnum.mjs";
144
146
  export * from "./OrderDraftSortByEnum.mjs";
147
+ export * from "./OrderDraftValidationIssue.mjs";
148
+ export * from "./OrderDraftValidationResult.mjs";
145
149
  export * from "./OrderExpanded.mjs";
146
150
  export * from "./OrderSortByEnum.mjs";
147
151
  export * from "./OrderStatusEnum1.mjs";
148
152
  export * from "./OrdersDraftUpdateRes.mjs";
149
153
  export * from "./OrdersExpandedListRes.mjs";
150
154
  export * from "./OrdersNewDraftRes.mjs";
155
+ export * from "./OrdersUpdateOffChrtReferenceIdRes.mjs";
151
156
  export * from "./OrgInfoResponse.mjs";
152
157
  export * from "./OrgMemberDetails.mjs";
153
158
  export * from "./OrgMemberListRes.mjs";
@@ -188,6 +193,7 @@ export * from "./ShipperConnectionRes.mjs";
188
193
  export * from "./ShipperCourierConnection1.mjs";
189
194
  export * from "./ShipperForwarderConnection1.mjs";
190
195
  export * from "./ShipperOrgInfoForConnections1.mjs";
196
+ export * from "./ShippingDocTemplateEnum.mjs";
191
197
  export * from "./ShippingOrderCancelledWebhookPayload.mjs";
192
198
  export * from "./ShippingOrderCompletedWebhookPayload.mjs";
193
199
  export * from "./ShippingOrderStagedWebhookPayload.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.540.0";
1
+ export declare const SDK_VERSION = "1.562.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.540.0";
1
+ export const SDK_VERSION = "1.562.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.540.0",
3
+ "version": "1.562.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",