@chrt-inc/typescript-sdk 1.919.0 → 1.920.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/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientUpdate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/resources/taskGroups/client/requests/OrderTemplateNewTaskGroupClientCreate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/resources/taskGroups/client/requests/OrderTemplateNewTaskGroupClientUpdate1.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +19 -5
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +71 -8
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateDepartmentAndLabelReq.d.ts → OrdersUpdateDepartmentReq.d.ts} +1 -3
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelReq.d.ts +11 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelReq.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/types/OrderTemplateNew1.d.ts +1 -0
- package/dist/cjs/api/types/OrderTemplateNewCore1.d.ts +1 -0
- package/dist/cjs/api/types/OrderTemplateNewTaskGroup1.d.ts +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/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplateNewClientUpdate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/resources/taskGroups/client/requests/OrderTemplateNewTaskGroupClientCreate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/resources/taskGroups/client/requests/OrderTemplateNewTaskGroupClientUpdate1.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +19 -5
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +71 -8
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateDepartmentAndLabelReq.d.mts → OrdersUpdateDepartmentReq.d.mts} +1 -3
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelReq.d.mts +11 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/OrdersUpdateLabelReq.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/requests/index.d.mts +2 -1
- package/dist/esm/api/types/OrderTemplateNew1.d.mts +1 -0
- package/dist/esm/api/types/OrderTemplateNewCore1.d.mts +1 -0
- package/dist/esm/api/types/OrderTemplateNewTaskGroup1.d.mts +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 +75 -4
- /package/dist/cjs/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateDepartmentAndLabelReq.js → OrdersUpdateDepartmentReq.js} +0 -0
- /package/dist/esm/api/resources/shipping/resources/orders/client/requests/{OrdersUpdateDepartmentAndLabelReq.mjs → OrdersUpdateDepartmentReq.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -58,8 +58,8 @@ class ChrtClient {
|
|
|
58
58
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
59
59
|
"X-Fern-Language": "JavaScript",
|
|
60
60
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
61
|
-
"X-Fern-SDK-Version": "1.
|
|
62
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
61
|
+
"X-Fern-SDK-Version": "1.920.0",
|
|
62
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.920.0",
|
|
63
63
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
64
64
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
65
65
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -11,6 +11,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface OrderTemplateNewClientCreate1 {
|
|
13
13
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
14
|
+
coordinator_assigned_user_ids?: string[];
|
|
14
15
|
coordinator_department_id?: string | null;
|
|
15
16
|
coordinator_label?: string | null;
|
|
16
17
|
/** Must be a string starting with `org_` */
|
|
@@ -7,6 +7,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface OrderTemplateNewClientUpdate1 {
|
|
10
|
+
coordinator_assigned_user_ids?: string[];
|
|
10
11
|
coordinator_department_id?: string | null;
|
|
11
12
|
coordinator_department_id__set_to_None?: boolean;
|
|
12
13
|
coordinator_label?: string | null;
|
|
@@ -11,6 +11,7 @@ import * as Chrt from "../../../../../../../../index.js";
|
|
|
11
11
|
export interface OrderTemplateNewTaskGroupClientCreate1 {
|
|
12
12
|
coordinator_setup_notes?: string | null;
|
|
13
13
|
driver_id?: string | null;
|
|
14
|
+
executor_assigned_user_ids?: string[];
|
|
14
15
|
/** Must be a string starting with `org_` */
|
|
15
16
|
executor_org_id?: string | null;
|
|
16
17
|
off_chrt_executor_org_data_id?: string | null;
|
|
@@ -11,6 +11,7 @@ export interface OrderTemplateNewTaskGroupClientUpdate1 {
|
|
|
11
11
|
coordinator_setup_notes__set_to_None?: boolean;
|
|
12
12
|
driver_id?: string | null;
|
|
13
13
|
driver_id__set_to_None?: boolean;
|
|
14
|
+
executor_assigned_user_ids?: string[];
|
|
14
15
|
/** Must be a string starting with `org_` */
|
|
15
16
|
executor_org_id?: string | null;
|
|
16
17
|
executor_org_id__set_to_None?: boolean;
|
|
@@ -155,19 +155,33 @@ export declare class Orders {
|
|
|
155
155
|
unassignV1(orderId: string, request: Chrt.shipping.OrdersUnassignReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
156
156
|
private __unassignV1;
|
|
157
157
|
/**
|
|
158
|
-
* Updates department_id
|
|
158
|
+
* Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
|
|
159
159
|
*
|
|
160
160
|
* @param {string} orderId
|
|
161
|
-
* @param {Chrt.shipping.
|
|
161
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentReq} request
|
|
162
162
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
163
|
*
|
|
164
164
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
165
165
|
*
|
|
166
166
|
* @example
|
|
167
|
-
* await client.shipping.orders.
|
|
167
|
+
* await client.shipping.orders.updateDepartmentV1("order_id")
|
|
168
168
|
*/
|
|
169
|
-
|
|
170
|
-
private
|
|
169
|
+
updateDepartmentV1(orderId: string, request?: Chrt.shipping.OrdersUpdateDepartmentReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
170
|
+
private __updateDepartmentV1;
|
|
171
|
+
/**
|
|
172
|
+
* Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
173
|
+
*
|
|
174
|
+
* @param {string} orderId
|
|
175
|
+
* @param {Chrt.shipping.OrdersUpdateLabelReq} request
|
|
176
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* await client.shipping.orders.updateLabelV1("order_id")
|
|
182
|
+
*/
|
|
183
|
+
updateLabelV1(orderId: string, request?: Chrt.shipping.OrdersUpdateLabelReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
184
|
+
private __updateLabelV1;
|
|
171
185
|
/**
|
|
172
186
|
* Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
|
|
173
187
|
*
|
|
@@ -573,26 +573,26 @@ class Orders {
|
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
575
|
/**
|
|
576
|
-
* Updates department_id
|
|
576
|
+
* Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
|
|
577
577
|
*
|
|
578
578
|
* @param {string} orderId
|
|
579
|
-
* @param {Chrt.shipping.
|
|
579
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentReq} request
|
|
580
580
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
581
581
|
*
|
|
582
582
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
583
583
|
*
|
|
584
584
|
* @example
|
|
585
|
-
* await client.shipping.orders.
|
|
585
|
+
* await client.shipping.orders.updateDepartmentV1("order_id")
|
|
586
586
|
*/
|
|
587
|
-
|
|
588
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
587
|
+
updateDepartmentV1(orderId, request = {}, requestOptions) {
|
|
588
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDepartmentV1(orderId, request, requestOptions));
|
|
589
589
|
}
|
|
590
|
-
|
|
590
|
+
__updateDepartmentV1(orderId_1) {
|
|
591
591
|
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
592
592
|
var _a, _b, _c, _d;
|
|
593
593
|
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);
|
|
594
594
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
595
|
-
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/
|
|
595
|
+
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_department/v1/${encodeURIComponent(orderId)}`),
|
|
596
596
|
method: "PATCH",
|
|
597
597
|
headers: _headers,
|
|
598
598
|
contentType: "application/json",
|
|
@@ -626,7 +626,70 @@ class Orders {
|
|
|
626
626
|
rawResponse: _response.rawResponse,
|
|
627
627
|
});
|
|
628
628
|
case "timeout":
|
|
629
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/
|
|
629
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_department/v1/{order_id}.");
|
|
630
|
+
case "unknown":
|
|
631
|
+
throw new errors.ChrtError({
|
|
632
|
+
message: _response.error.errorMessage,
|
|
633
|
+
rawResponse: _response.rawResponse,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
640
|
+
*
|
|
641
|
+
* @param {string} orderId
|
|
642
|
+
* @param {Chrt.shipping.OrdersUpdateLabelReq} request
|
|
643
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
644
|
+
*
|
|
645
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
646
|
+
*
|
|
647
|
+
* @example
|
|
648
|
+
* await client.shipping.orders.updateLabelV1("order_id")
|
|
649
|
+
*/
|
|
650
|
+
updateLabelV1(orderId, request = {}, requestOptions) {
|
|
651
|
+
return core.HttpResponsePromise.fromPromise(this.__updateLabelV1(orderId, request, requestOptions));
|
|
652
|
+
}
|
|
653
|
+
__updateLabelV1(orderId_1) {
|
|
654
|
+
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
655
|
+
var _a, _b, _c, _d;
|
|
656
|
+
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);
|
|
657
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
658
|
+
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_label/v1/${encodeURIComponent(orderId)}`),
|
|
659
|
+
method: "PATCH",
|
|
660
|
+
headers: _headers,
|
|
661
|
+
contentType: "application/json",
|
|
662
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
663
|
+
requestType: "json",
|
|
664
|
+
body: request,
|
|
665
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
666
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
667
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
668
|
+
});
|
|
669
|
+
if (_response.ok) {
|
|
670
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
671
|
+
}
|
|
672
|
+
if (_response.error.reason === "status-code") {
|
|
673
|
+
switch (_response.error.statusCode) {
|
|
674
|
+
case 422:
|
|
675
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
676
|
+
default:
|
|
677
|
+
throw new errors.ChrtError({
|
|
678
|
+
statusCode: _response.error.statusCode,
|
|
679
|
+
body: _response.error.body,
|
|
680
|
+
rawResponse: _response.rawResponse,
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
switch (_response.error.reason) {
|
|
685
|
+
case "non-json":
|
|
686
|
+
throw new errors.ChrtError({
|
|
687
|
+
statusCode: _response.error.statusCode,
|
|
688
|
+
body: _response.error.rawBody,
|
|
689
|
+
rawResponse: _response.rawResponse,
|
|
690
|
+
});
|
|
691
|
+
case "timeout":
|
|
692
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_label/v1/{order_id}.");
|
|
630
693
|
case "unknown":
|
|
631
694
|
throw new errors.ChrtError({
|
|
632
695
|
message: _response.error.errorMessage,
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {}
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface OrdersUpdateDepartmentReq {
|
|
9
9
|
department_id?: string | null;
|
|
10
10
|
department_id__set_to_None?: boolean;
|
|
11
|
-
label?: string | null;
|
|
12
|
-
label__set_to_None?: boolean;
|
|
13
11
|
}
|
|
@@ -3,5 +3,6 @@ export { type OrdersCancelManyReq } from "./OrdersCancelManyReq.js";
|
|
|
3
3
|
export { type OrdersTypeaheadLabelV1Request } from "./OrdersTypeaheadLabelV1Request.js";
|
|
4
4
|
export { type OrdersTypeaheadV1Request } from "./OrdersTypeaheadV1Request.js";
|
|
5
5
|
export { type OrdersUnassignReq } from "./OrdersUnassignReq.js";
|
|
6
|
-
export { type
|
|
6
|
+
export { type OrdersUpdateDepartmentReq } from "./OrdersUpdateDepartmentReq.js";
|
|
7
|
+
export { type OrdersUpdateLabelReq } from "./OrdersUpdateLabelReq.js";
|
|
7
8
|
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.js";
|
|
@@ -6,6 +6,7 @@ export interface OrderTemplateNew1 {
|
|
|
6
6
|
_id: string;
|
|
7
7
|
archived_at_timestamp?: string | null;
|
|
8
8
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
9
|
+
coordinator_assigned_user_ids?: string[];
|
|
9
10
|
coordinator_department_id?: string | null;
|
|
10
11
|
coordinator_label?: string | null;
|
|
11
12
|
/** Must be a string starting with `org_` */
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as Chrt from "../index.js";
|
|
5
5
|
export interface OrderTemplateNewCore1 {
|
|
6
6
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
7
|
+
coordinator_assigned_user_ids?: string[];
|
|
7
8
|
coordinator_department_id?: string | null;
|
|
8
9
|
coordinator_label?: string | null;
|
|
9
10
|
/** Must be a string starting with `org_` */
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.js";
|
|
|
5
5
|
export interface OrderTemplateNewTaskGroup1 {
|
|
6
6
|
coordinator_setup_notes?: string | null;
|
|
7
7
|
driver_id?: string | null;
|
|
8
|
+
executor_assigned_user_ids?: string[];
|
|
8
9
|
/** Must be a string starting with `org_` */
|
|
9
10
|
executor_org_id?: string | null;
|
|
10
11
|
off_chrt_executor_org_data_id?: string | null;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.920.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -22,8 +22,8 @@ export class ChrtClient {
|
|
|
22
22
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
23
23
|
"X-Fern-Language": "JavaScript",
|
|
24
24
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
25
|
-
"X-Fern-SDK-Version": "1.
|
|
26
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
25
|
+
"X-Fern-SDK-Version": "1.920.0",
|
|
26
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.920.0",
|
|
27
27
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
28
28
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
29
29
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -11,6 +11,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface OrderTemplateNewClientCreate1 {
|
|
13
13
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
14
|
+
coordinator_assigned_user_ids?: string[];
|
|
14
15
|
coordinator_department_id?: string | null;
|
|
15
16
|
coordinator_label?: string | null;
|
|
16
17
|
/** Must be a string starting with `org_` */
|
|
@@ -7,6 +7,7 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface OrderTemplateNewClientUpdate1 {
|
|
10
|
+
coordinator_assigned_user_ids?: string[];
|
|
10
11
|
coordinator_department_id?: string | null;
|
|
11
12
|
coordinator_department_id__set_to_None?: boolean;
|
|
12
13
|
coordinator_label?: string | null;
|
|
@@ -11,6 +11,7 @@ import * as Chrt from "../../../../../../../../index.mjs";
|
|
|
11
11
|
export interface OrderTemplateNewTaskGroupClientCreate1 {
|
|
12
12
|
coordinator_setup_notes?: string | null;
|
|
13
13
|
driver_id?: string | null;
|
|
14
|
+
executor_assigned_user_ids?: string[];
|
|
14
15
|
/** Must be a string starting with `org_` */
|
|
15
16
|
executor_org_id?: string | null;
|
|
16
17
|
off_chrt_executor_org_data_id?: string | null;
|
|
@@ -11,6 +11,7 @@ export interface OrderTemplateNewTaskGroupClientUpdate1 {
|
|
|
11
11
|
coordinator_setup_notes__set_to_None?: boolean;
|
|
12
12
|
driver_id?: string | null;
|
|
13
13
|
driver_id__set_to_None?: boolean;
|
|
14
|
+
executor_assigned_user_ids?: string[];
|
|
14
15
|
/** Must be a string starting with `org_` */
|
|
15
16
|
executor_org_id?: string | null;
|
|
16
17
|
executor_org_id__set_to_None?: boolean;
|
|
@@ -155,19 +155,33 @@ export declare class Orders {
|
|
|
155
155
|
unassignV1(orderId: string, request: Chrt.shipping.OrdersUnassignReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
156
156
|
private __unassignV1;
|
|
157
157
|
/**
|
|
158
|
-
* Updates department_id
|
|
158
|
+
* Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
|
|
159
159
|
*
|
|
160
160
|
* @param {string} orderId
|
|
161
|
-
* @param {Chrt.shipping.
|
|
161
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentReq} request
|
|
162
162
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
163
|
*
|
|
164
164
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
165
165
|
*
|
|
166
166
|
* @example
|
|
167
|
-
* await client.shipping.orders.
|
|
167
|
+
* await client.shipping.orders.updateDepartmentV1("order_id")
|
|
168
168
|
*/
|
|
169
|
-
|
|
170
|
-
private
|
|
169
|
+
updateDepartmentV1(orderId: string, request?: Chrt.shipping.OrdersUpdateDepartmentReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
170
|
+
private __updateDepartmentV1;
|
|
171
|
+
/**
|
|
172
|
+
* Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
173
|
+
*
|
|
174
|
+
* @param {string} orderId
|
|
175
|
+
* @param {Chrt.shipping.OrdersUpdateLabelReq} request
|
|
176
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* await client.shipping.orders.updateLabelV1("order_id")
|
|
182
|
+
*/
|
|
183
|
+
updateLabelV1(orderId: string, request?: Chrt.shipping.OrdersUpdateLabelReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
184
|
+
private __updateLabelV1;
|
|
171
185
|
/**
|
|
172
186
|
* Updates off_chrt_reference_id on a non-draft order. | authz_personas=[order_creator_org_operators] | (OrdersUpdateOffChrtReferenceIdReq) -> (OrdersUpdateOffChrtReferenceIdRes)
|
|
173
187
|
*
|
|
@@ -537,26 +537,26 @@ export class Orders {
|
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
/**
|
|
540
|
-
* Updates department_id
|
|
540
|
+
* Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
|
|
541
541
|
*
|
|
542
542
|
* @param {string} orderId
|
|
543
|
-
* @param {Chrt.shipping.
|
|
543
|
+
* @param {Chrt.shipping.OrdersUpdateDepartmentReq} request
|
|
544
544
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
545
545
|
*
|
|
546
546
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
547
547
|
*
|
|
548
548
|
* @example
|
|
549
|
-
* await client.shipping.orders.
|
|
549
|
+
* await client.shipping.orders.updateDepartmentV1("order_id")
|
|
550
550
|
*/
|
|
551
|
-
|
|
552
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
551
|
+
updateDepartmentV1(orderId, request = {}, requestOptions) {
|
|
552
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDepartmentV1(orderId, request, requestOptions));
|
|
553
553
|
}
|
|
554
|
-
|
|
554
|
+
__updateDepartmentV1(orderId_1) {
|
|
555
555
|
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
556
556
|
var _a, _b, _c, _d;
|
|
557
557
|
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);
|
|
558
558
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
559
|
-
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/
|
|
559
|
+
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_department/v1/${encodeURIComponent(orderId)}`),
|
|
560
560
|
method: "PATCH",
|
|
561
561
|
headers: _headers,
|
|
562
562
|
contentType: "application/json",
|
|
@@ -590,7 +590,70 @@ export class Orders {
|
|
|
590
590
|
rawResponse: _response.rawResponse,
|
|
591
591
|
});
|
|
592
592
|
case "timeout":
|
|
593
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/
|
|
593
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_department/v1/{order_id}.");
|
|
594
|
+
case "unknown":
|
|
595
|
+
throw new errors.ChrtError({
|
|
596
|
+
message: _response.error.errorMessage,
|
|
597
|
+
rawResponse: _response.rawResponse,
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
604
|
+
*
|
|
605
|
+
* @param {string} orderId
|
|
606
|
+
* @param {Chrt.shipping.OrdersUpdateLabelReq} request
|
|
607
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
608
|
+
*
|
|
609
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
610
|
+
*
|
|
611
|
+
* @example
|
|
612
|
+
* await client.shipping.orders.updateLabelV1("order_id")
|
|
613
|
+
*/
|
|
614
|
+
updateLabelV1(orderId, request = {}, requestOptions) {
|
|
615
|
+
return core.HttpResponsePromise.fromPromise(this.__updateLabelV1(orderId, request, requestOptions));
|
|
616
|
+
}
|
|
617
|
+
__updateLabelV1(orderId_1) {
|
|
618
|
+
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
619
|
+
var _a, _b, _c, _d;
|
|
620
|
+
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);
|
|
621
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
622
|
+
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_label/v1/${encodeURIComponent(orderId)}`),
|
|
623
|
+
method: "PATCH",
|
|
624
|
+
headers: _headers,
|
|
625
|
+
contentType: "application/json",
|
|
626
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
627
|
+
requestType: "json",
|
|
628
|
+
body: request,
|
|
629
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
630
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
631
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
632
|
+
});
|
|
633
|
+
if (_response.ok) {
|
|
634
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
635
|
+
}
|
|
636
|
+
if (_response.error.reason === "status-code") {
|
|
637
|
+
switch (_response.error.statusCode) {
|
|
638
|
+
case 422:
|
|
639
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
640
|
+
default:
|
|
641
|
+
throw new errors.ChrtError({
|
|
642
|
+
statusCode: _response.error.statusCode,
|
|
643
|
+
body: _response.error.body,
|
|
644
|
+
rawResponse: _response.rawResponse,
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
switch (_response.error.reason) {
|
|
649
|
+
case "non-json":
|
|
650
|
+
throw new errors.ChrtError({
|
|
651
|
+
statusCode: _response.error.statusCode,
|
|
652
|
+
body: _response.error.rawBody,
|
|
653
|
+
rawResponse: _response.rawResponse,
|
|
654
|
+
});
|
|
655
|
+
case "timeout":
|
|
656
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /shipping/orders/update_label/v1/{order_id}.");
|
|
594
657
|
case "unknown":
|
|
595
658
|
throw new errors.ChrtError({
|
|
596
659
|
message: _response.error.errorMessage,
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {}
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface OrdersUpdateDepartmentReq {
|
|
9
9
|
department_id?: string | null;
|
|
10
10
|
department_id__set_to_None?: boolean;
|
|
11
|
-
label?: string | null;
|
|
12
|
-
label__set_to_None?: boolean;
|
|
13
11
|
}
|
|
@@ -3,5 +3,6 @@ export { type OrdersCancelManyReq } from "./OrdersCancelManyReq.mjs";
|
|
|
3
3
|
export { type OrdersTypeaheadLabelV1Request } from "./OrdersTypeaheadLabelV1Request.mjs";
|
|
4
4
|
export { type OrdersTypeaheadV1Request } from "./OrdersTypeaheadV1Request.mjs";
|
|
5
5
|
export { type OrdersUnassignReq } from "./OrdersUnassignReq.mjs";
|
|
6
|
-
export { type
|
|
6
|
+
export { type OrdersUpdateDepartmentReq } from "./OrdersUpdateDepartmentReq.mjs";
|
|
7
|
+
export { type OrdersUpdateLabelReq } from "./OrdersUpdateLabelReq.mjs";
|
|
7
8
|
export { type OrdersUpdateOffChrtReferenceIdReq } from "./OrdersUpdateOffChrtReferenceIdReq.mjs";
|
|
@@ -6,6 +6,7 @@ export interface OrderTemplateNew1 {
|
|
|
6
6
|
_id: string;
|
|
7
7
|
archived_at_timestamp?: string | null;
|
|
8
8
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
9
|
+
coordinator_assigned_user_ids?: string[];
|
|
9
10
|
coordinator_department_id?: string | null;
|
|
10
11
|
coordinator_label?: string | null;
|
|
11
12
|
/** Must be a string starting with `org_` */
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
5
|
export interface OrderTemplateNewCore1 {
|
|
6
6
|
cargos?: Chrt.OrderTemplateNewCargo1[];
|
|
7
|
+
coordinator_assigned_user_ids?: string[];
|
|
7
8
|
coordinator_department_id?: string | null;
|
|
8
9
|
coordinator_label?: string | null;
|
|
9
10
|
/** Must be a string starting with `org_` */
|
|
@@ -5,6 +5,7 @@ import * as Chrt from "../index.mjs";
|
|
|
5
5
|
export interface OrderTemplateNewTaskGroup1 {
|
|
6
6
|
coordinator_setup_notes?: string | null;
|
|
7
7
|
driver_id?: string | null;
|
|
8
|
+
executor_assigned_user_ids?: string[];
|
|
8
9
|
/** Must be a string starting with `org_` */
|
|
9
10
|
executor_org_id?: string | null;
|
|
10
11
|
off_chrt_executor_org_data_id?: string | null;
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.920.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.920.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -23651,7 +23651,7 @@ await client.shipping.orders.unassignV1("order_id", {
|
|
|
23651
23651
|
</dl>
|
|
23652
23652
|
</details>
|
|
23653
23653
|
|
|
23654
|
-
<details><summary><code>client.shipping.orders.<a href="/src/api/resources/shipping/resources/orders/client/Client.ts">
|
|
23654
|
+
<details><summary><code>client.shipping.orders.<a href="/src/api/resources/shipping/resources/orders/client/Client.ts">updateDepartmentV1</a>(orderId, { ...params }) -> boolean</code></summary>
|
|
23655
23655
|
<dl>
|
|
23656
23656
|
<dd>
|
|
23657
23657
|
|
|
@@ -23663,7 +23663,7 @@ await client.shipping.orders.unassignV1("order_id", {
|
|
|
23663
23663
|
<dl>
|
|
23664
23664
|
<dd>
|
|
23665
23665
|
|
|
23666
|
-
Updates
|
|
23666
|
+
Updates department_id for the caller's role on the order. Coordinator writes coordinator_department_id; executor writes executor_department_id on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateDepartmentReq) -> (bool)
|
|
23667
23667
|
|
|
23668
23668
|
</dd>
|
|
23669
23669
|
</dl>
|
|
@@ -23679,7 +23679,7 @@ Updates department*id and/or label for the caller's role on the order. Coordinat
|
|
|
23679
23679
|
<dd>
|
|
23680
23680
|
|
|
23681
23681
|
```typescript
|
|
23682
|
-
await client.shipping.orders.
|
|
23682
|
+
await client.shipping.orders.updateDepartmentV1("order_id");
|
|
23683
23683
|
```
|
|
23684
23684
|
|
|
23685
23685
|
</dd>
|
|
@@ -23703,7 +23703,78 @@ await client.shipping.orders.updateDepartmentAndLabelV1("order_id");
|
|
|
23703
23703
|
<dl>
|
|
23704
23704
|
<dd>
|
|
23705
23705
|
|
|
23706
|
-
**request:** `Chrt.shipping.
|
|
23706
|
+
**request:** `Chrt.shipping.OrdersUpdateDepartmentReq`
|
|
23707
|
+
|
|
23708
|
+
</dd>
|
|
23709
|
+
</dl>
|
|
23710
|
+
|
|
23711
|
+
<dl>
|
|
23712
|
+
<dd>
|
|
23713
|
+
|
|
23714
|
+
**requestOptions:** `Orders.RequestOptions`
|
|
23715
|
+
|
|
23716
|
+
</dd>
|
|
23717
|
+
</dl>
|
|
23718
|
+
</dd>
|
|
23719
|
+
</dl>
|
|
23720
|
+
|
|
23721
|
+
</dd>
|
|
23722
|
+
</dl>
|
|
23723
|
+
</details>
|
|
23724
|
+
|
|
23725
|
+
<details><summary><code>client.shipping.orders.<a href="/src/api/resources/shipping/resources/orders/client/Client.ts">updateLabelV1</a>(orderId, { ...params }) -> boolean</code></summary>
|
|
23726
|
+
<dl>
|
|
23727
|
+
<dd>
|
|
23728
|
+
|
|
23729
|
+
#### 📝 Description
|
|
23730
|
+
|
|
23731
|
+
<dl>
|
|
23732
|
+
<dd>
|
|
23733
|
+
|
|
23734
|
+
<dl>
|
|
23735
|
+
<dd>
|
|
23736
|
+
|
|
23737
|
+
Updates label for the caller's role on the order. Coordinator writes coordinator_label; executor writes executor_label on matching task_group_details rows. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersUpdateLabelReq) -> (bool)
|
|
23738
|
+
|
|
23739
|
+
</dd>
|
|
23740
|
+
</dl>
|
|
23741
|
+
</dd>
|
|
23742
|
+
</dl>
|
|
23743
|
+
|
|
23744
|
+
#### 🔌 Usage
|
|
23745
|
+
|
|
23746
|
+
<dl>
|
|
23747
|
+
<dd>
|
|
23748
|
+
|
|
23749
|
+
<dl>
|
|
23750
|
+
<dd>
|
|
23751
|
+
|
|
23752
|
+
```typescript
|
|
23753
|
+
await client.shipping.orders.updateLabelV1("order_id");
|
|
23754
|
+
```
|
|
23755
|
+
|
|
23756
|
+
</dd>
|
|
23757
|
+
</dl>
|
|
23758
|
+
</dd>
|
|
23759
|
+
</dl>
|
|
23760
|
+
|
|
23761
|
+
#### ⚙️ Parameters
|
|
23762
|
+
|
|
23763
|
+
<dl>
|
|
23764
|
+
<dd>
|
|
23765
|
+
|
|
23766
|
+
<dl>
|
|
23767
|
+
<dd>
|
|
23768
|
+
|
|
23769
|
+
**orderId:** `string`
|
|
23770
|
+
|
|
23771
|
+
</dd>
|
|
23772
|
+
</dl>
|
|
23773
|
+
|
|
23774
|
+
<dl>
|
|
23775
|
+
<dd>
|
|
23776
|
+
|
|
23777
|
+
**request:** `Chrt.shipping.OrdersUpdateLabelReq`
|
|
23707
23778
|
|
|
23708
23779
|
</dd>
|
|
23709
23780
|
</dl>
|
|
File without changes
|