@shipengine/alchemy 4.1.6 → 4.1.8
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 +63 -0
- package/index.mjs +60 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2469,6 +2469,12 @@ Object.defineProperty(dist, "__esModule", { value: true });
|
|
|
2469
2469
|
var _default = dist.default = (function () {
|
|
2470
2470
|
});
|
|
2471
2471
|
|
|
2472
|
+
var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeType2) => {
|
|
2473
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Downgrade"] = 0] = "Downgrade";
|
|
2474
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Cancellation"] = 1] = "Cancellation";
|
|
2475
|
+
return AccountBillingPlanChangeType2;
|
|
2476
|
+
})(AccountBillingPlanChangeType || {});
|
|
2477
|
+
|
|
2472
2478
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
2473
2479
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
2474
2480
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
@@ -2498,6 +2504,38 @@ class CodedError {
|
|
|
2498
2504
|
}
|
|
2499
2505
|
}
|
|
2500
2506
|
|
|
2507
|
+
var MetadataCapability = /* @__PURE__ */ ((MetadataCapability2) => {
|
|
2508
|
+
MetadataCapability2["AutoFunding"] = "auto_funding";
|
|
2509
|
+
MetadataCapability2["UpdatePaymentMethod"] = "update_payment_method";
|
|
2510
|
+
MetadataCapability2["DefaultPurchaseAmount"] = "default_purchase_amount";
|
|
2511
|
+
MetadataCapability2["ReportsLink"] = "reports_link";
|
|
2512
|
+
MetadataCapability2["BalanceHistory"] = "balance_history";
|
|
2513
|
+
MetadataCapability2["Nickname"] = "nickname";
|
|
2514
|
+
MetadataCapability2["RefreshServices"] = "refresh_services";
|
|
2515
|
+
MetadataCapability2["UpdatePassword"] = "update_password";
|
|
2516
|
+
MetadataCapability2["AccountSettingsLink"] = "account_settings_link";
|
|
2517
|
+
MetadataCapability2["Unknown"] = "unknown";
|
|
2518
|
+
return MetadataCapability2;
|
|
2519
|
+
})(MetadataCapability || {});
|
|
2520
|
+
var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
|
|
2521
|
+
MetadataRequirement2["BillingAddress"] = "billing_address";
|
|
2522
|
+
MetadataRequirement2["CurrencyCode"] = "currency_code";
|
|
2523
|
+
MetadataRequirement2["IovationBlackBox"] = "iovation_black_box";
|
|
2524
|
+
MetadataRequirement2["Nickname"] = "nickname";
|
|
2525
|
+
MetadataRequirement2["PaymentMethod"] = "payment_method";
|
|
2526
|
+
MetadataRequirement2["PickupAddress"] = "pickup_address";
|
|
2527
|
+
MetadataRequirement2["Unknown"] = "unknown";
|
|
2528
|
+
return MetadataRequirement2;
|
|
2529
|
+
})(MetadataRequirement || {});
|
|
2530
|
+
var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
|
|
2531
|
+
MetadataSatisfyingFormTypes2["Address"] = "address";
|
|
2532
|
+
MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
|
|
2533
|
+
MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
|
|
2534
|
+
MetadataSatisfyingFormTypes2["StampSellerLabelProvider"] = "stamps_seller_label_provider";
|
|
2535
|
+
MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
|
|
2536
|
+
return MetadataSatisfyingFormTypes2;
|
|
2537
|
+
})(MetadataSatisfyingFormTypes || {});
|
|
2538
|
+
|
|
2501
2539
|
var CreditCardVendor = /* @__PURE__ */ ((CreditCardVendor2) => {
|
|
2502
2540
|
CreditCardVendor2["AMERICAN_EXPRESS"] = "americanexpress";
|
|
2503
2541
|
CreditCardVendor2["DISCOVER"] = "discover";
|
|
@@ -2555,6 +2593,7 @@ var InsuranceProviderType = /* @__PURE__ */ ((InsuranceProviderType2) => {
|
|
|
2555
2593
|
|
|
2556
2594
|
const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
2557
2595
|
__proto__: null,
|
|
2596
|
+
AccountBillingPlanChangeType,
|
|
2558
2597
|
CodedError,
|
|
2559
2598
|
ConfirmationType,
|
|
2560
2599
|
CreditCardVendor,
|
|
@@ -2562,6 +2601,9 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2562
2601
|
CustomsContentsType,
|
|
2563
2602
|
CustomsNonDeliveryType,
|
|
2564
2603
|
InsuranceProviderType,
|
|
2604
|
+
MetadataCapability,
|
|
2605
|
+
MetadataRequirement,
|
|
2606
|
+
MetadataSatisfyingFormTypes,
|
|
2565
2607
|
RateCardStatus
|
|
2566
2608
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2567
2609
|
|
|
@@ -7750,6 +7792,13 @@ class FundingSourcesAPI {
|
|
|
7750
7792
|
amount
|
|
7751
7793
|
);
|
|
7752
7794
|
});
|
|
7795
|
+
/**
|
|
7796
|
+
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
7797
|
+
* and attaching carriers
|
|
7798
|
+
*/
|
|
7799
|
+
this.metadata = () => __async$u(this, null, function* () {
|
|
7800
|
+
return yield this.client.get("/v1/funding_sources/metadata");
|
|
7801
|
+
});
|
|
7753
7802
|
this.client = client;
|
|
7754
7803
|
}
|
|
7755
7804
|
}
|
|
@@ -9009,6 +9058,16 @@ const useUpdateFundingSource = () => {
|
|
|
9009
9058
|
});
|
|
9010
9059
|
};
|
|
9011
9060
|
|
|
9061
|
+
const useGetFundingSourceMetadata = () => {
|
|
9062
|
+
const { client } = useShipEngine();
|
|
9063
|
+
return reactQuery.useQuery({
|
|
9064
|
+
onError,
|
|
9065
|
+
queryFn: () => client.fundingSources.metadata(),
|
|
9066
|
+
queryKey: ["useGetFundingSourceMetadata"],
|
|
9067
|
+
select: (result) => result.data
|
|
9068
|
+
});
|
|
9069
|
+
};
|
|
9070
|
+
|
|
9012
9071
|
const useGetInsuranceAccount = (insuranceProvider) => {
|
|
9013
9072
|
const { client } = useShipEngine();
|
|
9014
9073
|
return reactQuery.useQuery({
|
|
@@ -11055,6 +11114,9 @@ exports.FundingSourcesAPI = FundingSourcesAPI;
|
|
|
11055
11114
|
exports.InsuranceAPI = InsuranceAPI;
|
|
11056
11115
|
exports.InsuranceProviderType = InsuranceProviderType;
|
|
11057
11116
|
exports.LabelsAPI = LabelsAPI;
|
|
11117
|
+
exports.MetadataCapability = MetadataCapability;
|
|
11118
|
+
exports.MetadataRequirement = MetadataRequirement;
|
|
11119
|
+
exports.MetadataSatisfyingFormTypes = MetadataSatisfyingFormTypes;
|
|
11058
11120
|
exports.OrderSourcesAPI = OrderSourcesAPI;
|
|
11059
11121
|
exports.RateCardStatus = RateCardStatus;
|
|
11060
11122
|
exports.RateCardsAPI = RateCardsAPI;
|
|
@@ -11100,6 +11162,7 @@ exports.useGetCarrierById = useGetCarrierById;
|
|
|
11100
11162
|
exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
|
|
11101
11163
|
exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
|
|
11102
11164
|
exports.useGetFundingSourceById = useGetFundingSourceById;
|
|
11165
|
+
exports.useGetFundingSourceMetadata = useGetFundingSourceMetadata;
|
|
11103
11166
|
exports.useGetInsuranceAccount = useGetInsuranceAccount;
|
|
11104
11167
|
exports.useGetLabel = useGetLabel;
|
|
11105
11168
|
exports.useGetPackageRatingGroupByCarrier = useGetPackageRatingGroupByCarrier;
|
package/index.mjs
CHANGED
|
@@ -2447,6 +2447,12 @@ Object.defineProperty(dist, "__esModule", { value: true });
|
|
|
2447
2447
|
var _default = dist.default = (function () {
|
|
2448
2448
|
});
|
|
2449
2449
|
|
|
2450
|
+
var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeType2) => {
|
|
2451
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Downgrade"] = 0] = "Downgrade";
|
|
2452
|
+
AccountBillingPlanChangeType2[AccountBillingPlanChangeType2["Cancellation"] = 1] = "Cancellation";
|
|
2453
|
+
return AccountBillingPlanChangeType2;
|
|
2454
|
+
})(AccountBillingPlanChangeType || {});
|
|
2455
|
+
|
|
2450
2456
|
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
2451
2457
|
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
2452
2458
|
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
@@ -2476,6 +2482,38 @@ class CodedError {
|
|
|
2476
2482
|
}
|
|
2477
2483
|
}
|
|
2478
2484
|
|
|
2485
|
+
var MetadataCapability = /* @__PURE__ */ ((MetadataCapability2) => {
|
|
2486
|
+
MetadataCapability2["AutoFunding"] = "auto_funding";
|
|
2487
|
+
MetadataCapability2["UpdatePaymentMethod"] = "update_payment_method";
|
|
2488
|
+
MetadataCapability2["DefaultPurchaseAmount"] = "default_purchase_amount";
|
|
2489
|
+
MetadataCapability2["ReportsLink"] = "reports_link";
|
|
2490
|
+
MetadataCapability2["BalanceHistory"] = "balance_history";
|
|
2491
|
+
MetadataCapability2["Nickname"] = "nickname";
|
|
2492
|
+
MetadataCapability2["RefreshServices"] = "refresh_services";
|
|
2493
|
+
MetadataCapability2["UpdatePassword"] = "update_password";
|
|
2494
|
+
MetadataCapability2["AccountSettingsLink"] = "account_settings_link";
|
|
2495
|
+
MetadataCapability2["Unknown"] = "unknown";
|
|
2496
|
+
return MetadataCapability2;
|
|
2497
|
+
})(MetadataCapability || {});
|
|
2498
|
+
var MetadataRequirement = /* @__PURE__ */ ((MetadataRequirement2) => {
|
|
2499
|
+
MetadataRequirement2["BillingAddress"] = "billing_address";
|
|
2500
|
+
MetadataRequirement2["CurrencyCode"] = "currency_code";
|
|
2501
|
+
MetadataRequirement2["IovationBlackBox"] = "iovation_black_box";
|
|
2502
|
+
MetadataRequirement2["Nickname"] = "nickname";
|
|
2503
|
+
MetadataRequirement2["PaymentMethod"] = "payment_method";
|
|
2504
|
+
MetadataRequirement2["PickupAddress"] = "pickup_address";
|
|
2505
|
+
MetadataRequirement2["Unknown"] = "unknown";
|
|
2506
|
+
return MetadataRequirement2;
|
|
2507
|
+
})(MetadataRequirement || {});
|
|
2508
|
+
var MetadataSatisfyingFormTypes = /* @__PURE__ */ ((MetadataSatisfyingFormTypes2) => {
|
|
2509
|
+
MetadataSatisfyingFormTypes2["Address"] = "address";
|
|
2510
|
+
MetadataSatisfyingFormTypes2["CreditCard"] = "credit_card";
|
|
2511
|
+
MetadataSatisfyingFormTypes2["StampsAccountCredentials"] = "stamps_account_credentials";
|
|
2512
|
+
MetadataSatisfyingFormTypes2["StampSellerLabelProvider"] = "stamps_seller_label_provider";
|
|
2513
|
+
MetadataSatisfyingFormTypes2["Unknown"] = "unknown";
|
|
2514
|
+
return MetadataSatisfyingFormTypes2;
|
|
2515
|
+
})(MetadataSatisfyingFormTypes || {});
|
|
2516
|
+
|
|
2479
2517
|
var CreditCardVendor = /* @__PURE__ */ ((CreditCardVendor2) => {
|
|
2480
2518
|
CreditCardVendor2["AMERICAN_EXPRESS"] = "americanexpress";
|
|
2481
2519
|
CreditCardVendor2["DISCOVER"] = "discover";
|
|
@@ -2533,6 +2571,7 @@ var InsuranceProviderType = /* @__PURE__ */ ((InsuranceProviderType2) => {
|
|
|
2533
2571
|
|
|
2534
2572
|
const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
2535
2573
|
__proto__: null,
|
|
2574
|
+
AccountBillingPlanChangeType,
|
|
2536
2575
|
CodedError,
|
|
2537
2576
|
ConfirmationType,
|
|
2538
2577
|
CreditCardVendor,
|
|
@@ -2540,6 +2579,9 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2540
2579
|
CustomsContentsType,
|
|
2541
2580
|
CustomsNonDeliveryType,
|
|
2542
2581
|
InsuranceProviderType,
|
|
2582
|
+
MetadataCapability,
|
|
2583
|
+
MetadataRequirement,
|
|
2584
|
+
MetadataSatisfyingFormTypes,
|
|
2543
2585
|
RateCardStatus
|
|
2544
2586
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2545
2587
|
|
|
@@ -7728,6 +7770,13 @@ class FundingSourcesAPI {
|
|
|
7728
7770
|
amount
|
|
7729
7771
|
);
|
|
7730
7772
|
});
|
|
7773
|
+
/**
|
|
7774
|
+
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
7775
|
+
* and attaching carriers
|
|
7776
|
+
*/
|
|
7777
|
+
this.metadata = () => __async$u(this, null, function* () {
|
|
7778
|
+
return yield this.client.get("/v1/funding_sources/metadata");
|
|
7779
|
+
});
|
|
7731
7780
|
this.client = client;
|
|
7732
7781
|
}
|
|
7733
7782
|
}
|
|
@@ -8987,6 +9036,16 @@ const useUpdateFundingSource = () => {
|
|
|
8987
9036
|
});
|
|
8988
9037
|
};
|
|
8989
9038
|
|
|
9039
|
+
const useGetFundingSourceMetadata = () => {
|
|
9040
|
+
const { client } = useShipEngine();
|
|
9041
|
+
return useQuery({
|
|
9042
|
+
onError,
|
|
9043
|
+
queryFn: () => client.fundingSources.metadata(),
|
|
9044
|
+
queryKey: ["useGetFundingSourceMetadata"],
|
|
9045
|
+
select: (result) => result.data
|
|
9046
|
+
});
|
|
9047
|
+
};
|
|
9048
|
+
|
|
8990
9049
|
const useGetInsuranceAccount = (insuranceProvider) => {
|
|
8991
9050
|
const { client } = useShipEngine();
|
|
8992
9051
|
return useQuery({
|
|
@@ -11014,4 +11073,4 @@ const alchemy = {
|
|
|
11014
11073
|
createElement
|
|
11015
11074
|
};
|
|
11016
11075
|
|
|
11017
|
-
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, useCreateShippingRule, 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, useListShippingRules, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
|
|
11076
|
+
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, 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, useCreateShippingRule, useCreateWarehouse, useDeleteRateCard, useDeleteWarehouse, useDownloadRateCard, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useGetZonesByCarrier, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListShippingRules, useListWarehouses, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
|