@shipengine/alchemy 4.1.0 → 4.1.2
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/index.js +54 -0
- package/index.mjs +53 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7622,6 +7622,19 @@ var lib = {
|
|
|
7622
7622
|
stringify: stringify
|
|
7623
7623
|
};
|
|
7624
7624
|
|
|
7625
|
+
class AccountBillingPlanAPI {
|
|
7626
|
+
constructor(client) {
|
|
7627
|
+
this.client = client;
|
|
7628
|
+
/**
|
|
7629
|
+
* The `get` method retrieves the account billing plan for the current user.
|
|
7630
|
+
*/
|
|
7631
|
+
this.get = () => {
|
|
7632
|
+
return this.client.get("/v1/account/billing_plan");
|
|
7633
|
+
};
|
|
7634
|
+
this.client = client;
|
|
7635
|
+
}
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7625
7638
|
class CustomPackagesAPI {
|
|
7626
7639
|
constructor(client) {
|
|
7627
7640
|
this.client = client;
|
|
@@ -8017,6 +8030,19 @@ class ShipmentsAPI {
|
|
|
8017
8030
|
}
|
|
8018
8031
|
}
|
|
8019
8032
|
|
|
8033
|
+
class ShippingRulesAPI {
|
|
8034
|
+
constructor(client) {
|
|
8035
|
+
this.client = client;
|
|
8036
|
+
/**
|
|
8037
|
+
* The `list` method retrieves the list of shipping rules by seller.
|
|
8038
|
+
*/
|
|
8039
|
+
this.list = () => {
|
|
8040
|
+
return this.client.get(`/v1/shipping_rules`);
|
|
8041
|
+
};
|
|
8042
|
+
this.client = client;
|
|
8043
|
+
}
|
|
8044
|
+
}
|
|
8045
|
+
|
|
8020
8046
|
class WarehousesAPI {
|
|
8021
8047
|
constructor(client) {
|
|
8022
8048
|
this.client = client;
|
|
@@ -8220,6 +8246,13 @@ class ShipEngineAPI {
|
|
|
8220
8246
|
get accountSettings() {
|
|
8221
8247
|
return new AccountSettingsAPI(this.client);
|
|
8222
8248
|
}
|
|
8249
|
+
/**
|
|
8250
|
+
* The `accountBillingPlan` method provides access to the Account Billing Plan endpoints
|
|
8251
|
+
* in ShipEngine API.
|
|
8252
|
+
*/
|
|
8253
|
+
get accountBillingPlan() {
|
|
8254
|
+
return new AccountBillingPlanAPI(this.client);
|
|
8255
|
+
}
|
|
8223
8256
|
/**
|
|
8224
8257
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
8225
8258
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
|
@@ -8337,6 +8370,15 @@ class ShipEngineAPI {
|
|
|
8337
8370
|
get warehouses() {
|
|
8338
8371
|
return new WarehousesAPI(this.client);
|
|
8339
8372
|
}
|
|
8373
|
+
/**
|
|
8374
|
+
* The `shippingRules` method provides access to the Shipping Rules endpoints in ShipEngine
|
|
8375
|
+
* API.
|
|
8376
|
+
*
|
|
8377
|
+
* @see {@link ShippingRulesAPI | The Shipping Rules API module}
|
|
8378
|
+
*/
|
|
8379
|
+
get shippingRules() {
|
|
8380
|
+
return new ShippingRulesAPI(this.client);
|
|
8381
|
+
}
|
|
8340
8382
|
}
|
|
8341
8383
|
|
|
8342
8384
|
const ShipEngineContext = React.createContext(void 0);
|
|
@@ -9819,6 +9861,16 @@ const useUpdateWarehouse = () => {
|
|
|
9819
9861
|
});
|
|
9820
9862
|
};
|
|
9821
9863
|
|
|
9864
|
+
const useGetAccountBillingPlan = () => {
|
|
9865
|
+
const { client } = useShipEngine();
|
|
9866
|
+
return reactQuery.useQuery({
|
|
9867
|
+
onError,
|
|
9868
|
+
queryFn: () => client.accountBillingPlan.get(),
|
|
9869
|
+
queryKey: ["useGetAccountBillingPlan"],
|
|
9870
|
+
select: (result) => result.data
|
|
9871
|
+
});
|
|
9872
|
+
};
|
|
9873
|
+
|
|
9822
9874
|
const fallbackThemeData = {
|
|
9823
9875
|
borderRadius: {
|
|
9824
9876
|
L: "16px",
|
|
@@ -10964,6 +11016,7 @@ exports.ShipEngine = ShipEngine;
|
|
|
10964
11016
|
exports.ShipEngineAPI = ShipEngineAPI;
|
|
10965
11017
|
exports.ShipEngineContext = ShipEngineContext;
|
|
10966
11018
|
exports.ShipmentsAPI = ShipmentsAPI;
|
|
11019
|
+
exports.ShippingRulesAPI = ShippingRulesAPI;
|
|
10967
11020
|
exports.WarehousesAPI = WarehousesAPI;
|
|
10968
11021
|
exports.alchemy = alchemy;
|
|
10969
11022
|
exports.default = alchemy;
|
|
@@ -10989,6 +11042,7 @@ exports.useDeleteRateCard = useDeleteRateCard;
|
|
|
10989
11042
|
exports.useDeleteWarehouse = useDeleteWarehouse;
|
|
10990
11043
|
exports.useDownloadRateCard = useDownloadRateCard;
|
|
10991
11044
|
exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
|
|
11045
|
+
exports.useGetAccountBillingPlan = useGetAccountBillingPlan;
|
|
10992
11046
|
exports.useGetAccountSettings = useGetAccountSettings;
|
|
10993
11047
|
exports.useGetAutoFundingConfiguration = useGetAutoFundingConfiguration;
|
|
10994
11048
|
exports.useGetCarrierById = useGetCarrierById;
|
package/index.mjs
CHANGED
|
@@ -7600,6 +7600,19 @@ var lib = {
|
|
|
7600
7600
|
stringify: stringify
|
|
7601
7601
|
};
|
|
7602
7602
|
|
|
7603
|
+
class AccountBillingPlanAPI {
|
|
7604
|
+
constructor(client) {
|
|
7605
|
+
this.client = client;
|
|
7606
|
+
/**
|
|
7607
|
+
* The `get` method retrieves the account billing plan for the current user.
|
|
7608
|
+
*/
|
|
7609
|
+
this.get = () => {
|
|
7610
|
+
return this.client.get("/v1/account/billing_plan");
|
|
7611
|
+
};
|
|
7612
|
+
this.client = client;
|
|
7613
|
+
}
|
|
7614
|
+
}
|
|
7615
|
+
|
|
7603
7616
|
class CustomPackagesAPI {
|
|
7604
7617
|
constructor(client) {
|
|
7605
7618
|
this.client = client;
|
|
@@ -7995,6 +8008,19 @@ class ShipmentsAPI {
|
|
|
7995
8008
|
}
|
|
7996
8009
|
}
|
|
7997
8010
|
|
|
8011
|
+
class ShippingRulesAPI {
|
|
8012
|
+
constructor(client) {
|
|
8013
|
+
this.client = client;
|
|
8014
|
+
/**
|
|
8015
|
+
* The `list` method retrieves the list of shipping rules by seller.
|
|
8016
|
+
*/
|
|
8017
|
+
this.list = () => {
|
|
8018
|
+
return this.client.get(`/v1/shipping_rules`);
|
|
8019
|
+
};
|
|
8020
|
+
this.client = client;
|
|
8021
|
+
}
|
|
8022
|
+
}
|
|
8023
|
+
|
|
7998
8024
|
class WarehousesAPI {
|
|
7999
8025
|
constructor(client) {
|
|
8000
8026
|
this.client = client;
|
|
@@ -8198,6 +8224,13 @@ class ShipEngineAPI {
|
|
|
8198
8224
|
get accountSettings() {
|
|
8199
8225
|
return new AccountSettingsAPI(this.client);
|
|
8200
8226
|
}
|
|
8227
|
+
/**
|
|
8228
|
+
* The `accountBillingPlan` method provides access to the Account Billing Plan endpoints
|
|
8229
|
+
* in ShipEngine API.
|
|
8230
|
+
*/
|
|
8231
|
+
get accountBillingPlan() {
|
|
8232
|
+
return new AccountBillingPlanAPI(this.client);
|
|
8233
|
+
}
|
|
8201
8234
|
/**
|
|
8202
8235
|
* The `addresses` method provides access to the Address Validation endpoints
|
|
8203
8236
|
* in ShipEngine API. e.g. Validate Addresses, Parse Addresses, etc.
|
|
@@ -8315,6 +8348,15 @@ class ShipEngineAPI {
|
|
|
8315
8348
|
get warehouses() {
|
|
8316
8349
|
return new WarehousesAPI(this.client);
|
|
8317
8350
|
}
|
|
8351
|
+
/**
|
|
8352
|
+
* The `shippingRules` method provides access to the Shipping Rules endpoints in ShipEngine
|
|
8353
|
+
* API.
|
|
8354
|
+
*
|
|
8355
|
+
* @see {@link ShippingRulesAPI | The Shipping Rules API module}
|
|
8356
|
+
*/
|
|
8357
|
+
get shippingRules() {
|
|
8358
|
+
return new ShippingRulesAPI(this.client);
|
|
8359
|
+
}
|
|
8318
8360
|
}
|
|
8319
8361
|
|
|
8320
8362
|
const ShipEngineContext = createContext(void 0);
|
|
@@ -9797,6 +9839,16 @@ const useUpdateWarehouse = () => {
|
|
|
9797
9839
|
});
|
|
9798
9840
|
};
|
|
9799
9841
|
|
|
9842
|
+
const useGetAccountBillingPlan = () => {
|
|
9843
|
+
const { client } = useShipEngine();
|
|
9844
|
+
return useQuery({
|
|
9845
|
+
onError,
|
|
9846
|
+
queryFn: () => client.accountBillingPlan.get(),
|
|
9847
|
+
queryKey: ["useGetAccountBillingPlan"],
|
|
9848
|
+
select: (result) => result.data
|
|
9849
|
+
});
|
|
9850
|
+
};
|
|
9851
|
+
|
|
9800
9852
|
const fallbackThemeData = {
|
|
9801
9853
|
borderRadius: {
|
|
9802
9854
|
L: "16px",
|
|
@@ -10912,4 +10964,4 @@ const alchemy = {
|
|
|
10912
10964
|
createElement
|
|
10913
10965
|
};
|
|
10914
10966
|
|
|
10915
|
-
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, logger, onError, retryUntil, useAddFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateWarehouse, useDeleteRateCard, useDeleteWarehouse, useDownloadRateCard, useFundingSourcesAddFunds, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useGetZonesByCarrier, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
|
|
10967
|
+
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, logger, onError, retryUntil, useAddFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateWarehouse, useDeleteRateCard, useDeleteWarehouse, useDownloadRateCard, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useGetZonesByCarrier, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
|