@shipengine/js-api 4.22.1 → 4.23.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/errors/types.d.ts +1 -1
- package/index.js +6 -0
- package/index.mjs +6 -0
- package/labels/api.d.ts +4 -0
- package/labels/types.d.ts +4 -6
- package/package.json +1 -1
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" | "refund_assist_already_enabled" | "refund_assist_not_available" | "refund_assist_not_enabled";
|
|
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_label_refund_status" | "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.js
CHANGED
|
@@ -3911,6 +3911,12 @@ class LabelsAPI {
|
|
|
3911
3911
|
this.void = (labelId) => {
|
|
3912
3912
|
return this.client.put(`/v1/labels/${labelId}/void`);
|
|
3913
3913
|
};
|
|
3914
|
+
/**
|
|
3915
|
+
* The `cancelRefund` method allows a user to cancel a refund request for a label by `labelId`.
|
|
3916
|
+
*/
|
|
3917
|
+
this.cancelRefund = (labelId) => {
|
|
3918
|
+
return this.client.post(`/v1/labels/${labelId}/cancel_refund`);
|
|
3919
|
+
};
|
|
3914
3920
|
/**
|
|
3915
3921
|
* The `export` method allows to export a CSV document of labels based on the provided parameters.
|
|
3916
3922
|
*/
|
package/index.mjs
CHANGED
|
@@ -3907,6 +3907,12 @@ class LabelsAPI {
|
|
|
3907
3907
|
this.void = (labelId) => {
|
|
3908
3908
|
return this.client.put(`/v1/labels/${labelId}/void`);
|
|
3909
3909
|
};
|
|
3910
|
+
/**
|
|
3911
|
+
* The `cancelRefund` method allows a user to cancel a refund request for a label by `labelId`.
|
|
3912
|
+
*/
|
|
3913
|
+
this.cancelRefund = (labelId) => {
|
|
3914
|
+
return this.client.post(`/v1/labels/${labelId}/cancel_refund`);
|
|
3915
|
+
};
|
|
3910
3916
|
/**
|
|
3911
3917
|
* The `export` method allows to export a CSV document of labels based on the provided parameters.
|
|
3912
3918
|
*/
|
package/labels/api.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export declare class LabelsAPI {
|
|
|
32
32
|
* The `void` method allows a user to void a label by `labelId`.
|
|
33
33
|
*/
|
|
34
34
|
void: (labelId: string) => Promise<import("axios").AxiosResponse<VoidRequest, any>>;
|
|
35
|
+
/**
|
|
36
|
+
* The `cancelRefund` method allows a user to cancel a refund request for a label by `labelId`.
|
|
37
|
+
*/
|
|
38
|
+
cancelRefund: (labelId: string) => Promise<import("axios").AxiosResponse<Label, any>>;
|
|
35
39
|
/**
|
|
36
40
|
* The `export` method allows to export a CSV document of labels based on the provided parameters.
|
|
37
41
|
*/
|
package/labels/types.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ 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
|
+
export type LabelVoidType = "refund_assist" | "manual";
|
|
14
|
+
export type RefundStatus = "request_scheduled" | "pending" | "approved" | "rejected" | "excluded";
|
|
13
15
|
/**
|
|
14
16
|
* Columns available for label exports
|
|
15
17
|
*/
|
|
@@ -94,11 +96,9 @@ export type ListLabelsParams = {
|
|
|
94
96
|
rateId?: string;
|
|
95
97
|
/**
|
|
96
98
|
* `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"
|
|
99
|
+
* Can be a single status or multiple comma-separated statuses
|
|
100
100
|
*/
|
|
101
|
-
refundStatus?:
|
|
101
|
+
refundStatus?: RefundStatus[] | RefundStatus;
|
|
102
102
|
/**
|
|
103
103
|
* `serviceCode` is an optional string to limit results to only labels for
|
|
104
104
|
* a specific carrier service.
|
|
@@ -165,8 +165,6 @@ export type ExportLabelsParams = {
|
|
|
165
165
|
*/
|
|
166
166
|
labelId?: string;
|
|
167
167
|
} & ListLabelsParams;
|
|
168
|
-
export type LabelVoidType = "refund_assist" | "manual";
|
|
169
|
-
export type RefundStatus = "request_scheduled" | "pending" | "approved" | "rejected" | "excluded";
|
|
170
168
|
export type RefundDetails = {
|
|
171
169
|
amountApproved: Money | null;
|
|
172
170
|
amountCredited: Money | null;
|