@shipengine/js-api 0.38.1 → 0.40.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/funding-sources/api.d.ts +7 -1
- package/funding-sources/types.d.ts +62 -7
- package/index.js +58 -0
- package/index.mjs +56 -1
- package/package.json +1 -1
- package/shipping-rules/api.d.ts +5 -0
- package/shipping-rules/types.d.ts +7 -7
- package/types.d.ts +2 -0
package/funding-sources/api.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Money } from "../payments";
|
|
3
|
-
import { AddFundsResponse, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress } from "./types";
|
|
3
|
+
import { AddFundsResponse, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSource, CreditCardInfo, FundingSource, FundingSourceAddress, MetadataResponse } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* # Funding Sources API module - /v1/funding_sources
|
|
6
|
+
* Docs: https://auctane.atlassian.net/wiki/spaces/SE/pages/3628370266/ShipEngine+Funding+Sources+API
|
|
6
7
|
*/
|
|
7
8
|
export declare class FundingSourcesAPI {
|
|
8
9
|
private client;
|
|
@@ -41,4 +42,9 @@ export declare class FundingSourcesAPI {
|
|
|
41
42
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
42
43
|
*/
|
|
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>>;
|
|
44
50
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export type AddFundsResponse = {
|
|
2
|
-
balance: {
|
|
3
|
-
amount: number;
|
|
4
|
-
currency: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
1
|
/**
|
|
8
2
|
* An encoded device fingerprint string containing information about the end-user's computing device such as OS, browser, etc.
|
|
9
3
|
* Required for carrier registration and US Wallet creation.
|
|
@@ -35,7 +29,7 @@ export interface CarrierRegistration {
|
|
|
35
29
|
{
|
|
36
30
|
acceptedTerms: Term[];
|
|
37
31
|
agreeToTerms: boolean;
|
|
38
|
-
carrierCode:
|
|
32
|
+
carrierCode: string;
|
|
39
33
|
fundingSourceId: string;
|
|
40
34
|
iovationBlackBox: IovationBlackBox;
|
|
41
35
|
pickupAddress?: FundingSourceAddress;
|
|
@@ -66,6 +60,42 @@ export interface Term {
|
|
|
66
60
|
termType: string;
|
|
67
61
|
version: string;
|
|
68
62
|
}
|
|
63
|
+
export type MetadataRequiredTerm = {
|
|
64
|
+
termType: string;
|
|
65
|
+
version: string;
|
|
66
|
+
};
|
|
67
|
+
export declare enum MetadataCapability {
|
|
68
|
+
AutoFunding = "auto_funding",
|
|
69
|
+
UpdatePaymentMethod = "update_payment_method",
|
|
70
|
+
DefaultPurchaseAmount = "default_purchase_amount",
|
|
71
|
+
ReportsLink = "reports_link",
|
|
72
|
+
BalanceHistory = "balance_history",
|
|
73
|
+
Nickname = "nickname",
|
|
74
|
+
RefreshServices = "refresh_services",
|
|
75
|
+
UpdatePassword = "update_password",
|
|
76
|
+
AccountSettingsLink = "account_settings_link",
|
|
77
|
+
Unknown = "unknown"
|
|
78
|
+
}
|
|
79
|
+
export declare enum MetadataRequirement {
|
|
80
|
+
BillingAddress = "billing_address",
|
|
81
|
+
CurrencyCode = "currency_code",
|
|
82
|
+
IovationBlackBox = "iovation_black_box",
|
|
83
|
+
Nickname = "nickname",
|
|
84
|
+
PaymentMethod = "payment_method",
|
|
85
|
+
PickupAddress = "pickup_address",
|
|
86
|
+
Unknown = "unknown"
|
|
87
|
+
}
|
|
88
|
+
export declare enum MetadataSatisfyingFormTypes {
|
|
89
|
+
Address = "address",
|
|
90
|
+
CreditCard = "credit_card",
|
|
91
|
+
StampsAccountCredentials = "stamps_account_credentials",
|
|
92
|
+
StampSellerLabelProvider = "stamps_seller_label_provider",
|
|
93
|
+
Unknown = "unknown"
|
|
94
|
+
}
|
|
95
|
+
export type MetadataRegistrationRequirement = {
|
|
96
|
+
requirementType: MetadataRequirement;
|
|
97
|
+
satisfyingFormTypes: MetadataSatisfyingFormTypes[];
|
|
98
|
+
};
|
|
69
99
|
export interface CarrierRegistrationResponse {
|
|
70
100
|
carrierAttachmentResults: [
|
|
71
101
|
{
|
|
@@ -77,4 +107,29 @@ export interface CarrierRegistrationResponse {
|
|
|
77
107
|
}
|
|
78
108
|
];
|
|
79
109
|
}
|
|
110
|
+
export interface MetadataResponse {
|
|
111
|
+
defaultFundingSourceProfile: {
|
|
112
|
+
capabilities: MetadataCapability[] | null;
|
|
113
|
+
countryCode: string;
|
|
114
|
+
currencyCode: string;
|
|
115
|
+
registrationRequirements: MetadataRegistrationRequirement[];
|
|
116
|
+
requiredTerms: MetadataRequiredTerm[];
|
|
117
|
+
};
|
|
118
|
+
defaultRegionProfile: {
|
|
119
|
+
carrierProfiles: Array<{
|
|
120
|
+
capabilities: MetadataCapability[] | null;
|
|
121
|
+
carrierCode: string;
|
|
122
|
+
registrationRequirements: MetadataRegistrationRequirement[];
|
|
123
|
+
requiredTerms: MetadataRequiredTerm[];
|
|
124
|
+
}>;
|
|
125
|
+
countryCode: string;
|
|
126
|
+
currencyCode: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export type AddFundsResponse = {
|
|
130
|
+
balance: {
|
|
131
|
+
amount: number;
|
|
132
|
+
currency: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
80
135
|
export {};
|
package/index.js
CHANGED
|
@@ -4,6 +4,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const axios = require('axios');
|
|
6
6
|
|
|
7
|
+
var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeType2) => {
|
|
8
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Downgrade"] = 0] = "Downgrade";
|
|
9
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Cancellation"] = 1] = "Cancellation";
|
|
10
|
+
return AccountBillingPlanChangeType2;
|
|
11
|
+
})(AccountBillingPlanChangeType || {});
|
|
12
|
+
|
|
7
13
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
8
14
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
9
15
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
@@ -33,6 +39,38 @@ class CodedError {
|
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
42
|
+
var MetadataCapability = /* @__PURE__ */ ((MetadataCapability2) => {
|
|
43
|
+
MetadataCapability2["AutoFunding"] = "auto_funding";
|
|
44
|
+
MetadataCapability2["UpdatePaymentMethod"] = "update_payment_method";
|
|
45
|
+
MetadataCapability2["DefaultPurchaseAmount"] = "default_purchase_amount";
|
|
46
|
+
MetadataCapability2["ReportsLink"] = "reports_link";
|
|
47
|
+
MetadataCapability2["BalanceHistory"] = "balance_history";
|
|
48
|
+
MetadataCapability2["Nickname"] = "nickname";
|
|
49
|
+
MetadataCapability2["RefreshServices"] = "refresh_services";
|
|
50
|
+
MetadataCapability2["UpdatePassword"] = "update_password";
|
|
51
|
+
MetadataCapability2["AccountSettingsLink"] = "account_settings_link";
|
|
52
|
+
MetadataCapability2["Unknown"] = "unknown";
|
|
53
|
+
return MetadataCapability2;
|
|
54
|
+
})(MetadataCapability || {});
|
|
55
|
+
var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
|
|
56
|
+
MetadataRequirement2["BillingAddress"] = "billing_address";
|
|
57
|
+
MetadataRequirement2["CurrencyCode"] = "currency_code";
|
|
58
|
+
MetadataRequirement2["IovationBlackBox"] = "iovation_black_box";
|
|
59
|
+
MetadataRequirement2["Nickname"] = "nickname";
|
|
60
|
+
MetadataRequirement2["PaymentMethod"] = "payment_method";
|
|
61
|
+
MetadataRequirement2["PickupAddress"] = "pickup_address";
|
|
62
|
+
MetadataRequirement2["Unknown"] = "unknown";
|
|
63
|
+
return MetadataRequirement2;
|
|
64
|
+
})(MetadataRequirement || {});
|
|
65
|
+
var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
|
|
66
|
+
MetadataSatisfyingFormTypes2["Address"] = "address";
|
|
67
|
+
MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
|
|
68
|
+
MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
|
|
69
|
+
MetadataSatisfyingFormTypes2["StampSellerLabelProvider"] = "stamps_seller_label_provider";
|
|
70
|
+
MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
|
|
71
|
+
return MetadataSatisfyingFormTypes2;
|
|
72
|
+
})(MetadataSatisfyingFormTypes || {});
|
|
73
|
+
|
|
36
74
|
var CreditCardVendor = /* @__PURE__ */ ((CreditCardVendor2) => {
|
|
37
75
|
CreditCardVendor2["AMERICAN_EXPRESS"] = "americanexpress";
|
|
38
76
|
CreditCardVendor2["DISCOVER"] = "discover";
|
|
@@ -90,6 +128,7 @@ var InsuranceProviderType = /* @__PURE__ */ ((InsuranceProviderType2) => {
|
|
|
90
128
|
|
|
91
129
|
const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
92
130
|
__proto__: null,
|
|
131
|
+
AccountBillingPlanChangeType,
|
|
93
132
|
CodedError,
|
|
94
133
|
ConfirmationType,
|
|
95
134
|
CreditCardVendor,
|
|
@@ -97,6 +136,9 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
97
136
|
CustomsContentsType,
|
|
98
137
|
CustomsNonDeliveryType,
|
|
99
138
|
InsuranceProviderType,
|
|
139
|
+
MetadataCapability,
|
|
140
|
+
MetadataRequirement,
|
|
141
|
+
MetadataSatisfyingFormTypes,
|
|
100
142
|
RateCardStatus
|
|
101
143
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
102
144
|
|
|
@@ -3355,6 +3397,13 @@ class FundingSourcesAPI {
|
|
|
3355
3397
|
amount
|
|
3356
3398
|
);
|
|
3357
3399
|
});
|
|
3400
|
+
/**
|
|
3401
|
+
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
3402
|
+
* and attaching carriers
|
|
3403
|
+
*/
|
|
3404
|
+
this.metadata = () => __async$2(this, null, function* () {
|
|
3405
|
+
return yield this.client.get("/v1/funding_sources/metadata");
|
|
3406
|
+
});
|
|
3358
3407
|
this.client = client;
|
|
3359
3408
|
}
|
|
3360
3409
|
}
|
|
@@ -3644,6 +3693,12 @@ class ShippingRulesAPI {
|
|
|
3644
3693
|
this.list = () => {
|
|
3645
3694
|
return this.client.get(`/v1/shipping_rules`);
|
|
3646
3695
|
};
|
|
3696
|
+
/**
|
|
3697
|
+
* The `create` method creates a new shipping rule for a given user.
|
|
3698
|
+
*/
|
|
3699
|
+
this.create = (shippingRule) => {
|
|
3700
|
+
return this.client.post("/v1/shipping_rules", shippingRule);
|
|
3701
|
+
};
|
|
3647
3702
|
this.client = client;
|
|
3648
3703
|
}
|
|
3649
3704
|
}
|
|
@@ -4000,6 +4055,9 @@ exports.FundingSourcesAPI = FundingSourcesAPI;
|
|
|
4000
4055
|
exports.InsuranceAPI = InsuranceAPI;
|
|
4001
4056
|
exports.InsuranceProviderType = InsuranceProviderType;
|
|
4002
4057
|
exports.LabelsAPI = LabelsAPI;
|
|
4058
|
+
exports.MetadataCapability = MetadataCapability;
|
|
4059
|
+
exports.MetadataRequirement = MetadataRequirement;
|
|
4060
|
+
exports.MetadataSatisfyingFormTypes = MetadataSatisfyingFormTypes;
|
|
4003
4061
|
exports.OrderSourcesAPI = OrderSourcesAPI;
|
|
4004
4062
|
exports.RateCardStatus = RateCardStatus;
|
|
4005
4063
|
exports.RateCardsAPI = RateCardsAPI;
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
|
|
3
|
+
var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeType2) => {
|
|
4
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Downgrade"] = 0] = "Downgrade";
|
|
5
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Cancellation"] = 1] = "Cancellation";
|
|
6
|
+
return AccountBillingPlanChangeType2;
|
|
7
|
+
})(AccountBillingPlanChangeType || {});
|
|
8
|
+
|
|
3
9
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4
10
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
5
11
|
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
@@ -29,6 +35,38 @@ class CodedError {
|
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
|
|
38
|
+
var MetadataCapability = /* @__PURE__ */ ((MetadataCapability2) => {
|
|
39
|
+
MetadataCapability2["AutoFunding"] = "auto_funding";
|
|
40
|
+
MetadataCapability2["UpdatePaymentMethod"] = "update_payment_method";
|
|
41
|
+
MetadataCapability2["DefaultPurchaseAmount"] = "default_purchase_amount";
|
|
42
|
+
MetadataCapability2["ReportsLink"] = "reports_link";
|
|
43
|
+
MetadataCapability2["BalanceHistory"] = "balance_history";
|
|
44
|
+
MetadataCapability2["Nickname"] = "nickname";
|
|
45
|
+
MetadataCapability2["RefreshServices"] = "refresh_services";
|
|
46
|
+
MetadataCapability2["UpdatePassword"] = "update_password";
|
|
47
|
+
MetadataCapability2["AccountSettingsLink"] = "account_settings_link";
|
|
48
|
+
MetadataCapability2["Unknown"] = "unknown";
|
|
49
|
+
return MetadataCapability2;
|
|
50
|
+
})(MetadataCapability || {});
|
|
51
|
+
var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
|
|
52
|
+
MetadataRequirement2["BillingAddress"] = "billing_address";
|
|
53
|
+
MetadataRequirement2["CurrencyCode"] = "currency_code";
|
|
54
|
+
MetadataRequirement2["IovationBlackBox"] = "iovation_black_box";
|
|
55
|
+
MetadataRequirement2["Nickname"] = "nickname";
|
|
56
|
+
MetadataRequirement2["PaymentMethod"] = "payment_method";
|
|
57
|
+
MetadataRequirement2["PickupAddress"] = "pickup_address";
|
|
58
|
+
MetadataRequirement2["Unknown"] = "unknown";
|
|
59
|
+
return MetadataRequirement2;
|
|
60
|
+
})(MetadataRequirement || {});
|
|
61
|
+
var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
|
|
62
|
+
MetadataSatisfyingFormTypes2["Address"] = "address";
|
|
63
|
+
MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
|
|
64
|
+
MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
|
|
65
|
+
MetadataSatisfyingFormTypes2["StampSellerLabelProvider"] = "stamps_seller_label_provider";
|
|
66
|
+
MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
|
|
67
|
+
return MetadataSatisfyingFormTypes2;
|
|
68
|
+
})(MetadataSatisfyingFormTypes || {});
|
|
69
|
+
|
|
32
70
|
var CreditCardVendor = /* @__PURE__ */ ((CreditCardVendor2) => {
|
|
33
71
|
CreditCardVendor2["AMERICAN_EXPRESS"] = "americanexpress";
|
|
34
72
|
CreditCardVendor2["DISCOVER"] = "discover";
|
|
@@ -86,6 +124,7 @@ var InsuranceProviderType = /* @__PURE__ */ ((InsuranceProviderType2) => {
|
|
|
86
124
|
|
|
87
125
|
const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
88
126
|
__proto__: null,
|
|
127
|
+
AccountBillingPlanChangeType,
|
|
89
128
|
CodedError,
|
|
90
129
|
ConfirmationType,
|
|
91
130
|
CreditCardVendor,
|
|
@@ -93,6 +132,9 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
93
132
|
CustomsContentsType,
|
|
94
133
|
CustomsNonDeliveryType,
|
|
95
134
|
InsuranceProviderType,
|
|
135
|
+
MetadataCapability,
|
|
136
|
+
MetadataRequirement,
|
|
137
|
+
MetadataSatisfyingFormTypes,
|
|
96
138
|
RateCardStatus
|
|
97
139
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
98
140
|
|
|
@@ -3351,6 +3393,13 @@ class FundingSourcesAPI {
|
|
|
3351
3393
|
amount
|
|
3352
3394
|
);
|
|
3353
3395
|
});
|
|
3396
|
+
/**
|
|
3397
|
+
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
3398
|
+
* and attaching carriers
|
|
3399
|
+
*/
|
|
3400
|
+
this.metadata = () => __async$2(this, null, function* () {
|
|
3401
|
+
return yield this.client.get("/v1/funding_sources/metadata");
|
|
3402
|
+
});
|
|
3354
3403
|
this.client = client;
|
|
3355
3404
|
}
|
|
3356
3405
|
}
|
|
@@ -3640,6 +3689,12 @@ class ShippingRulesAPI {
|
|
|
3640
3689
|
this.list = () => {
|
|
3641
3690
|
return this.client.get(`/v1/shipping_rules`);
|
|
3642
3691
|
};
|
|
3692
|
+
/**
|
|
3693
|
+
* The `create` method creates a new shipping rule for a given user.
|
|
3694
|
+
*/
|
|
3695
|
+
this.create = (shippingRule) => {
|
|
3696
|
+
return this.client.post("/v1/shipping_rules", shippingRule);
|
|
3697
|
+
};
|
|
3643
3698
|
this.client = client;
|
|
3644
3699
|
}
|
|
3645
3700
|
}
|
|
@@ -3982,4 +4037,4 @@ class ShipEngineAPI {
|
|
|
3982
4037
|
}
|
|
3983
4038
|
}
|
|
3984
4039
|
|
|
3985
|
-
export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
|
|
4040
|
+
export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, ShippingRulesAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
|
package/package.json
CHANGED
package/shipping-rules/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
+
import { RequiredFields } from "../types";
|
|
2
3
|
import { ShippingRule } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* # Shipping Rules API module - /v1/shipping_rules
|
|
@@ -12,4 +13,8 @@ export declare class ShippingRulesAPI {
|
|
|
12
13
|
list: () => Promise<import("axios").AxiosResponse<{
|
|
13
14
|
shippingRules: ShippingRule[];
|
|
14
15
|
}, any>>;
|
|
16
|
+
/**
|
|
17
|
+
* The `create` method creates a new shipping rule for a given user.
|
|
18
|
+
*/
|
|
19
|
+
create: (shippingRule: ShippingRule) => Promise<import("axios").AxiosResponse<RequiredFields<ShippingRule, "id">, any>>;
|
|
15
20
|
}
|
|
@@ -10,7 +10,7 @@ type RuleTypeCondition = "is" | "is_less" | "is_more" | "is_not";
|
|
|
10
10
|
/**
|
|
11
11
|
* @category Entities
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface ShippingRulesConditions {
|
|
14
14
|
identifier: RuleType;
|
|
15
15
|
operation: RuleTypeCondition;
|
|
16
16
|
value: string;
|
|
@@ -18,7 +18,7 @@ export interface Conditions {
|
|
|
18
18
|
/**
|
|
19
19
|
* @category Entities
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface ShippingRuleSelectedService {
|
|
22
22
|
carrierId: string;
|
|
23
23
|
carrierServiceCode: string;
|
|
24
24
|
}
|
|
@@ -30,8 +30,8 @@ export interface ShippingRule {
|
|
|
30
30
|
code?: string;
|
|
31
31
|
createdAt?: ISOString;
|
|
32
32
|
default: {
|
|
33
|
-
services:
|
|
34
|
-
sortBy
|
|
33
|
+
services: ShippingRuleSelectedService[];
|
|
34
|
+
sortBy?: string;
|
|
35
35
|
};
|
|
36
36
|
deleted?: boolean;
|
|
37
37
|
deletedAt?: ISOString;
|
|
@@ -39,10 +39,10 @@ export interface ShippingRule {
|
|
|
39
39
|
name: string;
|
|
40
40
|
rules?: [
|
|
41
41
|
{
|
|
42
|
-
conditions:
|
|
42
|
+
conditions: ShippingRulesConditions[];
|
|
43
43
|
priority: number;
|
|
44
|
-
services:
|
|
45
|
-
sortBy
|
|
44
|
+
services: ShippingRuleSelectedService[];
|
|
45
|
+
sortBy?: string;
|
|
46
46
|
}
|
|
47
47
|
];
|
|
48
48
|
updatedAt?: ISOString;
|
package/types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
1
2
|
export * from "./account-settings/types";
|
|
3
|
+
export * from "./account-billing-plan/types";
|
|
2
4
|
export * from "./addresses/types";
|
|
3
5
|
export * from "./carriers/types";
|
|
4
6
|
export * from "./custom-packages/types";
|