@shipengine/js-api 4.21.0 → 4.22.1-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-refund-assist/api.d.ts +25 -0
- package/account-refund-assist/index.d.ts +2 -0
- package/account-refund-assist/types.d.ts +10 -0
- package/client.d.ts +6 -0
- package/errors/types.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +37 -0
- package/index.mjs +37 -1
- package/labels/types.d.ts +19 -0
- package/package.json +1 -1
- package/types.d.ts +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { GetRefundAssistResponse } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* # Account Refund Assist API module - /v1/account/refund_assist
|
|
5
|
+
*/
|
|
6
|
+
export declare class AccountRefundAssistAPI {
|
|
7
|
+
private client;
|
|
8
|
+
constructor(client: AxiosInstance);
|
|
9
|
+
/**
|
|
10
|
+
* The `get` method retrieves the refund assist configuration for all carriers,
|
|
11
|
+
* including if it is enabled for the user.
|
|
12
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#1.--Retrieve-RA-settings-information-(with-carrier-and-RA-details)
|
|
13
|
+
*/
|
|
14
|
+
get: () => Promise<import("axios").AxiosResponse<GetRefundAssistResponse, any>>;
|
|
15
|
+
/**
|
|
16
|
+
* The `enable` method enables refund assist globally for the user.
|
|
17
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#2.--Enable-RA-for-a-seller
|
|
18
|
+
*/
|
|
19
|
+
enable: () => Promise<import("axios").AxiosResponse<void, any>>;
|
|
20
|
+
/**
|
|
21
|
+
* The `disable` method disables refund assist globally for the user.
|
|
22
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#3.--Disable-RA-for-a-seller
|
|
23
|
+
*/
|
|
24
|
+
disable: () => Promise<import("axios").AxiosResponse<void, any>>;
|
|
25
|
+
}
|
package/client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AccountAddonsAPI } from "./account-addons";
|
|
|
3
3
|
import { AccountBillingAPI } from "./account-billing";
|
|
4
4
|
import { AccountBillingPlanAPI } from "./account-billing-plan";
|
|
5
5
|
import { AccountFeaturesAPI } from "./account-features";
|
|
6
|
+
import { AccountRefundAssistAPI } from "./account-refund-assist";
|
|
6
7
|
import { AccountSettingsAPI } from "./account-settings";
|
|
7
8
|
import { AddressesAPI } from "./addresses";
|
|
8
9
|
import { AuctanePayAPI } from "./auctane-pay";
|
|
@@ -127,6 +128,11 @@ export declare class ShipEngineAPI {
|
|
|
127
128
|
* in ShipEngine API.
|
|
128
129
|
*/
|
|
129
130
|
get accountBilling(): AccountBillingAPI;
|
|
131
|
+
/**
|
|
132
|
+
* The `accountRefundAssist` method provides access to the Account Refund Assist endpoints
|
|
133
|
+
* in ShipEngine API.
|
|
134
|
+
*/
|
|
135
|
+
get accountRefundAssist(): AccountRefundAssistAPI;
|
|
130
136
|
/**
|
|
131
137
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
132
138
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
package/errors/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @category Entities
|
|
3
3
|
*/
|
|
4
|
-
export type CodedErrorCode = "auto_fund_not_supported" | "batch_cannot_be_modified" | "billing_info_not_found" | "carrier_conflict" | "carrier_disconnected" | "carrier_not_connected" | "carrier_not_supported" | "confirmation_not_supported" | "default_warehouse_cannot_be_deleted" | "duplicated_name" | "duplicated_rate_card" | "empty_file" | "field_conflict" | "field_value_required" | "forbidden" | "funding_source_registration_in_progress" | "identifier_conflict" | "identifiers_must_match" | "insufficient_funds" | "insufficient_rate_card_data" | "insurance_failure" | "invalid_address" | "invalid_billing_info" | "invalid_billing_plan" | "invalid_currency" | "invalid_field_value" | "invalid_file_size" | "invalid_file_type" | "invalid_identifier" | "invalid_packages" | "invalid_rates" | "invalid_service" | "invalid_shipping_rule" | "invalid_status" | "invalid_string_length" | "invalid_weight_bands_rates" | "invalid_weight_bands" | "invalid_zones" | "label_images_not_supported" | "meter_failure" | "not_found" | "order_source_not_active" | "rate_limit_exceeded" | "refresh_not_supported" | "repeated_surcharges_in_rate_card" | "repeated_surcharges_in_services" | "repeated_surcharges_in_zone" | "request_body_required" | "return_label_not_supported" | "settings_not_supported" | "subscription_inactive" | "terms_not_accepted" | "tracking_not_supported" | "trial_expired" | "unauthorized" | "unknown" | "unspecified" | "verification_failure" | "warehouse_conflict" | "webhook_event_type_conflict" | "system_api_error" | "inactive_addon_error" | "addons_disabling_missing_seller_addon_error" | "addons_disabling_inactive_addon_error" | "addons_disabling_general_error" | "request_seller_feature_error";
|
|
4
|
+
export type CodedErrorCode = "auto_fund_not_supported" | "batch_cannot_be_modified" | "billing_info_not_found" | "carrier_conflict" | "carrier_disconnected" | "carrier_not_connected" | "carrier_not_supported" | "confirmation_not_supported" | "default_warehouse_cannot_be_deleted" | "duplicated_name" | "duplicated_rate_card" | "empty_file" | "field_conflict" | "field_value_required" | "forbidden" | "funding_source_registration_in_progress" | "identifier_conflict" | "identifiers_must_match" | "insufficient_funds" | "insufficient_rate_card_data" | "insurance_failure" | "invalid_address" | "invalid_billing_info" | "invalid_billing_plan" | "invalid_currency" | "invalid_field_value" | "invalid_file_size" | "invalid_file_type" | "invalid_identifier" | "invalid_packages" | "invalid_rates" | "invalid_service" | "invalid_shipping_rule" | "invalid_status" | "invalid_string_length" | "invalid_weight_bands_rates" | "invalid_weight_bands" | "invalid_zones" | "label_images_not_supported" | "meter_failure" | "not_found" | "order_source_not_active" | "rate_limit_exceeded" | "refresh_not_supported" | "repeated_surcharges_in_rate_card" | "repeated_surcharges_in_services" | "repeated_surcharges_in_zone" | "request_body_required" | "return_label_not_supported" | "settings_not_supported" | "subscription_inactive" | "terms_not_accepted" | "tracking_not_supported" | "trial_expired" | "unauthorized" | "unknown" | "unspecified" | "verification_failure" | "warehouse_conflict" | "webhook_event_type_conflict" | "system_api_error" | "inactive_addon_error" | "addons_disabling_missing_seller_addon_error" | "addons_disabling_inactive_addon_error" | "addons_disabling_general_error" | "request_seller_feature_error" | "refund_assist_already_enabled" | "refund_assist_not_available" | "refund_assist_not_enabled";
|
|
5
5
|
/**
|
|
6
6
|
* @category Entities
|
|
7
7
|
*/
|
package/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * as SE from "./types";
|
|
|
2
2
|
export * from "./account-settings";
|
|
3
3
|
export * from "./account-addons";
|
|
4
4
|
export * from "./account-features";
|
|
5
|
+
export * from "./account-refund-assist";
|
|
5
6
|
export * from "./addresses";
|
|
6
7
|
export * from "./auctane-pay";
|
|
7
8
|
export * from "./account-billing-plan";
|
package/index.js
CHANGED
|
@@ -269,6 +269,35 @@ class AccountFeaturesAPI {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
class AccountRefundAssistAPI {
|
|
273
|
+
constructor(client) {
|
|
274
|
+
this.client = client;
|
|
275
|
+
/**
|
|
276
|
+
* The `get` method retrieves the refund assist configuration for all carriers,
|
|
277
|
+
* including if it is enabled for the user.
|
|
278
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#1.--Retrieve-RA-settings-information-(with-carrier-and-RA-details)
|
|
279
|
+
*/
|
|
280
|
+
this.get = () => {
|
|
281
|
+
return this.client.get("/v1/account/refund_assist");
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* The `enable` method enables refund assist globally for the user.
|
|
285
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#2.--Enable-RA-for-a-seller
|
|
286
|
+
*/
|
|
287
|
+
this.enable = () => {
|
|
288
|
+
return this.client.post("/v1/account/refund_assist/enable");
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* The `disable` method disables refund assist globally for the user.
|
|
292
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#3.--Disable-RA-for-a-seller
|
|
293
|
+
*/
|
|
294
|
+
this.disable = () => {
|
|
295
|
+
return this.client.post("/v1/account/refund_assist/disable");
|
|
296
|
+
};
|
|
297
|
+
this.client = client;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
272
301
|
class AddressesAPI {
|
|
273
302
|
constructor(client) {
|
|
274
303
|
this.client = client;
|
|
@@ -22010,6 +22039,13 @@ class ShipEngineAPI {
|
|
|
22010
22039
|
get accountBilling() {
|
|
22011
22040
|
return new AccountBillingAPI(this.client);
|
|
22012
22041
|
}
|
|
22042
|
+
/**
|
|
22043
|
+
* The `accountRefundAssist` method provides access to the Account Refund Assist endpoints
|
|
22044
|
+
* in ShipEngine API.
|
|
22045
|
+
*/
|
|
22046
|
+
get accountRefundAssist() {
|
|
22047
|
+
return new AccountRefundAssistAPI(this.client);
|
|
22048
|
+
}
|
|
22013
22049
|
/**
|
|
22014
22050
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
22015
22051
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
|
@@ -22210,6 +22246,7 @@ exports.AccountBillingAPI = AccountBillingAPI;
|
|
|
22210
22246
|
exports.AccountBillingPlanAPI = AccountBillingPlanAPI;
|
|
22211
22247
|
exports.AccountBillingPlanChangeType = AccountBillingPlanChangeType;
|
|
22212
22248
|
exports.AccountFeaturesAPI = AccountFeaturesAPI;
|
|
22249
|
+
exports.AccountRefundAssistAPI = AccountRefundAssistAPI;
|
|
22213
22250
|
exports.AccountSettingsAPI = AccountSettingsAPI;
|
|
22214
22251
|
exports.AddressesAPI = AddressesAPI;
|
|
22215
22252
|
exports.AuctanePayAPI = AuctanePayAPI;
|
package/index.mjs
CHANGED
|
@@ -265,6 +265,35 @@ class AccountFeaturesAPI {
|
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
class AccountRefundAssistAPI {
|
|
269
|
+
constructor(client) {
|
|
270
|
+
this.client = client;
|
|
271
|
+
/**
|
|
272
|
+
* The `get` method retrieves the refund assist configuration for all carriers,
|
|
273
|
+
* including if it is enabled for the user.
|
|
274
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#1.--Retrieve-RA-settings-information-(with-carrier-and-RA-details)
|
|
275
|
+
*/
|
|
276
|
+
this.get = () => {
|
|
277
|
+
return this.client.get("/v1/account/refund_assist");
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* The `enable` method enables refund assist globally for the user.
|
|
281
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#2.--Enable-RA-for-a-seller
|
|
282
|
+
*/
|
|
283
|
+
this.enable = () => {
|
|
284
|
+
return this.client.post("/v1/account/refund_assist/enable");
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* The `disable` method disables refund assist globally for the user.
|
|
288
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6766264564/Refund+Assist+API+contracts#3.--Disable-RA-for-a-seller
|
|
289
|
+
*/
|
|
290
|
+
this.disable = () => {
|
|
291
|
+
return this.client.post("/v1/account/refund_assist/disable");
|
|
292
|
+
};
|
|
293
|
+
this.client = client;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
268
297
|
class AddressesAPI {
|
|
269
298
|
constructor(client) {
|
|
270
299
|
this.client = client;
|
|
@@ -22006,6 +22035,13 @@ class ShipEngineAPI {
|
|
|
22006
22035
|
get accountBilling() {
|
|
22007
22036
|
return new AccountBillingAPI(this.client);
|
|
22008
22037
|
}
|
|
22038
|
+
/**
|
|
22039
|
+
* The `accountRefundAssist` method provides access to the Account Refund Assist endpoints
|
|
22040
|
+
* in ShipEngine API.
|
|
22041
|
+
*/
|
|
22042
|
+
get accountRefundAssist() {
|
|
22043
|
+
return new AccountRefundAssistAPI(this.client);
|
|
22044
|
+
}
|
|
22009
22045
|
/**
|
|
22010
22046
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
22011
22047
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
|
@@ -22201,4 +22237,4 @@ class ShipEngineAPI {
|
|
|
22201
22237
|
}
|
|
22202
22238
|
}
|
|
22203
22239
|
|
|
22204
|
-
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountFeaturesAPI, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FeatureId, 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 };
|
|
22240
|
+
export { AccountAddonsAPI, AccountBillingAPI, AccountBillingPlanAPI, AccountBillingPlanChangeType, AccountFeaturesAPI, AccountRefundAssistAPI, AccountSettingsAPI, AddressesAPI, AuctanePayAPI, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FeatureId, 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
|
@@ -39,6 +39,7 @@ export type Label = {
|
|
|
39
39
|
paperlessDownload: PaperlessDownload | null;
|
|
40
40
|
qrCodeDownload?: LinkedResource;
|
|
41
41
|
rateDetails: RateDetail[];
|
|
42
|
+
refundDetails: RefundDetails | null;
|
|
42
43
|
relayPoints: {
|
|
43
44
|
shipFrom: RelayPoint;
|
|
44
45
|
shipTo: RelayPoint;
|
|
@@ -58,6 +59,7 @@ export type Label = {
|
|
|
58
59
|
trackingUrl: string;
|
|
59
60
|
voided: boolean;
|
|
60
61
|
voidedAt: string | null;
|
|
62
|
+
voidType: LabelVoidType | null;
|
|
61
63
|
};
|
|
62
64
|
export type PaperlessDownload = {
|
|
63
65
|
handoffCode: string;
|
|
@@ -90,6 +92,13 @@ export type ListLabelsParams = {
|
|
|
90
92
|
* specific rate.
|
|
91
93
|
*/
|
|
92
94
|
rateId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* `refundStatus` is an optional string to filter results by refund status.
|
|
97
|
+
* Can be a single status or multiple comma-separated statuses.
|
|
98
|
+
* @example "pending"
|
|
99
|
+
* @example "pending,approved"
|
|
100
|
+
*/
|
|
101
|
+
refundStatus?: string;
|
|
93
102
|
/**
|
|
94
103
|
* `serviceCode` is an optional string to limit results to only labels for
|
|
95
104
|
* a specific carrier service.
|
|
@@ -156,3 +165,13 @@ export type ExportLabelsParams = {
|
|
|
156
165
|
*/
|
|
157
166
|
labelId?: string;
|
|
158
167
|
} & ListLabelsParams;
|
|
168
|
+
export type LabelVoidType = "refund_assist" | "manual";
|
|
169
|
+
export type RefundStatus = "request_scheduled" | "pending" | "approved" | "rejected" | "excluded";
|
|
170
|
+
export type RefundDetails = {
|
|
171
|
+
amountApproved: Money | null;
|
|
172
|
+
amountCredited: Money | null;
|
|
173
|
+
amountPaid: Money | null;
|
|
174
|
+
amountRequested: Money | null;
|
|
175
|
+
refundStatus: RefundStatus;
|
|
176
|
+
requestDate: string;
|
|
177
|
+
};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./account-billing-plan/types";
|
|
|
4
4
|
export * from "./account-billing/types";
|
|
5
5
|
export * from "./account-addons/types";
|
|
6
6
|
export * from "./account-features/types";
|
|
7
|
+
export * from "./account-refund-assist/types";
|
|
7
8
|
export * from "./addresses/types";
|
|
8
9
|
export * from "./auctane-pay/types";
|
|
9
10
|
export * from "./carriers/types";
|