@chrt-inc/typescript-sdk 1.853.0 → 1.858.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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.d.ts +30 -1
- package/dist/cjs/api/resources/operations/resources/cases/client/Client.js +125 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts +4 -4
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/Client.js +10 -4
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.ts +3 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.ts +3 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.ts +6 -3
- package/dist/cjs/api/types/Case1.d.ts +1 -0
- package/dist/cjs/api/types/OrderBuilderReq.d.ts +0 -2
- package/dist/cjs/api/types/OrderTemplate1.d.ts +3 -1
- package/dist/cjs/api/types/OrderTemplateCore1.d.ts +3 -1
- package/dist/cjs/api/types/TaskListToApplyToCase1.d.ts +7 -0
- package/dist/cjs/api/types/TaskListToApplyToCase1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/operations/resources/cases/client/Client.d.mts +30 -1
- package/dist/esm/api/resources/operations/resources/cases/client/Client.mjs +125 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.mts +4 -4
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/Client.mjs +10 -4
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientCreate1.d.mts +3 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplateClientUpdate1.d.mts +3 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplates/client/requests/OrderTemplatesListV1Request.d.mts +6 -3
- package/dist/esm/api/types/Case1.d.mts +1 -0
- package/dist/esm/api/types/OrderBuilderReq.d.mts +0 -2
- package/dist/esm/api/types/OrderTemplate1.d.mts +3 -1
- package/dist/esm/api/types/OrderTemplateCore1.d.mts +3 -1
- package/dist/esm/api/types/TaskListToApplyToCase1.d.mts +7 -0
- package/dist/esm/api/types/TaskListToApplyToCase1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +155 -2
package/dist/cjs/Client.js
CHANGED
|
@@ -57,8 +57,8 @@ class ChrtClient {
|
|
|
57
57
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
58
58
|
"X-Fern-Language": "JavaScript",
|
|
59
59
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
60
|
-
"X-Fern-SDK-Version": "1.
|
|
61
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
60
|
+
"X-Fern-SDK-Version": "1.858.0",
|
|
61
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.858.0",
|
|
62
62
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
63
63
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
64
64
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -184,6 +184,35 @@ export declare class Cases {
|
|
|
184
184
|
*/
|
|
185
185
|
getSuggestedDepartmentV1(caseId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<(string | null) | undefined>;
|
|
186
186
|
private __getSuggestedDepartmentV1;
|
|
187
|
+
/**
|
|
188
|
+
* Adds a task list to apply when the order is staged. | authz: min_org_role=operator | (UTCDatetime | None) -> (bool)
|
|
189
|
+
*
|
|
190
|
+
* @param {string} caseId
|
|
191
|
+
* @param {string} taskListId
|
|
192
|
+
* @param {string | null} request
|
|
193
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* await client.operations.cases.addTaskListToApplyAtOrderStagingV1("case_id", "task_list_id", "2024-01-15T09:30:00Z")
|
|
199
|
+
*/
|
|
200
|
+
addTaskListToApplyAtOrderStagingV1(caseId: string, taskListId: string, request?: string | null, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
201
|
+
private __addTaskListToApplyAtOrderStagingV1;
|
|
202
|
+
/**
|
|
203
|
+
* Removes a pending staging task list to apply from a draft order case. | authz: min_org_role=operator | () -> (bool)
|
|
204
|
+
*
|
|
205
|
+
* @param {string} caseId
|
|
206
|
+
* @param {string} taskListId
|
|
207
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
|
+
*
|
|
209
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* await client.operations.cases.removeTaskListToApplyAtOrderStagingV1("case_id", "task_list_id")
|
|
213
|
+
*/
|
|
214
|
+
removeTaskListToApplyAtOrderStagingV1(caseId: string, taskListId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
215
|
+
private __removeTaskListToApplyAtOrderStagingV1;
|
|
187
216
|
/**
|
|
188
217
|
* Returns distinct case_tag values matching the query via case-insensitive regex for the caller's organization. | authz: min_org_role=operator | () -> (list[CaseTypeaheadResult])
|
|
189
218
|
*
|
|
@@ -230,7 +259,7 @@ export declare class Cases {
|
|
|
230
259
|
getV1(caseId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<Chrt.Case1>;
|
|
231
260
|
private __getV1;
|
|
232
261
|
/**
|
|
233
|
-
* Updates a case's
|
|
262
|
+
* Updates a case's department and tag. | authz: min_org_role=operator | (CaseClientUpdate1) -> (bool)
|
|
234
263
|
*
|
|
235
264
|
* @param {string} caseId
|
|
236
265
|
* @param {Chrt.operations.CaseClientUpdate1} request
|
|
@@ -725,6 +725,130 @@ class Cases {
|
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
727
|
}
|
|
728
|
+
/**
|
|
729
|
+
* Adds a task list to apply when the order is staged. | authz: min_org_role=operator | (UTCDatetime | None) -> (bool)
|
|
730
|
+
*
|
|
731
|
+
* @param {string} caseId
|
|
732
|
+
* @param {string} taskListId
|
|
733
|
+
* @param {string | null} request
|
|
734
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
735
|
+
*
|
|
736
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
737
|
+
*
|
|
738
|
+
* @example
|
|
739
|
+
* await client.operations.cases.addTaskListToApplyAtOrderStagingV1("case_id", "task_list_id", "2024-01-15T09:30:00Z")
|
|
740
|
+
*/
|
|
741
|
+
addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions) {
|
|
742
|
+
return core.HttpResponsePromise.fromPromise(this.__addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions));
|
|
743
|
+
}
|
|
744
|
+
__addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions) {
|
|
745
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
746
|
+
var _a, _b, _c, _d;
|
|
747
|
+
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);
|
|
748
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
749
|
+
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, `operations/cases/task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(caseId)}/${encodeURIComponent(taskListId)}`),
|
|
750
|
+
method: "POST",
|
|
751
|
+
headers: _headers,
|
|
752
|
+
contentType: "application/json",
|
|
753
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
754
|
+
requestType: "json",
|
|
755
|
+
body: request != null ? request : undefined,
|
|
756
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
757
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
758
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
759
|
+
});
|
|
760
|
+
if (_response.ok) {
|
|
761
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
762
|
+
}
|
|
763
|
+
if (_response.error.reason === "status-code") {
|
|
764
|
+
switch (_response.error.statusCode) {
|
|
765
|
+
case 422:
|
|
766
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
767
|
+
default:
|
|
768
|
+
throw new errors.ChrtError({
|
|
769
|
+
statusCode: _response.error.statusCode,
|
|
770
|
+
body: _response.error.body,
|
|
771
|
+
rawResponse: _response.rawResponse,
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
switch (_response.error.reason) {
|
|
776
|
+
case "non-json":
|
|
777
|
+
throw new errors.ChrtError({
|
|
778
|
+
statusCode: _response.error.statusCode,
|
|
779
|
+
body: _response.error.rawBody,
|
|
780
|
+
rawResponse: _response.rawResponse,
|
|
781
|
+
});
|
|
782
|
+
case "timeout":
|
|
783
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/task_lists_to_apply_at_order_staging/add/v1/{case_id}/{task_list_id}.");
|
|
784
|
+
case "unknown":
|
|
785
|
+
throw new errors.ChrtError({
|
|
786
|
+
message: _response.error.errorMessage,
|
|
787
|
+
rawResponse: _response.rawResponse,
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Removes a pending staging task list to apply from a draft order case. | authz: min_org_role=operator | () -> (bool)
|
|
794
|
+
*
|
|
795
|
+
* @param {string} caseId
|
|
796
|
+
* @param {string} taskListId
|
|
797
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
798
|
+
*
|
|
799
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
800
|
+
*
|
|
801
|
+
* @example
|
|
802
|
+
* await client.operations.cases.removeTaskListToApplyAtOrderStagingV1("case_id", "task_list_id")
|
|
803
|
+
*/
|
|
804
|
+
removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions) {
|
|
805
|
+
return core.HttpResponsePromise.fromPromise(this.__removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions));
|
|
806
|
+
}
|
|
807
|
+
__removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions) {
|
|
808
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
809
|
+
var _a, _b, _c, _d;
|
|
810
|
+
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);
|
|
811
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
812
|
+
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, `operations/cases/task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(caseId)}/${encodeURIComponent(taskListId)}`),
|
|
813
|
+
method: "POST",
|
|
814
|
+
headers: _headers,
|
|
815
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
816
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
817
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
818
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
819
|
+
});
|
|
820
|
+
if (_response.ok) {
|
|
821
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
822
|
+
}
|
|
823
|
+
if (_response.error.reason === "status-code") {
|
|
824
|
+
switch (_response.error.statusCode) {
|
|
825
|
+
case 422:
|
|
826
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
827
|
+
default:
|
|
828
|
+
throw new errors.ChrtError({
|
|
829
|
+
statusCode: _response.error.statusCode,
|
|
830
|
+
body: _response.error.body,
|
|
831
|
+
rawResponse: _response.rawResponse,
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
switch (_response.error.reason) {
|
|
836
|
+
case "non-json":
|
|
837
|
+
throw new errors.ChrtError({
|
|
838
|
+
statusCode: _response.error.statusCode,
|
|
839
|
+
body: _response.error.rawBody,
|
|
840
|
+
rawResponse: _response.rawResponse,
|
|
841
|
+
});
|
|
842
|
+
case "timeout":
|
|
843
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/task_lists_to_apply_at_order_staging/remove/v1/{case_id}/{task_list_id}.");
|
|
844
|
+
case "unknown":
|
|
845
|
+
throw new errors.ChrtError({
|
|
846
|
+
message: _response.error.errorMessage,
|
|
847
|
+
rawResponse: _response.rawResponse,
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
}
|
|
728
852
|
/**
|
|
729
853
|
* Returns distinct case_tag values matching the query via case-insensitive regex for the caller's organization. | authz: min_org_role=operator | () -> (list[CaseTypeaheadResult])
|
|
730
854
|
*
|
|
@@ -918,7 +1042,7 @@ class Cases {
|
|
|
918
1042
|
});
|
|
919
1043
|
}
|
|
920
1044
|
/**
|
|
921
|
-
* Updates a case's
|
|
1045
|
+
* Updates a case's department and tag. | authz: min_org_role=operator | (CaseClientUpdate1) -> (bool)
|
|
922
1046
|
*
|
|
923
1047
|
* @param {string} caseId
|
|
924
1048
|
* @param {Chrt.operations.CaseClientUpdate1} request
|
package/dist/cjs/api/resources/shipping/resources/orderDrafts/client/requests/OrdersNewDraftReq.d.ts
CHANGED
|
@@ -13,8 +13,6 @@ export interface OrdersNewDraftReq {
|
|
|
13
13
|
/** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
|
|
14
14
|
creation_idempotency_key?: string | null;
|
|
15
15
|
department_id?: string | null;
|
|
16
|
-
/** If set, pins the first applied OperationsTask's deadline; later from_previous_task entries cascade from it. None anchors the chain to the apply time (now). */
|
|
17
|
-
initial_deadline_timestamp?: string | null;
|
|
18
16
|
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
19
17
|
off_chrt_reference_id?: string | null;
|
|
20
18
|
off_chrt_shipper_org_id?: string | null;
|
|
@@ -24,6 +22,8 @@ export interface OrdersNewDraftReq {
|
|
|
24
22
|
order_thread_shipping_turn?: Chrt.ShippingTurnClientCreate1 | null;
|
|
25
23
|
/** Must be a string starting with `org_` */
|
|
26
24
|
shipper_org_id?: string | null;
|
|
27
|
-
/** OperationsTaskList
|
|
28
|
-
|
|
25
|
+
/** OperationsTaskList applications to apply to the coordinator's Case at order creation, each with its own optional first-deadline pin. */
|
|
26
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
27
|
+
/** OperationsTaskList applications to copy onto the coordinator's Case for deferred application when the draft order is staged. */
|
|
28
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
29
29
|
}
|
|
@@ -81,7 +81,8 @@ export declare class OrderTemplates {
|
|
|
81
81
|
* filter_case_tag: "filter_case_tag",
|
|
82
82
|
* filter_driver_id: "filter_driver_id",
|
|
83
83
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
84
|
-
*
|
|
84
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
85
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
85
86
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
86
87
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
87
88
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -198,7 +198,8 @@ class OrderTemplates {
|
|
|
198
198
|
* filter_case_tag: "filter_case_tag",
|
|
199
199
|
* filter_driver_id: "filter_driver_id",
|
|
200
200
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
201
|
-
*
|
|
201
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
202
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
202
203
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
203
204
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
204
205
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -213,7 +214,7 @@ class OrderTemplates {
|
|
|
213
214
|
__listV1() {
|
|
214
215
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
215
216
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
216
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_off_chrt_reference_id_str: filterOffChrtReferenceIdStr, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_id: filterOffChrtShipperOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_department_id: filterDepartmentId, filter_case_tag: filterCaseTag, filter_driver_id: filterDriverId, filter_directory_entry_id: filterDirectoryEntryId,
|
|
217
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_off_chrt_reference_id_str: filterOffChrtReferenceIdStr, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_id: filterOffChrtShipperOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_department_id: filterDepartmentId, filter_case_tag: filterCaseTag, filter_driver_id: filterDriverId, filter_directory_entry_id: filterDirectoryEntryId, filter_task_lists_to_apply_at_order_creation_task_list_id: filterTaskListsToApplyAtOrderCreationTaskListId, filter_task_lists_to_apply_at_order_staging_task_list_id: filterTaskListsToApplyAtOrderStagingTaskListId, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_last_edited_at_timestamp_gte: filterLastEditedAtTimestampGte, filter_last_edited_at_timestamp_lte: filterLastEditedAtTimestampLte, filter_last_used_at_timestamp_gte: filterLastUsedAtTimestampGte, filter_last_used_at_timestamp_lte: filterLastUsedAtTimestampLte, } = request;
|
|
217
218
|
const _queryParams = {};
|
|
218
219
|
if (sortBy !== undefined) {
|
|
219
220
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -260,8 +261,13 @@ class OrderTemplates {
|
|
|
260
261
|
if (filterDirectoryEntryId !== undefined) {
|
|
261
262
|
_queryParams["filter_directory_entry_id"] = filterDirectoryEntryId;
|
|
262
263
|
}
|
|
263
|
-
if (
|
|
264
|
-
_queryParams["
|
|
264
|
+
if (filterTaskListsToApplyAtOrderCreationTaskListId !== undefined) {
|
|
265
|
+
_queryParams["filter_task_lists_to_apply_at_order_creation_task_list_id"] =
|
|
266
|
+
filterTaskListsToApplyAtOrderCreationTaskListId;
|
|
267
|
+
}
|
|
268
|
+
if (filterTaskListsToApplyAtOrderStagingTaskListId !== undefined) {
|
|
269
|
+
_queryParams["filter_task_lists_to_apply_at_order_staging_task_list_id"] =
|
|
270
|
+
filterTaskListsToApplyAtOrderStagingTaskListId;
|
|
265
271
|
}
|
|
266
272
|
if (filterCreatedAtTimestampGte !== undefined) {
|
|
267
273
|
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
@@ -24,6 +25,7 @@ export interface OrderTemplateClientCreate1 {
|
|
|
24
25
|
schema_version: number;
|
|
25
26
|
/** Must be a string starting with `org_` */
|
|
26
27
|
shipper_org_id?: string | null;
|
|
27
|
-
|
|
28
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
29
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
28
30
|
text?: string | null;
|
|
29
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.js";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {}
|
|
@@ -27,7 +28,8 @@ export interface OrderTemplateClientUpdate1 {
|
|
|
27
28
|
/** Must be a string starting with `org_` */
|
|
28
29
|
shipper_org_id?: string | null;
|
|
29
30
|
shipper_org_id__set_to_None?: boolean;
|
|
30
|
-
|
|
31
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
32
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
31
33
|
text?: string | null;
|
|
32
34
|
text__set_to_None?: boolean;
|
|
33
35
|
}
|
|
@@ -20,7 +20,8 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
20
20
|
* filter_case_tag: "filter_case_tag",
|
|
21
21
|
* filter_driver_id: "filter_driver_id",
|
|
22
22
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
23
|
-
*
|
|
23
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
24
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
24
25
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
26
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
26
27
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -58,8 +59,10 @@ export interface OrderTemplatesListV1Request {
|
|
|
58
59
|
filter_driver_id?: string | null;
|
|
59
60
|
/** Filter by directory entry ID included in the template. */
|
|
60
61
|
filter_directory_entry_id?: string | null;
|
|
61
|
-
/** Filter by task list ID included in
|
|
62
|
-
|
|
62
|
+
/** Filter by task list ID included in order-creation applications. */
|
|
63
|
+
filter_task_lists_to_apply_at_order_creation_task_list_id?: string | null;
|
|
64
|
+
/** Filter by task list ID included in staging applications. */
|
|
65
|
+
filter_task_lists_to_apply_at_order_staging_task_list_id?: string | null;
|
|
63
66
|
/** Filter created_at_timestamp >= value (inclusive). */
|
|
64
67
|
filter_created_at_timestamp_gte?: string | null;
|
|
65
68
|
/** Filter created_at_timestamp <= value (inclusive). */
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.js";
|
|
5
5
|
export interface OrderBuilderReq {
|
|
6
|
-
/** Per-build pin for the first applied OperationsTask's deadline (later from_previous_task entries cascade from it). Kept off the template so saved templates don't carry a stale absolute time; None anchors the chain to the build time. */
|
|
7
|
-
initial_deadline_timestamp?: string | null;
|
|
8
6
|
order_template_core?: Chrt.OrderTemplateCore1 | null;
|
|
9
7
|
order_template_id?: string | null;
|
|
10
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
4
5
|
export interface OrderTemplate1 {
|
|
5
6
|
_id: string;
|
|
6
7
|
archived_at_timestamp?: string | null;
|
|
@@ -26,6 +27,7 @@ export interface OrderTemplate1 {
|
|
|
26
27
|
schema_version: number;
|
|
27
28
|
/** Must be a string starting with `org_` */
|
|
28
29
|
shipper_org_id?: string | null;
|
|
29
|
-
|
|
30
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
31
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
30
32
|
text?: string | null;
|
|
31
33
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
4
5
|
/**
|
|
5
6
|
* Shared seed of an order build: the order text + long-lived references. Reused by the library template (OrderTemplateBase1) and the ad-hoc kickoff payload so the fields the builder seeds from can't drift. (Mirrors TaskCore1.)
|
|
6
7
|
*
|
|
@@ -19,6 +20,7 @@ export interface OrderTemplateCore1 {
|
|
|
19
20
|
schema_version: number;
|
|
20
21
|
/** Must be a string starting with `org_` */
|
|
21
22
|
shipper_org_id?: string | null;
|
|
22
|
-
|
|
23
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
24
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
23
25
|
text?: string | null;
|
|
24
26
|
}
|
|
@@ -410,6 +410,7 @@ export * from "./TaskGroupStatusEnum1.js";
|
|
|
410
410
|
export * from "./TaskGroupTypeEnum1.js";
|
|
411
411
|
export * from "./TaskGroupTypeaheadFieldEnum.js";
|
|
412
412
|
export * from "./TaskGroupTypeaheadResult.js";
|
|
413
|
+
export * from "./TaskListToApplyToCase1.js";
|
|
413
414
|
export * from "./TaskManifest1.js";
|
|
414
415
|
export * from "./TaskStatusEnum1.js";
|
|
415
416
|
export * from "./TaskWaitTimeGeofenceRes.js";
|
|
@@ -426,6 +426,7 @@ __exportStar(require("./TaskGroupStatusEnum1.js"), exports);
|
|
|
426
426
|
__exportStar(require("./TaskGroupTypeEnum1.js"), exports);
|
|
427
427
|
__exportStar(require("./TaskGroupTypeaheadFieldEnum.js"), exports);
|
|
428
428
|
__exportStar(require("./TaskGroupTypeaheadResult.js"), exports);
|
|
429
|
+
__exportStar(require("./TaskListToApplyToCase1.js"), exports);
|
|
429
430
|
__exportStar(require("./TaskManifest1.js"), exports);
|
|
430
431
|
__exportStar(require("./TaskStatusEnum1.js"), exports);
|
|
431
432
|
__exportStar(require("./TaskWaitTimeGeofenceRes.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.858.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -21,8 +21,8 @@ export class ChrtClient {
|
|
|
21
21
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
22
22
|
"X-Fern-Language": "JavaScript",
|
|
23
23
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
24
|
-
"X-Fern-SDK-Version": "1.
|
|
25
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
24
|
+
"X-Fern-SDK-Version": "1.858.0",
|
|
25
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.858.0",
|
|
26
26
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
27
27
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
28
28
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -184,6 +184,35 @@ export declare class Cases {
|
|
|
184
184
|
*/
|
|
185
185
|
getSuggestedDepartmentV1(caseId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<(string | null) | undefined>;
|
|
186
186
|
private __getSuggestedDepartmentV1;
|
|
187
|
+
/**
|
|
188
|
+
* Adds a task list to apply when the order is staged. | authz: min_org_role=operator | (UTCDatetime | None) -> (bool)
|
|
189
|
+
*
|
|
190
|
+
* @param {string} caseId
|
|
191
|
+
* @param {string} taskListId
|
|
192
|
+
* @param {string | null} request
|
|
193
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* await client.operations.cases.addTaskListToApplyAtOrderStagingV1("case_id", "task_list_id", "2024-01-15T09:30:00Z")
|
|
199
|
+
*/
|
|
200
|
+
addTaskListToApplyAtOrderStagingV1(caseId: string, taskListId: string, request?: string | null, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
201
|
+
private __addTaskListToApplyAtOrderStagingV1;
|
|
202
|
+
/**
|
|
203
|
+
* Removes a pending staging task list to apply from a draft order case. | authz: min_org_role=operator | () -> (bool)
|
|
204
|
+
*
|
|
205
|
+
* @param {string} caseId
|
|
206
|
+
* @param {string} taskListId
|
|
207
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
208
|
+
*
|
|
209
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* await client.operations.cases.removeTaskListToApplyAtOrderStagingV1("case_id", "task_list_id")
|
|
213
|
+
*/
|
|
214
|
+
removeTaskListToApplyAtOrderStagingV1(caseId: string, taskListId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
215
|
+
private __removeTaskListToApplyAtOrderStagingV1;
|
|
187
216
|
/**
|
|
188
217
|
* Returns distinct case_tag values matching the query via case-insensitive regex for the caller's organization. | authz: min_org_role=operator | () -> (list[CaseTypeaheadResult])
|
|
189
218
|
*
|
|
@@ -230,7 +259,7 @@ export declare class Cases {
|
|
|
230
259
|
getV1(caseId: string, requestOptions?: Cases.RequestOptions): core.HttpResponsePromise<Chrt.Case1>;
|
|
231
260
|
private __getV1;
|
|
232
261
|
/**
|
|
233
|
-
* Updates a case's
|
|
262
|
+
* Updates a case's department and tag. | authz: min_org_role=operator | (CaseClientUpdate1) -> (bool)
|
|
234
263
|
*
|
|
235
264
|
* @param {string} caseId
|
|
236
265
|
* @param {Chrt.operations.CaseClientUpdate1} request
|
|
@@ -689,6 +689,130 @@ export class Cases {
|
|
|
689
689
|
}
|
|
690
690
|
});
|
|
691
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* Adds a task list to apply when the order is staged. | authz: min_org_role=operator | (UTCDatetime | None) -> (bool)
|
|
694
|
+
*
|
|
695
|
+
* @param {string} caseId
|
|
696
|
+
* @param {string} taskListId
|
|
697
|
+
* @param {string | null} request
|
|
698
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
699
|
+
*
|
|
700
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* await client.operations.cases.addTaskListToApplyAtOrderStagingV1("case_id", "task_list_id", "2024-01-15T09:30:00Z")
|
|
704
|
+
*/
|
|
705
|
+
addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions) {
|
|
706
|
+
return core.HttpResponsePromise.fromPromise(this.__addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions));
|
|
707
|
+
}
|
|
708
|
+
__addTaskListToApplyAtOrderStagingV1(caseId, taskListId, request, requestOptions) {
|
|
709
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
710
|
+
var _a, _b, _c, _d;
|
|
711
|
+
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);
|
|
712
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
713
|
+
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, `operations/cases/task_lists_to_apply_at_order_staging/add/v1/${encodeURIComponent(caseId)}/${encodeURIComponent(taskListId)}`),
|
|
714
|
+
method: "POST",
|
|
715
|
+
headers: _headers,
|
|
716
|
+
contentType: "application/json",
|
|
717
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
718
|
+
requestType: "json",
|
|
719
|
+
body: request != null ? request : undefined,
|
|
720
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
721
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
722
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
723
|
+
});
|
|
724
|
+
if (_response.ok) {
|
|
725
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
726
|
+
}
|
|
727
|
+
if (_response.error.reason === "status-code") {
|
|
728
|
+
switch (_response.error.statusCode) {
|
|
729
|
+
case 422:
|
|
730
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
731
|
+
default:
|
|
732
|
+
throw new errors.ChrtError({
|
|
733
|
+
statusCode: _response.error.statusCode,
|
|
734
|
+
body: _response.error.body,
|
|
735
|
+
rawResponse: _response.rawResponse,
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
switch (_response.error.reason) {
|
|
740
|
+
case "non-json":
|
|
741
|
+
throw new errors.ChrtError({
|
|
742
|
+
statusCode: _response.error.statusCode,
|
|
743
|
+
body: _response.error.rawBody,
|
|
744
|
+
rawResponse: _response.rawResponse,
|
|
745
|
+
});
|
|
746
|
+
case "timeout":
|
|
747
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/task_lists_to_apply_at_order_staging/add/v1/{case_id}/{task_list_id}.");
|
|
748
|
+
case "unknown":
|
|
749
|
+
throw new errors.ChrtError({
|
|
750
|
+
message: _response.error.errorMessage,
|
|
751
|
+
rawResponse: _response.rawResponse,
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Removes a pending staging task list to apply from a draft order case. | authz: min_org_role=operator | () -> (bool)
|
|
758
|
+
*
|
|
759
|
+
* @param {string} caseId
|
|
760
|
+
* @param {string} taskListId
|
|
761
|
+
* @param {Cases.RequestOptions} requestOptions - Request-specific configuration.
|
|
762
|
+
*
|
|
763
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
764
|
+
*
|
|
765
|
+
* @example
|
|
766
|
+
* await client.operations.cases.removeTaskListToApplyAtOrderStagingV1("case_id", "task_list_id")
|
|
767
|
+
*/
|
|
768
|
+
removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions) {
|
|
769
|
+
return core.HttpResponsePromise.fromPromise(this.__removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions));
|
|
770
|
+
}
|
|
771
|
+
__removeTaskListToApplyAtOrderStagingV1(caseId, taskListId, requestOptions) {
|
|
772
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
773
|
+
var _a, _b, _c, _d;
|
|
774
|
+
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);
|
|
775
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
776
|
+
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, `operations/cases/task_lists_to_apply_at_order_staging/remove/v1/${encodeURIComponent(caseId)}/${encodeURIComponent(taskListId)}`),
|
|
777
|
+
method: "POST",
|
|
778
|
+
headers: _headers,
|
|
779
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
780
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
781
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
782
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
783
|
+
});
|
|
784
|
+
if (_response.ok) {
|
|
785
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
786
|
+
}
|
|
787
|
+
if (_response.error.reason === "status-code") {
|
|
788
|
+
switch (_response.error.statusCode) {
|
|
789
|
+
case 422:
|
|
790
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
791
|
+
default:
|
|
792
|
+
throw new errors.ChrtError({
|
|
793
|
+
statusCode: _response.error.statusCode,
|
|
794
|
+
body: _response.error.body,
|
|
795
|
+
rawResponse: _response.rawResponse,
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
switch (_response.error.reason) {
|
|
800
|
+
case "non-json":
|
|
801
|
+
throw new errors.ChrtError({
|
|
802
|
+
statusCode: _response.error.statusCode,
|
|
803
|
+
body: _response.error.rawBody,
|
|
804
|
+
rawResponse: _response.rawResponse,
|
|
805
|
+
});
|
|
806
|
+
case "timeout":
|
|
807
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /operations/cases/task_lists_to_apply_at_order_staging/remove/v1/{case_id}/{task_list_id}.");
|
|
808
|
+
case "unknown":
|
|
809
|
+
throw new errors.ChrtError({
|
|
810
|
+
message: _response.error.errorMessage,
|
|
811
|
+
rawResponse: _response.rawResponse,
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
}
|
|
692
816
|
/**
|
|
693
817
|
* Returns distinct case_tag values matching the query via case-insensitive regex for the caller's organization. | authz: min_org_role=operator | () -> (list[CaseTypeaheadResult])
|
|
694
818
|
*
|
|
@@ -882,7 +1006,7 @@ export class Cases {
|
|
|
882
1006
|
});
|
|
883
1007
|
}
|
|
884
1008
|
/**
|
|
885
|
-
* Updates a case's
|
|
1009
|
+
* Updates a case's department and tag. | authz: min_org_role=operator | (CaseClientUpdate1) -> (bool)
|
|
886
1010
|
*
|
|
887
1011
|
* @param {string} caseId
|
|
888
1012
|
* @param {Chrt.operations.CaseClientUpdate1} request
|
|
@@ -13,8 +13,6 @@ export interface OrdersNewDraftReq {
|
|
|
13
13
|
/** Optional key, unique per caller org, that makes draft creation idempotent: re-sending the same key returns the already-created draft instead of creating a duplicate. */
|
|
14
14
|
creation_idempotency_key?: string | null;
|
|
15
15
|
department_id?: string | null;
|
|
16
|
-
/** If set, pins the first applied OperationsTask's deadline; later from_previous_task entries cascade from it. None anchors the chain to the apply time (now). */
|
|
17
|
-
initial_deadline_timestamp?: string | null;
|
|
18
16
|
/** Must be a URL-safe string of 1-64 characters. Allowed characters: A-Z, a-z, 0-9, '.', '_', '~', '-' (RFC 3986 unreserved). */
|
|
19
17
|
off_chrt_reference_id?: string | null;
|
|
20
18
|
off_chrt_shipper_org_id?: string | null;
|
|
@@ -24,6 +22,8 @@ export interface OrdersNewDraftReq {
|
|
|
24
22
|
order_thread_shipping_turn?: Chrt.ShippingTurnClientCreate1 | null;
|
|
25
23
|
/** Must be a string starting with `org_` */
|
|
26
24
|
shipper_org_id?: string | null;
|
|
27
|
-
/** OperationsTaskList
|
|
28
|
-
|
|
25
|
+
/** OperationsTaskList applications to apply to the coordinator's Case at order creation, each with its own optional first-deadline pin. */
|
|
26
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
27
|
+
/** OperationsTaskList applications to copy onto the coordinator's Case for deferred application when the draft order is staged. */
|
|
28
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
29
29
|
}
|
|
@@ -81,7 +81,8 @@ export declare class OrderTemplates {
|
|
|
81
81
|
* filter_case_tag: "filter_case_tag",
|
|
82
82
|
* filter_driver_id: "filter_driver_id",
|
|
83
83
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
84
|
-
*
|
|
84
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
85
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
85
86
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
86
87
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
87
88
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -162,7 +162,8 @@ export class OrderTemplates {
|
|
|
162
162
|
* filter_case_tag: "filter_case_tag",
|
|
163
163
|
* filter_driver_id: "filter_driver_id",
|
|
164
164
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
165
|
-
*
|
|
165
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
166
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
166
167
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
167
168
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
168
169
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -177,7 +178,7 @@ export class OrderTemplates {
|
|
|
177
178
|
__listV1() {
|
|
178
179
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
179
180
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
180
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_off_chrt_reference_id_str: filterOffChrtReferenceIdStr, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_id: filterOffChrtShipperOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_department_id: filterDepartmentId, filter_case_tag: filterCaseTag, filter_driver_id: filterDriverId, filter_directory_entry_id: filterDirectoryEntryId,
|
|
181
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_off_chrt_reference_id_str: filterOffChrtReferenceIdStr, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_id: filterOffChrtShipperOrgId, filter_coordinator_org_id: filterCoordinatorOrgId, filter_department_id: filterDepartmentId, filter_case_tag: filterCaseTag, filter_driver_id: filterDriverId, filter_directory_entry_id: filterDirectoryEntryId, filter_task_lists_to_apply_at_order_creation_task_list_id: filterTaskListsToApplyAtOrderCreationTaskListId, filter_task_lists_to_apply_at_order_staging_task_list_id: filterTaskListsToApplyAtOrderStagingTaskListId, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_last_edited_at_timestamp_gte: filterLastEditedAtTimestampGte, filter_last_edited_at_timestamp_lte: filterLastEditedAtTimestampLte, filter_last_used_at_timestamp_gte: filterLastUsedAtTimestampGte, filter_last_used_at_timestamp_lte: filterLastUsedAtTimestampLte, } = request;
|
|
181
182
|
const _queryParams = {};
|
|
182
183
|
if (sortBy !== undefined) {
|
|
183
184
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -224,8 +225,13 @@ export class OrderTemplates {
|
|
|
224
225
|
if (filterDirectoryEntryId !== undefined) {
|
|
225
226
|
_queryParams["filter_directory_entry_id"] = filterDirectoryEntryId;
|
|
226
227
|
}
|
|
227
|
-
if (
|
|
228
|
-
_queryParams["
|
|
228
|
+
if (filterTaskListsToApplyAtOrderCreationTaskListId !== undefined) {
|
|
229
|
+
_queryParams["filter_task_lists_to_apply_at_order_creation_task_list_id"] =
|
|
230
|
+
filterTaskListsToApplyAtOrderCreationTaskListId;
|
|
231
|
+
}
|
|
232
|
+
if (filterTaskListsToApplyAtOrderStagingTaskListId !== undefined) {
|
|
233
|
+
_queryParams["filter_task_lists_to_apply_at_order_staging_task_list_id"] =
|
|
234
|
+
filterTaskListsToApplyAtOrderStagingTaskListId;
|
|
229
235
|
}
|
|
230
236
|
if (filterCreatedAtTimestampGte !== undefined) {
|
|
231
237
|
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
@@ -24,6 +25,7 @@ export interface OrderTemplateClientCreate1 {
|
|
|
24
25
|
schema_version: number;
|
|
25
26
|
/** Must be a string starting with `org_` */
|
|
26
27
|
shipper_org_id?: string | null;
|
|
27
|
-
|
|
28
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
29
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
28
30
|
text?: string | null;
|
|
29
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {}
|
|
@@ -27,7 +28,8 @@ export interface OrderTemplateClientUpdate1 {
|
|
|
27
28
|
/** Must be a string starting with `org_` */
|
|
28
29
|
shipper_org_id?: string | null;
|
|
29
30
|
shipper_org_id__set_to_None?: boolean;
|
|
30
|
-
|
|
31
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
32
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
31
33
|
text?: string | null;
|
|
32
34
|
text__set_to_None?: boolean;
|
|
33
35
|
}
|
|
@@ -20,7 +20,8 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
20
20
|
* filter_case_tag: "filter_case_tag",
|
|
21
21
|
* filter_driver_id: "filter_driver_id",
|
|
22
22
|
* filter_directory_entry_id: "filter_directory_entry_id",
|
|
23
|
-
*
|
|
23
|
+
* filter_task_lists_to_apply_at_order_creation_task_list_id: "filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
24
|
+
* filter_task_lists_to_apply_at_order_staging_task_list_id: "filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
24
25
|
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
25
26
|
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
26
27
|
* filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -58,8 +59,10 @@ export interface OrderTemplatesListV1Request {
|
|
|
58
59
|
filter_driver_id?: string | null;
|
|
59
60
|
/** Filter by directory entry ID included in the template. */
|
|
60
61
|
filter_directory_entry_id?: string | null;
|
|
61
|
-
/** Filter by task list ID included in
|
|
62
|
-
|
|
62
|
+
/** Filter by task list ID included in order-creation applications. */
|
|
63
|
+
filter_task_lists_to_apply_at_order_creation_task_list_id?: string | null;
|
|
64
|
+
/** Filter by task list ID included in staging applications. */
|
|
65
|
+
filter_task_lists_to_apply_at_order_staging_task_list_id?: string | null;
|
|
63
66
|
/** Filter created_at_timestamp >= value (inclusive). */
|
|
64
67
|
filter_created_at_timestamp_gte?: string | null;
|
|
65
68
|
/** Filter created_at_timestamp <= value (inclusive). */
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
5
|
export interface OrderBuilderReq {
|
|
6
|
-
/** Per-build pin for the first applied OperationsTask's deadline (later from_previous_task entries cascade from it). Kept off the template so saved templates don't carry a stale absolute time; None anchors the chain to the build time. */
|
|
7
|
-
initial_deadline_timestamp?: string | null;
|
|
8
6
|
order_template_core?: Chrt.OrderTemplateCore1 | null;
|
|
9
7
|
order_template_id?: string | null;
|
|
10
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
4
5
|
export interface OrderTemplate1 {
|
|
5
6
|
_id: string;
|
|
6
7
|
archived_at_timestamp?: string | null;
|
|
@@ -26,6 +27,7 @@ export interface OrderTemplate1 {
|
|
|
26
27
|
schema_version: number;
|
|
27
28
|
/** Must be a string starting with `org_` */
|
|
28
29
|
shipper_org_id?: string | null;
|
|
29
|
-
|
|
30
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
31
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
30
32
|
text?: string | null;
|
|
31
33
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* Shared seed of an order build: the order text + long-lived references. Reused by the library template (OrderTemplateBase1) and the ad-hoc kickoff payload so the fields the builder seeds from can't drift. (Mirrors TaskCore1.)
|
|
6
7
|
*
|
|
@@ -19,6 +20,7 @@ export interface OrderTemplateCore1 {
|
|
|
19
20
|
schema_version: number;
|
|
20
21
|
/** Must be a string starting with `org_` */
|
|
21
22
|
shipper_org_id?: string | null;
|
|
22
|
-
|
|
23
|
+
task_lists_to_apply_at_order_creation?: Chrt.TaskListToApplyToCase1[];
|
|
24
|
+
task_lists_to_apply_at_order_staging?: Chrt.TaskListToApplyToCase1[];
|
|
23
25
|
text?: string | null;
|
|
24
26
|
}
|
|
@@ -410,6 +410,7 @@ export * from "./TaskGroupStatusEnum1.mjs";
|
|
|
410
410
|
export * from "./TaskGroupTypeEnum1.mjs";
|
|
411
411
|
export * from "./TaskGroupTypeaheadFieldEnum.mjs";
|
|
412
412
|
export * from "./TaskGroupTypeaheadResult.mjs";
|
|
413
|
+
export * from "./TaskListToApplyToCase1.mjs";
|
|
413
414
|
export * from "./TaskManifest1.mjs";
|
|
414
415
|
export * from "./TaskStatusEnum1.mjs";
|
|
415
416
|
export * from "./TaskWaitTimeGeofenceRes.mjs";
|
|
@@ -410,6 +410,7 @@ export * from "./TaskGroupStatusEnum1.mjs";
|
|
|
410
410
|
export * from "./TaskGroupTypeEnum1.mjs";
|
|
411
411
|
export * from "./TaskGroupTypeaheadFieldEnum.mjs";
|
|
412
412
|
export * from "./TaskGroupTypeaheadResult.mjs";
|
|
413
|
+
export * from "./TaskListToApplyToCase1.mjs";
|
|
413
414
|
export * from "./TaskManifest1.mjs";
|
|
414
415
|
export * from "./TaskStatusEnum1.mjs";
|
|
415
416
|
export * from "./TaskWaitTimeGeofenceRes.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.858.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.858.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -12050,6 +12050,156 @@ await client.operations.cases.getSuggestedDepartmentV1("case_id");
|
|
|
12050
12050
|
</dl>
|
|
12051
12051
|
</details>
|
|
12052
12052
|
|
|
12053
|
+
<details><summary><code>client.operations.cases.<a href="/src/api/resources/operations/resources/cases/client/Client.ts">addTaskListToApplyAtOrderStagingV1</a>(caseId, taskListId, { ...params }) -> boolean</code></summary>
|
|
12054
|
+
<dl>
|
|
12055
|
+
<dd>
|
|
12056
|
+
|
|
12057
|
+
#### 📝 Description
|
|
12058
|
+
|
|
12059
|
+
<dl>
|
|
12060
|
+
<dd>
|
|
12061
|
+
|
|
12062
|
+
<dl>
|
|
12063
|
+
<dd>
|
|
12064
|
+
|
|
12065
|
+
Adds a task list to apply when the order is staged. | authz: min_org_role=operator | (UTCDatetime | None) -> (bool)
|
|
12066
|
+
|
|
12067
|
+
</dd>
|
|
12068
|
+
</dl>
|
|
12069
|
+
</dd>
|
|
12070
|
+
</dl>
|
|
12071
|
+
|
|
12072
|
+
#### 🔌 Usage
|
|
12073
|
+
|
|
12074
|
+
<dl>
|
|
12075
|
+
<dd>
|
|
12076
|
+
|
|
12077
|
+
<dl>
|
|
12078
|
+
<dd>
|
|
12079
|
+
|
|
12080
|
+
```typescript
|
|
12081
|
+
await client.operations.cases.addTaskListToApplyAtOrderStagingV1("case_id", "task_list_id", "2024-01-15T09:30:00Z");
|
|
12082
|
+
```
|
|
12083
|
+
|
|
12084
|
+
</dd>
|
|
12085
|
+
</dl>
|
|
12086
|
+
</dd>
|
|
12087
|
+
</dl>
|
|
12088
|
+
|
|
12089
|
+
#### ⚙️ Parameters
|
|
12090
|
+
|
|
12091
|
+
<dl>
|
|
12092
|
+
<dd>
|
|
12093
|
+
|
|
12094
|
+
<dl>
|
|
12095
|
+
<dd>
|
|
12096
|
+
|
|
12097
|
+
**caseId:** `string`
|
|
12098
|
+
|
|
12099
|
+
</dd>
|
|
12100
|
+
</dl>
|
|
12101
|
+
|
|
12102
|
+
<dl>
|
|
12103
|
+
<dd>
|
|
12104
|
+
|
|
12105
|
+
**taskListId:** `string`
|
|
12106
|
+
|
|
12107
|
+
</dd>
|
|
12108
|
+
</dl>
|
|
12109
|
+
|
|
12110
|
+
<dl>
|
|
12111
|
+
<dd>
|
|
12112
|
+
|
|
12113
|
+
**request:** `string | null`
|
|
12114
|
+
|
|
12115
|
+
</dd>
|
|
12116
|
+
</dl>
|
|
12117
|
+
|
|
12118
|
+
<dl>
|
|
12119
|
+
<dd>
|
|
12120
|
+
|
|
12121
|
+
**requestOptions:** `Cases.RequestOptions`
|
|
12122
|
+
|
|
12123
|
+
</dd>
|
|
12124
|
+
</dl>
|
|
12125
|
+
</dd>
|
|
12126
|
+
</dl>
|
|
12127
|
+
|
|
12128
|
+
</dd>
|
|
12129
|
+
</dl>
|
|
12130
|
+
</details>
|
|
12131
|
+
|
|
12132
|
+
<details><summary><code>client.operations.cases.<a href="/src/api/resources/operations/resources/cases/client/Client.ts">removeTaskListToApplyAtOrderStagingV1</a>(caseId, taskListId) -> boolean</code></summary>
|
|
12133
|
+
<dl>
|
|
12134
|
+
<dd>
|
|
12135
|
+
|
|
12136
|
+
#### 📝 Description
|
|
12137
|
+
|
|
12138
|
+
<dl>
|
|
12139
|
+
<dd>
|
|
12140
|
+
|
|
12141
|
+
<dl>
|
|
12142
|
+
<dd>
|
|
12143
|
+
|
|
12144
|
+
Removes a pending staging task list to apply from a draft order case. | authz: min_org_role=operator | () -> (bool)
|
|
12145
|
+
|
|
12146
|
+
</dd>
|
|
12147
|
+
</dl>
|
|
12148
|
+
</dd>
|
|
12149
|
+
</dl>
|
|
12150
|
+
|
|
12151
|
+
#### 🔌 Usage
|
|
12152
|
+
|
|
12153
|
+
<dl>
|
|
12154
|
+
<dd>
|
|
12155
|
+
|
|
12156
|
+
<dl>
|
|
12157
|
+
<dd>
|
|
12158
|
+
|
|
12159
|
+
```typescript
|
|
12160
|
+
await client.operations.cases.removeTaskListToApplyAtOrderStagingV1("case_id", "task_list_id");
|
|
12161
|
+
```
|
|
12162
|
+
|
|
12163
|
+
</dd>
|
|
12164
|
+
</dl>
|
|
12165
|
+
</dd>
|
|
12166
|
+
</dl>
|
|
12167
|
+
|
|
12168
|
+
#### ⚙️ Parameters
|
|
12169
|
+
|
|
12170
|
+
<dl>
|
|
12171
|
+
<dd>
|
|
12172
|
+
|
|
12173
|
+
<dl>
|
|
12174
|
+
<dd>
|
|
12175
|
+
|
|
12176
|
+
**caseId:** `string`
|
|
12177
|
+
|
|
12178
|
+
</dd>
|
|
12179
|
+
</dl>
|
|
12180
|
+
|
|
12181
|
+
<dl>
|
|
12182
|
+
<dd>
|
|
12183
|
+
|
|
12184
|
+
**taskListId:** `string`
|
|
12185
|
+
|
|
12186
|
+
</dd>
|
|
12187
|
+
</dl>
|
|
12188
|
+
|
|
12189
|
+
<dl>
|
|
12190
|
+
<dd>
|
|
12191
|
+
|
|
12192
|
+
**requestOptions:** `Cases.RequestOptions`
|
|
12193
|
+
|
|
12194
|
+
</dd>
|
|
12195
|
+
</dl>
|
|
12196
|
+
</dd>
|
|
12197
|
+
</dl>
|
|
12198
|
+
|
|
12199
|
+
</dd>
|
|
12200
|
+
</dl>
|
|
12201
|
+
</details>
|
|
12202
|
+
|
|
12053
12203
|
<details><summary><code>client.operations.cases.<a href="/src/api/resources/operations/resources/cases/client/Client.ts">typeaheadV1</a>({ ...params }) -> Chrt.CaseTypeaheadResult[]</code></summary>
|
|
12054
12204
|
<dl>
|
|
12055
12205
|
<dd>
|
|
@@ -12264,7 +12414,7 @@ await client.operations.cases.getV1("case_id");
|
|
|
12264
12414
|
<dl>
|
|
12265
12415
|
<dd>
|
|
12266
12416
|
|
|
12267
|
-
Updates a case's
|
|
12417
|
+
Updates a case's department and tag. | authz: min_org_role=operator | (CaseClientUpdate1) -> (bool)
|
|
12268
12418
|
|
|
12269
12419
|
</dd>
|
|
12270
12420
|
</dl>
|
|
@@ -21025,7 +21175,10 @@ await client.shipping.orderTemplates.listV1({
|
|
|
21025
21175
|
filter_case_tag: "filter_case_tag",
|
|
21026
21176
|
filter_driver_id: "filter_driver_id",
|
|
21027
21177
|
filter_directory_entry_id: "filter_directory_entry_id",
|
|
21028
|
-
|
|
21178
|
+
filter_task_lists_to_apply_at_order_creation_task_list_id:
|
|
21179
|
+
"filter_task_lists_to_apply_at_order_creation_task_list_id",
|
|
21180
|
+
filter_task_lists_to_apply_at_order_staging_task_list_id:
|
|
21181
|
+
"filter_task_lists_to_apply_at_order_staging_task_list_id",
|
|
21029
21182
|
filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
21030
21183
|
filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
21031
21184
|
filter_last_edited_at_timestamp_gte: "2024-01-15T09:30:00Z",
|