@chrt-inc/typescript-sdk 1.944.0 → 1.949.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/shippingIntegrations/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/shippingIntegrations/client/Client.js +19 -14
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.ts +0 -16
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.js +0 -71
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/shippingIntegrations/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/index.js +2 -1
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.d.ts +44 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.js +121 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.js +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/index.js +17 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/Client.d.ts +35 -2
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/Client.js +152 -4
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.d.ts +54 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListV1Request.d.ts +6 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersStatusSummaryV1Request.d.ts +6 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/orders/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.ts +0 -16
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.js +0 -71
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutor.d.ts +17 -0
- package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutorListRes.d.ts +8 -0
- package/dist/cjs/api/types/ShippingIntegrationIntegrationExecutorListRes.js +5 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.ts +8 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.js +10 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderExpanded1.d.ts +3 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderSortByEnum.d.ts +2 -1
- package/dist/cjs/api/types/ShippingIntegrationOrderSortByEnum.js +1 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.d.ts +5 -1
- package/dist/cjs/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.js +5 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -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/shippingIntegrations/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/shippingIntegrations/client/Client.mjs +5 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.d.mts +0 -16
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.mjs +0 -71
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/shippingIntegrations/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.d.mts +44 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.mjs +84 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/Client.d.mts +35 -2
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/Client.mjs +152 -4
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.d.mts +54 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersListV1Request.d.mts +6 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/OrdersStatusSummaryV1Request.d.mts +6 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/orders/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.d.mts +0 -16
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.mjs +0 -71
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.mts +0 -1
- package/dist/esm/api/types/ShippingIntegrationIntegrationExecutor.d.mts +17 -0
- package/dist/esm/api/types/ShippingIntegrationIntegrationExecutorListRes.d.mts +8 -0
- package/dist/esm/api/types/ShippingIntegrationIntegrationExecutorListRes.mjs +4 -0
- package/dist/esm/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.mts +8 -0
- package/dist/esm/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.mjs +7 -0
- package/dist/esm/api/types/ShippingIntegrationOrderExpanded1.d.mts +3 -0
- package/dist/esm/api/types/ShippingIntegrationOrderSortByEnum.d.mts +2 -1
- package/dist/esm/api/types/ShippingIntegrationOrderSortByEnum.mjs +1 -0
- package/dist/esm/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.d.mts +5 -1
- package/dist/esm/api/types/ShippingIntegrationOrderTypeaheadFieldEnum.mjs +4 -1
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +142 -134
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.d.ts +0 -16
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.d.ts +0 -16
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.d.mts +0 -16
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.d.mts +0 -16
- /package/dist/cjs/api/resources/shippingIntegrations/resources/{atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.js → orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.js} +0 -0
- /package/dist/cjs/api/{resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.js → types/ShippingIntegrationIntegrationExecutor.js} +0 -0
- /package/dist/esm/api/resources/shippingIntegrations/resources/{atlas/resources/orders/client/requests/OrdersTypeaheadV1Request.mjs → orders/client/requests/OrdersListForIntegrationExecutorOperatorsV1Request.mjs} +0 -0
- /package/dist/esm/api/{resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/OrdersTypeaheadV1Request.mjs → types/ShippingIntegrationIntegrationExecutor.mjs} +0 -0
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.949.0",
|
|
64
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.949.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) });
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../core/index.js";
|
|
6
6
|
import { Connections } from "../resources/connections/client/Client.js";
|
|
7
|
+
import { IntegrationExecutors } from "../resources/integrationExecutors/client/Client.js";
|
|
7
8
|
import { Orders } from "../resources/orders/client/Client.js";
|
|
8
9
|
import { Atlas } from "../resources/atlas/client/Client.js";
|
|
9
10
|
import { Cxt } from "../resources/cxt/client/Client.js";
|
|
@@ -25,6 +26,7 @@ export declare namespace ShippingIntegrations {
|
|
|
25
26
|
export declare class ShippingIntegrations {
|
|
26
27
|
protected readonly _options: ShippingIntegrations.Options;
|
|
27
28
|
protected _connections: Connections | undefined;
|
|
29
|
+
protected _integrationExecutors: IntegrationExecutors | undefined;
|
|
28
30
|
protected _orders: Orders | undefined;
|
|
29
31
|
protected _atlas: Atlas | undefined;
|
|
30
32
|
protected _cxt: Cxt | undefined;
|
|
@@ -34,6 +36,7 @@ export declare class ShippingIntegrations {
|
|
|
34
36
|
protected _xcelerator: Xcelerator | undefined;
|
|
35
37
|
constructor(_options?: ShippingIntegrations.Options);
|
|
36
38
|
get connections(): Connections;
|
|
39
|
+
get integrationExecutors(): IntegrationExecutors;
|
|
37
40
|
get orders(): Orders;
|
|
38
41
|
get atlas(): Atlas;
|
|
39
42
|
get cxt(): Cxt;
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ShippingIntegrations = void 0;
|
|
7
7
|
const Client_js_1 = require("../resources/connections/client/Client.js");
|
|
8
|
-
const Client_js_2 = require("../resources/
|
|
9
|
-
const Client_js_3 = require("../resources/
|
|
10
|
-
const Client_js_4 = require("../resources/
|
|
11
|
-
const Client_js_5 = require("../resources/
|
|
12
|
-
const Client_js_6 = require("../resources/
|
|
13
|
-
const Client_js_7 = require("../resources/
|
|
14
|
-
const Client_js_8 = require("../resources/
|
|
8
|
+
const Client_js_2 = require("../resources/integrationExecutors/client/Client.js");
|
|
9
|
+
const Client_js_3 = require("../resources/orders/client/Client.js");
|
|
10
|
+
const Client_js_4 = require("../resources/atlas/client/Client.js");
|
|
11
|
+
const Client_js_5 = require("../resources/cxt/client/Client.js");
|
|
12
|
+
const Client_js_6 = require("../resources/dispatchScience/client/Client.js");
|
|
13
|
+
const Client_js_7 = require("../resources/ecourier/client/Client.js");
|
|
14
|
+
const Client_js_8 = require("../resources/ontime360/client/Client.js");
|
|
15
|
+
const Client_js_9 = require("../resources/xcelerator/client/Client.js");
|
|
15
16
|
class ShippingIntegrations {
|
|
16
17
|
constructor(_options = {}) {
|
|
17
18
|
this._options = _options;
|
|
@@ -20,33 +21,37 @@ class ShippingIntegrations {
|
|
|
20
21
|
var _a;
|
|
21
22
|
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_js_1.Connections(this._options)));
|
|
22
23
|
}
|
|
24
|
+
get integrationExecutors() {
|
|
25
|
+
var _a;
|
|
26
|
+
return ((_a = this._integrationExecutors) !== null && _a !== void 0 ? _a : (this._integrationExecutors = new Client_js_2.IntegrationExecutors(this._options)));
|
|
27
|
+
}
|
|
23
28
|
get orders() {
|
|
24
29
|
var _a;
|
|
25
|
-
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new
|
|
30
|
+
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_3.Orders(this._options)));
|
|
26
31
|
}
|
|
27
32
|
get atlas() {
|
|
28
33
|
var _a;
|
|
29
|
-
return ((_a = this._atlas) !== null && _a !== void 0 ? _a : (this._atlas = new
|
|
34
|
+
return ((_a = this._atlas) !== null && _a !== void 0 ? _a : (this._atlas = new Client_js_4.Atlas(this._options)));
|
|
30
35
|
}
|
|
31
36
|
get cxt() {
|
|
32
37
|
var _a;
|
|
33
|
-
return ((_a = this._cxt) !== null && _a !== void 0 ? _a : (this._cxt = new
|
|
38
|
+
return ((_a = this._cxt) !== null && _a !== void 0 ? _a : (this._cxt = new Client_js_5.Cxt(this._options)));
|
|
34
39
|
}
|
|
35
40
|
get dispatchScience() {
|
|
36
41
|
var _a;
|
|
37
|
-
return ((_a = this._dispatchScience) !== null && _a !== void 0 ? _a : (this._dispatchScience = new
|
|
42
|
+
return ((_a = this._dispatchScience) !== null && _a !== void 0 ? _a : (this._dispatchScience = new Client_js_6.DispatchScience(this._options)));
|
|
38
43
|
}
|
|
39
44
|
get ecourier() {
|
|
40
45
|
var _a;
|
|
41
|
-
return ((_a = this._ecourier) !== null && _a !== void 0 ? _a : (this._ecourier = new
|
|
46
|
+
return ((_a = this._ecourier) !== null && _a !== void 0 ? _a : (this._ecourier = new Client_js_7.Ecourier(this._options)));
|
|
42
47
|
}
|
|
43
48
|
get ontime360() {
|
|
44
49
|
var _a;
|
|
45
|
-
return ((_a = this._ontime360) !== null && _a !== void 0 ? _a : (this._ontime360 = new
|
|
50
|
+
return ((_a = this._ontime360) !== null && _a !== void 0 ? _a : (this._ontime360 = new Client_js_8.Ontime360(this._options)));
|
|
46
51
|
}
|
|
47
52
|
get xcelerator() {
|
|
48
53
|
var _a;
|
|
49
|
-
return ((_a = this._xcelerator) !== null && _a !== void 0 ? _a : (this._xcelerator = new
|
|
54
|
+
return ((_a = this._xcelerator) !== null && _a !== void 0 ? _a : (this._xcelerator = new Client_js_9.Xcelerator(this._options)));
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
exports.ShippingIntegrations = ShippingIntegrations;
|
|
@@ -100,21 +100,5 @@ export declare class Orders {
|
|
|
100
100
|
*/
|
|
101
101
|
syncOneV1(request: Chrt.shippingIntegrations.atlas.AtlasOrderSyncOneReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.AtlasOrder1>;
|
|
102
102
|
private __syncOneV1;
|
|
103
|
-
/**
|
|
104
|
-
* Returns distinct Atlas integration order IDs matching the query via case-insensitive regex within the caller's organization. | authz: caller's organization scope | () -> (list[ShippingIntegrationOrderTypeaheadResult])
|
|
105
|
-
*
|
|
106
|
-
* @param {Chrt.shippingIntegrations.atlas.OrdersTypeaheadV1Request} request
|
|
107
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
-
*
|
|
109
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* await client.shippingIntegrations.atlas.orders.typeaheadV1({
|
|
113
|
-
* query: "query",
|
|
114
|
-
* limit: 1
|
|
115
|
-
* })
|
|
116
|
-
*/
|
|
117
|
-
typeaheadV1(request: Chrt.shippingIntegrations.atlas.OrdersTypeaheadV1Request, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.ShippingIntegrationOrderTypeaheadResult[]>;
|
|
118
|
-
private __typeaheadV1;
|
|
119
103
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
120
104
|
}
|
|
@@ -358,77 +358,6 @@ class Orders {
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
/**
|
|
362
|
-
* Returns distinct Atlas integration order IDs matching the query via case-insensitive regex within the caller's organization. | authz: caller's organization scope | () -> (list[ShippingIntegrationOrderTypeaheadResult])
|
|
363
|
-
*
|
|
364
|
-
* @param {Chrt.shippingIntegrations.atlas.OrdersTypeaheadV1Request} request
|
|
365
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
366
|
-
*
|
|
367
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
368
|
-
*
|
|
369
|
-
* @example
|
|
370
|
-
* await client.shippingIntegrations.atlas.orders.typeaheadV1({
|
|
371
|
-
* query: "query",
|
|
372
|
-
* limit: 1
|
|
373
|
-
* })
|
|
374
|
-
*/
|
|
375
|
-
typeaheadV1(request, requestOptions) {
|
|
376
|
-
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
377
|
-
}
|
|
378
|
-
__typeaheadV1(request, requestOptions) {
|
|
379
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
380
|
-
var _a, _b, _c, _d, _e;
|
|
381
|
-
const { query, limit } = request;
|
|
382
|
-
const _queryParams = {};
|
|
383
|
-
_queryParams["query"] = query;
|
|
384
|
-
if (limit !== undefined) {
|
|
385
|
-
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
386
|
-
}
|
|
387
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
388
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
389
|
-
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "shipping_integrations/atlas/orders/typeahead/v1"),
|
|
390
|
-
method: "GET",
|
|
391
|
-
headers: _headers,
|
|
392
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
393
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
394
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
395
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
396
|
-
});
|
|
397
|
-
if (_response.ok) {
|
|
398
|
-
return {
|
|
399
|
-
data: _response.body,
|
|
400
|
-
rawResponse: _response.rawResponse,
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
if (_response.error.reason === "status-code") {
|
|
404
|
-
switch (_response.error.statusCode) {
|
|
405
|
-
case 422:
|
|
406
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
407
|
-
default:
|
|
408
|
-
throw new errors.ChrtError({
|
|
409
|
-
statusCode: _response.error.statusCode,
|
|
410
|
-
body: _response.error.body,
|
|
411
|
-
rawResponse: _response.rawResponse,
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
switch (_response.error.reason) {
|
|
416
|
-
case "non-json":
|
|
417
|
-
throw new errors.ChrtError({
|
|
418
|
-
statusCode: _response.error.statusCode,
|
|
419
|
-
body: _response.error.rawBody,
|
|
420
|
-
rawResponse: _response.rawResponse,
|
|
421
|
-
});
|
|
422
|
-
case "timeout":
|
|
423
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/atlas/orders/typeahead/v1.");
|
|
424
|
-
case "unknown":
|
|
425
|
-
throw new errors.ChrtError({
|
|
426
|
-
message: _response.error.errorMessage,
|
|
427
|
-
rawResponse: _response.rawResponse,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
361
|
_getAuthorizationHeader() {
|
|
433
362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
434
363
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -36,8 +36,9 @@ 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.xcelerator = exports.ontime360 = exports.ecourier = exports.dispatchScience = exports.cxt = exports.atlas = exports.orders = exports.connections = void 0;
|
|
39
|
+
exports.xcelerator = exports.ontime360 = exports.ecourier = exports.dispatchScience = exports.cxt = exports.atlas = exports.orders = exports.integrationExecutors = exports.connections = void 0;
|
|
40
40
|
exports.connections = __importStar(require("./connections/index.js"));
|
|
41
|
+
exports.integrationExecutors = __importStar(require("./integrationExecutors/index.js"));
|
|
41
42
|
exports.orders = __importStar(require("./orders/index.js"));
|
|
42
43
|
exports.atlas = __importStar(require("./atlas/index.js"));
|
|
43
44
|
exports.cxt = __importStar(require("./cxt/index.js"));
|
|
@@ -0,0 +1,44 @@
|
|
|
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 IntegrationExecutors {
|
|
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 IntegrationExecutors {
|
|
31
|
+
protected readonly _options: IntegrationExecutors.Options;
|
|
32
|
+
constructor(_options?: IntegrationExecutors.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Lists all distinct integration executor organizations that have credentials configured across any shipping integration, with public organization data expanded. | authz: min_org_role=operator | () -> (ShippingIntegrationIntegrationExecutorListRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {IntegrationExecutors.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.shippingIntegrations.integrationExecutors.listV1()
|
|
40
|
+
*/
|
|
41
|
+
listV1(requestOptions?: IntegrationExecutors.RequestOptions): core.HttpResponsePromise<Chrt.ShippingIntegrationIntegrationExecutorListRes>;
|
|
42
|
+
private __listV1;
|
|
43
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
44
|
+
}
|
package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
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.IntegrationExecutors = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
class IntegrationExecutors {
|
|
54
|
+
constructor(_options = {}) {
|
|
55
|
+
this._options = _options;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Lists all distinct integration executor organizations that have credentials configured across any shipping integration, with public organization data expanded. | authz: min_org_role=operator | () -> (ShippingIntegrationIntegrationExecutorListRes)
|
|
59
|
+
*
|
|
60
|
+
* @param {IntegrationExecutors.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.shippingIntegrations.integrationExecutors.listV1()
|
|
64
|
+
*/
|
|
65
|
+
listV1(requestOptions) {
|
|
66
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
67
|
+
}
|
|
68
|
+
__listV1(requestOptions) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
var _a, _b, _c, _d;
|
|
71
|
+
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);
|
|
72
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
73
|
+
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_integrations/integration_executors/list/v1"),
|
|
74
|
+
method: "GET",
|
|
75
|
+
headers: _headers,
|
|
76
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
77
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
78
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
|
+
});
|
|
81
|
+
if (_response.ok) {
|
|
82
|
+
return {
|
|
83
|
+
data: _response.body,
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (_response.error.reason === "status-code") {
|
|
88
|
+
throw new errors.ChrtError({
|
|
89
|
+
statusCode: _response.error.statusCode,
|
|
90
|
+
body: _response.error.body,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
switch (_response.error.reason) {
|
|
95
|
+
case "non-json":
|
|
96
|
+
throw new errors.ChrtError({
|
|
97
|
+
statusCode: _response.error.statusCode,
|
|
98
|
+
body: _response.error.rawBody,
|
|
99
|
+
rawResponse: _response.rawResponse,
|
|
100
|
+
});
|
|
101
|
+
case "timeout":
|
|
102
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/integration_executors/list/v1.");
|
|
103
|
+
case "unknown":
|
|
104
|
+
throw new errors.ChrtError({
|
|
105
|
+
message: _response.error.errorMessage,
|
|
106
|
+
rawResponse: _response.rawResponse,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
_getAuthorizationHeader() {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
114
|
+
if (bearer != null) {
|
|
115
|
+
return `Bearer ${bearer}`;
|
|
116
|
+
}
|
|
117
|
+
return undefined;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.IntegrationExecutors = IntegrationExecutors;
|
package/dist/cjs/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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);
|
|
@@ -31,7 +31,7 @@ export declare class Orders {
|
|
|
31
31
|
protected readonly _options: Orders.Options;
|
|
32
32
|
constructor(_options?: Orders.Options);
|
|
33
33
|
/**
|
|
34
|
-
* Returns one unified shipping integration order by its Mongo ObjectId with
|
|
34
|
+
* Returns one unified shipping integration order by its Mongo ObjectId with related organizations expanded. | () -> (ShippingIntegrationOrderExpanded1)
|
|
35
35
|
*
|
|
36
36
|
* @param {string} id - Mongo ObjectId of the unified order document. The provider's own order ID is the integration_order_id field on the returned order.
|
|
37
37
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -43,6 +43,35 @@ export declare class Orders {
|
|
|
43
43
|
*/
|
|
44
44
|
detailV1(id: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.ShippingIntegrationOrderExpanded1>;
|
|
45
45
|
private __detailV1;
|
|
46
|
+
/**
|
|
47
|
+
* Lists orders assigned to the caller's integration executor organization across all shipping integrations with integration coordinator organizations expanded, filtering, sorting, pagination, and optional search. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (ShippingIntegrationOrderListRes)
|
|
48
|
+
*
|
|
49
|
+
* @param {Chrt.shippingIntegrations.OrdersListForIntegrationExecutorOperatorsV1Request} request
|
|
50
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.shippingIntegrations.orders.listForIntegrationExecutorOperatorsV1({
|
|
56
|
+
* sort_by: "ordered_at_timestamp",
|
|
57
|
+
* sort_order: "asc",
|
|
58
|
+
* page: 1,
|
|
59
|
+
* page_size: 1,
|
|
60
|
+
* search: "search",
|
|
61
|
+
* filter_shipping_integration: ["xcelerator"],
|
|
62
|
+
* filter_status: ["staged"],
|
|
63
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
64
|
+
* filter_reference_number: "filter_reference_number",
|
|
65
|
+
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
66
|
+
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
67
|
+
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
68
|
+
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
69
|
+
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
70
|
+
* filter_first_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
listForIntegrationExecutorOperatorsV1(request?: Chrt.shippingIntegrations.OrdersListForIntegrationExecutorOperatorsV1Request, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.ShippingIntegrationOrderListRes>;
|
|
74
|
+
private __listForIntegrationExecutorOperatorsV1;
|
|
46
75
|
/**
|
|
47
76
|
* Lists the caller's orders from every shipping integration with provider organizations expanded, filtering, sorting, pagination, and optional search. | () -> (ShippingIntegrationOrderListRes)
|
|
48
77
|
*
|
|
@@ -65,6 +94,8 @@ export declare class Orders {
|
|
|
65
94
|
* filter_reference_number: "filter_reference_number",
|
|
66
95
|
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
67
96
|
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
97
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
98
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
68
99
|
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
69
100
|
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
70
101
|
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -90,6 +121,8 @@ export declare class Orders {
|
|
|
90
121
|
* filter_reference_number: "filter_reference_number",
|
|
91
122
|
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
92
123
|
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
124
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
125
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
93
126
|
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
94
127
|
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
95
128
|
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -99,7 +132,7 @@ export declare class Orders {
|
|
|
99
132
|
statusSummaryV1(request?: Chrt.shippingIntegrations.OrdersStatusSummaryV1Request, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.ShippingIntegrationOrderStatusSummaryRes>;
|
|
100
133
|
private __statusSummaryV1;
|
|
101
134
|
/**
|
|
102
|
-
* Returns distinct integration order IDs matching the query via case-insensitive regex within the caller's organization. |
|
|
135
|
+
* Returns distinct integration order IDs and reference numbers matching the query via case-insensitive regex within the caller's organization. | () -> (list[ShippingIntegrationOrderTypeaheadResult])
|
|
103
136
|
*
|
|
104
137
|
* @param {Chrt.shippingIntegrations.OrdersTypeaheadV1Request} request
|
|
105
138
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|