@chrt-inc/typescript-sdk 1.315.0 → 1.319.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/index.d.ts +2 -2
- package/dist/cjs/api/resources/index.js +3 -3
- package/dist/cjs/api/resources/orderDrafts/client/Client.d.ts +7 -17
- package/dist/cjs/api/resources/orderDrafts/client/Client.js +11 -68
- package/dist/cjs/api/resources/orderDrafts/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/orderDrafts/index.d.ts +1 -1
- package/dist/cjs/api/resources/orderDrafts/index.js +1 -1
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.d.ts +55 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/Client.js +158 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.ts +25 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/index.d.ts +2 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/index.js +18 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/orderDrafts/resources/expanded/types/index.js +17 -0
- package/dist/cjs/api/resources/orderDrafts/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/orderDrafts/resources/index.js +4 -1
- package/dist/cjs/api/resources/orders/index.d.ts +1 -1
- package/dist/cjs/api/resources/orders/index.js +1 -1
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.d.ts +62 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/Client.js +276 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/index.js +15 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +46 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +46 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/expanded/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orders/resources/expanded/index.d.ts +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/index.js +1 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.ts +8 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.js +10 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/expanded/types/index.js +18 -0
- package/dist/cjs/api/resources/orders/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/resources/index.js +5 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.js +118 -0
- package/dist/cjs/api/types/{OrderDraftExpandedRes.d.ts → OrderDraftExpanded.d.ts} +5 -6
- package/dist/cjs/api/types/OrderDraftExpandedListRes.d.ts +1 -4
- package/dist/cjs/api/types/OrderDraftSortByEnum.d.ts +4 -0
- package/dist/cjs/api/types/OrderSortByEnum.d.ts +12 -0
- package/dist/cjs/api/types/OrderSortByEnum.js +14 -0
- package/dist/cjs/api/types/OrdersExpandedListRes.d.ts +8 -0
- package/dist/cjs/api/types/OrdersExpandedListRes.js +5 -0
- package/dist/cjs/api/types/index.d.ts +4 -3
- package/dist/cjs/api/types/index.js +4 -3
- 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/index.d.mts +2 -2
- package/dist/esm/api/resources/index.mjs +2 -2
- package/dist/esm/api/resources/orderDrafts/client/Client.d.mts +7 -17
- package/dist/esm/api/resources/orderDrafts/client/Client.mjs +11 -68
- package/dist/esm/api/resources/orderDrafts/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/orderDrafts/index.d.mts +1 -1
- package/dist/esm/api/resources/orderDrafts/index.mjs +1 -1
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.d.mts +55 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/Client.mjs +121 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/ExpandedListV1Request.d.mts +25 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/index.d.mts +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/index.mjs +2 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/ExpandedListV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.d.mts +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/expanded/types/index.mjs +1 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/orderDrafts/resources/index.mjs +3 -0
- package/dist/esm/api/resources/orders/index.d.mts +1 -1
- package/dist/esm/api/resources/orders/index.mjs +1 -1
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.d.mts +62 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/Client.mjs +276 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/index.d.mts +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/index.mjs +1 -1
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +46 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +46 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/expanded/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/index.d.mts +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/index.mjs +1 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForForwarderOperatorsV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.d.mts +8 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/ExpandedListForShipperOperatorsV1RequestSortOrder.mjs +7 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/expanded/types/index.mjs +2 -0
- package/dist/esm/api/resources/orders/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/resources/index.mjs +2 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +118 -0
- package/dist/esm/api/types/{OrderDraftExpandedRes.d.mts → OrderDraftExpanded.d.mts} +5 -6
- package/dist/esm/api/types/OrderDraftExpandedListRes.d.mts +1 -4
- package/dist/esm/api/types/OrderDraftSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/OrderSortByEnum.d.mts +12 -0
- package/dist/esm/api/types/OrderSortByEnum.mjs +11 -0
- package/dist/esm/api/types/OrdersExpandedListRes.d.mts +8 -0
- package/dist/esm/api/types/OrdersExpandedListRes.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +4 -3
- package/dist/esm/api/types/index.mjs +4 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +312 -14
- package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.ts +0 -21
- package/dist/cjs/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.ts +0 -21
- package/dist/cjs/api/types/TaskDraftExpanded.d.ts +0 -10
- package/dist/cjs/api/types/TaskGroupDraftExpanded.d.ts +0 -10
- package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedListReq.d.mts +0 -21
- package/dist/esm/api/resources/orderDrafts/client/requests/OrderDraftExpandedReq.d.mts +0 -21
- package/dist/esm/api/types/TaskDraftExpanded.d.mts +0 -10
- package/dist/esm/api/types/TaskGroupDraftExpanded.d.mts +0 -10
- /package/dist/cjs/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.js → resources/expanded/client/requests/ExpandedListV1Request.js} +0 -0
- /package/dist/cjs/api/resources/{orderDrafts/client/requests/OrderDraftExpandedReq.js → orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/{types/OrderDraftExpandedRes.js → resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/types/{TaskDraftExpanded.js → OrderDraftExpanded.js} +0 -0
- /package/dist/cjs/api/types/{TaskGroupDraftExpanded.js → OrderDraftSortByEnum.js} +0 -0
- /package/dist/esm/api/resources/orderDrafts/{client/requests/OrderDraftExpandedListReq.mjs → resources/expanded/client/requests/ExpandedListV1Request.mjs} +0 -0
- /package/dist/esm/api/resources/{orderDrafts/client/requests/OrderDraftExpandedReq.mjs → orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/{types/OrderDraftExpandedRes.mjs → resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/types/{TaskDraftExpanded.mjs → OrderDraftExpanded.mjs} +0 -0
- /package/dist/esm/api/types/{TaskGroupDraftExpanded.mjs → OrderDraftSortByEnum.mjs} +0 -0
|
@@ -60,6 +60,124 @@ class TaskGroups {
|
|
|
60
60
|
var _a;
|
|
61
61
|
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Client_js_1.Expanded(this._options)));
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves the task group ID for the courier organization assigned to an order. | authz_personas=[courier_org_operators] | () -> (PydanticObjectId)
|
|
65
|
+
*
|
|
66
|
+
* @param {string} byOrderIdOrShortId
|
|
67
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* await client.taskGroups.getTaskGroupIdForCourierOperatorsV1("by_order_id_or_short_id")
|
|
73
|
+
*/
|
|
74
|
+
getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__getTaskGroupIdForCourierOperatorsV1(byOrderIdOrShortId, requestOptions) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
var _a, _b, _c, _d;
|
|
80
|
+
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);
|
|
81
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
82
|
+
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, `oort/task_groups/task_group_id/for_courier_operators/v1/${encodeURIComponent(byOrderIdOrShortId)}`),
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers: _headers,
|
|
85
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
87
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
88
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
+
});
|
|
90
|
+
if (_response.ok) {
|
|
91
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
92
|
+
}
|
|
93
|
+
if (_response.error.reason === "status-code") {
|
|
94
|
+
switch (_response.error.statusCode) {
|
|
95
|
+
case 422:
|
|
96
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
97
|
+
default:
|
|
98
|
+
throw new errors.ChrtError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.body,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
switch (_response.error.reason) {
|
|
106
|
+
case "non-json":
|
|
107
|
+
throw new errors.ChrtError({
|
|
108
|
+
statusCode: _response.error.statusCode,
|
|
109
|
+
body: _response.error.rawBody,
|
|
110
|
+
rawResponse: _response.rawResponse,
|
|
111
|
+
});
|
|
112
|
+
case "timeout":
|
|
113
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_operators/v1/{by_order_id_or_short_id}.");
|
|
114
|
+
case "unknown":
|
|
115
|
+
throw new errors.ChrtError({
|
|
116
|
+
message: _response.error.errorMessage,
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Retrieves the task group ID for the courier driver assigned to an order. | authz_personas=[courier_driver] | () -> (PydanticObjectId)
|
|
124
|
+
*
|
|
125
|
+
* @param {string} byOrderIdOrShortId
|
|
126
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
+
*
|
|
128
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* await client.taskGroups.getTaskGroupIdForCourierDriverV1("by_order_id_or_short_id")
|
|
132
|
+
*/
|
|
133
|
+
getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions) {
|
|
134
|
+
return core.HttpResponsePromise.fromPromise(this.__getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions));
|
|
135
|
+
}
|
|
136
|
+
__getTaskGroupIdForCourierDriverV1(byOrderIdOrShortId, requestOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a, _b, _c, _d;
|
|
139
|
+
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);
|
|
140
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
141
|
+
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, `oort/task_groups/task_group_id/for_courier_driver/v1/${encodeURIComponent(byOrderIdOrShortId)}`),
|
|
142
|
+
method: "GET",
|
|
143
|
+
headers: _headers,
|
|
144
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
145
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
146
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
|
+
});
|
|
149
|
+
if (_response.ok) {
|
|
150
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
151
|
+
}
|
|
152
|
+
if (_response.error.reason === "status-code") {
|
|
153
|
+
switch (_response.error.statusCode) {
|
|
154
|
+
case 422:
|
|
155
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
156
|
+
default:
|
|
157
|
+
throw new errors.ChrtError({
|
|
158
|
+
statusCode: _response.error.statusCode,
|
|
159
|
+
body: _response.error.body,
|
|
160
|
+
rawResponse: _response.rawResponse,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
switch (_response.error.reason) {
|
|
165
|
+
case "non-json":
|
|
166
|
+
throw new errors.ChrtError({
|
|
167
|
+
statusCode: _response.error.statusCode,
|
|
168
|
+
body: _response.error.rawBody,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
case "timeout":
|
|
172
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /oort/task_groups/task_group_id/for_courier_driver/v1/{by_order_id_or_short_id}.");
|
|
173
|
+
case "unknown":
|
|
174
|
+
throw new errors.ChrtError({
|
|
175
|
+
message: _response.error.errorMessage,
|
|
176
|
+
rawResponse: _response.rawResponse,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
63
181
|
/**
|
|
64
182
|
* Updates the ordering of tasks in a task group. Task group must be in STAGED or IN_PROGRESS status. | authz_personas=[lig_org_operators] | (SetTaskOrderingReq) -> (bool)
|
|
65
183
|
*
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.js";
|
|
5
|
-
export interface
|
|
5
|
+
export interface OrderDraftExpanded {
|
|
6
6
|
order: Chrt.Order1;
|
|
7
|
-
task_groups_expanded?: Chrt.TaskGroupDraftExpanded[] | null;
|
|
8
|
-
cargos?: Chrt.Cargo1[] | null;
|
|
9
|
-
shipper_org_company_name?: string | null;
|
|
10
|
-
shipper_org_handle?: string | null;
|
|
11
|
-
off_chrt_shipper_org_company_name?: string | null;
|
|
12
7
|
forwarder_org_company_name?: string | null;
|
|
13
8
|
forwarder_org_handle?: string | null;
|
|
9
|
+
shipper_org_company_name?: string | null;
|
|
10
|
+
off_chrt_shipper_org_company_name?: string | null;
|
|
11
|
+
task_groups_expanded?: Chrt.TaskGroupExpanded[] | null;
|
|
12
|
+
cargos?: Chrt.Cargo1[] | null;
|
|
14
13
|
}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Chrt from "../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Response model for listing draft orders.
|
|
7
|
-
*/
|
|
8
5
|
export interface OrderDraftExpandedListRes {
|
|
9
|
-
|
|
6
|
+
order_drafts_expanded: Chrt.OrderDraftExpanded[];
|
|
10
7
|
total_count: number;
|
|
11
8
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type OrderSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "exception_at_timestamp" | "order_cancelled_at_timestamp";
|
|
5
|
+
export declare const OrderSortByEnum: {
|
|
6
|
+
readonly DraftStartedAtTimestamp: "draft_started_at_timestamp";
|
|
7
|
+
readonly StagedAtTimestamp: "staged_at_timestamp";
|
|
8
|
+
readonly InProgressAtTimestamp: "in_progress_at_timestamp";
|
|
9
|
+
readonly CompletedAtTimestamp: "completed_at_timestamp";
|
|
10
|
+
readonly ExceptionAtTimestamp: "exception_at_timestamp";
|
|
11
|
+
readonly OrderCancelledAtTimestamp: "order_cancelled_at_timestamp";
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OrderSortByEnum = void 0;
|
|
7
|
+
exports.OrderSortByEnum = {
|
|
8
|
+
DraftStartedAtTimestamp: "draft_started_at_timestamp",
|
|
9
|
+
StagedAtTimestamp: "staged_at_timestamp",
|
|
10
|
+
InProgressAtTimestamp: "in_progress_at_timestamp",
|
|
11
|
+
CompletedAtTimestamp: "completed_at_timestamp",
|
|
12
|
+
ExceptionAtTimestamp: "exception_at_timestamp",
|
|
13
|
+
OrderCancelledAtTimestamp: "order_cancelled_at_timestamp",
|
|
14
|
+
};
|
|
@@ -56,11 +56,14 @@ export * from "./OffChrtShipperOrg1.js";
|
|
|
56
56
|
export * from "./OnboardCourierTaskActionEnum1.js";
|
|
57
57
|
export * from "./Order1.js";
|
|
58
58
|
export * from "./OrderAndTaskGroupExpandedReq.js";
|
|
59
|
+
export * from "./OrderDraftExpanded.js";
|
|
59
60
|
export * from "./OrderDraftExpandedListRes.js";
|
|
60
|
-
export * from "./
|
|
61
|
+
export * from "./OrderDraftSortByEnum.js";
|
|
61
62
|
export * from "./OrderExpanded.js";
|
|
63
|
+
export * from "./OrderSortByEnum.js";
|
|
62
64
|
export * from "./OrderStatusEnum1.js";
|
|
63
65
|
export * from "./OrdersDraftUpdateRes.js";
|
|
66
|
+
export * from "./OrdersExpandedListRes.js";
|
|
64
67
|
export * from "./OrdersNewDraftRes.js";
|
|
65
68
|
export * from "./OrgMemberDetails.js";
|
|
66
69
|
export * from "./OrgMembersAndDrivers.js";
|
|
@@ -102,10 +105,8 @@ export * from "./TaskArtifactStatusEnum1.js";
|
|
|
102
105
|
export * from "./TaskArtifactTypeEnum1.js";
|
|
103
106
|
export * from "./TaskClientCreate1.js";
|
|
104
107
|
export * from "./TaskClientUpdate1.js";
|
|
105
|
-
export * from "./TaskDraftExpanded.js";
|
|
106
108
|
export * from "./TaskExpanded.js";
|
|
107
109
|
export * from "./TaskGroup1.js";
|
|
108
|
-
export * from "./TaskGroupDraftExpanded.js";
|
|
109
110
|
export * from "./TaskGroupExpanded.js";
|
|
110
111
|
export * from "./TaskGroupExpandedListRes.js";
|
|
111
112
|
export * from "./TaskGroupMessage1.js";
|
|
@@ -72,11 +72,14 @@ __exportStar(require("./OffChrtShipperOrg1.js"), exports);
|
|
|
72
72
|
__exportStar(require("./OnboardCourierTaskActionEnum1.js"), exports);
|
|
73
73
|
__exportStar(require("./Order1.js"), exports);
|
|
74
74
|
__exportStar(require("./OrderAndTaskGroupExpandedReq.js"), exports);
|
|
75
|
+
__exportStar(require("./OrderDraftExpanded.js"), exports);
|
|
75
76
|
__exportStar(require("./OrderDraftExpandedListRes.js"), exports);
|
|
76
|
-
__exportStar(require("./
|
|
77
|
+
__exportStar(require("./OrderDraftSortByEnum.js"), exports);
|
|
77
78
|
__exportStar(require("./OrderExpanded.js"), exports);
|
|
79
|
+
__exportStar(require("./OrderSortByEnum.js"), exports);
|
|
78
80
|
__exportStar(require("./OrderStatusEnum1.js"), exports);
|
|
79
81
|
__exportStar(require("./OrdersDraftUpdateRes.js"), exports);
|
|
82
|
+
__exportStar(require("./OrdersExpandedListRes.js"), exports);
|
|
80
83
|
__exportStar(require("./OrdersNewDraftRes.js"), exports);
|
|
81
84
|
__exportStar(require("./OrgMemberDetails.js"), exports);
|
|
82
85
|
__exportStar(require("./OrgMembersAndDrivers.js"), exports);
|
|
@@ -118,10 +121,8 @@ __exportStar(require("./TaskArtifactStatusEnum1.js"), exports);
|
|
|
118
121
|
__exportStar(require("./TaskArtifactTypeEnum1.js"), exports);
|
|
119
122
|
__exportStar(require("./TaskClientCreate1.js"), exports);
|
|
120
123
|
__exportStar(require("./TaskClientUpdate1.js"), exports);
|
|
121
|
-
__exportStar(require("./TaskDraftExpanded.js"), exports);
|
|
122
124
|
__exportStar(require("./TaskExpanded.js"), exports);
|
|
123
125
|
__exportStar(require("./TaskGroup1.js"), exports);
|
|
124
|
-
__exportStar(require("./TaskGroupDraftExpanded.js"), exports);
|
|
125
126
|
__exportStar(require("./TaskGroupExpanded.js"), exports);
|
|
126
127
|
__exportStar(require("./TaskGroupExpandedListRes.js"), exports);
|
|
127
128
|
__exportStar(require("./TaskGroupMessage1.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.319.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -35,8 +35,8 @@ export class ChrtClient {
|
|
|
35
35
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
36
36
|
"X-Fern-Language": "JavaScript",
|
|
37
37
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
38
|
-
"X-Fern-SDK-Version": "1.
|
|
39
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
38
|
+
"X-Fern-SDK-Version": "1.319.0",
|
|
39
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.319.0",
|
|
40
40
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
41
41
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
42
42
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * as connections from "./connections/index.mjs";
|
|
2
2
|
export * from "./connections/types/index.mjs";
|
|
3
|
+
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
4
|
+
export * as orders from "./orders/index.mjs";
|
|
3
5
|
export * as taskGroups from "./taskGroups/index.mjs";
|
|
4
6
|
export * as payments from "./payments/index.mjs";
|
|
5
7
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
@@ -16,8 +18,6 @@ export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mj
|
|
|
16
18
|
export * as drivers from "./drivers/index.mjs";
|
|
17
19
|
export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
18
20
|
export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
|
|
19
|
-
export * as orders from "./orders/index.mjs";
|
|
20
|
-
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
21
21
|
export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
|
|
22
22
|
export * as orgs from "./orgs/index.mjs";
|
|
23
23
|
export * as root from "./root/index.mjs";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * as connections from "./connections/index.mjs";
|
|
2
2
|
export * from "./connections/types/index.mjs";
|
|
3
|
+
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
4
|
+
export * as orders from "./orders/index.mjs";
|
|
3
5
|
export * as taskGroups from "./taskGroups/index.mjs";
|
|
4
6
|
export * as payments from "./payments/index.mjs";
|
|
5
7
|
export * as courierPayDriverLineItemGroups from "./courierPayDriverLineItemGroups/index.mjs";
|
|
@@ -16,8 +18,6 @@ export * as taskArtifactNotifications from "./taskArtifactNotifications/index.mj
|
|
|
16
18
|
export * as drivers from "./drivers/index.mjs";
|
|
17
19
|
export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
18
20
|
export * as offChrtShipperOrg from "./offChrtShipperOrg/index.mjs";
|
|
19
|
-
export * as orders from "./orders/index.mjs";
|
|
20
|
-
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
21
21
|
export * as shipperContactInfo from "./shipperContactInfo/index.mjs";
|
|
22
22
|
export * as orgs from "./orgs/index.mjs";
|
|
23
23
|
export * as root from "./root/index.mjs";
|
|
@@ -8,6 +8,7 @@ import { TaskGroup } from "../resources/taskGroup/client/Client.mjs";
|
|
|
8
8
|
import { Task } from "../resources/task/client/Client.mjs";
|
|
9
9
|
import { TaskArtifact } from "../resources/taskArtifact/client/Client.mjs";
|
|
10
10
|
import { Cargo } from "../resources/cargo/client/Client.mjs";
|
|
11
|
+
import { Expanded } from "../resources/expanded/client/Client.mjs";
|
|
11
12
|
export declare namespace OrderDrafts {
|
|
12
13
|
interface Options {
|
|
13
14
|
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
@@ -37,11 +38,13 @@ export declare class OrderDrafts {
|
|
|
37
38
|
protected _task: Task | undefined;
|
|
38
39
|
protected _taskArtifact: TaskArtifact | undefined;
|
|
39
40
|
protected _cargo: Cargo | undefined;
|
|
41
|
+
protected _expanded: Expanded | undefined;
|
|
40
42
|
constructor(_options?: OrderDrafts.Options);
|
|
41
43
|
get taskGroup(): TaskGroup;
|
|
42
44
|
get task(): Task;
|
|
43
45
|
get taskArtifact(): TaskArtifact;
|
|
44
46
|
get cargo(): Cargo;
|
|
47
|
+
get expanded(): Expanded;
|
|
45
48
|
/**
|
|
46
49
|
* Creates a new draft order with org assignments based on caller's organization type. | (OrdersNewDraftReq) -> (OrdersNewDraftRes)
|
|
47
50
|
*
|
|
@@ -84,32 +87,19 @@ export declare class OrderDrafts {
|
|
|
84
87
|
deleteV1(orderId: string, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
85
88
|
private __deleteV1;
|
|
86
89
|
/**
|
|
87
|
-
* Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (
|
|
90
|
+
* Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
|
|
88
91
|
*
|
|
89
92
|
* @param {string} orderIdOrShortId
|
|
90
|
-
* @param {Chrt.
|
|
93
|
+
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
91
94
|
* @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
95
|
*
|
|
93
96
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
97
|
*
|
|
95
98
|
* @example
|
|
96
|
-
* await client.orderDrafts.expandedV1("order_id_or_short_id")
|
|
99
|
+
* await client.orderDrafts.expandedV1("order_id_or_short_id", {})
|
|
97
100
|
*/
|
|
98
|
-
expandedV1(orderIdOrShortId: string, request
|
|
101
|
+
expandedV1(orderIdOrShortId: string, request: Chrt.OrderAndTaskGroupExpandedReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpanded>;
|
|
99
102
|
private __expandedV1;
|
|
100
|
-
/**
|
|
101
|
-
* Lists all draft orders created by the authenticated user with optional expanded related data. | (OrderDraftExpandedListReq) -> (OrderDraftExpandedListRes)
|
|
102
|
-
*
|
|
103
|
-
* @param {Chrt.OrderDraftExpandedListReq} request
|
|
104
|
-
* @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
-
*
|
|
106
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* await client.orderDrafts.expandedListV1()
|
|
110
|
-
*/
|
|
111
|
-
expandedListV1(request?: Chrt.OrderDraftExpandedListReq, requestOptions?: OrderDrafts.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
|
|
112
|
-
private __expandedListV1;
|
|
113
103
|
/**
|
|
114
104
|
* Checks whether the draft order satisfies all requirements to move into staging. | () -> (bool)
|
|
115
105
|
*
|
|
@@ -19,6 +19,7 @@ import { TaskGroup } from "../resources/taskGroup/client/Client.mjs";
|
|
|
19
19
|
import { Task } from "../resources/task/client/Client.mjs";
|
|
20
20
|
import { TaskArtifact } from "../resources/taskArtifact/client/Client.mjs";
|
|
21
21
|
import { Cargo } from "../resources/cargo/client/Client.mjs";
|
|
22
|
+
import { Expanded } from "../resources/expanded/client/Client.mjs";
|
|
22
23
|
export class OrderDrafts {
|
|
23
24
|
constructor(_options = {}) {
|
|
24
25
|
this._options = _options;
|
|
@@ -39,6 +40,10 @@ export class OrderDrafts {
|
|
|
39
40
|
var _a;
|
|
40
41
|
return ((_a = this._cargo) !== null && _a !== void 0 ? _a : (this._cargo = new Cargo(this._options)));
|
|
41
42
|
}
|
|
43
|
+
get expanded() {
|
|
44
|
+
var _a;
|
|
45
|
+
return ((_a = this._expanded) !== null && _a !== void 0 ? _a : (this._expanded = new Expanded(this._options)));
|
|
46
|
+
}
|
|
42
47
|
/**
|
|
43
48
|
* Creates a new draft order with org assignments based on caller's organization type. | (OrdersNewDraftReq) -> (OrdersNewDraftRes)
|
|
44
49
|
*
|
|
@@ -225,22 +230,22 @@ export class OrderDrafts {
|
|
|
225
230
|
});
|
|
226
231
|
}
|
|
227
232
|
/**
|
|
228
|
-
* Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (
|
|
233
|
+
* Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpanded)
|
|
229
234
|
*
|
|
230
235
|
* @param {string} orderIdOrShortId
|
|
231
|
-
* @param {Chrt.
|
|
236
|
+
* @param {Chrt.OrderAndTaskGroupExpandedReq} request
|
|
232
237
|
* @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
233
238
|
*
|
|
234
239
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
235
240
|
*
|
|
236
241
|
* @example
|
|
237
|
-
* await client.orderDrafts.expandedV1("order_id_or_short_id")
|
|
242
|
+
* await client.orderDrafts.expandedV1("order_id_or_short_id", {})
|
|
238
243
|
*/
|
|
239
|
-
expandedV1(orderIdOrShortId, request
|
|
244
|
+
expandedV1(orderIdOrShortId, request, requestOptions) {
|
|
240
245
|
return core.HttpResponsePromise.fromPromise(this.__expandedV1(orderIdOrShortId, request, requestOptions));
|
|
241
246
|
}
|
|
242
|
-
__expandedV1(
|
|
243
|
-
return __awaiter(this,
|
|
247
|
+
__expandedV1(orderIdOrShortId, request, requestOptions) {
|
|
248
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
249
|
var _a, _b, _c, _d;
|
|
245
250
|
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);
|
|
246
251
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -287,68 +292,6 @@ export class OrderDrafts {
|
|
|
287
292
|
}
|
|
288
293
|
});
|
|
289
294
|
}
|
|
290
|
-
/**
|
|
291
|
-
* Lists all draft orders created by the authenticated user with optional expanded related data. | (OrderDraftExpandedListReq) -> (OrderDraftExpandedListRes)
|
|
292
|
-
*
|
|
293
|
-
* @param {Chrt.OrderDraftExpandedListReq} request
|
|
294
|
-
* @param {OrderDrafts.RequestOptions} requestOptions - Request-specific configuration.
|
|
295
|
-
*
|
|
296
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
297
|
-
*
|
|
298
|
-
* @example
|
|
299
|
-
* await client.orderDrafts.expandedListV1()
|
|
300
|
-
*/
|
|
301
|
-
expandedListV1(request = {}, requestOptions) {
|
|
302
|
-
return core.HttpResponsePromise.fromPromise(this.__expandedListV1(request, requestOptions));
|
|
303
|
-
}
|
|
304
|
-
__expandedListV1() {
|
|
305
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
306
|
-
var _a, _b, _c, _d;
|
|
307
|
-
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);
|
|
308
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
309
|
-
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, "oort/order_drafts/expanded/list/v1"),
|
|
310
|
-
method: "POST",
|
|
311
|
-
headers: _headers,
|
|
312
|
-
contentType: "application/json",
|
|
313
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
314
|
-
requestType: "json",
|
|
315
|
-
body: request,
|
|
316
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
317
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
318
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
319
|
-
});
|
|
320
|
-
if (_response.ok) {
|
|
321
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
322
|
-
}
|
|
323
|
-
if (_response.error.reason === "status-code") {
|
|
324
|
-
switch (_response.error.statusCode) {
|
|
325
|
-
case 422:
|
|
326
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
327
|
-
default:
|
|
328
|
-
throw new errors.ChrtError({
|
|
329
|
-
statusCode: _response.error.statusCode,
|
|
330
|
-
body: _response.error.body,
|
|
331
|
-
rawResponse: _response.rawResponse,
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
switch (_response.error.reason) {
|
|
336
|
-
case "non-json":
|
|
337
|
-
throw new errors.ChrtError({
|
|
338
|
-
statusCode: _response.error.statusCode,
|
|
339
|
-
body: _response.error.rawBody,
|
|
340
|
-
rawResponse: _response.rawResponse,
|
|
341
|
-
});
|
|
342
|
-
case "timeout":
|
|
343
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/order_drafts/expanded/list/v1.");
|
|
344
|
-
case "unknown":
|
|
345
|
-
throw new errors.ChrtError({
|
|
346
|
-
message: _response.error.errorMessage,
|
|
347
|
-
rawResponse: _response.rawResponse,
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
295
|
/**
|
|
353
296
|
* Checks whether the draft order satisfies all requirements to move into staging. | () -> (bool)
|
|
354
297
|
*
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
export { type OrdersNewDraftReq } from "./OrdersNewDraftReq.mjs";
|
|
2
2
|
export { type OrdersDraftUpdateReq } from "./OrdersDraftUpdateReq.mjs";
|
|
3
|
-
export { type OrderDraftExpandedReq } from "./OrderDraftExpandedReq.mjs";
|
|
4
|
-
export { type OrderDraftExpandedListReq } from "./OrderDraftExpandedListReq.mjs";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace Expanded {
|
|
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 Expanded {
|
|
31
|
+
protected readonly _options: Expanded.Options;
|
|
32
|
+
constructor(_options?: Expanded.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Lists expanded draft orders for the creator with filtering, sorting, and pagination. | (OrderAndTaskGroupExpandedReq) -> (OrderDraftExpandedListRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.orderDrafts.ExpandedListV1Request} request
|
|
37
|
+
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.orderDrafts.expanded.listV1({
|
|
43
|
+
* sort_by: "draft_started_at_timestamp",
|
|
44
|
+
* sort_order: "ascending",
|
|
45
|
+
* page: 1,
|
|
46
|
+
* page_size: 1,
|
|
47
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
48
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
49
|
+
* body: {}
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
listV1(request: Chrt.orderDrafts.ExpandedListV1Request, requestOptions?: Expanded.RequestOptions): core.HttpResponsePromise<Chrt.OrderDraftExpandedListRes>;
|
|
53
|
+
private __listV1;
|
|
54
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
55
|
+
}
|