@chrt-inc/typescript-sdk 1.935.0 → 1.944.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 +9 -4
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/Client.js +22 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/client/index.js +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/index.d.ts +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/index.js +18 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.d.ts +119 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.js +430 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.js +17 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.d.ts +26 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.js +5 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.d.ts +15 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.js +17 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/index.js +43 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.ts +104 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.js +371 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.js +17 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.d.ts +15 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.js +5 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.d.ts +48 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.js +5 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.d.ts +1 -0
- package/dist/cjs/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.js +17 -0
- 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/types/EcourierCredsLimited1.d.ts +29 -0
- package/dist/cjs/api/types/EcourierCredsLimited1.js +5 -0
- package/dist/cjs/api/types/EcourierCredsListRes.d.ts +8 -0
- package/dist/cjs/api/types/EcourierCredsListRes.js +5 -0
- package/dist/cjs/api/types/EcourierCredsTestRes.d.ts +11 -0
- package/dist/cjs/api/types/EcourierCredsTestRes.js +5 -0
- package/dist/cjs/api/types/EcourierOrder1.d.ts +19 -0
- package/dist/cjs/api/types/EcourierOrder1.js +5 -0
- package/dist/cjs/api/types/EcourierOrderCustomerResponse1.d.ts +16 -0
- package/dist/cjs/api/types/EcourierOrderCustomerResponse1.js +5 -0
- package/dist/cjs/api/types/EcourierOrderListRes.d.ts +8 -0
- package/dist/cjs/api/types/EcourierOrderListRes.js +5 -0
- package/dist/cjs/api/types/EcourierOrderResponse1.d.ts +43 -0
- package/dist/cjs/api/types/EcourierOrderResponse1.js +5 -0
- package/dist/cjs/api/types/EcourierOrderSortByEnum.d.ts +10 -0
- package/dist/cjs/api/types/EcourierOrderSortByEnum.js +12 -0
- package/dist/cjs/api/types/EcourierOrderStopResponse1.d.ts +27 -0
- package/dist/cjs/api/types/EcourierOrderStopResponse1.js +5 -0
- package/dist/cjs/api/types/FraytWebhookResponse.d.ts +7 -0
- package/dist/cjs/api/types/FraytWebhookResponse.js +5 -0
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.d.ts +6 -1
- package/dist/cjs/api/types/NotificationEventsForOrgsEnum.js +5 -0
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.d.ts +6 -1
- package/dist/cjs/api/types/NotificationEventsForUsersEnum.js +5 -0
- package/dist/cjs/api/types/OrgShippingIntegrationEnum1.d.ts +2 -1
- package/dist/cjs/api/types/OrgShippingIntegrationEnum1.js +1 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChange1.d.ts +17 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChange1.js +5 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedReq.d.ts +12 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedReq.js +5 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedRes.d.ts +6 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedRes.js +5 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.d.ts +37 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.js +16 -0
- package/dist/cjs/api/types/index.d.ts +14 -0
- package/dist/cjs/api/types/index.js +14 -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/ecourier/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/Client.mjs +18 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/client/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/index.d.mts +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/index.mjs +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.d.mts +119 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/Client.mjs +393 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.d.mts +26 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.d.mts +15 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/EcourierCredsClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/creds/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/index.mjs +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.d.mts +104 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/Client.mjs +334 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.d.mts +15 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/EcourierOrderSyncOneReq.mjs +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.d.mts +48 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/OrdersListV1Request.mjs +4 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.d.mts +1 -0
- package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.mjs +1 -0
- 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/types/EcourierCredsLimited1.d.mts +29 -0
- package/dist/esm/api/types/EcourierCredsLimited1.mjs +4 -0
- package/dist/esm/api/types/EcourierCredsListRes.d.mts +8 -0
- package/dist/esm/api/types/EcourierCredsListRes.mjs +4 -0
- package/dist/esm/api/types/EcourierCredsTestRes.d.mts +11 -0
- package/dist/esm/api/types/EcourierCredsTestRes.mjs +4 -0
- package/dist/esm/api/types/EcourierOrder1.d.mts +19 -0
- package/dist/esm/api/types/EcourierOrder1.mjs +4 -0
- package/dist/esm/api/types/EcourierOrderCustomerResponse1.d.mts +16 -0
- package/dist/esm/api/types/EcourierOrderCustomerResponse1.mjs +4 -0
- package/dist/esm/api/types/EcourierOrderListRes.d.mts +8 -0
- package/dist/esm/api/types/EcourierOrderListRes.mjs +4 -0
- package/dist/esm/api/types/EcourierOrderResponse1.d.mts +43 -0
- package/dist/esm/api/types/EcourierOrderResponse1.mjs +4 -0
- package/dist/esm/api/types/EcourierOrderSortByEnum.d.mts +10 -0
- package/dist/esm/api/types/EcourierOrderSortByEnum.mjs +9 -0
- package/dist/esm/api/types/EcourierOrderStopResponse1.d.mts +27 -0
- package/dist/esm/api/types/EcourierOrderStopResponse1.mjs +4 -0
- package/dist/esm/api/types/FraytWebhookResponse.d.mts +7 -0
- package/dist/esm/api/types/FraytWebhookResponse.mjs +4 -0
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.d.mts +6 -1
- package/dist/esm/api/types/NotificationEventsForOrgsEnum.mjs +5 -0
- package/dist/esm/api/types/NotificationEventsForUsersEnum.d.mts +6 -1
- package/dist/esm/api/types/NotificationEventsForUsersEnum.mjs +5 -0
- package/dist/esm/api/types/OrgShippingIntegrationEnum1.d.mts +2 -1
- package/dist/esm/api/types/OrgShippingIntegrationEnum1.mjs +1 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChange1.d.mts +17 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChange1.mjs +4 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedReq.d.mts +12 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedReq.mjs +4 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedRes.d.mts +6 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedRes.mjs +4 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.d.mts +37 -0
- package/dist/esm/api/types/ShippingIntegrationOrderStatusChangedWebhookPayload.mjs +13 -0
- package/dist/esm/api/types/index.d.mts +14 -0
- package/dist/esm/api/types/index.mjs +14 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +678 -0
|
@@ -0,0 +1,104 @@
|
|
|
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 Orders {
|
|
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 Orders {
|
|
31
|
+
protected readonly _options: Orders.Options;
|
|
32
|
+
constructor(_options?: Orders.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} providerOrgId - CHRT org ID of the courier whose e-Courier database holds the order
|
|
37
|
+
* @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
|
|
38
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("provider_org_id", "integration_order_id")
|
|
44
|
+
*/
|
|
45
|
+
detailByIntegrationOrderIdV1(providerOrgId: string, integrationOrderId: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
|
|
46
|
+
private __detailByIntegrationOrderIdV1;
|
|
47
|
+
/**
|
|
48
|
+
* Returns one mirrored e-Courier order by its Mongo ObjectId. | () -> (EcourierOrder1)
|
|
49
|
+
*
|
|
50
|
+
* @param {string} id - Mongo ObjectId of the mirror document. e-Courier's own order number is the integration_order_id, accepted by the by_integration_order_id route.
|
|
51
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.shippingIntegrations.ecourier.orders.detailV1("id")
|
|
57
|
+
*/
|
|
58
|
+
detailV1(id: string, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
|
|
59
|
+
private __detailV1;
|
|
60
|
+
/**
|
|
61
|
+
* Lists mirrored e-Courier orders for the caller's organization with filtering, sorting, and pagination. | () -> (EcourierOrderListRes)
|
|
62
|
+
*
|
|
63
|
+
* @param {Chrt.shippingIntegrations.ecourier.OrdersListV1Request} request
|
|
64
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.shippingIntegrations.ecourier.orders.listV1({
|
|
70
|
+
* sort_by: "mirrored_at_timestamp",
|
|
71
|
+
* sort_order: "asc",
|
|
72
|
+
* page: 1,
|
|
73
|
+
* page_size: 1,
|
|
74
|
+
* filter_provider_org_id: ["filter_provider_org_id"],
|
|
75
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
76
|
+
* filter_provider_status_raw: "filter_provider_status_raw",
|
|
77
|
+
* filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
78
|
+
* filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
79
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
80
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
81
|
+
* filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
82
|
+
* filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
listV1(request?: Chrt.shippingIntegrations.ecourier.OrdersListV1Request, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrderListRes>;
|
|
86
|
+
private __listV1;
|
|
87
|
+
/**
|
|
88
|
+
* Fetches and mirrors one e-Courier order by the provider's own order number, updating the unified order list alongside it. | authz: min_org_role=operator | (EcourierOrderSyncOneReq) -> (EcourierOrder1)
|
|
89
|
+
*
|
|
90
|
+
* @param {Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq} request
|
|
91
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.shippingIntegrations.ecourier.orders.syncOneV1({
|
|
97
|
+
* integration_order_id: "integration_order_id",
|
|
98
|
+
* provider_org_id: "provider_org_id"
|
|
99
|
+
* })
|
|
100
|
+
*/
|
|
101
|
+
syncOneV1(request: Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq, requestOptions?: Orders.RequestOptions): core.HttpResponsePromise<Chrt.EcourierOrder1>;
|
|
102
|
+
private __syncOneV1;
|
|
103
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
15
|
+
import * as Chrt from "../../../../../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
18
|
+
export class Orders {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns one mirrored e-Courier order by the provider's own order number. | () -> (EcourierOrder1)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} providerOrgId - CHRT org ID of the courier whose e-Courier database holds the order
|
|
26
|
+
* @param {string} integrationOrderId - e-Courier's own order number for the order, as carried on a unified order row
|
|
27
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.shippingIntegrations.ecourier.orders.detailByIntegrationOrderIdV1("provider_org_id", "integration_order_id")
|
|
33
|
+
*/
|
|
34
|
+
detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions) {
|
|
35
|
+
return core.HttpResponsePromise.fromPromise(this.__detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions));
|
|
36
|
+
}
|
|
37
|
+
__detailByIntegrationOrderIdV1(providerOrgId, integrationOrderId, requestOptions) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
var _a, _b, _c, _d;
|
|
40
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
41
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
42
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/${encodeURIComponent(providerOrgId)}/${encodeURIComponent(integrationOrderId)}`),
|
|
43
|
+
method: "GET",
|
|
44
|
+
headers: _headers,
|
|
45
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
46
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
47
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
48
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
49
|
+
});
|
|
50
|
+
if (_response.ok) {
|
|
51
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
52
|
+
}
|
|
53
|
+
if (_response.error.reason === "status-code") {
|
|
54
|
+
switch (_response.error.statusCode) {
|
|
55
|
+
case 422:
|
|
56
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
57
|
+
default:
|
|
58
|
+
throw new errors.ChrtError({
|
|
59
|
+
statusCode: _response.error.statusCode,
|
|
60
|
+
body: _response.error.body,
|
|
61
|
+
rawResponse: _response.rawResponse,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
switch (_response.error.reason) {
|
|
66
|
+
case "non-json":
|
|
67
|
+
throw new errors.ChrtError({
|
|
68
|
+
statusCode: _response.error.statusCode,
|
|
69
|
+
body: _response.error.rawBody,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
71
|
+
});
|
|
72
|
+
case "timeout":
|
|
73
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/by_integration_order_id/detail/v1/{provider_org_id}/{integration_order_id}.");
|
|
74
|
+
case "unknown":
|
|
75
|
+
throw new errors.ChrtError({
|
|
76
|
+
message: _response.error.errorMessage,
|
|
77
|
+
rawResponse: _response.rawResponse,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns one mirrored e-Courier order by its Mongo ObjectId. | () -> (EcourierOrder1)
|
|
84
|
+
*
|
|
85
|
+
* @param {string} id - Mongo ObjectId of the mirror document. e-Courier's own order number is the integration_order_id, accepted by the by_integration_order_id route.
|
|
86
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* await client.shippingIntegrations.ecourier.orders.detailV1("id")
|
|
92
|
+
*/
|
|
93
|
+
detailV1(id, requestOptions) {
|
|
94
|
+
return core.HttpResponsePromise.fromPromise(this.__detailV1(id, requestOptions));
|
|
95
|
+
}
|
|
96
|
+
__detailV1(id, requestOptions) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
var _a, _b, _c, _d;
|
|
99
|
+
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);
|
|
100
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
101
|
+
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/detail/v1/${encodeURIComponent(id)}`),
|
|
102
|
+
method: "GET",
|
|
103
|
+
headers: _headers,
|
|
104
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
105
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
106
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
107
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
108
|
+
});
|
|
109
|
+
if (_response.ok) {
|
|
110
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
111
|
+
}
|
|
112
|
+
if (_response.error.reason === "status-code") {
|
|
113
|
+
switch (_response.error.statusCode) {
|
|
114
|
+
case 422:
|
|
115
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
116
|
+
default:
|
|
117
|
+
throw new errors.ChrtError({
|
|
118
|
+
statusCode: _response.error.statusCode,
|
|
119
|
+
body: _response.error.body,
|
|
120
|
+
rawResponse: _response.rawResponse,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
switch (_response.error.reason) {
|
|
125
|
+
case "non-json":
|
|
126
|
+
throw new errors.ChrtError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.rawBody,
|
|
129
|
+
rawResponse: _response.rawResponse,
|
|
130
|
+
});
|
|
131
|
+
case "timeout":
|
|
132
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/detail/v1/{id}.");
|
|
133
|
+
case "unknown":
|
|
134
|
+
throw new errors.ChrtError({
|
|
135
|
+
message: _response.error.errorMessage,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Lists mirrored e-Courier orders for the caller's organization with filtering, sorting, and pagination. | () -> (EcourierOrderListRes)
|
|
143
|
+
*
|
|
144
|
+
* @param {Chrt.shippingIntegrations.ecourier.OrdersListV1Request} request
|
|
145
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
146
|
+
*
|
|
147
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* await client.shippingIntegrations.ecourier.orders.listV1({
|
|
151
|
+
* sort_by: "mirrored_at_timestamp",
|
|
152
|
+
* sort_order: "asc",
|
|
153
|
+
* page: 1,
|
|
154
|
+
* page_size: 1,
|
|
155
|
+
* filter_provider_org_id: ["filter_provider_org_id"],
|
|
156
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
157
|
+
* filter_provider_status_raw: "filter_provider_status_raw",
|
|
158
|
+
* filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
159
|
+
* filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
160
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
161
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
162
|
+
* filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
163
|
+
* filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
164
|
+
* })
|
|
165
|
+
*/
|
|
166
|
+
listV1(request = {}, requestOptions) {
|
|
167
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
|
|
168
|
+
}
|
|
169
|
+
__listV1() {
|
|
170
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
171
|
+
var _a, _b, _c, _d, _e, _f;
|
|
172
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_provider_org_id: filterProviderOrgId, filter_integration_order_id: filterIntegrationOrderId, filter_provider_status_raw: filterProviderStatusRaw, filter_mirrored_at_timestamp_gte: filterMirroredAtTimestampGte, filter_mirrored_at_timestamp_lte: filterMirroredAtTimestampLte, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, filter_updated_at_timestamp_gte: filterUpdatedAtTimestampGte, filter_updated_at_timestamp_lte: filterUpdatedAtTimestampLte, } = request;
|
|
173
|
+
const _queryParams = {};
|
|
174
|
+
if (sortBy !== undefined) {
|
|
175
|
+
_queryParams["sort_by"] = sortBy;
|
|
176
|
+
}
|
|
177
|
+
if (sortOrder !== undefined) {
|
|
178
|
+
_queryParams["sort_order"] = sortOrder;
|
|
179
|
+
}
|
|
180
|
+
if (page !== undefined) {
|
|
181
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
182
|
+
}
|
|
183
|
+
if (pageSize !== undefined) {
|
|
184
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
185
|
+
}
|
|
186
|
+
if (filterProviderOrgId !== undefined) {
|
|
187
|
+
if (Array.isArray(filterProviderOrgId)) {
|
|
188
|
+
_queryParams["filter_provider_org_id"] = filterProviderOrgId.map((item) => item);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
_queryParams["filter_provider_org_id"] = filterProviderOrgId;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (filterIntegrationOrderId !== undefined) {
|
|
195
|
+
_queryParams["filter_integration_order_id"] = filterIntegrationOrderId;
|
|
196
|
+
}
|
|
197
|
+
if (filterProviderStatusRaw !== undefined) {
|
|
198
|
+
_queryParams["filter_provider_status_raw"] = filterProviderStatusRaw;
|
|
199
|
+
}
|
|
200
|
+
if (filterMirroredAtTimestampGte !== undefined) {
|
|
201
|
+
_queryParams["filter_mirrored_at_timestamp_gte"] = filterMirroredAtTimestampGte;
|
|
202
|
+
}
|
|
203
|
+
if (filterMirroredAtTimestampLte !== undefined) {
|
|
204
|
+
_queryParams["filter_mirrored_at_timestamp_lte"] = filterMirroredAtTimestampLte;
|
|
205
|
+
}
|
|
206
|
+
if (filterCreatedAtTimestampGte !== undefined) {
|
|
207
|
+
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
208
|
+
}
|
|
209
|
+
if (filterCreatedAtTimestampLte !== undefined) {
|
|
210
|
+
_queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
|
|
211
|
+
}
|
|
212
|
+
if (filterUpdatedAtTimestampGte !== undefined) {
|
|
213
|
+
_queryParams["filter_updated_at_timestamp_gte"] = filterUpdatedAtTimestampGte;
|
|
214
|
+
}
|
|
215
|
+
if (filterUpdatedAtTimestampLte !== undefined) {
|
|
216
|
+
_queryParams["filter_updated_at_timestamp_lte"] = filterUpdatedAtTimestampLte;
|
|
217
|
+
}
|
|
218
|
+
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);
|
|
219
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
220
|
+
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/ecourier/orders/list/v1"),
|
|
221
|
+
method: "GET",
|
|
222
|
+
headers: _headers,
|
|
223
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
224
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
225
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
226
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
+
});
|
|
228
|
+
if (_response.ok) {
|
|
229
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
230
|
+
}
|
|
231
|
+
if (_response.error.reason === "status-code") {
|
|
232
|
+
switch (_response.error.statusCode) {
|
|
233
|
+
case 422:
|
|
234
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
235
|
+
default:
|
|
236
|
+
throw new errors.ChrtError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.body,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
switch (_response.error.reason) {
|
|
244
|
+
case "non-json":
|
|
245
|
+
throw new errors.ChrtError({
|
|
246
|
+
statusCode: _response.error.statusCode,
|
|
247
|
+
body: _response.error.rawBody,
|
|
248
|
+
rawResponse: _response.rawResponse,
|
|
249
|
+
});
|
|
250
|
+
case "timeout":
|
|
251
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping_integrations/ecourier/orders/list/v1.");
|
|
252
|
+
case "unknown":
|
|
253
|
+
throw new errors.ChrtError({
|
|
254
|
+
message: _response.error.errorMessage,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Fetches and mirrors one e-Courier order by the provider's own order number, updating the unified order list alongside it. | authz: min_org_role=operator | (EcourierOrderSyncOneReq) -> (EcourierOrder1)
|
|
262
|
+
*
|
|
263
|
+
* @param {Chrt.shippingIntegrations.ecourier.EcourierOrderSyncOneReq} request
|
|
264
|
+
* @param {Orders.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
|
+
*
|
|
266
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* await client.shippingIntegrations.ecourier.orders.syncOneV1({
|
|
270
|
+
* integration_order_id: "integration_order_id",
|
|
271
|
+
* provider_org_id: "provider_org_id"
|
|
272
|
+
* })
|
|
273
|
+
*/
|
|
274
|
+
syncOneV1(request, requestOptions) {
|
|
275
|
+
return core.HttpResponsePromise.fromPromise(this.__syncOneV1(request, requestOptions));
|
|
276
|
+
}
|
|
277
|
+
__syncOneV1(request, requestOptions) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
var _a, _b, _c, _d;
|
|
280
|
+
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);
|
|
281
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
282
|
+
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/sync_one/v1"),
|
|
283
|
+
method: "POST",
|
|
284
|
+
headers: _headers,
|
|
285
|
+
contentType: "application/json",
|
|
286
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
287
|
+
requestType: "json",
|
|
288
|
+
body: request,
|
|
289
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
290
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
291
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
292
|
+
});
|
|
293
|
+
if (_response.ok) {
|
|
294
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
295
|
+
}
|
|
296
|
+
if (_response.error.reason === "status-code") {
|
|
297
|
+
switch (_response.error.statusCode) {
|
|
298
|
+
case 422:
|
|
299
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
300
|
+
default:
|
|
301
|
+
throw new errors.ChrtError({
|
|
302
|
+
statusCode: _response.error.statusCode,
|
|
303
|
+
body: _response.error.body,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
switch (_response.error.reason) {
|
|
309
|
+
case "non-json":
|
|
310
|
+
throw new errors.ChrtError({
|
|
311
|
+
statusCode: _response.error.statusCode,
|
|
312
|
+
body: _response.error.rawBody,
|
|
313
|
+
rawResponse: _response.rawResponse,
|
|
314
|
+
});
|
|
315
|
+
case "timeout":
|
|
316
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping_integrations/ecourier/orders/sync_one/v1.");
|
|
317
|
+
case "unknown":
|
|
318
|
+
throw new errors.ChrtError({
|
|
319
|
+
message: _response.error.errorMessage,
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
_getAuthorizationHeader() {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
328
|
+
if (bearer != null) {
|
|
329
|
+
return `Bearer ${bearer}`;
|
|
330
|
+
}
|
|
331
|
+
return undefined;
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* integration_order_id: "integration_order_id",
|
|
8
|
+
* provider_org_id: "provider_org_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface EcourierOrderSyncOneReq {
|
|
12
|
+
integration_order_id: string;
|
|
13
|
+
/** Must be a string starting with `org_` */
|
|
14
|
+
provider_org_id: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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: "mirrored_at_timestamp",
|
|
9
|
+
* sort_order: "asc",
|
|
10
|
+
* page: 1,
|
|
11
|
+
* page_size: 1,
|
|
12
|
+
* filter_provider_org_id: ["filter_provider_org_id"],
|
|
13
|
+
* filter_integration_order_id: "filter_integration_order_id",
|
|
14
|
+
* filter_provider_status_raw: "filter_provider_status_raw",
|
|
15
|
+
* filter_mirrored_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
16
|
+
* filter_mirrored_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
17
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
18
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
19
|
+
* filter_updated_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
20
|
+
* filter_updated_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
export interface OrdersListV1Request {
|
|
24
|
+
/** Field to sort by. */
|
|
25
|
+
sort_by?: Chrt.EcourierOrderSortByEnum | null;
|
|
26
|
+
/** Sort order (asc or desc). */
|
|
27
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
28
|
+
page?: number | null;
|
|
29
|
+
page_size?: number | null;
|
|
30
|
+
/** Filter by provider org ID(s) */
|
|
31
|
+
filter_provider_org_id?: (string | null) | (string | null)[];
|
|
32
|
+
/** Filter by e-Courier's exact order number */
|
|
33
|
+
filter_integration_order_id?: string | null;
|
|
34
|
+
/** Filter by e-Courier's raw OrderStatus letter. Not reliably operational; prefer the unified status on the cross-integration list. */
|
|
35
|
+
filter_provider_status_raw?: string | null;
|
|
36
|
+
/** Filter mirrored_at_timestamp >= value */
|
|
37
|
+
filter_mirrored_at_timestamp_gte?: string | null;
|
|
38
|
+
/** Filter mirrored_at_timestamp <= value */
|
|
39
|
+
filter_mirrored_at_timestamp_lte?: string | null;
|
|
40
|
+
/** Filter created_at_timestamp >= value */
|
|
41
|
+
filter_created_at_timestamp_gte?: string | null;
|
|
42
|
+
/** Filter created_at_timestamp <= value */
|
|
43
|
+
filter_created_at_timestamp_lte?: string | null;
|
|
44
|
+
/** Filter updated_at_timestamp >= value */
|
|
45
|
+
filter_updated_at_timestamp_gte?: string | null;
|
|
46
|
+
/** Filter updated_at_timestamp <= value */
|
|
47
|
+
filter_updated_at_timestamp_lte?: string | null;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
package/dist/esm/api/resources/shippingIntegrations/resources/ecourier/resources/orders/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -3,6 +3,7 @@ export * as orders from "./orders/index.mjs";
|
|
|
3
3
|
export * as atlas from "./atlas/index.mjs";
|
|
4
4
|
export * as cxt from "./cxt/index.mjs";
|
|
5
5
|
export * as dispatchScience from "./dispatchScience/index.mjs";
|
|
6
|
+
export * as ecourier from "./ecourier/index.mjs";
|
|
6
7
|
export * as ontime360 from "./ontime360/index.mjs";
|
|
7
8
|
export * as xcelerator from "./xcelerator/index.mjs";
|
|
8
9
|
export * from "./orders/client/requests/index.mjs";
|
|
@@ -3,6 +3,7 @@ export * as orders from "./orders/index.mjs";
|
|
|
3
3
|
export * as atlas from "./atlas/index.mjs";
|
|
4
4
|
export * as cxt from "./cxt/index.mjs";
|
|
5
5
|
export * as dispatchScience from "./dispatchScience/index.mjs";
|
|
6
|
+
export * as ecourier from "./ecourier/index.mjs";
|
|
6
7
|
export * as ontime360 from "./ontime360/index.mjs";
|
|
7
8
|
export * as xcelerator from "./xcelerator/index.mjs";
|
|
8
9
|
export * from "./orders/client/requests/index.mjs";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The only shape of an e-Courier credential a user is ever allowed to receive.
|
|
6
|
+
*/
|
|
7
|
+
export interface EcourierCredsLimited1 {
|
|
8
|
+
_id: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
/** Origin of the courier's e-Courier host, with no path. The request path is derived from `ecourier_database`. */
|
|
11
|
+
base_url: string;
|
|
12
|
+
created_at_timestamp: string;
|
|
13
|
+
ecourier_customer_code: string;
|
|
14
|
+
ecourier_customer_id: string;
|
|
15
|
+
ecourier_database: string;
|
|
16
|
+
high_water_mark_timestamp?: string | null;
|
|
17
|
+
notes?: string | null;
|
|
18
|
+
/** Must be a string starting with `org_` */
|
|
19
|
+
org_id: string;
|
|
20
|
+
/** Must be a string starting with `user_` */
|
|
21
|
+
owned_by_user_id: string;
|
|
22
|
+
provider_account_label?: string | null;
|
|
23
|
+
/** Must be a string starting with `org_` */
|
|
24
|
+
provider_org_id: string;
|
|
25
|
+
schema_version: number;
|
|
26
|
+
shipping_integration: "ecourier";
|
|
27
|
+
updated_at_timestamp: string;
|
|
28
|
+
username: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Result of testing whether a stored e-Courier credential still works.
|
|
6
|
+
*/
|
|
7
|
+
export interface EcourierCredsTestRes {
|
|
8
|
+
failure_reason?: string | null;
|
|
9
|
+
ok: boolean;
|
|
10
|
+
provider_account_label?: string | null;
|
|
11
|
+
}
|