@shipengine/js-api 4.14.0 → 4.16.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-addons/api.d.ts +15 -0
- package/account-addons/index.d.ts +2 -0
- package/account-addons/types.d.ts +7 -0
- package/auctane-pay/api.d.ts +11 -1
- package/auctane-pay/types.d.ts +24 -0
- package/client.d.ts +6 -0
- package/index.d.ts +1 -0
- package/index.js +36 -0
- package/index.mjs +36 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { Addon } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* # Account Addons API module - /v1/account/addons
|
|
5
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6364332064/Add-ons+New+endpoints+definition
|
|
6
|
+
*/
|
|
7
|
+
export declare class AccountAddonsAPI {
|
|
8
|
+
private client;
|
|
9
|
+
constructor(client: AxiosInstance);
|
|
10
|
+
/**
|
|
11
|
+
* The `list` method retrieves a list of all available addons, also includes
|
|
12
|
+
* if its avaiable for the current user
|
|
13
|
+
*/
|
|
14
|
+
list: () => Promise<import("axios").AxiosResponse<Addon[], any>>;
|
|
15
|
+
}
|
package/auctane-pay/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { ConfigResponse, CreateSessionRequest, CreateSessionResponse, PaymentMethodsResponse, PreviewTransactionRequest, PreviewTransactionResponse, UpdatePaymentMethodRequest, UpdatePaymentMethodResponse } from "./types";
|
|
2
|
+
import { ConfigResponse, CreateSessionRequest, CreateSessionResponse, IdentityVerificationResponse, PaymentAccountResponse, PaymentMethodsResponse, PreviewTransactionRequest, PreviewTransactionResponse, UpdatePaymentMethodRequest, UpdatePaymentMethodResponse } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* # Auctane Pay API module - /v1/payments
|
|
5
5
|
*
|
|
@@ -43,4 +43,14 @@ export declare class AuctanePayAPI {
|
|
|
43
43
|
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Auctane-Pay-available-endpoints-in-Shipstation-API
|
|
44
44
|
*/
|
|
45
45
|
updatePaymentMethod: (paymentMethodId: string, payload: UpdatePaymentMethodRequest) => Promise<import("axios").AxiosResponse<UpdatePaymentMethodResponse, any>>;
|
|
46
|
+
/**
|
|
47
|
+
* The `identityVerification` method returns a Plaid IDV verification URL for a given user
|
|
48
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Identity-verification
|
|
49
|
+
*/
|
|
50
|
+
identityVerification: () => Promise<import("axios").AxiosResponse<IdentityVerificationResponse, any>>;
|
|
51
|
+
/**
|
|
52
|
+
* The `getPaymentAccount` method returns the Payment Account data for a given user
|
|
53
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API
|
|
54
|
+
*/
|
|
55
|
+
getPaymentAccount: () => Promise<import("axios").AxiosResponse<PaymentAccountResponse, any>>;
|
|
46
56
|
}
|
package/auctane-pay/types.d.ts
CHANGED
|
@@ -144,6 +144,30 @@ export interface PaymentMethod {
|
|
|
144
144
|
* The PaymentMethod from the Update response
|
|
145
145
|
*/
|
|
146
146
|
export type UpdatePaymentMethodResponse = Omit<PaymentMethod, "sourceAccountId" | "paymentMethodType" | "institutionName">;
|
|
147
|
+
export type IdentityProvider = "Plaid";
|
|
148
|
+
export type IdentityVerificationResponse = {
|
|
149
|
+
/** Provider used for the identity verification */
|
|
150
|
+
identityProvider: IdentityProvider;
|
|
151
|
+
plaidLinkToken: string;
|
|
152
|
+
/** URL of the provider to start the identity verification */
|
|
153
|
+
verificationUrl: string;
|
|
154
|
+
};
|
|
155
|
+
export type PaymentAccountTrustLevel = "New" | "Trusted" | "Restricted" | "Grandfathered";
|
|
156
|
+
export type PaymentAccountEnrollmentStatus = "NotSet" | "Enrolled" | "Prohibited" | "OptedOut";
|
|
157
|
+
export type PaymentAccountResponse = {
|
|
158
|
+
/** Boolean to know if there is a IDV in progress */
|
|
159
|
+
isVerificationRequested: boolean;
|
|
160
|
+
/** Determine if the Wallet was created with Auctane Pay */
|
|
161
|
+
isWalletCreatedAfterAuctanePayLaunch: boolean;
|
|
162
|
+
/** Max amount of money the user can use */
|
|
163
|
+
limit: number;
|
|
164
|
+
/** Remaining amount of money */
|
|
165
|
+
limitRemaining: number;
|
|
166
|
+
/** Represents the surcharge enrollment status for an account. */
|
|
167
|
+
surchargeEnrollmentStatus: PaymentAccountEnrollmentStatus;
|
|
168
|
+
/** Auctane Pay's trust level for a particular customer. */
|
|
169
|
+
trustLevel: PaymentAccountTrustLevel;
|
|
170
|
+
};
|
|
147
171
|
/**
|
|
148
172
|
* @category Entities
|
|
149
173
|
*/
|
package/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosError, AxiosRequestHeaders } from "axios";
|
|
2
|
+
import { AccountAddonsAPI } from "./account-addons";
|
|
2
3
|
import { AccountBillingAPI } from "./account-billing";
|
|
3
4
|
import { AccountBillingPlanAPI } from "./account-billing-plan";
|
|
4
5
|
import { AccountSettingsAPI } from "./account-settings";
|
|
@@ -105,6 +106,11 @@ export declare class ShipEngineAPI {
|
|
|
105
106
|
* in ShipEngine API.
|
|
106
107
|
*/
|
|
107
108
|
get accountBillingPlan(): AccountBillingPlanAPI;
|
|
109
|
+
/**
|
|
110
|
+
* The `accountAddons` method provides access to the Account Addons endpoints
|
|
111
|
+
* in ShipEngine API.
|
|
112
|
+
*/
|
|
113
|
+
get accountAddons(): AccountAddonsAPI;
|
|
108
114
|
/**
|
|
109
115
|
* The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
|
|
110
116
|
* in ShipEngine API.
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -216,6 +216,20 @@ class AccountSettingsAPI {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
class AccountAddonsAPI {
|
|
220
|
+
constructor(client) {
|
|
221
|
+
this.client = client;
|
|
222
|
+
/**
|
|
223
|
+
* The `list` method retrieves a list of all available addons, also includes
|
|
224
|
+
* if its avaiable for the current user
|
|
225
|
+
*/
|
|
226
|
+
this.list = () => {
|
|
227
|
+
return this.client.get("/v1/account/addons");
|
|
228
|
+
};
|
|
229
|
+
this.client = client;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
219
233
|
class AddressesAPI {
|
|
220
234
|
constructor(client) {
|
|
221
235
|
this.client = client;
|
|
@@ -296,6 +310,20 @@ class AuctanePayAPI {
|
|
|
296
310
|
payload
|
|
297
311
|
);
|
|
298
312
|
};
|
|
313
|
+
/**
|
|
314
|
+
* The `identityVerification` method returns a Plaid IDV verification URL for a given user
|
|
315
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Identity-verification
|
|
316
|
+
*/
|
|
317
|
+
this.identityVerification = () => {
|
|
318
|
+
return this.client.post("/v1/payments/identity_verification");
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* The `getPaymentAccount` method returns the Payment Account data for a given user
|
|
322
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API
|
|
323
|
+
*/
|
|
324
|
+
this.getPaymentAccount = () => {
|
|
325
|
+
return this.client.get("/v1/payments/account");
|
|
326
|
+
};
|
|
299
327
|
this.client = client;
|
|
300
328
|
}
|
|
301
329
|
}
|
|
@@ -21891,6 +21919,13 @@ class ShipEngineAPI {
|
|
|
21891
21919
|
get accountBillingPlan() {
|
|
21892
21920
|
return new AccountBillingPlanAPI(this.client);
|
|
21893
21921
|
}
|
|
21922
|
+
/**
|
|
21923
|
+
* The `accountAddons` method provides access to the Account Addons endpoints
|
|
21924
|
+
* in ShipEngine API.
|
|
21925
|
+
*/
|
|
21926
|
+
get accountAddons() {
|
|
21927
|
+
return new AccountAddonsAPI(this.client);
|
|
21928
|
+
}
|
|
21894
21929
|
/**
|
|
21895
21930
|
* The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
|
|
21896
21931
|
* in ShipEngine API.
|
|
@@ -22093,6 +22128,7 @@ class ShipEngineAPI {
|
|
|
22093
22128
|
}
|
|
22094
22129
|
}
|
|
22095
22130
|
|
|
22131
|
+
exports.AccountAddonsAPI = AccountAddonsAPI;
|
|
22096
22132
|
exports.AccountBillingAPI = AccountBillingAPI;
|
|
22097
22133
|
exports.AccountBillingPlanAPI = AccountBillingPlanAPI;
|
|
22098
22134
|
exports.AccountBillingPlanChangeType = AccountBillingPlanChangeType;
|
package/index.mjs
CHANGED
|
@@ -212,6 +212,20 @@ class AccountSettingsAPI {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
class AccountAddonsAPI {
|
|
216
|
+
constructor(client) {
|
|
217
|
+
this.client = client;
|
|
218
|
+
/**
|
|
219
|
+
* The `list` method retrieves a list of all available addons, also includes
|
|
220
|
+
* if its avaiable for the current user
|
|
221
|
+
*/
|
|
222
|
+
this.list = () => {
|
|
223
|
+
return this.client.get("/v1/account/addons");
|
|
224
|
+
};
|
|
225
|
+
this.client = client;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
215
229
|
class AddressesAPI {
|
|
216
230
|
constructor(client) {
|
|
217
231
|
this.client = client;
|
|
@@ -292,6 +306,20 @@ class AuctanePayAPI {
|
|
|
292
306
|
payload
|
|
293
307
|
);
|
|
294
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* The `identityVerification` method returns a Plaid IDV verification URL for a given user
|
|
311
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Identity-verification
|
|
312
|
+
*/
|
|
313
|
+
this.identityVerification = () => {
|
|
314
|
+
return this.client.post("/v1/payments/identity_verification");
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* The `getPaymentAccount` method returns the Payment Account data for a given user
|
|
318
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API
|
|
319
|
+
*/
|
|
320
|
+
this.getPaymentAccount = () => {
|
|
321
|
+
return this.client.get("/v1/payments/account");
|
|
322
|
+
};
|
|
295
323
|
this.client = client;
|
|
296
324
|
}
|
|
297
325
|
}
|
|
@@ -21887,6 +21915,13 @@ class ShipEngineAPI {
|
|
|
21887
21915
|
get accountBillingPlan() {
|
|
21888
21916
|
return new AccountBillingPlanAPI(this.client);
|
|
21889
21917
|
}
|
|
21918
|
+
/**
|
|
21919
|
+
* The `accountAddons` method provides access to the Account Addons endpoints
|
|
21920
|
+
* in ShipEngine API.
|
|
21921
|
+
*/
|
|
21922
|
+
get accountAddons() {
|
|
21923
|
+
return new AccountAddonsAPI(this.client);
|
|
21924
|
+
}
|
|
21890
21925
|
/**
|
|
21891
21926
|
* The `accountBilling` method provides access to the Account Billing (Recurly) endpoints
|
|
21892
21927
|
* in ShipEngine API.
|
|
@@ -22089,4 +22124,4 @@ class ShipEngineAPI {
|
|
|
22089
22124
|
}
|
|
22090
22125
|
}
|
|
22091
22126
|
|
|
22092
|
-
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 };
|
|
22127
|
+
export { AccountAddonsAPI, 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/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
|
2
2
|
export * from "./account-settings/types";
|
|
3
3
|
export * from "./account-billing-plan/types";
|
|
4
4
|
export * from "./account-billing/types";
|
|
5
|
+
export * from "./account-addons/types";
|
|
5
6
|
export * from "./addresses/types";
|
|
6
7
|
export * from "./auctane-pay/types";
|
|
7
8
|
export * from "./carriers/types";
|