@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import { Connections } from "../resources/connections/client/Client.mjs";
|
|
5
|
+
import { IntegrationExecutors } from "../resources/integrationExecutors/client/Client.mjs";
|
|
5
6
|
import { Orders } from "../resources/orders/client/Client.mjs";
|
|
6
7
|
import { Atlas } from "../resources/atlas/client/Client.mjs";
|
|
7
8
|
import { Cxt } from "../resources/cxt/client/Client.mjs";
|
|
@@ -17,6 +18,10 @@ export class ShippingIntegrations {
|
|
|
17
18
|
var _a;
|
|
18
19
|
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Connections(this._options)));
|
|
19
20
|
}
|
|
21
|
+
get integrationExecutors() {
|
|
22
|
+
var _a;
|
|
23
|
+
return ((_a = this._integrationExecutors) !== null && _a !== void 0 ? _a : (this._integrationExecutors = new IntegrationExecutors(this._options)));
|
|
24
|
+
}
|
|
20
25
|
get orders() {
|
|
21
26
|
var _a;
|
|
22
27
|
return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Orders(this._options)));
|
|
@@ -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
|
}
|
|
@@ -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);
|
|
@@ -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";
|
|
@@ -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.
|
|
@@ -20,7 +20,7 @@ export class Orders {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Returns one unified shipping integration order by its Mongo ObjectId with
|
|
23
|
+
* Returns one unified shipping integration order by its Mongo ObjectId with related organizations expanded. | () -> (ShippingIntegrationOrderExpanded1)
|
|
24
24
|
*
|
|
25
25
|
* @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.
|
|
26
26
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -81,6 +81,138 @@ export class Orders {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* 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)
|
|
86
|
+
*
|
|
87
|
+
* @param {Chrt.shippingIntegrations.OrdersListForIntegrationExecutorOperatorsV1Request} request
|
|
88
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await client.shippingIntegrations.orders.listForIntegrationExecutorOperatorsV1({
|
|
94
|
+
* sort_by: "ordered_at_timestamp",
|
|
95
|
+
* sort_order: "asc",
|
|
96
|
+
* page: 1,
|
|
97
|
+
* page_size: 1,
|
|
98
|
+
* search: "search",
|
|
99
|
+
* filter_shipping_integration: ["xcelerator"],
|
|
100
|
+
* filter_status: ["staged"],
|
|
101
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
102
|
+
* filter_reference_number: "filter_reference_number",
|
|
103
|
+
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
104
|
+
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
105
|
+
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
106
|
+
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
107
|
+
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
108
|
+
* filter_first_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
109
|
+
* })
|
|
110
|
+
*/
|
|
111
|
+
listForIntegrationExecutorOperatorsV1(request = {}, requestOptions) {
|
|
112
|
+
return core.HttpResponsePromise.fromPromise(this.__listForIntegrationExecutorOperatorsV1(request, requestOptions));
|
|
113
|
+
}
|
|
114
|
+
__listForIntegrationExecutorOperatorsV1() {
|
|
115
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
116
|
+
var _a, _b, _c, _d, _e, _f;
|
|
117
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_shipping_integration: filterShippingIntegration, filter_status: filterStatus, filter_integration_order_id: filterIntegrationOrderId, filter_reference_number: filterReferenceNumber, filter_ordered_at_timestamp_gte: filterOrderedAtTimestampGte, filter_ordered_at_timestamp_lte: filterOrderedAtTimestampLte, filter_last_mirrored_at_timestamp_gte: filterLastMirroredAtTimestampGte, filter_last_mirrored_at_timestamp_lte: filterLastMirroredAtTimestampLte, filter_first_mirrored_at_timestamp_gte: filterFirstMirroredAtTimestampGte, filter_first_mirrored_at_timestamp_lte: filterFirstMirroredAtTimestampLte, } = request;
|
|
118
|
+
const _queryParams = {};
|
|
119
|
+
if (sortBy !== undefined) {
|
|
120
|
+
_queryParams["sort_by"] = sortBy;
|
|
121
|
+
}
|
|
122
|
+
if (sortOrder !== undefined) {
|
|
123
|
+
_queryParams["sort_order"] = sortOrder;
|
|
124
|
+
}
|
|
125
|
+
if (page !== undefined) {
|
|
126
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
127
|
+
}
|
|
128
|
+
if (pageSize !== undefined) {
|
|
129
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
130
|
+
}
|
|
131
|
+
if (search !== undefined) {
|
|
132
|
+
_queryParams["search"] = search;
|
|
133
|
+
}
|
|
134
|
+
if (filterShippingIntegration !== undefined) {
|
|
135
|
+
if (Array.isArray(filterShippingIntegration)) {
|
|
136
|
+
_queryParams["filter_shipping_integration"] = filterShippingIntegration.map((item) => item);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
_queryParams["filter_shipping_integration"] = filterShippingIntegration;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (filterStatus !== undefined) {
|
|
143
|
+
if (Array.isArray(filterStatus)) {
|
|
144
|
+
_queryParams["filter_status"] = filterStatus.map((item) => item);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
_queryParams["filter_status"] = filterStatus;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (filterIntegrationOrderId !== undefined) {
|
|
151
|
+
_queryParams["filter_integration_order_id"] = filterIntegrationOrderId;
|
|
152
|
+
}
|
|
153
|
+
if (filterReferenceNumber !== undefined) {
|
|
154
|
+
_queryParams["filter_reference_number"] = filterReferenceNumber;
|
|
155
|
+
}
|
|
156
|
+
if (filterOrderedAtTimestampGte !== undefined) {
|
|
157
|
+
_queryParams["filter_ordered_at_timestamp_gte"] = filterOrderedAtTimestampGte;
|
|
158
|
+
}
|
|
159
|
+
if (filterOrderedAtTimestampLte !== undefined) {
|
|
160
|
+
_queryParams["filter_ordered_at_timestamp_lte"] = filterOrderedAtTimestampLte;
|
|
161
|
+
}
|
|
162
|
+
if (filterLastMirroredAtTimestampGte !== undefined) {
|
|
163
|
+
_queryParams["filter_last_mirrored_at_timestamp_gte"] = filterLastMirroredAtTimestampGte;
|
|
164
|
+
}
|
|
165
|
+
if (filterLastMirroredAtTimestampLte !== undefined) {
|
|
166
|
+
_queryParams["filter_last_mirrored_at_timestamp_lte"] = filterLastMirroredAtTimestampLte;
|
|
167
|
+
}
|
|
168
|
+
if (filterFirstMirroredAtTimestampGte !== undefined) {
|
|
169
|
+
_queryParams["filter_first_mirrored_at_timestamp_gte"] = filterFirstMirroredAtTimestampGte;
|
|
170
|
+
}
|
|
171
|
+
if (filterFirstMirroredAtTimestampLte !== undefined) {
|
|
172
|
+
_queryParams["filter_first_mirrored_at_timestamp_lte"] = filterFirstMirroredAtTimestampLte;
|
|
173
|
+
}
|
|
174
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
175
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
176
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "shipping_integrations/orders/list/for_integration_executor_operators/v1"),
|
|
177
|
+
method: "GET",
|
|
178
|
+
headers: _headers,
|
|
179
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
180
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
181
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
182
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
+
});
|
|
184
|
+
if (_response.ok) {
|
|
185
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
186
|
+
}
|
|
187
|
+
if (_response.error.reason === "status-code") {
|
|
188
|
+
switch (_response.error.statusCode) {
|
|
189
|
+
case 422:
|
|
190
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
191
|
+
default:
|
|
192
|
+
throw new errors.ChrtError({
|
|
193
|
+
statusCode: _response.error.statusCode,
|
|
194
|
+
body: _response.error.body,
|
|
195
|
+
rawResponse: _response.rawResponse,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
switch (_response.error.reason) {
|
|
200
|
+
case "non-json":
|
|
201
|
+
throw new errors.ChrtError({
|
|
202
|
+
statusCode: _response.error.statusCode,
|
|
203
|
+
body: _response.error.rawBody,
|
|
204
|
+
rawResponse: _response.rawResponse,
|
|
205
|
+
});
|
|
206
|
+
case "timeout":
|
|
207
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/orders/list/for_integration_executor_operators/v1.");
|
|
208
|
+
case "unknown":
|
|
209
|
+
throw new errors.ChrtError({
|
|
210
|
+
message: _response.error.errorMessage,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
84
216
|
/**
|
|
85
217
|
* Lists the caller's orders from every shipping integration with provider organizations expanded, filtering, sorting, pagination, and optional search. | () -> (ShippingIntegrationOrderListRes)
|
|
86
218
|
*
|
|
@@ -103,6 +235,8 @@ export class Orders {
|
|
|
103
235
|
* filter_reference_number: "filter_reference_number",
|
|
104
236
|
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
105
237
|
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
238
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
239
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
106
240
|
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
107
241
|
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
108
242
|
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -115,7 +249,7 @@ export class Orders {
|
|
|
115
249
|
__listV1() {
|
|
116
250
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
117
251
|
var _a, _b, _c, _d, _e, _f;
|
|
118
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_shipping_integration: filterShippingIntegration, filter_provider_org_id: filterProviderOrgId, filter_status: filterStatus, filter_integration_order_id: filterIntegrationOrderId, filter_reference_number: filterReferenceNumber, filter_ordered_at_timestamp_gte: filterOrderedAtTimestampGte, filter_ordered_at_timestamp_lte: filterOrderedAtTimestampLte, filter_last_mirrored_at_timestamp_gte: filterLastMirroredAtTimestampGte, filter_last_mirrored_at_timestamp_lte: filterLastMirroredAtTimestampLte, filter_first_mirrored_at_timestamp_gte: filterFirstMirroredAtTimestampGte, filter_first_mirrored_at_timestamp_lte: filterFirstMirroredAtTimestampLte, } = request;
|
|
252
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, search, filter_shipping_integration: filterShippingIntegration, filter_provider_org_id: filterProviderOrgId, filter_status: filterStatus, filter_integration_order_id: filterIntegrationOrderId, filter_reference_number: filterReferenceNumber, filter_ordered_at_timestamp_gte: filterOrderedAtTimestampGte, filter_ordered_at_timestamp_lte: filterOrderedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_last_mirrored_at_timestamp_gte: filterLastMirroredAtTimestampGte, filter_last_mirrored_at_timestamp_lte: filterLastMirroredAtTimestampLte, filter_first_mirrored_at_timestamp_gte: filterFirstMirroredAtTimestampGte, filter_first_mirrored_at_timestamp_lte: filterFirstMirroredAtTimestampLte, } = request;
|
|
119
253
|
const _queryParams = {};
|
|
120
254
|
if (sortBy !== undefined) {
|
|
121
255
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -168,6 +302,12 @@ export class Orders {
|
|
|
168
302
|
if (filterOrderedAtTimestampLte !== undefined) {
|
|
169
303
|
_queryParams["filter_ordered_at_timestamp_lte"] = filterOrderedAtTimestampLte;
|
|
170
304
|
}
|
|
305
|
+
if (filterCompletedAtTimestampGte !== undefined) {
|
|
306
|
+
_queryParams["filter_completed_at_timestamp_gte"] = filterCompletedAtTimestampGte;
|
|
307
|
+
}
|
|
308
|
+
if (filterCompletedAtTimestampLte !== undefined) {
|
|
309
|
+
_queryParams["filter_completed_at_timestamp_lte"] = filterCompletedAtTimestampLte;
|
|
310
|
+
}
|
|
171
311
|
if (filterLastMirroredAtTimestampGte !== undefined) {
|
|
172
312
|
_queryParams["filter_last_mirrored_at_timestamp_gte"] = filterLastMirroredAtTimestampGte;
|
|
173
313
|
}
|
|
@@ -239,6 +379,8 @@ export class Orders {
|
|
|
239
379
|
* filter_reference_number: "filter_reference_number",
|
|
240
380
|
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
241
381
|
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
382
|
+
* filter_completed_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
383
|
+
* filter_completed_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
242
384
|
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
243
385
|
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
244
386
|
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
@@ -251,7 +393,7 @@ export class Orders {
|
|
|
251
393
|
__statusSummaryV1() {
|
|
252
394
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
253
395
|
var _a, _b, _c, _d;
|
|
254
|
-
const { filter_shipping_integration: filterShippingIntegration, filter_provider_org_id: filterProviderOrgId, filter_status: filterStatus, filter_integration_order_id: filterIntegrationOrderId, filter_reference_number: filterReferenceNumber, filter_ordered_at_timestamp_gte: filterOrderedAtTimestampGte, filter_ordered_at_timestamp_lte: filterOrderedAtTimestampLte, filter_last_mirrored_at_timestamp_gte: filterLastMirroredAtTimestampGte, filter_last_mirrored_at_timestamp_lte: filterLastMirroredAtTimestampLte, filter_first_mirrored_at_timestamp_gte: filterFirstMirroredAtTimestampGte, filter_first_mirrored_at_timestamp_lte: filterFirstMirroredAtTimestampLte, } = request;
|
|
396
|
+
const { filter_shipping_integration: filterShippingIntegration, filter_provider_org_id: filterProviderOrgId, filter_status: filterStatus, filter_integration_order_id: filterIntegrationOrderId, filter_reference_number: filterReferenceNumber, filter_ordered_at_timestamp_gte: filterOrderedAtTimestampGte, filter_ordered_at_timestamp_lte: filterOrderedAtTimestampLte, filter_completed_at_timestamp_gte: filterCompletedAtTimestampGte, filter_completed_at_timestamp_lte: filterCompletedAtTimestampLte, filter_last_mirrored_at_timestamp_gte: filterLastMirroredAtTimestampGte, filter_last_mirrored_at_timestamp_lte: filterLastMirroredAtTimestampLte, filter_first_mirrored_at_timestamp_gte: filterFirstMirroredAtTimestampGte, filter_first_mirrored_at_timestamp_lte: filterFirstMirroredAtTimestampLte, } = request;
|
|
255
397
|
const _queryParams = {};
|
|
256
398
|
if (filterShippingIntegration !== undefined) {
|
|
257
399
|
if (Array.isArray(filterShippingIntegration)) {
|
|
@@ -289,6 +431,12 @@ export class Orders {
|
|
|
289
431
|
if (filterOrderedAtTimestampLte !== undefined) {
|
|
290
432
|
_queryParams["filter_ordered_at_timestamp_lte"] = filterOrderedAtTimestampLte;
|
|
291
433
|
}
|
|
434
|
+
if (filterCompletedAtTimestampGte !== undefined) {
|
|
435
|
+
_queryParams["filter_completed_at_timestamp_gte"] = filterCompletedAtTimestampGte;
|
|
436
|
+
}
|
|
437
|
+
if (filterCompletedAtTimestampLte !== undefined) {
|
|
438
|
+
_queryParams["filter_completed_at_timestamp_lte"] = filterCompletedAtTimestampLte;
|
|
439
|
+
}
|
|
292
440
|
if (filterLastMirroredAtTimestampGte !== undefined) {
|
|
293
441
|
_queryParams["filter_last_mirrored_at_timestamp_gte"] = filterLastMirroredAtTimestampGte;
|
|
294
442
|
}
|
|
@@ -347,7 +495,7 @@ export class Orders {
|
|
|
347
495
|
});
|
|
348
496
|
}
|
|
349
497
|
/**
|
|
350
|
-
* Returns distinct integration order IDs matching the query via case-insensitive regex within the caller's organization. |
|
|
498
|
+
* Returns distinct integration order IDs and reference numbers matching the query via case-insensitive regex within the caller's organization. | () -> (list[ShippingIntegrationOrderTypeaheadResult])
|
|
351
499
|
*
|
|
352
500
|
* @param {Chrt.shippingIntegrations.OrdersTypeaheadV1Request} request
|
|
353
501
|
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* sort_by: "ordered_at_timestamp",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* search: "search",
|
|
13
|
+
* filter_shipping_integration: ["xcelerator"],
|
|
14
|
+
* filter_status: ["staged"],
|
|
15
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
16
|
+
* filter_reference_number: "filter_reference_number",
|
|
17
|
+
* filter_ordered_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
18
|
+
* filter_ordered_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
19
|
+
* filter_last_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
20
|
+
* filter_last_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
21
|
+
* filter_first_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
22
|
+
* filter_first_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
23
|
+
* }
|
|
24
|
+
*/
|
|
25
|
+
export interface OrdersListForIntegrationExecutorOperatorsV1Request {
|
|
26
|
+
/** Field to sort by. */
|
|
27
|
+
sort_by?: Chrt.ShippingIntegrationOrderSortByEnum | null;
|
|
28
|
+
/** Sort order (asc or desc). */
|
|
29
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
30
|
+
page?: number | null;
|
|
31
|
+
page_size?: number | null;
|
|
32
|
+
/** Search provider order IDs and reference numbers. */
|
|
33
|
+
search?: string | null;
|
|
34
|
+
/** Filter by shipping integration(s) */
|
|
35
|
+
filter_shipping_integration?: (Chrt.OrgShippingIntegrationEnum1 | null) | (Chrt.OrgShippingIntegrationEnum1 | null)[];
|
|
36
|
+
/** Filter by unified status(es) */
|
|
37
|
+
filter_status?: (Chrt.ShippingIntegrationOrderStatusEnum1 | null) | (Chrt.ShippingIntegrationOrderStatusEnum1 | null)[];
|
|
38
|
+
/** Filter by the provider's exact order ID */
|
|
39
|
+
filter_integration_order_id?: string | null;
|
|
40
|
+
/** Filter by an exact reference number carried on the order */
|
|
41
|
+
filter_reference_number?: string | null;
|
|
42
|
+
/** Filter ordered_at_timestamp >= value */
|
|
43
|
+
filter_ordered_at_timestamp_gte?: string | null;
|
|
44
|
+
/** Filter ordered_at_timestamp <= value */
|
|
45
|
+
filter_ordered_at_timestamp_lte?: string | null;
|
|
46
|
+
/** Filter last_mirrored_at_timestamp >= value */
|
|
47
|
+
filter_last_mirrored_at_timestamp_gte?: string | null;
|
|
48
|
+
/** Filter last_mirrored_at_timestamp <= value */
|
|
49
|
+
filter_last_mirrored_at_timestamp_lte?: string | null;
|
|
50
|
+
/** Filter first_mirrored_at_timestamp >= value */
|
|
51
|
+
filter_first_mirrored_at_timestamp_gte?: string | null;
|
|
52
|
+
/** Filter first_mirrored_at_timestamp <= value */
|
|
53
|
+
filter_first_mirrored_at_timestamp_lte?: string | null;
|
|
54
|
+
}
|