@chrt-inc/typescript-sdk 1.944.0 → 1.953.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/Client.js +5 -1
- package/dist/cjs/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.ts +3 -0
- package/dist/cjs/api/resources/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 +3 -19
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.js +7 -78
- package/dist/cjs/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/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/ontime360/resources/orders/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.js +7 -7
- package/dist/cjs/api/resources/shippingIntegrations/resources/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 +3 -19
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.js +7 -78
- package/dist/cjs/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +1 -1
- package/dist/cjs/api/types/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/shipping/resources/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/Client.mjs +5 -1
- package/dist/esm/api/resources/shipping/resources/orderTemplatesNew/client/requests/OrderTemplatesNewListV1Request.d.mts +3 -0
- package/dist/esm/api/resources/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 +3 -19
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/Client.mjs +7 -78
- package/dist/esm/api/resources/shippingIntegrations/resources/atlas/resources/orders/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/dispatchScience/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/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/ontime360/resources/orders/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/shippingIntegrations/resources/ontime360/resources/orders/client/Client.mjs +7 -7
- package/dist/esm/api/resources/shippingIntegrations/resources/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 +3 -19
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/Client.mjs +7 -78
- package/dist/esm/api/resources/shippingIntegrations/resources/xcelerator/resources/orders/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +1 -1
- package/dist/esm/api/types/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 +163 -166
- 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
|
@@ -22,24 +22,24 @@ export class Orders {
|
|
|
22
22
|
/**
|
|
23
23
|
* Returns one mirrored Atlas order by the provider's own order ID with the provider organization expanded. | () -> (AtlasOrderExpanded1)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
26
26
|
* @param {string} integrationOrderId - Atlas's own ID for the order, as carried on a unified order row
|
|
27
27
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shippingIntegrations.atlas.orders.detailByIntegrationOrderIdV1("
|
|
32
|
+
* await client.shippingIntegrations.atlas.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
33
33
|
*/
|
|
34
|
-
detailByIntegrationOrderIdV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(
|
|
34
|
+
detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__detailByIntegrationOrderIdV1(
|
|
37
|
+
__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
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
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, `shipping_integrations/atlas/orders/by_integration_order_id/detail/v1/${encodeURIComponent(
|
|
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, `shipping_integrations/atlas/orders/by_integration_order_id/detail/v1/${encodeURIComponent(orgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
43
|
method: "GET",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -70,7 +70,7 @@ export class Orders {
|
|
|
70
70
|
rawResponse: _response.rawResponse,
|
|
71
71
|
});
|
|
72
72
|
case "timeout":
|
|
73
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/atlas/orders/by_integration_order_id/detail/v1/{
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/atlas/orders/by_integration_order_id/detail/v1/{org_id}/{integration_order_id}.");
|
|
74
74
|
case "unknown":
|
|
75
75
|
throw new errors.ChrtError({
|
|
76
76
|
message: _response.error.errorMessage,
|
|
@@ -322,77 +322,6 @@ export class Orders {
|
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
|
-
/**
|
|
326
|
-
* 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])
|
|
327
|
-
*
|
|
328
|
-
* @param {Chrt.shippingIntegrations.atlas.OrdersTypeaheadV1Request} request
|
|
329
|
-
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
330
|
-
*
|
|
331
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
332
|
-
*
|
|
333
|
-
* @example
|
|
334
|
-
* await client.shippingIntegrations.atlas.orders.typeaheadV1({
|
|
335
|
-
* query: "query",
|
|
336
|
-
* limit: 1
|
|
337
|
-
* })
|
|
338
|
-
*/
|
|
339
|
-
typeaheadV1(request, requestOptions) {
|
|
340
|
-
return core.HttpResponsePromise.fromPromise(this.__typeaheadV1(request, requestOptions));
|
|
341
|
-
}
|
|
342
|
-
__typeaheadV1(request, requestOptions) {
|
|
343
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
-
var _a, _b, _c, _d, _e;
|
|
345
|
-
const { query, limit } = request;
|
|
346
|
-
const _queryParams = {};
|
|
347
|
-
_queryParams["query"] = query;
|
|
348
|
-
if (limit !== undefined) {
|
|
349
|
-
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
350
|
-
}
|
|
351
|
-
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
352
|
-
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
353
|
-
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"),
|
|
354
|
-
method: "GET",
|
|
355
|
-
headers: _headers,
|
|
356
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
357
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
358
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
359
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
360
|
-
});
|
|
361
|
-
if (_response.ok) {
|
|
362
|
-
return {
|
|
363
|
-
data: _response.body,
|
|
364
|
-
rawResponse: _response.rawResponse,
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
if (_response.error.reason === "status-code") {
|
|
368
|
-
switch (_response.error.statusCode) {
|
|
369
|
-
case 422:
|
|
370
|
-
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
371
|
-
default:
|
|
372
|
-
throw new errors.ChrtError({
|
|
373
|
-
statusCode: _response.error.statusCode,
|
|
374
|
-
body: _response.error.body,
|
|
375
|
-
rawResponse: _response.rawResponse,
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
switch (_response.error.reason) {
|
|
380
|
-
case "non-json":
|
|
381
|
-
throw new errors.ChrtError({
|
|
382
|
-
statusCode: _response.error.statusCode,
|
|
383
|
-
body: _response.error.rawBody,
|
|
384
|
-
rawResponse: _response.rawResponse,
|
|
385
|
-
});
|
|
386
|
-
case "timeout":
|
|
387
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/atlas/orders/typeahead/v1.");
|
|
388
|
-
case "unknown":
|
|
389
|
-
throw new errors.ChrtError({
|
|
390
|
-
message: _response.error.errorMessage,
|
|
391
|
-
rawResponse: _response.rawResponse,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
325
|
_getAuthorizationHeader() {
|
|
397
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
398
327
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -33,16 +33,16 @@ export declare class Orders {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns one mirrored CXT order by the provider's own order ID with the provider organization expanded. | () -> (CxtOrderExpanded1)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
37
37
|
* @param {string} integrationOrderId - CXT's own decimal ID for the order, as carried on a unified order row
|
|
38
38
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shippingIntegrations.cxt.orders.detailByIntegrationOrderIdV1("
|
|
43
|
+
* await client.shippingIntegrations.cxt.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
44
44
|
*/
|
|
45
|
-
detailByIntegrationOrderIdV1(
|
|
45
|
+
detailByIntegrationOrderIdV1(orgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.CxtOrderExpanded1>;
|
|
46
46
|
private __detailByIntegrationOrderIdV1;
|
|
47
47
|
/**
|
|
48
48
|
* Returns one mirrored CXT order by its Mongo ObjectId with the provider organization expanded. | () -> (CxtOrderExpanded1)
|
package/dist/esm/api/resources/shippingIntegrations/resources/cxt/resources/orders/client/Client.mjs
CHANGED
|
@@ -22,24 +22,24 @@ export class Orders {
|
|
|
22
22
|
/**
|
|
23
23
|
* Returns one mirrored CXT order by the provider's own order ID with the provider organization expanded. | () -> (CxtOrderExpanded1)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
26
26
|
* @param {string} integrationOrderId - CXT's own decimal ID for the order, as carried on a unified order row
|
|
27
27
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shippingIntegrations.cxt.orders.detailByIntegrationOrderIdV1("
|
|
32
|
+
* await client.shippingIntegrations.cxt.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
33
33
|
*/
|
|
34
|
-
detailByIntegrationOrderIdV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(
|
|
34
|
+
detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__detailByIntegrationOrderIdV1(
|
|
37
|
+
__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
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
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, `shipping_integrations/cxt/orders/by_integration_order_id/detail/v1/${encodeURIComponent(
|
|
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, `shipping_integrations/cxt/orders/by_integration_order_id/detail/v1/${encodeURIComponent(orgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
43
|
method: "GET",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -70,7 +70,7 @@ export class Orders {
|
|
|
70
70
|
rawResponse: _response.rawResponse,
|
|
71
71
|
});
|
|
72
72
|
case "timeout":
|
|
73
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/cxt/orders/by_integration_order_id/detail/v1/{
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/cxt/orders/by_integration_order_id/detail/v1/{org_id}/{integration_order_id}.");
|
|
74
74
|
case "unknown":
|
|
75
75
|
throw new errors.ChrtError({
|
|
76
76
|
message: _response.error.errorMessage,
|
|
@@ -33,16 +33,16 @@ export declare class Orders {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns one mirrored DispatchScience order by the provider's own order ID. | () -> (DispatchScienceOrder1)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
37
37
|
* @param {string} integrationOrderId - DispatchScience's own ID for the order (its orderId), as carried on a unified order row
|
|
38
38
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shippingIntegrations.dispatchScience.orders.detailByIntegrationOrderIdV1("
|
|
43
|
+
* await client.shippingIntegrations.dispatchScience.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
44
44
|
*/
|
|
45
|
-
detailByIntegrationOrderIdV1(
|
|
45
|
+
detailByIntegrationOrderIdV1(orgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.DispatchScienceOrder1>;
|
|
46
46
|
private __detailByIntegrationOrderIdV1;
|
|
47
47
|
/**
|
|
48
48
|
* Returns one mirrored DispatchScience order by its Mongo ObjectId. | () -> (DispatchScienceOrder1)
|
|
@@ -22,24 +22,24 @@ export class Orders {
|
|
|
22
22
|
/**
|
|
23
23
|
* Returns one mirrored DispatchScience order by the provider's own order ID. | () -> (DispatchScienceOrder1)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
26
26
|
* @param {string} integrationOrderId - DispatchScience's own ID for the order (its orderId), as carried on a unified order row
|
|
27
27
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shippingIntegrations.dispatchScience.orders.detailByIntegrationOrderIdV1("
|
|
32
|
+
* await client.shippingIntegrations.dispatchScience.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
33
33
|
*/
|
|
34
|
-
detailByIntegrationOrderIdV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(
|
|
34
|
+
detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__detailByIntegrationOrderIdV1(
|
|
37
|
+
__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
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
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, `shipping_integrations/dispatch_science/orders/by_integration_order_id/detail/v1/${encodeURIComponent(
|
|
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, `shipping_integrations/dispatch_science/orders/by_integration_order_id/detail/v1/${encodeURIComponent(orgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
43
|
method: "GET",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -70,7 +70,7 @@ export class Orders {
|
|
|
70
70
|
rawResponse: _response.rawResponse,
|
|
71
71
|
});
|
|
72
72
|
case "timeout":
|
|
73
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/dispatch_science/orders/by_integration_order_id/detail/v1/{
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/dispatch_science/orders/by_integration_order_id/detail/v1/{org_id}/{integration_order_id}.");
|
|
74
74
|
case "unknown":
|
|
75
75
|
throw new errors.ChrtError({
|
|
76
76
|
message: _response.error.errorMessage,
|
|
@@ -33,16 +33,16 @@ export declare class Orders {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
37
37
|
* @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
|
|
38
38
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("
|
|
43
|
+
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
44
44
|
*/
|
|
45
|
-
detailByIntegrationOrderIdV1(
|
|
45
|
+
detailByIntegrationOrderIdV1(orgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
|
|
46
46
|
private __detailByIntegrationOrderIdV1;
|
|
47
47
|
/**
|
|
48
48
|
* Returns one mirrored e-Courier order by its Mongo ObjectId. | () -> (EcourierOrder1)
|
|
@@ -22,24 +22,24 @@ export class Orders {
|
|
|
22
22
|
/**
|
|
23
23
|
* Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
26
26
|
* @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
|
|
27
27
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("
|
|
32
|
+
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
33
33
|
*/
|
|
34
|
-
detailByIntegrationOrderIdV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(
|
|
34
|
+
detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__detailByIntegrationOrderIdV1(
|
|
37
|
+
__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
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
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, `shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/${encodeURIComponent(
|
|
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, `shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/${encodeURIComponent(orgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
43
|
method: "GET",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -70,7 +70,7 @@ export class Orders {
|
|
|
70
70
|
rawResponse: _response.rawResponse,
|
|
71
71
|
});
|
|
72
72
|
case "timeout":
|
|
73
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/{
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/{org_id}/{integration_order_id}.");
|
|
74
74
|
case "unknown":
|
|
75
75
|
throw new errors.ChrtError({
|
|
76
76
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,44 @@
|
|
|
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 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/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/Client.mjs
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
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 { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
export class IntegrationExecutors {
|
|
18
|
+
constructor(_options = {}) {
|
|
19
|
+
this._options = _options;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 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)
|
|
23
|
+
*
|
|
24
|
+
* @param {IntegrationExecutors.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.shippingIntegrations.integrationExecutors.listV1()
|
|
28
|
+
*/
|
|
29
|
+
listV1(requestOptions) {
|
|
30
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(requestOptions));
|
|
31
|
+
}
|
|
32
|
+
__listV1(requestOptions) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
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);
|
|
36
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
37
|
+
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"),
|
|
38
|
+
method: "GET",
|
|
39
|
+
headers: _headers,
|
|
40
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
41
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
42
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
43
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
44
|
+
});
|
|
45
|
+
if (_response.ok) {
|
|
46
|
+
return {
|
|
47
|
+
data: _response.body,
|
|
48
|
+
rawResponse: _response.rawResponse,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (_response.error.reason === "status-code") {
|
|
52
|
+
throw new errors.ChrtError({
|
|
53
|
+
statusCode: _response.error.statusCode,
|
|
54
|
+
body: _response.error.body,
|
|
55
|
+
rawResponse: _response.rawResponse,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
switch (_response.error.reason) {
|
|
59
|
+
case "non-json":
|
|
60
|
+
throw new errors.ChrtError({
|
|
61
|
+
statusCode: _response.error.statusCode,
|
|
62
|
+
body: _response.error.rawBody,
|
|
63
|
+
rawResponse: _response.rawResponse,
|
|
64
|
+
});
|
|
65
|
+
case "timeout":
|
|
66
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/integration_executors/list/v1.");
|
|
67
|
+
case "unknown":
|
|
68
|
+
throw new errors.ChrtError({
|
|
69
|
+
message: _response.error.errorMessage,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
_getAuthorizationHeader() {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
78
|
+
if (bearer != null) {
|
|
79
|
+
return `Bearer ${bearer}`;
|
|
80
|
+
}
|
|
81
|
+
return undefined;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/client/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/api/resources/shippingIntegrations/resources/integrationExecutors/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -33,16 +33,16 @@ export declare class Orders {
|
|
|
33
33
|
/**
|
|
34
34
|
* Returns one mirrored OnTime360 order by the provider's own order GUID. | () -> (OnTime360Order1)
|
|
35
35
|
*
|
|
36
|
-
* @param {string}
|
|
36
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
37
37
|
* @param {string} integrationOrderId - OnTime360's own GUID for the order (its ID), as carried on a unified order row
|
|
38
38
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
39
|
*
|
|
40
40
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
* await client.shippingIntegrations.ontime360.orders.detailByIntegrationOrderIdV1("
|
|
43
|
+
* await client.shippingIntegrations.ontime360.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
44
44
|
*/
|
|
45
|
-
detailByIntegrationOrderIdV1(
|
|
45
|
+
detailByIntegrationOrderIdV1(orgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.OnTime360Order1>;
|
|
46
46
|
private __detailByIntegrationOrderIdV1;
|
|
47
47
|
/**
|
|
48
48
|
* Returns one mirrored OnTime360 order by its Mongo ObjectId. | () -> (OnTime360Order1)
|
|
@@ -22,24 +22,24 @@ export class Orders {
|
|
|
22
22
|
/**
|
|
23
23
|
* Returns one mirrored OnTime360 order by the provider's own order GUID. | () -> (OnTime360Order1)
|
|
24
24
|
*
|
|
25
|
-
* @param {string}
|
|
25
|
+
* @param {string} orgId - CHRT org ID of the other party (executor if caller is coordinator, coordinator if caller is executor)
|
|
26
26
|
* @param {string} integrationOrderId - OnTime360's own GUID for the order (its ID), as carried on a unified order row
|
|
27
27
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.shippingIntegrations.ontime360.orders.detailByIntegrationOrderIdV1("
|
|
32
|
+
* await client.shippingIntegrations.ontime360.orders.detailByIntegrationOrderIdV1("org_id", "integration_order_id")
|
|
33
33
|
*/
|
|
34
|
-
detailByIntegrationOrderIdV1(
|
|
35
|
-
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(
|
|
34
|
+
detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions));
|
|
36
36
|
}
|
|
37
|
-
__detailByIntegrationOrderIdV1(
|
|
37
|
+
__detailByIntegrationOrderIdV1(orgId, integrationOrderId, requestOptions) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d;
|
|
40
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
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, `shipping_integrations/ontime360/orders/by_integration_order_id/detail/v1/${encodeURIComponent(
|
|
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, `shipping_integrations/ontime360/orders/by_integration_order_id/detail/v1/${encodeURIComponent(orgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
43
|
method: "GET",
|
|
44
44
|
headers: _headers,
|
|
45
45
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -70,7 +70,7 @@ export class Orders {
|
|
|
70
70
|
rawResponse: _response.rawResponse,
|
|
71
71
|
});
|
|
72
72
|
case "timeout":
|
|
73
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ontime360/orders/by_integration_order_id/detail/v1/{
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ontime360/orders/by_integration_order_id/detail/v1/{org_id}/{integration_order_id}.");
|
|
74
74
|
case "unknown":
|
|
75
75
|
throw new errors.ChrtError({
|
|
76
76
|
message: _response.error.errorMessage,
|
|
@@ -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.
|