@shipengine/js-api 4.4.0 → 4.5.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-billing/types.d.ts +3 -11
- package/client.d.ts +7 -0
- package/funding-sources/api.d.ts +2 -2
- package/funding-sources/types.d.ts +1 -17
- package/index.d.ts +1 -0
- package/index.js +23 -2
- package/index.mjs +23 -3
- package/labels/types.d.ts +3 -0
- package/package.json +1 -1
- package/payments/types.d.ts +21 -0
- package/types.d.ts +1 -0
- package/users/api.d.ts +14 -0
- package/users/index.d.ts +2 -0
- package/users/types.d.ts +17 -0
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** @internal */
|
|
3
|
-
export type AccountBillingProvider = Provider;
|
|
1
|
+
import { AbbreviatedCreditCardInfo, BankAccountInfo } from "../payments";
|
|
4
2
|
/** @internal */
|
|
5
3
|
type PaymentMethod = {
|
|
6
|
-
bankAccountInfo:
|
|
7
|
-
|
|
8
|
-
provider: string;
|
|
9
|
-
} | null;
|
|
10
|
-
creditCardInfo: {
|
|
11
|
-
cardNumberLastFour: string;
|
|
12
|
-
provider: AccountBillingProvider;
|
|
13
|
-
} | null;
|
|
4
|
+
bankAccountInfo: BankAccountInfo | null;
|
|
5
|
+
creditCardInfo: AbbreviatedCreditCardInfo | null;
|
|
14
6
|
paymentMethodId?: string;
|
|
15
7
|
};
|
|
16
8
|
/** @internal */
|
package/client.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { ServicePointsAPI } from "./service-points";
|
|
|
22
22
|
import { ShipmentsAPI } from "./shipments";
|
|
23
23
|
import { ShippingRulesAPI } from "./shipping-rules";
|
|
24
24
|
import { ThemesAPI } from "./themes";
|
|
25
|
+
import { UsersApi } from "./users";
|
|
25
26
|
import { WarehousesAPI } from "./warehouses";
|
|
26
27
|
import { WebhooksAPI } from "./webhooks";
|
|
27
28
|
/**
|
|
@@ -252,4 +253,10 @@ export declare class ShipEngineAPI {
|
|
|
252
253
|
* @see {@link AuctanePayAPI | The Auctane Pay API module}
|
|
253
254
|
*/
|
|
254
255
|
get auctanePay(): AuctanePayAPI;
|
|
256
|
+
/**
|
|
257
|
+
* The `users` method provides access to Users endpoints in ShipEngine API.
|
|
258
|
+
*
|
|
259
|
+
* @see {@link UsersApi | The Users API module}
|
|
260
|
+
*/
|
|
261
|
+
get users(): UsersApi;
|
|
255
262
|
}
|
package/funding-sources/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Money } from "../payments";
|
|
3
3
|
import { CreationRangeQuery, PageableQuery } from "../resources";
|
|
4
|
-
import { AddFundsResponse, AuctanePayInfo,
|
|
4
|
+
import { AddFundsResponse, AuctanePayInfo, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress, FundingSourceCreateResponse, FundingSourceTransactionsResponse, InsuranceFundingSourceAcceptedTermsResponse, MetadataResponse } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
* # Funding Sources API module - /v1/funding_sources
|
|
@@ -30,7 +30,7 @@ export declare class FundingSourcesAPI {
|
|
|
30
30
|
* user to update the billing address or payment information associated with the
|
|
31
31
|
* funding source.
|
|
32
32
|
*/
|
|
33
|
-
update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo | undefined,
|
|
33
|
+
update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo | undefined, auctanePayInfo: AuctanePayInfo | undefined, fundingSourceId: string) => Promise<import("axios").AxiosResponse<{
|
|
34
34
|
fundingSource: FundingSource;
|
|
35
35
|
}, any>>;
|
|
36
36
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AbbreviatedCreditCardInfo, BankAccountInfo, Provider } from "../payments";
|
|
1
2
|
import { PageableResult } from "../resources";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
@@ -12,7 +13,6 @@ export type CreateFundingSource = {
|
|
|
12
13
|
billingInfo: FundingSourceAddress;
|
|
13
14
|
iovationBlackBox: IovationBlackBox;
|
|
14
15
|
paymentMethod: {
|
|
15
|
-
bankAccountInfo?: BankAccountInfo;
|
|
16
16
|
creditCardInfo?: CreditCardInfo;
|
|
17
17
|
paymentMethodId?: string;
|
|
18
18
|
sessionId?: string;
|
|
@@ -29,22 +29,10 @@ export type FundingSource = {
|
|
|
29
29
|
bankAccountInfo: BankAccountInfo | null;
|
|
30
30
|
creditCardInfo: AbbreviatedCreditCardInfo | null;
|
|
31
31
|
paymentMethodId?: string;
|
|
32
|
-
sessionId?: string;
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
34
|
/** @internal */
|
|
36
|
-
export type AbbreviatedCreditCardInfo = {
|
|
37
|
-
cardNumberLastFour: string;
|
|
38
|
-
provider: Provider;
|
|
39
|
-
};
|
|
40
|
-
/** @internal */
|
|
41
35
|
export type FundingSourceInsuranceProvider = "parcelguard" | "x_cover";
|
|
42
|
-
/**
|
|
43
|
-
* @internal
|
|
44
|
-
* Used for creating new funding source without Auctane Pay.
|
|
45
|
-
* As well for receiving existing funding source information.
|
|
46
|
-
*/
|
|
47
|
-
export type Provider = "visa" | "mastercard" | "american_express" | "discover" | "maestro" | "diners_club" | "ach" | "jcb" | "pulse" | "star" | "union_pay";
|
|
48
36
|
/** @internal */
|
|
49
37
|
export interface FundingSourcePickupAddress extends Omit<FundingSourceAddress, "email" | "phone"> {
|
|
50
38
|
email?: string;
|
|
@@ -98,10 +86,6 @@ export interface CreditCardInfo {
|
|
|
98
86
|
name: string;
|
|
99
87
|
provider: Provider;
|
|
100
88
|
}
|
|
101
|
-
export interface BankAccountInfo {
|
|
102
|
-
lastFour: string;
|
|
103
|
-
provider: string;
|
|
104
|
-
}
|
|
105
89
|
/** @internal */
|
|
106
90
|
export interface Term {
|
|
107
91
|
termType: string;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -3545,7 +3545,7 @@ class FundingSourcesAPI {
|
|
|
3545
3545
|
* user to update the billing address or payment information associated with the
|
|
3546
3546
|
* funding source.
|
|
3547
3547
|
*/
|
|
3548
|
-
this.update = (billingInfo, creditCardInfo,
|
|
3548
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3549
3549
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3550
3550
|
if (!endUserIpAddress) {
|
|
3551
3551
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3556,7 +3556,6 @@ class FundingSourcesAPI {
|
|
|
3556
3556
|
billingInfo,
|
|
3557
3557
|
endUserIpAddress,
|
|
3558
3558
|
paymentMethod: __spreadValues$3({
|
|
3559
|
-
bankAccountInfo,
|
|
3560
3559
|
creditCardInfo
|
|
3561
3560
|
}, auctanePayInfo)
|
|
3562
3561
|
}
|
|
@@ -4285,6 +4284,19 @@ class ThemesAPI {
|
|
|
4285
4284
|
}
|
|
4286
4285
|
}
|
|
4287
4286
|
|
|
4287
|
+
class UsersApi {
|
|
4288
|
+
constructor(client) {
|
|
4289
|
+
this.client = client;
|
|
4290
|
+
/**
|
|
4291
|
+
* The `list` gets all the users of the current Seller.
|
|
4292
|
+
*/
|
|
4293
|
+
this.list = (options) => {
|
|
4294
|
+
return this.client.get("/v1/users", { params: options });
|
|
4295
|
+
};
|
|
4296
|
+
this.client = client;
|
|
4297
|
+
}
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4288
4300
|
class WarehousesAPI {
|
|
4289
4301
|
constructor(client) {
|
|
4290
4302
|
this.client = client;
|
|
@@ -22006,6 +22018,14 @@ class ShipEngineAPI {
|
|
|
22006
22018
|
get auctanePay() {
|
|
22007
22019
|
return new AuctanePayAPI(this.client);
|
|
22008
22020
|
}
|
|
22021
|
+
/**
|
|
22022
|
+
* The `users` method provides access to Users endpoints in ShipEngine API.
|
|
22023
|
+
*
|
|
22024
|
+
* @see {@link UsersApi | The Users API module}
|
|
22025
|
+
*/
|
|
22026
|
+
get users() {
|
|
22027
|
+
return new UsersApi(this.client);
|
|
22028
|
+
}
|
|
22009
22029
|
}
|
|
22010
22030
|
|
|
22011
22031
|
exports.AccountBillingAPI = AccountBillingAPI;
|
|
@@ -22045,6 +22065,7 @@ exports.ShipEngineAPI = ShipEngineAPI;
|
|
|
22045
22065
|
exports.ShipmentsAPI = ShipmentsAPI;
|
|
22046
22066
|
exports.ShippingRulesAPI = ShippingRulesAPI;
|
|
22047
22067
|
exports.ThemesAPI = ThemesAPI;
|
|
22068
|
+
exports.UsersApi = UsersApi;
|
|
22048
22069
|
exports.WarehousesAPI = WarehousesAPI;
|
|
22049
22070
|
exports.WebhooksAPI = WebhooksAPI;
|
|
22050
22071
|
exports.camelizeKeys = camelizeKeys;
|
package/index.mjs
CHANGED
|
@@ -3541,7 +3541,7 @@ class FundingSourcesAPI {
|
|
|
3541
3541
|
* user to update the billing address or payment information associated with the
|
|
3542
3542
|
* funding source.
|
|
3543
3543
|
*/
|
|
3544
|
-
this.update = (billingInfo, creditCardInfo,
|
|
3544
|
+
this.update = (billingInfo, creditCardInfo, auctanePayInfo, fundingSourceId) => __async$4(this, null, function* () {
|
|
3545
3545
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
3546
3546
|
if (!endUserIpAddress) {
|
|
3547
3547
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3552,7 +3552,6 @@ class FundingSourcesAPI {
|
|
|
3552
3552
|
billingInfo,
|
|
3553
3553
|
endUserIpAddress,
|
|
3554
3554
|
paymentMethod: __spreadValues$3({
|
|
3555
|
-
bankAccountInfo,
|
|
3556
3555
|
creditCardInfo
|
|
3557
3556
|
}, auctanePayInfo)
|
|
3558
3557
|
}
|
|
@@ -4281,6 +4280,19 @@ class ThemesAPI {
|
|
|
4281
4280
|
}
|
|
4282
4281
|
}
|
|
4283
4282
|
|
|
4283
|
+
class UsersApi {
|
|
4284
|
+
constructor(client) {
|
|
4285
|
+
this.client = client;
|
|
4286
|
+
/**
|
|
4287
|
+
* The `list` gets all the users of the current Seller.
|
|
4288
|
+
*/
|
|
4289
|
+
this.list = (options) => {
|
|
4290
|
+
return this.client.get("/v1/users", { params: options });
|
|
4291
|
+
};
|
|
4292
|
+
this.client = client;
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4295
|
+
|
|
4284
4296
|
class WarehousesAPI {
|
|
4285
4297
|
constructor(client) {
|
|
4286
4298
|
this.client = client;
|
|
@@ -22002,6 +22014,14 @@ class ShipEngineAPI {
|
|
|
22002
22014
|
get auctanePay() {
|
|
22003
22015
|
return new AuctanePayAPI(this.client);
|
|
22004
22016
|
}
|
|
22017
|
+
/**
|
|
22018
|
+
* The `users` method provides access to Users endpoints in ShipEngine API.
|
|
22019
|
+
*
|
|
22020
|
+
* @see {@link UsersApi | The Users API module}
|
|
22021
|
+
*/
|
|
22022
|
+
get users() {
|
|
22023
|
+
return new UsersApi(this.client);
|
|
22024
|
+
}
|
|
22005
22025
|
}
|
|
22006
22026
|
|
|
22007
|
-
export { AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, camelizeKeys, decamelizeKeys, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
|
|
22027
|
+
export { AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, InvoiceAddressAPI, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, MovementIndicator, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, UsersApi, WarehousesAPI, WebhooksAPI, camelizeKeys, decamelizeKeys, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, parseError };
|
package/labels/types.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export type LabelFormat = "pdf" | "png" | "zpl";
|
|
|
10
10
|
export type LabelLayout = "4x6" | "letter";
|
|
11
11
|
export type LabelStatus = "processing" | "completed" | "error" | "voided";
|
|
12
12
|
export type LabelTrackingStatus = "unknown" | "in_transit" | "delivered" | "error";
|
|
13
|
+
/**
|
|
14
|
+
* Columns available for label exports
|
|
15
|
+
*/
|
|
13
16
|
export type LabelColumns = "shipment_id" | "label_id" | "external_order_id" | "external_shipment_id" | "packages" | "recipient" | "shipping_service" | "created_date" | "ship_date" | "status" | "tracking_status";
|
|
14
17
|
export type Label = {
|
|
15
18
|
alternativeIdentifiers?: string[];
|
package/package.json
CHANGED
package/payments/types.d.ts
CHANGED
|
@@ -17,6 +17,27 @@ export interface CreditCard {
|
|
|
17
17
|
number: string;
|
|
18
18
|
type: CreditCardVendor;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @category Entities
|
|
22
|
+
*/
|
|
23
|
+
export interface BankAccountInfo {
|
|
24
|
+
institutionName: string;
|
|
25
|
+
lastFour: string;
|
|
26
|
+
provider: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @category Entities
|
|
30
|
+
*/
|
|
31
|
+
export type AbbreviatedCreditCardInfo = {
|
|
32
|
+
cardNumberLastFour: string;
|
|
33
|
+
provider: Provider;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @category Entities
|
|
37
|
+
* Used for creating new funding source without Auctane Pay.
|
|
38
|
+
* As well for receiving existing funding source and subscription billing information.
|
|
39
|
+
*/
|
|
40
|
+
export type Provider = "visa" | "mastercard" | "american_express" | "discover" | "maestro" | "diners_club" | "ach" | "jcb" | "pulse" | "star" | "union_pay";
|
|
20
41
|
/**
|
|
21
42
|
* @category Entities
|
|
22
43
|
*/
|
package/types.d.ts
CHANGED
package/users/api.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { UserListOptions, UserListResponse } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* # Users API module - /v1/users
|
|
5
|
+
* @link https://docs.shipstation.com/openapi/users
|
|
6
|
+
*/
|
|
7
|
+
export declare class UsersApi {
|
|
8
|
+
private client;
|
|
9
|
+
constructor(client: AxiosInstance);
|
|
10
|
+
/**
|
|
11
|
+
* The `list` gets all the users of the current Seller.
|
|
12
|
+
*/
|
|
13
|
+
list: (options?: UserListOptions) => Promise<import("axios").AxiosResponse<UserListResponse, any>>;
|
|
14
|
+
}
|
package/users/index.d.ts
ADDED
package/users/types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CreationRangeQuery, ModificationRangeQuery, PageableQuery, PageableResult, SortableQuery } from "../resources";
|
|
2
|
+
export type UserStatus = "Active" | "Inactive" | "Locked_out" | "Email_lock";
|
|
3
|
+
export type User = {
|
|
4
|
+
createdAt: string;
|
|
5
|
+
email: string;
|
|
6
|
+
lastLoginAt: string;
|
|
7
|
+
name: string;
|
|
8
|
+
status: UserStatus;
|
|
9
|
+
userId: string;
|
|
10
|
+
username: string;
|
|
11
|
+
};
|
|
12
|
+
export type UserListOptions = {
|
|
13
|
+
status?: UserStatus;
|
|
14
|
+
} & PageableQuery & CreationRangeQuery & ModificationRangeQuery & SortableQuery;
|
|
15
|
+
export type UserListResponse = {
|
|
16
|
+
users: User[];
|
|
17
|
+
} & PageableResult;
|