@shipengine/js-api 0.40.0 → 1.0.0-next.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/account-settings/api.d.ts +2 -14
- package/account-settings/types.d.ts +2 -6
- package/addresses/api.d.ts +0 -11
- package/carriers/api.d.ts +2 -74
- package/carriers/types.d.ts +3 -22
- package/client.d.ts +1 -129
- package/custom-packages/api.d.ts +0 -6
- package/dimensions/types.d.ts +0 -5
- package/errors/types.d.ts +2 -2
- package/index.d.ts +0 -5
- package/index.js +16 -4074
- package/index.mjs +2829 -3936
- package/insurance/api.d.ts +0 -7
- package/labels/api.d.ts +0 -51
- package/order-sources/api.d.ts +0 -13
- package/package.json +2 -5
- package/rates/api.d.ts +0 -26
- package/resources/types.d.ts +0 -34
- package/sales-order-shipments/api.d.ts +5 -90
- package/sales-orders/api.d.ts +0 -25
- package/shipments/index.d.ts +0 -1
- package/shipments/types.d.ts +0 -13
- package/types.d.ts +0 -8
- package/warehouses/api.d.ts +0 -19
- package/account-billing-plan/api.d.ts +0 -13
- package/account-billing-plan/index.d.ts +0 -2
- package/account-billing-plan/types.d.ts +0 -30
- package/funding-sources/api.d.ts +0 -50
- package/funding-sources/index.d.ts +0 -2
- package/funding-sources/types.d.ts +0 -135
- package/rate-cards/api.d.ts +0 -44
- package/rate-cards/index.d.ts +0 -2
- package/rate-cards/types.d.ts +0 -88
- package/shipments/api.d.ts +0 -72
- package/shipping-rules/api.d.ts +0 -20
- package/shipping-rules/index.d.ts +0 -2
- package/shipping-rules/types.d.ts +0 -50
- package/utilities/index.d.ts +0 -1
- package/utilities/ip-address.d.ts +0 -1
- package/weight-band/index.d.ts +0 -1
- package/weight-band/types.d.ts +0 -17
- package/zones/index.d.ts +0 -1
- package/zones/types.d.ts +0 -7
package/insurance/api.d.ts
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { InsuranceAccount, InsuranceProvider } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Insurance API module - /v1/insurance
|
|
5
|
-
*/
|
|
6
3
|
export declare class InsuranceAPI {
|
|
7
4
|
private client;
|
|
8
5
|
constructor(client: AxiosInstance);
|
|
9
|
-
/**
|
|
10
|
-
* The `get` method retrieves the insurance balance for a given `insuranceProvider`
|
|
11
|
-
* by ID.
|
|
12
|
-
*/
|
|
13
6
|
get: (insuranceProvider: InsuranceProvider) => Promise<import("axios").AxiosResponse<InsuranceAccount, any>>;
|
|
14
7
|
}
|
package/labels/api.d.ts
CHANGED
|
@@ -1,73 +1,22 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Label, LabelLayout, VoidRequest } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Labels API - Create Label Options
|
|
5
|
-
*/
|
|
6
3
|
export interface CreateLabelOptions {
|
|
7
|
-
/**
|
|
8
|
-
* `displayScheme` is an optional string to control the display scheme of the label.
|
|
9
|
-
*/
|
|
10
4
|
displayScheme?: string;
|
|
11
|
-
/**
|
|
12
|
-
* `labelDownloadType` is an optional string to control the download type of the label.
|
|
13
|
-
*
|
|
14
|
-
* e.g. `url` or `inline`
|
|
15
|
-
*/
|
|
16
5
|
labelDownloadType?: string;
|
|
17
|
-
/**
|
|
18
|
-
* `labelFormat` is an optional string to control the format of the label.
|
|
19
|
-
*
|
|
20
|
-
* e.g. `pdf` or `zpl`
|
|
21
|
-
*/
|
|
22
6
|
labelFormat?: string;
|
|
23
|
-
/**
|
|
24
|
-
* `labelLayout` is an optional string to control the layout of the label.
|
|
25
|
-
*
|
|
26
|
-
* e.g. `4x6` or `8.5x11`
|
|
27
|
-
*/
|
|
28
7
|
labelLayout?: LabelLayout;
|
|
29
|
-
/**
|
|
30
|
-
* `validateAddress` is an optional string to control address validation during
|
|
31
|
-
* label purchase.
|
|
32
|
-
*/
|
|
33
8
|
validateAddress?: string;
|
|
34
9
|
}
|
|
35
|
-
/**
|
|
36
|
-
* # Labels API - List Labels Params
|
|
37
|
-
*/
|
|
38
10
|
export interface ListLabelsParams {
|
|
39
|
-
/**
|
|
40
|
-
* `shipmentId` is an optional string to filter labels by shipment ID. This
|
|
41
|
-
* is a unique identifier that ShipEngine API associates with your shipment.
|
|
42
|
-
*/
|
|
43
11
|
shipmentId?: string;
|
|
44
12
|
}
|
|
45
|
-
/**
|
|
46
|
-
* # Labels API module - /v1/labels
|
|
47
|
-
*/
|
|
48
13
|
export declare class LabelsAPI {
|
|
49
14
|
private client;
|
|
50
15
|
constructor(client: AxiosInstance);
|
|
51
|
-
/**
|
|
52
|
-
* The `get` method retrieves a specific label by `labelId`.
|
|
53
|
-
*/
|
|
54
16
|
get: (labelId: string) => Promise<import("axios").AxiosResponse<Label, any>>;
|
|
55
|
-
/**
|
|
56
|
-
* The `list` method retrieves a list of labels created by a given user.
|
|
57
|
-
*/
|
|
58
17
|
list: (params?: ListLabelsParams) => Promise<import("axios").AxiosResponse<{
|
|
59
18
|
labels: Label[];
|
|
60
19
|
}, any>>;
|
|
61
|
-
/**
|
|
62
|
-
* The `createByRateId` allows you to create a shipping label by using a `rateId`
|
|
63
|
-
* which is a unique identifier tied to a specific rate.
|
|
64
|
-
*
|
|
65
|
-
* This helps ensure that when a user is rate shopping, they can purchase a
|
|
66
|
-
* label for the price they were initially rated.
|
|
67
|
-
*/
|
|
68
20
|
createByRateId: (rateId: string, options: CreateLabelOptions) => Promise<import("axios").AxiosResponse<Label, any>>;
|
|
69
|
-
/**
|
|
70
|
-
* The `void` method allows a user to void a label by `labelId`.
|
|
71
|
-
*/
|
|
72
21
|
void: (labelId: string) => Promise<import("axios").AxiosResponse<VoidRequest, any>>;
|
|
73
22
|
}
|
package/order-sources/api.d.ts
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { OrderSource } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Order Sources API module - /v-beta/order_sources
|
|
5
|
-
*/
|
|
6
3
|
export declare class OrderSourcesAPI {
|
|
7
4
|
private client;
|
|
8
5
|
constructor(client: AxiosInstance);
|
|
9
|
-
/**
|
|
10
|
-
* The `list` method retrieves a list of connected order sources for a given user.
|
|
11
|
-
*/
|
|
12
6
|
list: () => Promise<import("axios").AxiosResponse<{
|
|
13
7
|
orderSources: OrderSource[];
|
|
14
8
|
}, any>>;
|
|
15
|
-
/**
|
|
16
|
-
* The `get` method retrieves a specific order source by `orderSourceId`.
|
|
17
|
-
*/
|
|
18
9
|
get: (orderSourceId: string) => Promise<import("axios").AxiosResponse<OrderSource, any>>;
|
|
19
|
-
/**
|
|
20
|
-
* The `refresh` method refreshes a specific order source by `orderSourceId`.
|
|
21
|
-
* This will pull in any `new orders` since the last order import.
|
|
22
|
-
*/
|
|
23
10
|
refresh: (orderSourceId: string) => Promise<import("axios").AxiosResponse<OrderSource, any>>;
|
|
24
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipengine/js-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-next.0",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -14,8 +14,5 @@
|
|
|
14
14
|
"entryPoint": "./src/index.ts",
|
|
15
15
|
"readmeFile": "./README.md",
|
|
16
16
|
"tsconfig": "./tsconfig.lib.json"
|
|
17
|
-
},
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"axios": "^0.26.1"
|
|
20
17
|
}
|
|
21
|
-
}
|
|
18
|
+
}
|
package/rates/api.d.ts
CHANGED
|
@@ -1,42 +1,16 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Currency } from "../payments";
|
|
3
3
|
import { RateResponse } from "./types";
|
|
4
|
-
/**
|
|
5
|
-
* # Rates API - Calculate Rates Options
|
|
6
|
-
*/
|
|
7
4
|
export interface CalculateRatesOptions {
|
|
8
|
-
/**
|
|
9
|
-
* `calculateTaxAmount` is an optional boolean that indicates rates returned
|
|
10
|
-
* should include the tax amount.
|
|
11
|
-
*/
|
|
12
5
|
calculateTaxAmount?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* `carrierIds` is an array of carrier IDs to filter rates by.
|
|
15
|
-
*/
|
|
16
6
|
carrierIds: string[];
|
|
17
|
-
/**
|
|
18
|
-
* `packageTypes` is an optional array of package types to filter rates by.
|
|
19
|
-
*/
|
|
20
7
|
packageTypes?: string[];
|
|
21
|
-
/**
|
|
22
|
-
* `preferredCurrency` is an optional indicator of the currency to return rates in.
|
|
23
|
-
*/
|
|
24
8
|
preferredCurrency?: Currency;
|
|
25
|
-
/**
|
|
26
|
-
* `serviceCodes` is an optional array of specific carrier service codes to filter rates by.
|
|
27
|
-
*/
|
|
28
9
|
serviceCodes?: string[];
|
|
29
10
|
}
|
|
30
|
-
/**
|
|
31
|
-
* # Rates API module - /v1/rates
|
|
32
|
-
*/
|
|
33
11
|
export declare class RatesAPI {
|
|
34
12
|
private client;
|
|
35
13
|
constructor(client: AxiosInstance);
|
|
36
|
-
/**
|
|
37
|
-
* The `calculate` method calculates rates for a shipment by shipment ID based
|
|
38
|
-
* on the shipment's options.
|
|
39
|
-
*/
|
|
40
14
|
calculateByShipmentId: (shipmentId: string, options: CalculateRatesOptions) => Promise<import("axios").AxiosResponse<Omit<import("..").Shipment, "items"> & {
|
|
41
15
|
items: import("../sales-order-shipments").SalesOrderShipmentItem[];
|
|
42
16
|
salesOrderIds: string[];
|
package/resources/types.d.ts
CHANGED
|
@@ -14,37 +14,3 @@ export interface LinkedResource {
|
|
|
14
14
|
href: string;
|
|
15
15
|
type: string;
|
|
16
16
|
}
|
|
17
|
-
export type ISOString = string;
|
|
18
|
-
export type PageableQuery = {
|
|
19
|
-
page?: number;
|
|
20
|
-
pageSize?: number;
|
|
21
|
-
};
|
|
22
|
-
export type PageableResult = {
|
|
23
|
-
links: {
|
|
24
|
-
first: LinkedResource;
|
|
25
|
-
last: LinkedResource;
|
|
26
|
-
next: LinkedResource;
|
|
27
|
-
prev: LinkedResource;
|
|
28
|
-
};
|
|
29
|
-
page: number;
|
|
30
|
-
pages: number;
|
|
31
|
-
total: number;
|
|
32
|
-
};
|
|
33
|
-
export type BatchableQuery = {
|
|
34
|
-
batchId?: string;
|
|
35
|
-
};
|
|
36
|
-
export type TaggableQuery = {
|
|
37
|
-
tag?: string;
|
|
38
|
-
};
|
|
39
|
-
export type CreationRangeQuery = {
|
|
40
|
-
createdAtEnd?: ISOString;
|
|
41
|
-
createdAtStart?: ISOString;
|
|
42
|
-
};
|
|
43
|
-
export type ModificationRangeQuery = {
|
|
44
|
-
modifiedAtEnd?: ISOString;
|
|
45
|
-
modifiedAtStart?: ISOString;
|
|
46
|
-
};
|
|
47
|
-
export type SortableQuery<TSortKeys = "created_at" | "modified_at"> = {
|
|
48
|
-
sortBy?: TSortKeys;
|
|
49
|
-
sortDir?: "asc" | "desc";
|
|
50
|
-
};
|
|
@@ -1,100 +1,15 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { CreationRangeQuery, ISOString, ModificationRangeQuery, PageableQuery, PageableResult, SortableQuery } from "../resources";
|
|
3
|
-
import { FulfillmentStatus, PaymentStatus } from "../sales-orders";
|
|
4
2
|
import { SalesOrderShipment } from "./types";
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
|
-
export type ListSalesOrderShipmentsParams = {
|
|
9
|
-
/**
|
|
10
|
-
* `cancelled` is an optional boolean indicating if cancelled shipments
|
|
11
|
-
* should be included in the response.
|
|
12
|
-
*/
|
|
13
|
-
cancelled?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* `externalOrderId` is an optional unique ID that can be set by the user to
|
|
16
|
-
* associate shipments with an external system.
|
|
17
|
-
*/
|
|
18
|
-
externalOrderId?: string;
|
|
19
|
-
/**
|
|
20
|
-
* `externalOrderNumber` is an optional unique ID that can be set by the
|
|
21
|
-
* user to associate orders with an external system.
|
|
22
|
-
*/
|
|
23
|
-
externalOrderNumber?: string;
|
|
24
|
-
/**
|
|
25
|
-
* `fulfillmentStatus` is an optional string that indicates the fulfillment
|
|
26
|
-
* status of the shipments to be returned.
|
|
27
|
-
*/
|
|
28
|
-
fulfillmentStatus?: FulfillmentStatus;
|
|
29
|
-
/**
|
|
30
|
-
* `orderDateEnd` is an optional ISO 8601 string that indicates the end of the
|
|
31
|
-
* date range to query orders from.
|
|
32
|
-
*/
|
|
33
|
-
orderDateEnd?: ISOString;
|
|
34
|
-
/**
|
|
35
|
-
* `orderDateStart` is an optional ISO 8601 string that indicates the start of
|
|
36
|
-
* the date range to query orders from.
|
|
37
|
-
*/
|
|
38
|
-
orderDateStart?: ISOString;
|
|
39
|
-
/**
|
|
40
|
-
* `orderSourceId` is an optional string that indicates the order source ID
|
|
41
|
-
* to query orders from.
|
|
42
|
-
*/
|
|
43
|
-
orderSourceId?: string;
|
|
44
|
-
/**
|
|
45
|
-
* `paymentStatus` is an optional string that indicates the payment status of
|
|
46
|
-
* the shipments to be returned.
|
|
47
|
-
*/
|
|
48
|
-
paymentStatus?: PaymentStatus;
|
|
49
|
-
/**
|
|
50
|
-
* `salesOrderIds` is an optional array of sales order IDs to be used when
|
|
51
|
-
* querying sales orders.
|
|
52
|
-
*/
|
|
3
|
+
export interface ListSalesOrderShipmentsParams {
|
|
53
4
|
salesOrderIds?: string[];
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* # Sales Order Shipments - List Sales Order Shipments Body
|
|
57
|
-
*/
|
|
58
|
-
export type ListSalesOrderShipmentBody = {
|
|
59
|
-
/**
|
|
60
|
-
* `salesOrderIds` is an array of sales order IDs to be used when listing sales
|
|
61
|
-
* orders.
|
|
62
|
-
*/
|
|
63
|
-
salesOrderIds?: string[];
|
|
64
|
-
/**
|
|
65
|
-
* `shipments` is an array of shipments associated with the sales orders.
|
|
66
|
-
*/
|
|
67
|
-
shipments?: SalesOrderShipment[];
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* # Sales Order Shipments - List Sales Order Shipments Result
|
|
71
|
-
*/
|
|
72
|
-
export type ListSalesOrderShipmentsResult = {
|
|
73
|
-
/**
|
|
74
|
-
* `shipments` is an array of sales order shipments.
|
|
75
|
-
*/
|
|
76
|
-
shipments: SalesOrderShipment[];
|
|
77
|
-
} & PageableResult;
|
|
78
|
-
/**
|
|
79
|
-
* # Sales Order Shipments API module - /v-beta/shipments
|
|
80
|
-
*/
|
|
5
|
+
}
|
|
81
6
|
export declare class SalesOrderShipmentsAPI {
|
|
82
7
|
private client;
|
|
83
8
|
constructor(client: AxiosInstance);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
list: (body?: ListSalesOrderShipmentBody | undefined, params?: ListSalesOrderShipmentsParams) => Promise<import("axios").AxiosResponse<ListSalesOrderShipmentsResult, any>>;
|
|
88
|
-
/**
|
|
89
|
-
* The `get` method retrieves a specific sales order shipment by `shipmentId`.
|
|
90
|
-
*/
|
|
9
|
+
list: (params?: ListSalesOrderShipmentsParams) => Promise<import("axios").AxiosResponse<{
|
|
10
|
+
shipments: SalesOrderShipment[];
|
|
11
|
+
}, any>>;
|
|
91
12
|
get: (shipmentId: string) => Promise<import("axios").AxiosResponse<SalesOrderShipment, any>>;
|
|
92
|
-
/**
|
|
93
|
-
* The `create` method creates a new shipment for a sales order.
|
|
94
|
-
*/
|
|
95
13
|
create: (salesOrderId: string, shipment: Partial<SalesOrderShipment>) => Promise<import("axios").AxiosResponse<SalesOrderShipment, any>>;
|
|
96
|
-
/**
|
|
97
|
-
* The `update` method updates a specific sales order shipment by `shipmentId`.
|
|
98
|
-
*/
|
|
99
14
|
update: (shipmentId: string, shipment: Partial<SalesOrderShipment>) => Promise<import("axios").AxiosResponse<SalesOrderShipment, any>>;
|
|
100
15
|
}
|
package/sales-orders/api.d.ts
CHANGED
|
@@ -1,40 +1,15 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { SalesOrder, SalesOrderTracking } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Sales Orders - List Sales Orders Params
|
|
5
|
-
*/
|
|
6
3
|
export interface ListSalesOrdersParams {
|
|
7
|
-
/**
|
|
8
|
-
* `externalOrderId` is an optional unique ID that can be set by the user to
|
|
9
|
-
* associate shipments with an external system.
|
|
10
|
-
*/
|
|
11
4
|
externalOrderId?: string;
|
|
12
|
-
/**
|
|
13
|
-
* `externalOrderNumber` is an optional unique identifier that can be set by
|
|
14
|
-
* the user to associate shipments with an external order system.
|
|
15
|
-
*/
|
|
16
5
|
externalOrderNumber?: string;
|
|
17
6
|
}
|
|
18
|
-
/**
|
|
19
|
-
* # Sales Orders API module - /v-beta/sales_orders
|
|
20
|
-
*/
|
|
21
7
|
export declare class SalesOrdersAPI {
|
|
22
8
|
private client;
|
|
23
9
|
constructor(client: AxiosInstance);
|
|
24
|
-
/**
|
|
25
|
-
* The `list` method retrieves a list of sales orders.
|
|
26
|
-
*/
|
|
27
10
|
list: (params?: ListSalesOrdersParams) => Promise<import("axios").AxiosResponse<{
|
|
28
11
|
salesOrders: SalesOrder[];
|
|
29
12
|
}, any>>;
|
|
30
|
-
/**
|
|
31
|
-
* The `get` method retrieves a specific sales order by `salesOrderId`.
|
|
32
|
-
*/
|
|
33
13
|
get: (salesOrderId: string) => Promise<import("axios").AxiosResponse<SalesOrder, any>>;
|
|
34
|
-
/**
|
|
35
|
-
* The `notifyShipped` method notifies order source that the order has been
|
|
36
|
-
* shipped. Typically, the order source will then notify the user based on
|
|
37
|
-
* this update from ShipEngine API.
|
|
38
|
-
*/
|
|
39
14
|
notifyShipped: (salesOrderId: string, tracking: SalesOrderTracking) => Promise<import("axios").AxiosResponse<SalesOrder, any>>;
|
|
40
15
|
}
|
package/shipments/index.d.ts
CHANGED
package/shipments/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Address, AddressValidation } from "../addresses";
|
|
2
2
|
import { CarrierPackage } from "../carriers";
|
|
3
|
-
import { CodedError } from '../errors';
|
|
4
3
|
import { OrderSourceCode } from "../order-sources";
|
|
5
4
|
import { Money } from "../payments";
|
|
6
|
-
import { Rate } from '../rates';
|
|
7
5
|
import { Download, LinkedResource } from "../resources";
|
|
8
6
|
import { WeightWithUnit } from "../weight";
|
|
9
7
|
/**
|
|
@@ -102,7 +100,6 @@ export interface ShipmentItem {
|
|
|
102
100
|
* @category Entities
|
|
103
101
|
*/
|
|
104
102
|
export type ShipmentPackage = Omit<CarrierPackage, "name"> & {
|
|
105
|
-
contentDescription?: string;
|
|
106
103
|
externalPackageId?: string;
|
|
107
104
|
formDownload?: LinkedResource;
|
|
108
105
|
insuredValue?: Money;
|
|
@@ -147,7 +144,6 @@ export type Customs = {
|
|
|
147
144
|
export interface Shipment {
|
|
148
145
|
addressValidation?: AddressValidation;
|
|
149
146
|
advancedOptions?: {
|
|
150
|
-
additionalHandling?: boolean;
|
|
151
147
|
billToAccount?: string;
|
|
152
148
|
billToCountryCode?: string;
|
|
153
149
|
billToParty?: BillToParties;
|
|
@@ -197,12 +193,3 @@ export interface Shipment {
|
|
|
197
193
|
validateAddress?: AddressValidationOptions;
|
|
198
194
|
warehouseId?: string;
|
|
199
195
|
}
|
|
200
|
-
export type ShipmentRateResponse = {
|
|
201
|
-
created_at: string;
|
|
202
|
-
errors: CodedError[];
|
|
203
|
-
invalidRates: Rate[];
|
|
204
|
-
rate_request_id: string;
|
|
205
|
-
rates: Rate[];
|
|
206
|
-
shipment_id: string;
|
|
207
|
-
status: "working" | "completed" | "partial" | "error";
|
|
208
|
-
}[];
|
package/types.d.ts
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
export type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
2
|
-
export * from "./account-settings/types";
|
|
3
|
-
export * from "./account-billing-plan/types";
|
|
4
1
|
export * from "./addresses/types";
|
|
5
2
|
export * from "./carriers/types";
|
|
6
3
|
export * from "./custom-packages/types";
|
|
7
4
|
export * from "./dimensions/types";
|
|
8
5
|
export * from "./errors/types";
|
|
9
|
-
export * from "./funding-sources/types";
|
|
10
6
|
export * from "./insurance/types";
|
|
11
7
|
export * from "./labels/types";
|
|
12
8
|
export * from "./order-sources/types";
|
|
13
9
|
export * from "./payments/types";
|
|
14
10
|
export * from "./rates/types";
|
|
15
|
-
export * from "./rate-cards/types";
|
|
16
11
|
export * from "./relay-points/types";
|
|
17
12
|
export * from "./resources/types";
|
|
18
13
|
export * from "./sales-order-shipments/types";
|
|
19
14
|
export * from "./sales-orders/types";
|
|
20
15
|
export * from "./shipments/types";
|
|
21
|
-
export * from "./shipping-rules/types";
|
|
22
16
|
export * from "./warehouses/types";
|
|
23
17
|
export * from "./weight/types";
|
|
24
|
-
export * from "./weight-band/types";
|
|
25
|
-
export * from "./zones/types";
|
package/warehouses/api.d.ts
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Warehouse } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Warehouses API module - /v1/warehouses
|
|
5
|
-
*/
|
|
6
3
|
export declare class WarehousesAPI {
|
|
7
4
|
private client;
|
|
8
5
|
constructor(client: AxiosInstance);
|
|
9
|
-
/**
|
|
10
|
-
* The `list` method retrieves a list of `warehouses` (Ship From Locations)
|
|
11
|
-
* for a given user.
|
|
12
|
-
*/
|
|
13
6
|
list: () => Promise<import("axios").AxiosResponse<{
|
|
14
7
|
warehouses: Warehouse[];
|
|
15
8
|
}, any>>;
|
|
16
|
-
/**
|
|
17
|
-
* The `create` method allows for creation of warehouses (Ship From Locations)
|
|
18
|
-
* on a users ShipEngine account.
|
|
19
|
-
*/
|
|
20
9
|
create: (warehouse: Partial<Warehouse>) => Promise<import("axios").AxiosResponse<Warehouse, any>>;
|
|
21
|
-
/**
|
|
22
|
-
* The `update` method updates a specific warehouse (Ship From Location) for a
|
|
23
|
-
* given user by `warehouseId`.
|
|
24
|
-
*/
|
|
25
10
|
update: (warehouseId: string, warehouse: Partial<Warehouse>) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
26
|
-
/**
|
|
27
|
-
* The `delete` method deletes a specific warehouse (Ship From Location) by
|
|
28
|
-
* `warehouseId` from a users ShipEngine account.
|
|
29
|
-
*/
|
|
30
11
|
delete: (warehouseId: string) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
31
12
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from "axios";
|
|
2
|
-
import { AccountBillingPlanResponse } from "./types";
|
|
3
|
-
/**
|
|
4
|
-
* # Account Billing Plan API module - /v1/account/billing_plan
|
|
5
|
-
*/
|
|
6
|
-
export declare class AccountBillingPlanAPI {
|
|
7
|
-
private client;
|
|
8
|
-
constructor(client: AxiosInstance);
|
|
9
|
-
/**
|
|
10
|
-
* The `get` method retrieves the account billing plan for the current user.
|
|
11
|
-
*/
|
|
12
|
-
get: () => Promise<import("axios").AxiosResponse<AccountBillingPlanResponse, any>>;
|
|
13
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare enum AccountBillingPlanChangeType {
|
|
2
|
-
Downgrade = 0,
|
|
3
|
-
Cancellation = 1
|
|
4
|
-
}
|
|
5
|
-
export type AccountBillingPlan = {
|
|
6
|
-
code: string;
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Responses
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* "cancelledAt", "pendingChange" and "trialEndAt" are only available when applies
|
|
14
|
-
* won't be on the response otherwise
|
|
15
|
-
*/
|
|
16
|
-
export type AccountBillingPlanResponse = {
|
|
17
|
-
billingPlan: AccountBillingPlan;
|
|
18
|
-
cancelledAt?: string;
|
|
19
|
-
currentBillingCycle: {
|
|
20
|
-
endsAt: string;
|
|
21
|
-
startedAt: string;
|
|
22
|
-
};
|
|
23
|
-
pendingChange?: {
|
|
24
|
-
changeTo: AccountBillingPlan;
|
|
25
|
-
effectiveAt: string;
|
|
26
|
-
requestedAt: string;
|
|
27
|
-
type: AccountBillingPlanChangeType;
|
|
28
|
-
};
|
|
29
|
-
trialEndAt?: string;
|
|
30
|
-
};
|
package/funding-sources/api.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from "axios";
|
|
2
|
-
import { Money } from "../payments";
|
|
3
|
-
import { AddFundsResponse, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress, MetadataResponse } from "./types";
|
|
4
|
-
/**
|
|
5
|
-
* # Funding Sources API module - /v1/funding_sources
|
|
6
|
-
* Docs: https://auctane.atlassian.net/wiki/spaces/SE/pages/3628370266/ShipEngine+Funding+Sources+API
|
|
7
|
-
*/
|
|
8
|
-
export declare class FundingSourcesAPI {
|
|
9
|
-
private client;
|
|
10
|
-
constructor(client: AxiosInstance);
|
|
11
|
-
/**
|
|
12
|
-
* The `list` method retrieves a list of funding sources for a given user.
|
|
13
|
-
*/
|
|
14
|
-
list: () => Promise<import("axios").AxiosResponse<{
|
|
15
|
-
fundingSources: FundingSource[];
|
|
16
|
-
}, any>>;
|
|
17
|
-
/**
|
|
18
|
-
* The `get` method retrieves a specific funding source by `fundingSourceId`.
|
|
19
|
-
*/
|
|
20
|
-
get: (fundingSourceId: string) => Promise<import("axios").AxiosResponse<FundingSource, any>>;
|
|
21
|
-
/**
|
|
22
|
-
* The `create` method creates a new funding source for a given user. This requires
|
|
23
|
-
* payment information to be collected from the user.
|
|
24
|
-
*/
|
|
25
|
-
create: (createFundingSource: CreateFundingSource) => Promise<import("axios").AxiosResponse<{
|
|
26
|
-
fundingSource: FundingSource;
|
|
27
|
-
}, any>>;
|
|
28
|
-
/**
|
|
29
|
-
* The `update` method updates a funding source for a given user. This allows the
|
|
30
|
-
* user to update the billing address or payment information associated with the
|
|
31
|
-
* funding source.
|
|
32
|
-
*/
|
|
33
|
-
update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo, fundingSourceId: string) => Promise<import("axios").AxiosResponse<{
|
|
34
|
-
fundingSource: FundingSource;
|
|
35
|
-
}, any>>;
|
|
36
|
-
/**
|
|
37
|
-
* The `registerCarrier` method registers a carrier account and associates
|
|
38
|
-
* it with a given funding source.
|
|
39
|
-
*/
|
|
40
|
-
registerCarrier: (carrier: CarrierRegistration) => Promise<import("axios").AxiosResponse<CarrierRegistrationResponse, any>>;
|
|
41
|
-
/**
|
|
42
|
-
* The `addFunds` method allows you to add funds to a funding source.
|
|
43
|
-
*/
|
|
44
|
-
addFunds: (amount: Money, fundingSourceId: string) => Promise<import("axios").AxiosResponse<AddFundsResponse, any>>;
|
|
45
|
-
/**
|
|
46
|
-
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
47
|
-
* and attaching carriers
|
|
48
|
-
*/
|
|
49
|
-
metadata: () => Promise<import("axios").AxiosResponse<MetadataResponse, any>>;
|
|
50
|
-
}
|