@chrt-inc/typescript-sdk 1.303.0 → 1.304.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/README.md +0 -604
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/connections/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/connections/client/Client.js +3 -3
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.js +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToForwarder/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToForwarder/client/Client.js +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToShipper/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/connections/resources/connectionToShipper/client/Client.js +1 -1
- package/dist/cjs/api/resources/dev/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/dev/client/Client.js +9 -9
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +2 -2
- package/dist/cjs/api/resources/orderDrafts/client/Client.d.ts +27 -0
- package/dist/cjs/api/resources/orderDrafts/client/Client.js +125 -0
- package/dist/cjs/api/resources/orderDrafts/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orders/client/Client.d.ts +0 -3
- package/dist/cjs/api/resources/orders/client/Client.js +0 -5
- package/dist/cjs/api/resources/orders/resources/index.d.ts +0 -1
- package/dist/cjs/api/resources/orders/resources/index.js +1 -2
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.js +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.js +3 -3
- package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/orgProfiles/client/Client.js +7 -7
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/orgs/client/Client.js +7 -7
- package/dist/cjs/api/resources/root/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/root/client/Client.js +5 -5
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/taskArtifactNotifications/client/Client.js +2 -2
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +7 -7
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +14 -14
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +14 -14
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.js +1 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +1 -1
- package/dist/cjs/api/resources/utils/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/utils/client/Client.js +1 -1
- package/dist/cjs/api/types/Cargo1.d.ts +1 -1
- package/dist/cjs/api/types/CargoClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/CargoClientUpdate1.d.ts +1 -1
- package/dist/{esm/api/types/DriverUpdateResp.d.mts → cjs/api/types/DriverUpdateRes.d.ts} +1 -1
- package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +1 -1
- package/dist/cjs/api/types/index.js +1 -1
- 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/connections/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/connections/client/Client.mjs +3 -3
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.mjs +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToForwarder/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToForwarder/client/Client.mjs +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToShipper/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/connections/resources/connectionToShipper/client/Client.mjs +1 -1
- package/dist/esm/api/resources/dev/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/dev/client/Client.mjs +9 -9
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +2 -2
- package/dist/esm/api/resources/orderDrafts/client/Client.d.mts +27 -0
- package/dist/esm/api/resources/orderDrafts/client/Client.mjs +125 -0
- package/dist/esm/api/resources/orderDrafts/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orders/client/Client.d.mts +0 -3
- package/dist/esm/api/resources/orders/client/Client.mjs +0 -5
- package/dist/esm/api/resources/orders/resources/index.d.mts +0 -1
- package/dist/esm/api/resources/orders/resources/index.mjs +0 -1
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.mjs +3 -3
- package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/orgProfiles/client/Client.mjs +7 -7
- package/dist/esm/api/resources/orgs/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/orgs/client/Client.mjs +7 -7
- package/dist/esm/api/resources/root/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/root/client/Client.mjs +5 -5
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/taskArtifactNotifications/client/Client.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +7 -7
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +14 -14
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +14 -14
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.mjs +1 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +1 -1
- package/dist/esm/api/resources/utils/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/utils/client/Client.mjs +1 -1
- package/dist/esm/api/types/Cargo1.d.mts +1 -1
- package/dist/esm/api/types/CargoClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/CargoClientUpdate1.d.mts +1 -1
- package/dist/{cjs/api/types/DriverUpdateResp.d.ts → esm/api/types/DriverUpdateRes.d.mts} +1 -1
- package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +1 -1
- package/dist/esm/api/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +212 -214
- package/dist/cjs/api/resources/orders/resources/draft/client/Client.d.ts +0 -23
- package/dist/cjs/api/resources/orders/resources/draft/client/Client.js +0 -17
- package/dist/cjs/api/resources/orders/resources/draft/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/orders/resources/draft/client/index.js +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/index.d.ts +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/index.js +0 -18
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/Client.d.ts +0 -61
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/Client.js +0 -193
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/index.js +0 -17
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/index.d.ts +0 -1
- package/dist/cjs/api/resources/orders/resources/draft/resources/expanded/index.js +0 -17
- package/dist/cjs/api/resources/orders/resources/draft/resources/index.d.ts +0 -2
- package/dist/cjs/api/resources/orders/resources/draft/resources/index.js +0 -41
- package/dist/esm/api/resources/orders/resources/draft/client/Client.d.mts +0 -23
- package/dist/esm/api/resources/orders/resources/draft/client/Client.mjs +0 -13
- package/dist/esm/api/resources/orders/resources/draft/client/index.d.mts +0 -1
- package/dist/esm/api/resources/orders/resources/draft/client/index.mjs +0 -1
- package/dist/esm/api/resources/orders/resources/draft/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/index.mjs +0 -2
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/Client.d.mts +0 -61
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/Client.mjs +0 -156
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/index.mjs +0 -1
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/index.d.mts +0 -1
- package/dist/esm/api/resources/orders/resources/draft/resources/expanded/index.mjs +0 -1
- package/dist/esm/api/resources/orders/resources/draft/resources/index.d.mts +0 -2
- package/dist/esm/api/resources/orders/resources/draft/resources/index.mjs +0 -2
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.js +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.d.ts +0 -0
- /package/dist/cjs/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.js +0 -0
- /package/dist/cjs/api/types/{DriverUpdateResp.js → DriverUpdateRes.js} +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedListReq.mjs +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.d.mts +0 -0
- /package/dist/esm/api/resources/{orders/resources/draft/resources/expanded → orderDrafts}/client/requests/OrderDraftExpandedReq.mjs +0 -0
- /package/dist/esm/api/types/{DriverUpdateResp.mjs → DriverUpdateRes.mjs} +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
import * as environments from "../../../../../../../../environments.mjs";
|
|
14
|
-
import * as core from "../../../../../../../../core/index.mjs";
|
|
15
|
-
import * as Chrt from "../../../../../../../index.mjs";
|
|
16
|
-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
17
|
-
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
18
|
-
export class Expanded {
|
|
19
|
-
constructor(_options = {}) {
|
|
20
|
-
this._options = _options;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Fetches a single draft order with optional expanded related data. Only the creator of the draft order can access it.
|
|
24
|
-
*
|
|
25
|
-
* @param {string} orderIdOrShortId
|
|
26
|
-
* @param {Chrt.orders.draft.OrderDraftExpandedReq} request
|
|
27
|
-
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
-
*
|
|
29
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* await client.orders.draft.expanded.postExpandedV1("order_id_or_short_id")
|
|
33
|
-
*/
|
|
34
|
-
postExpandedV1(orderIdOrShortId, request = {}, requestOptions) {
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedV1(orderIdOrShortId, request, requestOptions));
|
|
36
|
-
}
|
|
37
|
-
__postExpandedV1(orderIdOrShortId_1) {
|
|
38
|
-
return __awaiter(this, arguments, void 0, function* (orderIdOrShortId, request = {}, requestOptions) {
|
|
39
|
-
var _a, _b, _c, _d;
|
|
40
|
-
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);
|
|
41
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
42
|
-
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/v1/${encodeURIComponent(orderIdOrShortId)}`),
|
|
43
|
-
method: "POST",
|
|
44
|
-
headers: _headers,
|
|
45
|
-
contentType: "application/json",
|
|
46
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
47
|
-
requestType: "json",
|
|
48
|
-
body: request,
|
|
49
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
50
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
51
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
52
|
-
});
|
|
53
|
-
if (_response.ok) {
|
|
54
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
55
|
-
}
|
|
56
|
-
if (_response.error.reason === "status-code") {
|
|
57
|
-
switch (_response.error.statusCode) {
|
|
58
|
-
case 422:
|
|
59
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
60
|
-
default:
|
|
61
|
-
throw new errors.ChrtError({
|
|
62
|
-
statusCode: _response.error.statusCode,
|
|
63
|
-
body: _response.error.body,
|
|
64
|
-
rawResponse: _response.rawResponse,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
switch (_response.error.reason) {
|
|
69
|
-
case "non-json":
|
|
70
|
-
throw new errors.ChrtError({
|
|
71
|
-
statusCode: _response.error.statusCode,
|
|
72
|
-
body: _response.error.rawBody,
|
|
73
|
-
rawResponse: _response.rawResponse,
|
|
74
|
-
});
|
|
75
|
-
case "timeout":
|
|
76
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/order_drafts/expanded/v1/{order_id_or_short_id}.");
|
|
77
|
-
case "unknown":
|
|
78
|
-
throw new errors.ChrtError({
|
|
79
|
-
message: _response.error.errorMessage,
|
|
80
|
-
rawResponse: _response.rawResponse,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Lists all draft orders created by the authenticated user with optional expanded related data.
|
|
87
|
-
*
|
|
88
|
-
* @param {Chrt.orders.draft.OrderDraftExpandedListReq} request
|
|
89
|
-
* @param {Expanded.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
|
-
*
|
|
91
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* await client.orders.draft.expanded.postExpandedListV1()
|
|
95
|
-
*/
|
|
96
|
-
postExpandedListV1(request = {}, requestOptions) {
|
|
97
|
-
return core.HttpResponsePromise.fromPromise(this.__postExpandedListV1(request, requestOptions));
|
|
98
|
-
}
|
|
99
|
-
__postExpandedListV1() {
|
|
100
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
101
|
-
var _a, _b, _c, _d;
|
|
102
|
-
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);
|
|
103
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
104
|
-
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"),
|
|
105
|
-
method: "POST",
|
|
106
|
-
headers: _headers,
|
|
107
|
-
contentType: "application/json",
|
|
108
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
109
|
-
requestType: "json",
|
|
110
|
-
body: request,
|
|
111
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
112
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
113
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
114
|
-
});
|
|
115
|
-
if (_response.ok) {
|
|
116
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
117
|
-
}
|
|
118
|
-
if (_response.error.reason === "status-code") {
|
|
119
|
-
switch (_response.error.statusCode) {
|
|
120
|
-
case 422:
|
|
121
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
122
|
-
default:
|
|
123
|
-
throw new errors.ChrtError({
|
|
124
|
-
statusCode: _response.error.statusCode,
|
|
125
|
-
body: _response.error.body,
|
|
126
|
-
rawResponse: _response.rawResponse,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
switch (_response.error.reason) {
|
|
131
|
-
case "non-json":
|
|
132
|
-
throw new errors.ChrtError({
|
|
133
|
-
statusCode: _response.error.statusCode,
|
|
134
|
-
body: _response.error.rawBody,
|
|
135
|
-
rawResponse: _response.rawResponse,
|
|
136
|
-
});
|
|
137
|
-
case "timeout":
|
|
138
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/order_drafts/expanded/list/v1.");
|
|
139
|
-
case "unknown":
|
|
140
|
-
throw new errors.ChrtError({
|
|
141
|
-
message: _response.error.errorMessage,
|
|
142
|
-
rawResponse: _response.rawResponse,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
_getAuthorizationHeader() {
|
|
148
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
150
|
-
if (bearer != null) {
|
|
151
|
-
return `Bearer ${bearer}`;
|
|
152
|
-
}
|
|
153
|
-
return undefined;
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests/index.mjs";
|
package/dist/esm/api/resources/orders/resources/draft/resources/expanded/client/requests/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.mjs";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|