@chrt-inc/typescript-sdk 1.949.0 → 1.959.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/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.js +5 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/shipping/resources/orders/client/Client.js +14 -9
- package/dist/cjs/api/resources/shipping/resources/orders/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/index.js +3 -1
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.d.ts +71 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.js +231 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/OrderEventsListV1Request.d.ts +36 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/OrderEventsListV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/index.js +17 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +1 -1
- package/dist/cjs/api/types/Order1.d.ts +42 -0
- package/dist/cjs/api/types/Order1.js +5 -0
- package/dist/cjs/api/types/OrderEventActionEnum1.d.ts +67 -0
- package/dist/cjs/api/types/OrderEventActionEnum1.js +66 -0
- package/dist/cjs/api/types/OrderEventActor1.d.ts +11 -0
- package/dist/cjs/api/types/OrderEventActor1.js +5 -0
- package/dist/cjs/api/types/OrderEventEntity1.d.ts +16 -0
- package/dist/cjs/api/types/OrderEventEntity1.js +5 -0
- package/dist/cjs/api/types/OrderEventExpanded1.d.ts +16 -0
- package/dist/cjs/api/types/OrderEventExpanded1.js +5 -0
- package/dist/cjs/api/types/OrderEventListRes.d.ts +8 -0
- package/dist/cjs/api/types/OrderEventListRes.js +5 -0
- package/dist/cjs/api/types/OrderEventSortByEnum.d.ts +4 -0
- package/dist/cjs/api/types/OrderEventSortByEnum.js +5 -0
- package/dist/cjs/api/types/OrderEventSystemActorEnum1.d.ts +13 -0
- package/dist/cjs/api/types/OrderEventSystemActorEnum1.js +15 -0
- package/dist/cjs/api/types/index.d.ts +8 -0
- package/dist/cjs/api/types/index.js +8 -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/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.mjs +5 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/shipping/resources/orders/client/Client.mjs +6 -1
- package/dist/esm/api/resources/shipping/resources/orders/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/index.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.d.mts +71 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.mjs +194 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/OrderEventsListV1Request.d.mts +36 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/OrderEventsListV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orders/resources/orderEvents/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +1 -1
- package/dist/esm/api/types/Order1.d.mts +42 -0
- package/dist/esm/api/types/Order1.mjs +4 -0
- package/dist/esm/api/types/OrderEventActionEnum1.d.mts +67 -0
- package/dist/esm/api/types/OrderEventActionEnum1.mjs +63 -0
- package/dist/esm/api/types/OrderEventActor1.d.mts +11 -0
- package/dist/esm/api/types/OrderEventActor1.mjs +4 -0
- package/dist/esm/api/types/OrderEventEntity1.d.mts +16 -0
- package/dist/esm/api/types/OrderEventEntity1.mjs +4 -0
- package/dist/esm/api/types/OrderEventExpanded1.d.mts +16 -0
- package/dist/esm/api/types/OrderEventExpanded1.mjs +4 -0
- package/dist/esm/api/types/OrderEventListRes.d.mts +8 -0
- package/dist/esm/api/types/OrderEventListRes.mjs +4 -0
- package/dist/esm/api/types/OrderEventSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/OrderEventSortByEnum.mjs +4 -0
- package/dist/esm/api/types/OrderEventSystemActorEnum1.d.mts +13 -0
- package/dist/esm/api/types/OrderEventSystemActorEnum1.mjs +12 -0
- package/dist/esm/api/types/index.d.mts +8 -0
- package/dist/esm/api/types/index.mjs +8 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +168 -33
package/dist/cjs/Client.js
CHANGED
|
@@ -60,8 +60,8 @@ class ChrtClient {
|
|
|
60
60
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
61
61
|
"X-Fern-Language": "JavaScript",
|
|
62
62
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
63
|
-
"X-Fern-SDK-Version": "1.
|
|
64
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
63
|
+
"X-Fern-SDK-Version": "1.959.0",
|
|
64
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.959.0",
|
|
65
65
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
66
66
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
67
67
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -70,7 +70,7 @@ export declare class Flights {
|
|
|
70
70
|
getFlightStatusForFlightLegV1(flightLegId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightLeg1>;
|
|
71
71
|
private __getFlightStatusForFlightLegV1;
|
|
72
72
|
/**
|
|
73
|
-
* Returns the
|
|
73
|
+
* Returns the Cirium positional track for a flight leg; pass force_refresh=true to bypass the cache. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, order_executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
74
74
|
*
|
|
75
75
|
* @param {string} flightLegId
|
|
76
76
|
* @param {Chrt.shipping.FlightsGetFlightTrackForFlightLegV1Request} request
|
|
@@ -233,7 +233,7 @@ class Flights {
|
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
-
* Returns the
|
|
236
|
+
* Returns the Cirium positional track for a flight leg; pass force_refresh=true to bypass the cache. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, order_executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
237
237
|
*
|
|
238
238
|
* @param {string} flightLegId
|
|
239
239
|
* @param {Chrt.shipping.FlightsGetFlightTrackForFlightLegV1Request} request
|
|
@@ -104,6 +104,7 @@ export declare class OrderTemplatesNew {
|
|
|
104
104
|
* search: "search",
|
|
105
105
|
* filter_archived: true,
|
|
106
106
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
107
|
+
* filter_coordinator_label: "filter_coordinator_label",
|
|
107
108
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
108
109
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
109
110
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -284,6 +284,7 @@ class OrderTemplatesNew {
|
|
|
284
284
|
* search: "search",
|
|
285
285
|
* filter_archived: true,
|
|
286
286
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
287
|
+
* filter_coordinator_label: "filter_coordinator_label",
|
|
287
288
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
288
289
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
289
290
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -303,7 +304,7 @@ class OrderTemplatesNew {
|
|
|
303
304
|
__listV1() {
|
|
304
305
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
305
306
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
306
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, 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;
|
|
307
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_archived: filterArchived, filter_owned_by_user_id: filterOwnedByUserId, filter_coordinator_label: filterCoordinatorLabel, filter_executor_org_id: filterExecutorOrgId, filter_off_chrt_executor_org_data_id: filterOffChrtExecutorOrgDataId, filter_shipper_org_id: filterShipperOrgId, filter_off_chrt_shipper_org_data_id: filterOffChrtShipperOrgDataId, filter_coordinator_shipper_account_ids: filterCoordinatorShipperAccountIds, 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;
|
|
307
308
|
const _queryParams = {};
|
|
308
309
|
if (sortBy !== undefined) {
|
|
309
310
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -326,6 +327,9 @@ class OrderTemplatesNew {
|
|
|
326
327
|
if (filterOwnedByUserId !== undefined) {
|
|
327
328
|
_queryParams["filter_owned_by_user_id"] = filterOwnedByUserId;
|
|
328
329
|
}
|
|
330
|
+
if (filterCoordinatorLabel !== undefined) {
|
|
331
|
+
_queryParams["filter_coordinator_label"] = filterCoordinatorLabel;
|
|
332
|
+
}
|
|
329
333
|
if (filterExecutorOrgId !== undefined) {
|
|
330
334
|
_queryParams["filter_executor_org_id"] = filterExecutorOrgId;
|
|
331
335
|
}
|
|
@@ -12,6 +12,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
12
12
|
* search: "search",
|
|
13
13
|
* filter_archived: true,
|
|
14
14
|
* filter_owned_by_user_id: "filter_owned_by_user_id",
|
|
15
|
+
* filter_coordinator_label: "filter_coordinator_label",
|
|
15
16
|
* filter_executor_org_id: "filter_executor_org_id",
|
|
16
17
|
* filter_off_chrt_executor_org_data_id: "filter_off_chrt_executor_org_data_id",
|
|
17
18
|
* filter_shipper_org_id: "filter_shipper_org_id",
|
|
@@ -38,6 +39,8 @@ export interface OrderTemplatesNewListV1Request {
|
|
|
38
39
|
filter_archived?: boolean | null;
|
|
39
40
|
/** Filter by the user that created the template. */
|
|
40
41
|
filter_owned_by_user_id?: string | null;
|
|
42
|
+
/** Filter by coordinator label. */
|
|
43
|
+
filter_coordinator_label?: string | null;
|
|
41
44
|
/** Filter by an on-CHRT executor organization ID. */
|
|
42
45
|
filter_executor_org_id?: string | null;
|
|
43
46
|
/** Filter by an off-CHRT executor organization data ID. */
|
|
@@ -7,6 +7,7 @@ import * as Chrt from "../../../../../index.js";
|
|
|
7
7
|
import { Cargo } from "../resources/cargo/client/Client.js";
|
|
8
8
|
import { Drafts } from "../resources/drafts/client/Client.js";
|
|
9
9
|
import { Expanded } from "../resources/expanded/client/Client.js";
|
|
10
|
+
import { OrderEvents } from "../resources/orderEvents/client/Client.js";
|
|
10
11
|
import { Task } from "../resources/task/client/Client.js";
|
|
11
12
|
import { TaskArtifact } from "../resources/taskArtifact/client/Client.js";
|
|
12
13
|
import { TaskGroup } from "../resources/taskGroup/client/Client.js";
|
|
@@ -39,6 +40,7 @@ export declare class Orders {
|
|
|
39
40
|
protected _cargo: Cargo | undefined;
|
|
40
41
|
protected _drafts: Drafts | undefined;
|
|
41
42
|
protected _expanded: Expanded | undefined;
|
|
43
|
+
protected _orderEvents: OrderEvents | undefined;
|
|
42
44
|
protected _task: Task | undefined;
|
|
43
45
|
protected _taskArtifact: TaskArtifact | undefined;
|
|
44
46
|
protected _taskGroup: TaskGroup | undefined;
|
|
@@ -47,6 +49,7 @@ export declare class Orders {
|
|
|
47
49
|
get cargo(): Cargo;
|
|
48
50
|
get drafts(): Drafts;
|
|
49
51
|
get expanded(): Expanded;
|
|
52
|
+
get orderEvents(): OrderEvents;
|
|
50
53
|
get task(): Task;
|
|
51
54
|
get taskArtifact(): TaskArtifact;
|
|
52
55
|
get taskGroup(): TaskGroup;
|
|
@@ -182,7 +185,7 @@ export declare class Orders {
|
|
|
182
185
|
getSuggestedDepartmentV1(orderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<(string | null) | undefined>;
|
|
183
186
|
private __getSuggestedDepartmentV1;
|
|
184
187
|
/**
|
|
185
|
-
* Sets task-group ordering on an
|
|
188
|
+
* Sets task-group ordering on an order ensuring terminal task groups precede non-terminal task groups. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersTaskGroupOrderingReq) -> (bool)
|
|
186
189
|
*
|
|
187
190
|
* @param {string} orderId
|
|
188
191
|
* @param {Chrt.shipping.OrdersTaskGroupOrderingReq} request
|
|
@@ -54,10 +54,11 @@ const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
|
54
54
|
const Client_js_1 = require("../resources/cargo/client/Client.js");
|
|
55
55
|
const Client_js_2 = require("../resources/drafts/client/Client.js");
|
|
56
56
|
const Client_js_3 = require("../resources/expanded/client/Client.js");
|
|
57
|
-
const Client_js_4 = require("../resources/
|
|
58
|
-
const Client_js_5 = require("../resources/
|
|
59
|
-
const Client_js_6 = require("../resources/
|
|
60
|
-
const Client_js_7 = require("../resources/
|
|
57
|
+
const Client_js_4 = require("../resources/orderEvents/client/Client.js");
|
|
58
|
+
const Client_js_5 = require("../resources/task/client/Client.js");
|
|
59
|
+
const Client_js_6 = require("../resources/taskArtifact/client/Client.js");
|
|
60
|
+
const Client_js_7 = require("../resources/taskGroup/client/Client.js");
|
|
61
|
+
const Client_js_8 = require("../resources/utils/client/Client.js");
|
|
61
62
|
class Orders {
|
|
62
63
|
constructor(_options = {}) {
|
|
63
64
|
this._options = _options;
|
|
@@ -74,21 +75,25 @@ class Orders {
|
|
|
74
75
|
var _a;
|
|
75
76
|
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_3.Expanded(this._options)));
|
|
76
77
|
}
|
|
78
|
+
get orderEvents() {
|
|
79
|
+
var _a;
|
|
80
|
+
return ((_a = this._orderEvents) !== null && _a !== void 0 ? _a : (this._orderEvents = new Client_js_4.OrderEvents(this._options)));
|
|
81
|
+
}
|
|
77
82
|
get task() {
|
|
78
83
|
var _a;
|
|
79
|
-
return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new
|
|
84
|
+
return ((_a = this._task) !== null && _a !== void 0 ? _a : (this._task = new Client_js_5.Task(this._options)));
|
|
80
85
|
}
|
|
81
86
|
get taskArtifact() {
|
|
82
87
|
var _a;
|
|
83
|
-
return ((_a = this._taskArtifact) !== null && _a !== void 0 ? _a : (this._taskArtifact = new
|
|
88
|
+
return ((_a = this._taskArtifact) !== null && _a !== void 0 ? _a : (this._taskArtifact = new Client_js_6.TaskArtifact(this._options)));
|
|
84
89
|
}
|
|
85
90
|
get taskGroup() {
|
|
86
91
|
var _a;
|
|
87
|
-
return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new
|
|
92
|
+
return ((_a = this._taskGroup) !== null && _a !== void 0 ? _a : (this._taskGroup = new Client_js_7.TaskGroup(this._options)));
|
|
88
93
|
}
|
|
89
94
|
get utils() {
|
|
90
95
|
var _a;
|
|
91
|
-
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new
|
|
96
|
+
return ((_a = this._utils) !== null && _a !== void 0 ? _a : (this._utils = new Client_js_8.Utils(this._options)));
|
|
92
97
|
}
|
|
93
98
|
/**
|
|
94
99
|
* Adds operator(s) to the caller's assignees on the order. Coordinator writes coordinator_assigned_user_ids; executor writes executor_assigned_user_ids on matching task_group_details. | authz_personas=[coordinator_org_operators, order_executor_org_operators] | (OrdersAssignReq) -> (bool)
|
|
@@ -652,7 +657,7 @@ class Orders {
|
|
|
652
657
|
});
|
|
653
658
|
}
|
|
654
659
|
/**
|
|
655
|
-
* Sets task-group ordering on an
|
|
660
|
+
* Sets task-group ordering on an order ensuring terminal task groups precede non-terminal task groups. | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | (OrdersTaskGroupOrderingReq) -> (bool)
|
|
656
661
|
*
|
|
657
662
|
* @param {string} orderId
|
|
658
663
|
* @param {Chrt.shipping.OrdersTaskGroupOrderingReq} request
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * as cargo from "./cargo/index.js";
|
|
2
2
|
export * as drafts from "./drafts/index.js";
|
|
3
3
|
export * as expanded from "./expanded/index.js";
|
|
4
|
+
export * as orderEvents from "./orderEvents/index.js";
|
|
4
5
|
export * as task from "./task/index.js";
|
|
5
6
|
export * as taskArtifact from "./taskArtifact/index.js";
|
|
6
7
|
export * as taskGroup from "./taskGroup/index.js";
|
|
@@ -8,6 +9,7 @@ export * as utils from "./utils/index.js";
|
|
|
8
9
|
export * from "./cargo/client/requests/index.js";
|
|
9
10
|
export * from "./drafts/client/requests/index.js";
|
|
10
11
|
export * from "./expanded/client/requests/index.js";
|
|
12
|
+
export * from "./orderEvents/client/requests/index.js";
|
|
11
13
|
export * from "./task/client/requests/index.js";
|
|
12
14
|
export * from "./taskArtifact/client/requests/index.js";
|
|
13
15
|
export * from "./taskGroup/client/requests/index.js";
|
|
@@ -36,10 +36,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.utils = exports.taskGroup = exports.taskArtifact = exports.task = exports.expanded = exports.drafts = exports.cargo = void 0;
|
|
39
|
+
exports.utils = exports.taskGroup = exports.taskArtifact = exports.task = exports.orderEvents = exports.expanded = exports.drafts = exports.cargo = void 0;
|
|
40
40
|
exports.cargo = __importStar(require("./cargo/index.js"));
|
|
41
41
|
exports.drafts = __importStar(require("./drafts/index.js"));
|
|
42
42
|
exports.expanded = __importStar(require("./expanded/index.js"));
|
|
43
|
+
exports.orderEvents = __importStar(require("./orderEvents/index.js"));
|
|
43
44
|
exports.task = __importStar(require("./task/index.js"));
|
|
44
45
|
exports.taskArtifact = __importStar(require("./taskArtifact/index.js"));
|
|
45
46
|
exports.taskGroup = __importStar(require("./taskGroup/index.js"));
|
|
@@ -47,6 +48,7 @@ exports.utils = __importStar(require("./utils/index.js"));
|
|
|
47
48
|
__exportStar(require("./cargo/client/requests/index.js"), exports);
|
|
48
49
|
__exportStar(require("./drafts/client/requests/index.js"), exports);
|
|
49
50
|
__exportStar(require("./expanded/client/requests/index.js"), exports);
|
|
51
|
+
__exportStar(require("./orderEvents/client/requests/index.js"), exports);
|
|
50
52
|
__exportStar(require("./task/client/requests/index.js"), exports);
|
|
51
53
|
__exportStar(require("./taskArtifact/client/requests/index.js"), exports);
|
|
52
54
|
__exportStar(require("./taskGroup/client/requests/index.js"), exports);
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../../../../../core/index.js";
|
|
6
|
+
import * as Chrt from "../../../../../../../index.js";
|
|
7
|
+
export declare namespace OrderEvents {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class OrderEvents {
|
|
31
|
+
protected readonly _options: OrderEvents.Options;
|
|
32
|
+
constructor(_options?: OrderEvents.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Lists event log entries for an order with organization and user public data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} orderId
|
|
37
|
+
* @param {Chrt.shipping.orders.OrderEventsListV1Request} request
|
|
38
|
+
* @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.shipping.orders.orderEvents.listV1("order_id", {
|
|
44
|
+
* sort_by: "timestamp",
|
|
45
|
+
* sort_order: "asc",
|
|
46
|
+
* page: 1,
|
|
47
|
+
* page_size: 1,
|
|
48
|
+
* filter_action: ["shipping.order.draft_started"],
|
|
49
|
+
* filter_user_id: "filter_user_id",
|
|
50
|
+
* filter_org_id: "filter_org_id",
|
|
51
|
+
* filter_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
52
|
+
* filter_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
53
|
+
* })
|
|
54
|
+
*/
|
|
55
|
+
listV1(orderId: string, request?: Chrt.shipping.orders.OrderEventsListV1Request, requestOptions?: OrderEvents.RequestOptions): core.HttpResponsePromise<Chrt.OrderEventListRes>;
|
|
56
|
+
private __listV1;
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves a single order event log entry by its ID with organization and user public data hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
|
|
59
|
+
*
|
|
60
|
+
* @param {string} orderEventId
|
|
61
|
+
* @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* await client.shipping.orders.orderEvents.getV1("order_event_id")
|
|
67
|
+
*/
|
|
68
|
+
getV1(orderEventId: string, requestOptions?: OrderEvents.RequestOptions): core.HttpResponsePromise<Chrt.OrderEventExpanded1>;
|
|
69
|
+
private __getV1;
|
|
70
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
71
|
+
}
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/Client.js
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.OrderEvents = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../../../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
54
|
+
class OrderEvents {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Lists event log entries for an order with organization and user public data hydrated, filtering, sorting, and pagination. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventListRes)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} orderId
|
|
62
|
+
* @param {Chrt.shipping.orders.OrderEventsListV1Request} request
|
|
63
|
+
* @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.shipping.orders.orderEvents.listV1("order_id", {
|
|
69
|
+
* sort_by: "timestamp",
|
|
70
|
+
* sort_order: "asc",
|
|
71
|
+
* page: 1,
|
|
72
|
+
* page_size: 1,
|
|
73
|
+
* filter_action: ["shipping.order.draft_started"],
|
|
74
|
+
* filter_user_id: "filter_user_id",
|
|
75
|
+
* filter_org_id: "filter_org_id",
|
|
76
|
+
* filter_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
77
|
+
* filter_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
78
|
+
* })
|
|
79
|
+
*/
|
|
80
|
+
listV1(orderId, request = {}, requestOptions) {
|
|
81
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(orderId, request, requestOptions));
|
|
82
|
+
}
|
|
83
|
+
__listV1(orderId_1) {
|
|
84
|
+
return __awaiter(this, arguments, void 0, function* (orderId, request = {}, requestOptions) {
|
|
85
|
+
var _a, _b, _c, _d, _e, _f;
|
|
86
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_action: filterAction, filter_user_id: filterUserId, filter_org_id: filterOrgId, filter_timestamp_gte: filterTimestampGte, filter_timestamp_lte: filterTimestampLte, } = request;
|
|
87
|
+
const _queryParams = {};
|
|
88
|
+
if (sortBy !== undefined) {
|
|
89
|
+
_queryParams["sort_by"] = sortBy;
|
|
90
|
+
}
|
|
91
|
+
if (sortOrder !== undefined) {
|
|
92
|
+
_queryParams["sort_order"] = sortOrder;
|
|
93
|
+
}
|
|
94
|
+
if (page !== undefined) {
|
|
95
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
96
|
+
}
|
|
97
|
+
if (pageSize !== undefined) {
|
|
98
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
99
|
+
}
|
|
100
|
+
if (filterAction !== undefined) {
|
|
101
|
+
if (Array.isArray(filterAction)) {
|
|
102
|
+
_queryParams["filter_action"] = filterAction.map((item) => item);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
_queryParams["filter_action"] = filterAction;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (filterUserId !== undefined) {
|
|
109
|
+
_queryParams["filter_user_id"] = filterUserId;
|
|
110
|
+
}
|
|
111
|
+
if (filterOrgId !== undefined) {
|
|
112
|
+
_queryParams["filter_org_id"] = filterOrgId;
|
|
113
|
+
}
|
|
114
|
+
if (filterTimestampGte !== undefined) {
|
|
115
|
+
_queryParams["filter_timestamp_gte"] = filterTimestampGte;
|
|
116
|
+
}
|
|
117
|
+
if (filterTimestampLte !== undefined) {
|
|
118
|
+
_queryParams["filter_timestamp_lte"] = filterTimestampLte;
|
|
119
|
+
}
|
|
120
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
121
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
122
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, `shipping/orders/order_events/list/v1/${encodeURIComponent(orderId)}`),
|
|
123
|
+
method: "GET",
|
|
124
|
+
headers: _headers,
|
|
125
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
126
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
127
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
128
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
129
|
+
});
|
|
130
|
+
if (_response.ok) {
|
|
131
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
132
|
+
}
|
|
133
|
+
if (_response.error.reason === "status-code") {
|
|
134
|
+
switch (_response.error.statusCode) {
|
|
135
|
+
case 422:
|
|
136
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
137
|
+
default:
|
|
138
|
+
throw new errors.ChrtError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.body,
|
|
141
|
+
rawResponse: _response.rawResponse,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
switch (_response.error.reason) {
|
|
146
|
+
case "non-json":
|
|
147
|
+
throw new errors.ChrtError({
|
|
148
|
+
statusCode: _response.error.statusCode,
|
|
149
|
+
body: _response.error.rawBody,
|
|
150
|
+
rawResponse: _response.rawResponse,
|
|
151
|
+
});
|
|
152
|
+
case "timeout":
|
|
153
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/order_events/list/v1/{order_id}.");
|
|
154
|
+
case "unknown":
|
|
155
|
+
throw new errors.ChrtError({
|
|
156
|
+
message: _response.error.errorMessage,
|
|
157
|
+
rawResponse: _response.rawResponse,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Retrieves a single order event log entry by its ID with organization and user public data hydrated. | authz: min_org_role=administrator | authz_personas=[draft_creator_org_operator, coordinator_org_operators] | () -> (OrderEventExpanded1)
|
|
164
|
+
*
|
|
165
|
+
* @param {string} orderEventId
|
|
166
|
+
* @param {OrderEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* await client.shipping.orders.orderEvents.getV1("order_event_id")
|
|
172
|
+
*/
|
|
173
|
+
getV1(orderEventId, requestOptions) {
|
|
174
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(orderEventId, requestOptions));
|
|
175
|
+
}
|
|
176
|
+
__getV1(orderEventId, requestOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
var _a, _b, _c, _d;
|
|
179
|
+
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);
|
|
180
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
181
|
+
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/order_events/v1/${encodeURIComponent(orderEventId)}`),
|
|
182
|
+
method: "GET",
|
|
183
|
+
headers: _headers,
|
|
184
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
185
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
186
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
187
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
188
|
+
});
|
|
189
|
+
if (_response.ok) {
|
|
190
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
191
|
+
}
|
|
192
|
+
if (_response.error.reason === "status-code") {
|
|
193
|
+
switch (_response.error.statusCode) {
|
|
194
|
+
case 422:
|
|
195
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
196
|
+
default:
|
|
197
|
+
throw new errors.ChrtError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.body,
|
|
200
|
+
rawResponse: _response.rawResponse,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
switch (_response.error.reason) {
|
|
205
|
+
case "non-json":
|
|
206
|
+
throw new errors.ChrtError({
|
|
207
|
+
statusCode: _response.error.statusCode,
|
|
208
|
+
body: _response.error.rawBody,
|
|
209
|
+
rawResponse: _response.rawResponse,
|
|
210
|
+
});
|
|
211
|
+
case "timeout":
|
|
212
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/orders/order_events/v1/{order_event_id}.");
|
|
213
|
+
case "unknown":
|
|
214
|
+
throw new errors.ChrtError({
|
|
215
|
+
message: _response.error.errorMessage,
|
|
216
|
+
rawResponse: _response.rawResponse,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
_getAuthorizationHeader() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
224
|
+
if (bearer != null) {
|
|
225
|
+
return `Bearer ${bearer}`;
|
|
226
|
+
}
|
|
227
|
+
return undefined;
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.OrderEvents = OrderEvents;
|
package/dist/cjs/api/resources/shipping/resources/orders/resources/orderEvents/client/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "timestamp",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* filter_action: ["shipping.order.draft_started"],
|
|
13
|
+
* filter_user_id: "filter_user_id",
|
|
14
|
+
* filter_org_id: "filter_org_id",
|
|
15
|
+
* filter_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
16
|
+
* filter_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface OrderEventsListV1Request {
|
|
20
|
+
/** Field to sort by */
|
|
21
|
+
sort_by?: Chrt.OrderEventSortByEnum | null;
|
|
22
|
+
/** Sort order (asc or desc) */
|
|
23
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
24
|
+
page?: number | null;
|
|
25
|
+
page_size?: number | null;
|
|
26
|
+
/** Filter by order event action(s) */
|
|
27
|
+
filter_action?: (Chrt.OrderEventActionEnum1 | null) | (Chrt.OrderEventActionEnum1 | null)[];
|
|
28
|
+
/** Filter by actor user ID */
|
|
29
|
+
filter_user_id?: string | null;
|
|
30
|
+
/** Filter by actor org ID */
|
|
31
|
+
filter_org_id?: string | null;
|
|
32
|
+
/** Filter timestamp >= value */
|
|
33
|
+
filter_timestamp_gte?: string | null;
|
|
34
|
+
/** Filter timestamp <= value */
|
|
35
|
+
filter_timestamp_lte?: string | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type OrderEventsListV1Request } from "./OrderEventsListV1Request.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -33,16 +33,16 @@ export declare class Orders {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns one mirrored Atlas order by the provider's own order ID with the provider organization expanded. | () -> (AtlasOrderExpanded1)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
37
37
|
* @param {string} integrationOrderId - Atlas's own ID for the order, as carried on a unified order row
|
|
38
38
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shippingIntegrations.atlas.orders.detailByIntegrationOrderIdV1("
|
|
43
|
+
* await client.shippingIntegrations.atlas.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
44
44
|
*/
|
|
45
|
-
detailByIntegrationOrderIdV1(
|
|
45
|
+
detailByIntegrationOrderIdV1(orgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.AtlasOrderExpanded1>;
|
|
46
46
|
private __detailByIntegrationOrderIdV1;
|
|
47
47
|
/**
|
|
48
48
|
* Returns one mirrored Atlas order by its Mongo ObjectId with the provider organization expanded. | () -> (AtlasOrderExpanded1)
|