@shipengine/alchemy 2.2.4 → 2.3.1

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.mjs CHANGED
@@ -3,7 +3,7 @@ import { createContext, forwardRef, useContext, createElement as createElement$1
3
3
  import { jsx as jsx$1, jsxs as jsxs$1 } from 'react/jsx-runtime';
4
4
  import { css, Global, ThemeProvider, CacheProvider } from '@emotion/react';
5
5
  import { BrandName } from '@packlink/brands';
6
- import { getEmotionResetStyles, createIconCache, GigerConfigProvider } from '@packlink/giger';
6
+ import { createIconCache, getEmotionResetStyles, GigerConfigProvider, GigerTestProvider } from '@packlink/giger';
7
7
  import { QueryClient, QueryClientProvider, useQuery, useMutation, useQueryClient } from 'react-query';
8
8
  import { Theme } from '@packlink/giger-theme';
9
9
  import { I18nextProvider } from 'react-i18next';
@@ -2455,17 +2455,17 @@ Object.defineProperty(dist, "__esModule", { value: true });
2455
2455
  var _default = dist.default = (function () {
2456
2456
  });
2457
2457
 
2458
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
2459
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
2460
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
2458
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2459
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2460
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2461
2461
  var __objRest$8 = (source, exclude) => {
2462
2462
  var target = {};
2463
2463
  for (var prop in source)
2464
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
2464
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2465
2465
  target[prop] = source[prop];
2466
- if (source != null && __getOwnPropSymbols$e)
2467
- for (var prop of __getOwnPropSymbols$e(source)) {
2468
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
2466
+ if (source != null && __getOwnPropSymbols$c)
2467
+ for (var prop of __getOwnPropSymbols$c(source)) {
2468
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2469
2469
  target[prop] = source[prop];
2470
2470
  }
2471
2471
  return target;
@@ -5232,7 +5232,7 @@ var ipaddr = {
5232
5232
  }).call(commonjsGlobal);
5233
5233
  } (ipaddr));
5234
5234
 
5235
- var __async$x = (__this, __arguments, generator) => {
5235
+ var __async$w = (__this, __arguments, generator) => {
5236
5236
  return new Promise((resolve, reject) => {
5237
5237
  var fulfilled = (value) => {
5238
5238
  try {
@@ -5252,7 +5252,7 @@ var __async$x = (__this, __arguments, generator) => {
5252
5252
  step((generator = generator.apply(__this, __arguments)).next());
5253
5253
  });
5254
5254
  };
5255
- const getEndUserIpAddress = () => __async$x(void 0, null, function* () {
5255
+ const getEndUserIpAddress = () => __async$w(void 0, null, function* () {
5256
5256
  try {
5257
5257
  const response = yield axios.get("https://api.ipify.org/?format=json");
5258
5258
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -5264,38 +5264,38 @@ const getEndUserIpAddress = () => __async$x(void 0, null, function* () {
5264
5264
  }
5265
5265
  });
5266
5266
 
5267
- var __defProp$7 = Object.defineProperty;
5268
- var __defProps$5 = Object.defineProperties;
5269
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
5270
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
5271
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
5272
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
5273
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5274
- var __spreadValues$7 = (a, b) => {
5267
+ var __defProp$5 = Object.defineProperty;
5268
+ var __defProps$3 = Object.defineProperties;
5269
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
5270
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
5271
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
5272
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
5273
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5274
+ var __spreadValues$5 = (a, b) => {
5275
5275
  for (var prop in b || (b = {}))
5276
- if (__hasOwnProp$d.call(b, prop))
5277
- __defNormalProp$7(a, prop, b[prop]);
5278
- if (__getOwnPropSymbols$d)
5279
- for (var prop of __getOwnPropSymbols$d(b)) {
5280
- if (__propIsEnum$d.call(b, prop))
5281
- __defNormalProp$7(a, prop, b[prop]);
5276
+ if (__hasOwnProp$b.call(b, prop))
5277
+ __defNormalProp$5(a, prop, b[prop]);
5278
+ if (__getOwnPropSymbols$b)
5279
+ for (var prop of __getOwnPropSymbols$b(b)) {
5280
+ if (__propIsEnum$b.call(b, prop))
5281
+ __defNormalProp$5(a, prop, b[prop]);
5282
5282
  }
5283
5283
  return a;
5284
5284
  };
5285
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
5285
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
5286
5286
  var __objRest$7 = (source, exclude) => {
5287
5287
  var target = {};
5288
5288
  for (var prop in source)
5289
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
5289
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
5290
5290
  target[prop] = source[prop];
5291
- if (source != null && __getOwnPropSymbols$d)
5292
- for (var prop of __getOwnPropSymbols$d(source)) {
5293
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
5291
+ if (source != null && __getOwnPropSymbols$b)
5292
+ for (var prop of __getOwnPropSymbols$b(source)) {
5293
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
5294
5294
  target[prop] = source[prop];
5295
5295
  }
5296
5296
  return target;
5297
5297
  };
5298
- var __async$w = (__this, __arguments, generator) => {
5298
+ var __async$v = (__this, __arguments, generator) => {
5299
5299
  return new Promise((resolve, reject) => {
5300
5300
  var fulfilled = (value) => {
5301
5301
  try {
@@ -5333,12 +5333,12 @@ class CarriersAPI {
5333
5333
  /**
5334
5334
  * The `connect` method connects a carrier account to a user's ShipEngine account.
5335
5335
  */
5336
- this.connect = (_a) => __async$w(this, null, function* () {
5336
+ this.connect = (_a) => __async$v(this, null, function* () {
5337
5337
  var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
5338
5338
  const endUserIpAddress = yield getEndUserIpAddress();
5339
5339
  if (!endUserIpAddress)
5340
5340
  return Promise.reject([new CodedError("Unable to get IP address")]);
5341
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$5(__spreadValues$7({}, connection), {
5341
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$3(__spreadValues$5({}, connection), {
5342
5342
  endUserIpAddress
5343
5343
  }));
5344
5344
  });
@@ -5419,6 +5419,13 @@ class CarriersAPI {
5419
5419
  this.getCurrencies = (carrierId) => {
5420
5420
  return this.client.get(`/v1/carriers/${carrierId}/currencies`);
5421
5421
  };
5422
+ /**
5423
+ * The `getZones` method retrieves a list of zones for which the attached carrier
5424
+ * provides support to.
5425
+ */
5426
+ this.getZones = (carrierId) => {
5427
+ return this.client.get(`/v1/carriers/${carrierId}/zones`);
5428
+ };
5422
5429
  this.client = client;
5423
5430
  }
5424
5431
  }
@@ -7613,23 +7620,23 @@ class CustomPackagesAPI {
7613
7620
  }
7614
7621
  }
7615
7622
 
7616
- var __defProp$6 = Object.defineProperty;
7617
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
7618
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
7619
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
7620
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7621
- var __spreadValues$6 = (a, b) => {
7623
+ var __defProp$4 = Object.defineProperty;
7624
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
7625
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
7626
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
7627
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7628
+ var __spreadValues$4 = (a, b) => {
7622
7629
  for (var prop in b || (b = {}))
7623
- if (__hasOwnProp$c.call(b, prop))
7624
- __defNormalProp$6(a, prop, b[prop]);
7625
- if (__getOwnPropSymbols$c)
7626
- for (var prop of __getOwnPropSymbols$c(b)) {
7627
- if (__propIsEnum$c.call(b, prop))
7628
- __defNormalProp$6(a, prop, b[prop]);
7630
+ if (__hasOwnProp$a.call(b, prop))
7631
+ __defNormalProp$4(a, prop, b[prop]);
7632
+ if (__getOwnPropSymbols$a)
7633
+ for (var prop of __getOwnPropSymbols$a(b)) {
7634
+ if (__propIsEnum$a.call(b, prop))
7635
+ __defNormalProp$4(a, prop, b[prop]);
7629
7636
  }
7630
7637
  return a;
7631
7638
  };
7632
- var __async$v = (__this, __arguments, generator) => {
7639
+ var __async$u = (__this, __arguments, generator) => {
7633
7640
  return new Promise((resolve, reject) => {
7634
7641
  var fulfilled = (value) => {
7635
7642
  try {
@@ -7668,11 +7675,11 @@ class FundingSourcesAPI {
7668
7675
  * The `create` method creates a new funding source for a given user. This requires
7669
7676
  * payment information to be collected from the user.
7670
7677
  */
7671
- this.create = (createFundingSource) => __async$v(this, null, function* () {
7678
+ this.create = (createFundingSource) => __async$u(this, null, function* () {
7672
7679
  const endUserIpAddress = yield getEndUserIpAddress();
7673
7680
  if (!endUserIpAddress)
7674
7681
  return Promise.reject([new CodedError("Unable to get IP address")]);
7675
- return yield this.client.post("/v1/funding_sources", __spreadValues$6({
7682
+ return yield this.client.post("/v1/funding_sources", __spreadValues$4({
7676
7683
  endUserIpAddress
7677
7684
  }, createFundingSource));
7678
7685
  });
@@ -7681,7 +7688,7 @@ class FundingSourcesAPI {
7681
7688
  * user to update the billing address or payment information associated with the
7682
7689
  * funding source.
7683
7690
  */
7684
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$v(this, null, function* () {
7691
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$u(this, null, function* () {
7685
7692
  const endUserIpAddress = yield getEndUserIpAddress();
7686
7693
  if (!endUserIpAddress)
7687
7694
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -7698,18 +7705,18 @@ class FundingSourcesAPI {
7698
7705
  * The `registerCarrier` method registers a carrier account and associates
7699
7706
  * it with a given funding source.
7700
7707
  */
7701
- this.registerCarrier = (carrier) => __async$v(this, null, function* () {
7708
+ this.registerCarrier = (carrier) => __async$u(this, null, function* () {
7702
7709
  const endUserIpAddress = yield getEndUserIpAddress();
7703
7710
  if (!endUserIpAddress)
7704
7711
  return Promise.reject([new CodedError("Unable to get IP address")]);
7705
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$6({
7712
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$4({
7706
7713
  endUserIpAddress
7707
7714
  }, carrier));
7708
7715
  });
7709
7716
  /**
7710
7717
  * The `addFunds` method allows you to add funds to a funding source.
7711
7718
  */
7712
- this.addFunds = (amount, fundingSourceId) => __async$v(this, null, function* () {
7719
+ this.addFunds = (amount, fundingSourceId) => __async$u(this, null, function* () {
7713
7720
  return yield this.client.put(
7714
7721
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
7715
7722
  amount
@@ -7943,7 +7950,7 @@ class SalesOrdersAPI {
7943
7950
  }
7944
7951
  }
7945
7952
 
7946
- var __async$u = (__this, __arguments, generator) => {
7953
+ var __async$t = (__this, __arguments, generator) => {
7947
7954
  return new Promise((resolve, reject) => {
7948
7955
  var fulfilled = (value) => {
7949
7956
  try {
@@ -7986,7 +7993,7 @@ class ShipmentsAPI {
7986
7993
  * The `create` method allows for creating shipments based on a list of shipment
7987
7994
  * items passed into this method.
7988
7995
  */
7989
- this.create = (...shipments) => __async$u(this, null, function* () {
7996
+ this.create = (...shipments) => __async$t(this, null, function* () {
7990
7997
  return this.client.post("/v1/shipments", {
7991
7998
  shipments
7992
7999
  });
@@ -8030,26 +8037,26 @@ class WarehousesAPI {
8030
8037
  }
8031
8038
  }
8032
8039
 
8033
- var __defProp$5 = Object.defineProperty;
8034
- var __defProps$4 = Object.defineProperties;
8035
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
8036
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
8037
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
8038
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
8039
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8040
- var __spreadValues$5 = (a, b) => {
8040
+ var __defProp$3 = Object.defineProperty;
8041
+ var __defProps$2 = Object.defineProperties;
8042
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
8043
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
8044
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
8045
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
8046
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8047
+ var __spreadValues$3 = (a, b) => {
8041
8048
  for (var prop in b || (b = {}))
8042
- if (__hasOwnProp$b.call(b, prop))
8043
- __defNormalProp$5(a, prop, b[prop]);
8044
- if (__getOwnPropSymbols$b)
8045
- for (var prop of __getOwnPropSymbols$b(b)) {
8046
- if (__propIsEnum$b.call(b, prop))
8047
- __defNormalProp$5(a, prop, b[prop]);
8049
+ if (__hasOwnProp$9.call(b, prop))
8050
+ __defNormalProp$3(a, prop, b[prop]);
8051
+ if (__getOwnPropSymbols$9)
8052
+ for (var prop of __getOwnPropSymbols$9(b)) {
8053
+ if (__propIsEnum$9.call(b, prop))
8054
+ __defNormalProp$3(a, prop, b[prop]);
8048
8055
  }
8049
8056
  return a;
8050
8057
  };
8051
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
8052
- var __async$t = (__this, __arguments, generator) => {
8058
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
8059
+ var __async$s = (__this, __arguments, generator) => {
8053
8060
  return new Promise((resolve, reject) => {
8054
8061
  var fulfilled = (value) => {
8055
8062
  try {
@@ -8071,7 +8078,7 @@ var __async$t = (__this, __arguments, generator) => {
8071
8078
  };
8072
8079
  const logger$1 = E({
8073
8080
  name: "shipengine-api",
8074
- serializers: __spreadProps$4(__spreadValues$5({}, k), {
8081
+ serializers: __spreadProps$2(__spreadValues$3({}, k), {
8075
8082
  req: (req) => ({
8076
8083
  headers: req.headers,
8077
8084
  method: req.method,
@@ -8096,7 +8103,7 @@ class ShipEngineAPI {
8096
8103
  constructor(token, { baseURL, headers, getToken }) {
8097
8104
  const client = axios.create({
8098
8105
  baseURL,
8099
- headers: __spreadProps$4(__spreadValues$5({}, headers), {
8106
+ headers: __spreadProps$2(__spreadValues$3({}, headers), {
8100
8107
  Authorization: `Bearer ${token}`,
8101
8108
  "Content-Type": "application/json"
8102
8109
  }),
@@ -8143,7 +8150,7 @@ class ShipEngineAPI {
8143
8150
  );
8144
8151
  return res;
8145
8152
  },
8146
- (err) => __async$t(this, null, function* () {
8153
+ (err) => __async$s(this, null, function* () {
8147
8154
  var _a, _b, _c, _d, _e, _f, _g;
8148
8155
  logger$1.error(
8149
8156
  { err, req: err.config, res: err.response },
@@ -8370,25 +8377,25 @@ const delay = (ms) => new Promise((resolve) => {
8370
8377
 
8371
8378
  const onError = (errors) => errors.forEach(console.log);
8372
8379
 
8373
- var __defProp$4 = Object.defineProperty;
8374
- var __defProps$3 = Object.defineProperties;
8375
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
8376
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
8377
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
8378
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
8379
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8380
- var __spreadValues$4 = (a, b) => {
8380
+ var __defProp$2 = Object.defineProperty;
8381
+ var __defProps$1 = Object.defineProperties;
8382
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
8383
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
8384
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
8385
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
8386
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8387
+ var __spreadValues$2 = (a, b) => {
8381
8388
  for (var prop in b || (b = {}))
8382
- if (__hasOwnProp$a.call(b, prop))
8383
- __defNormalProp$4(a, prop, b[prop]);
8384
- if (__getOwnPropSymbols$a)
8385
- for (var prop of __getOwnPropSymbols$a(b)) {
8386
- if (__propIsEnum$a.call(b, prop))
8387
- __defNormalProp$4(a, prop, b[prop]);
8389
+ if (__hasOwnProp$8.call(b, prop))
8390
+ __defNormalProp$2(a, prop, b[prop]);
8391
+ if (__getOwnPropSymbols$8)
8392
+ for (var prop of __getOwnPropSymbols$8(b)) {
8393
+ if (__propIsEnum$8.call(b, prop))
8394
+ __defNormalProp$2(a, prop, b[prop]);
8388
8395
  }
8389
8396
  return a;
8390
8397
  };
8391
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
8398
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
8392
8399
  const streams = [];
8393
8400
  if (process.env.NODE_ENV === "production") {
8394
8401
  streams.push({
@@ -8397,7 +8404,7 @@ if (process.env.NODE_ENV === "production") {
8397
8404
  }
8398
8405
  const logger = E({
8399
8406
  name: "shipengine",
8400
- serializers: __spreadProps$3(__spreadValues$4({}, k), {
8407
+ serializers: __spreadProps$1(__spreadValues$2({}, k), {
8401
8408
  req: (req) => ({
8402
8409
  headers: req.headers,
8403
8410
  method: req.method,
@@ -8432,7 +8439,7 @@ const useGetAccountSettings = () => {
8432
8439
  });
8433
8440
  };
8434
8441
 
8435
- var __async$s = (__this, __arguments, generator) => {
8442
+ var __async$r = (__this, __arguments, generator) => {
8436
8443
  return new Promise((resolve, reject) => {
8437
8444
  var fulfilled = (value) => {
8438
8445
  try {
@@ -8455,7 +8462,7 @@ var __async$s = (__this, __arguments, generator) => {
8455
8462
  const useUpdateAccountSettings = () => {
8456
8463
  const { client } = useShipEngine();
8457
8464
  return useMutation({
8458
- mutationFn: (settings) => __async$s(void 0, null, function* () {
8465
+ mutationFn: (settings) => __async$r(void 0, null, function* () {
8459
8466
  const result = yield client.accountSettings.update(settings);
8460
8467
  return result.data;
8461
8468
  }),
@@ -8464,7 +8471,7 @@ const useUpdateAccountSettings = () => {
8464
8471
  });
8465
8472
  };
8466
8473
 
8467
- var __async$r = (__this, __arguments, generator) => {
8474
+ var __async$q = (__this, __arguments, generator) => {
8468
8475
  return new Promise((resolve, reject) => {
8469
8476
  var fulfilled = (value) => {
8470
8477
  try {
@@ -8487,7 +8494,7 @@ var __async$r = (__this, __arguments, generator) => {
8487
8494
  const useParseAddress = () => {
8488
8495
  const { client } = useShipEngine();
8489
8496
  return useMutation({
8490
- mutationFn: (_0) => __async$r(void 0, [_0], function* ({ address, text }) {
8497
+ mutationFn: (_0) => __async$q(void 0, [_0], function* ({ address, text }) {
8491
8498
  const result = yield client.addresses.parse(text, address);
8492
8499
  return result.data;
8493
8500
  }),
@@ -8496,7 +8503,7 @@ const useParseAddress = () => {
8496
8503
  });
8497
8504
  };
8498
8505
 
8499
- var __async$q = (__this, __arguments, generator) => {
8506
+ var __async$p = (__this, __arguments, generator) => {
8500
8507
  return new Promise((resolve, reject) => {
8501
8508
  var fulfilled = (value) => {
8502
8509
  try {
@@ -8519,7 +8526,7 @@ var __async$q = (__this, __arguments, generator) => {
8519
8526
  const useValidateAddresses = () => {
8520
8527
  const { client } = useShipEngine();
8521
8528
  return useMutation({
8522
- mutationFn: (addresses) => __async$q(void 0, null, function* () {
8529
+ mutationFn: (addresses) => __async$p(void 0, null, function* () {
8523
8530
  const result = yield client.addresses.validate(addresses);
8524
8531
  return result.data;
8525
8532
  }),
@@ -8528,7 +8535,7 @@ const useValidateAddresses = () => {
8528
8535
  });
8529
8536
  };
8530
8537
 
8531
- var __async$p = (__this, __arguments, generator) => {
8538
+ var __async$o = (__this, __arguments, generator) => {
8532
8539
  return new Promise((resolve, reject) => {
8533
8540
  var fulfilled = (value) => {
8534
8541
  try {
@@ -8551,7 +8558,7 @@ var __async$p = (__this, __arguments, generator) => {
8551
8558
  const useAddFunds = (carrierId) => {
8552
8559
  const { client } = useShipEngine();
8553
8560
  return useMutation({
8554
- mutationFn: (funds) => __async$p(void 0, null, function* () {
8561
+ mutationFn: (funds) => __async$o(void 0, null, function* () {
8555
8562
  const result = yield client.carriers.addFunds(carrierId, funds);
8556
8563
  return result.data;
8557
8564
  }),
@@ -8560,7 +8567,7 @@ const useAddFunds = (carrierId) => {
8560
8567
  });
8561
8568
  };
8562
8569
 
8563
- var __async$o = (__this, __arguments, generator) => {
8570
+ var __async$n = (__this, __arguments, generator) => {
8564
8571
  return new Promise((resolve, reject) => {
8565
8572
  var fulfilled = (value) => {
8566
8573
  try {
@@ -8583,7 +8590,7 @@ var __async$o = (__this, __arguments, generator) => {
8583
8590
  const useConnectCarrier = () => {
8584
8591
  const { client } = useShipEngine();
8585
8592
  return useMutation({
8586
- mutationFn: (params) => __async$o(void 0, null, function* () {
8593
+ mutationFn: (params) => __async$n(void 0, null, function* () {
8587
8594
  const result = yield client.carriers.connect(params);
8588
8595
  return result.data;
8589
8596
  }),
@@ -8720,7 +8727,7 @@ const useListCarriers = () => {
8720
8727
  });
8721
8728
  };
8722
8729
 
8723
- var __async$n = (__this, __arguments, generator) => {
8730
+ var __async$m = (__this, __arguments, generator) => {
8724
8731
  return new Promise((resolve, reject) => {
8725
8732
  var fulfilled = (value) => {
8726
8733
  try {
@@ -8744,7 +8751,7 @@ const useUpdateAutoFunding = (carrierId) => {
8744
8751
  const { client } = useShipEngine();
8745
8752
  const queryClient = useQueryClient();
8746
8753
  return useMutation({
8747
- mutationFn: (options) => __async$n(void 0, null, function* () {
8754
+ mutationFn: (options) => __async$m(void 0, null, function* () {
8748
8755
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
8749
8756
  return result.data;
8750
8757
  }),
@@ -8756,6 +8763,23 @@ const useUpdateAutoFunding = (carrierId) => {
8756
8763
  });
8757
8764
  };
8758
8765
 
8766
+ const useGetZonesByCarrier = (carrierId) => {
8767
+ const { client } = useShipEngine();
8768
+ return useQuery({
8769
+ enabled: !!carrierId,
8770
+ onError,
8771
+ queryFn: () => {
8772
+ if (carrierId)
8773
+ return client.carriers.getZones(carrierId);
8774
+ return Promise.reject(new Error("carrierId is required"));
8775
+ },
8776
+ queryKey: ["useGetZonesByCarrier", carrierId],
8777
+ select: (result) => result.data.zones,
8778
+ // Fresh for 5 minutes
8779
+ staleTime: 5 * 60 * 1e3
8780
+ });
8781
+ };
8782
+
8759
8783
  const useListCustomPackageTypes = () => {
8760
8784
  const { client } = useShipEngine();
8761
8785
  return useQuery({
@@ -8766,7 +8790,7 @@ const useListCustomPackageTypes = () => {
8766
8790
  });
8767
8791
  };
8768
8792
 
8769
- var __async$m = (__this, __arguments, generator) => {
8793
+ var __async$l = (__this, __arguments, generator) => {
8770
8794
  return new Promise((resolve, reject) => {
8771
8795
  var fulfilled = (value) => {
8772
8796
  try {
@@ -8789,7 +8813,7 @@ var __async$m = (__this, __arguments, generator) => {
8789
8813
  const useCreateFundingSource = () => {
8790
8814
  const { client } = useShipEngine();
8791
8815
  return useMutation({
8792
- mutationFn: (fundingSource) => __async$m(void 0, null, function* () {
8816
+ mutationFn: (fundingSource) => __async$l(void 0, null, function* () {
8793
8817
  const result = yield client.fundingSources.create(fundingSource);
8794
8818
  return result.data;
8795
8819
  }),
@@ -8798,7 +8822,7 @@ const useCreateFundingSource = () => {
8798
8822
  });
8799
8823
  };
8800
8824
 
8801
- var __async$l = (__this, __arguments, generator) => {
8825
+ var __async$k = (__this, __arguments, generator) => {
8802
8826
  return new Promise((resolve, reject) => {
8803
8827
  var fulfilled = (value) => {
8804
8828
  try {
@@ -8821,7 +8845,7 @@ var __async$l = (__this, __arguments, generator) => {
8821
8845
  const useFundingSourcesAddFunds = (fundingSourceId) => {
8822
8846
  const { client } = useShipEngine();
8823
8847
  return useMutation({
8824
- mutationFn: (funds) => __async$l(void 0, null, function* () {
8848
+ mutationFn: (funds) => __async$k(void 0, null, function* () {
8825
8849
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
8826
8850
  return result.data;
8827
8851
  }),
@@ -8850,7 +8874,7 @@ const useListFundingSources = () => {
8850
8874
  });
8851
8875
  };
8852
8876
 
8853
- var __async$k = (__this, __arguments, generator) => {
8877
+ var __async$j = (__this, __arguments, generator) => {
8854
8878
  return new Promise((resolve, reject) => {
8855
8879
  var fulfilled = (value) => {
8856
8880
  try {
@@ -8873,7 +8897,7 @@ var __async$k = (__this, __arguments, generator) => {
8873
8897
  const useRegisterCarrier = () => {
8874
8898
  const { client } = useShipEngine();
8875
8899
  return useMutation({
8876
- mutationFn: (carrier) => __async$k(void 0, null, function* () {
8900
+ mutationFn: (carrier) => __async$j(void 0, null, function* () {
8877
8901
  const result = yield client.fundingSources.registerCarrier(carrier);
8878
8902
  return result.data;
8879
8903
  }),
@@ -8882,7 +8906,7 @@ const useRegisterCarrier = () => {
8882
8906
  });
8883
8907
  };
8884
8908
 
8885
- var __async$j = (__this, __arguments, generator) => {
8909
+ var __async$i = (__this, __arguments, generator) => {
8886
8910
  return new Promise((resolve, reject) => {
8887
8911
  var fulfilled = (value) => {
8888
8912
  try {
@@ -8905,7 +8929,7 @@ var __async$j = (__this, __arguments, generator) => {
8905
8929
  const useUpdateFundingSource = () => {
8906
8930
  const { client } = useShipEngine();
8907
8931
  return useMutation({
8908
- mutationFn: (_0) => __async$j(void 0, [_0], function* ({
8932
+ mutationFn: (_0) => __async$i(void 0, [_0], function* ({
8909
8933
  billingInfo,
8910
8934
  creditCardInfo,
8911
8935
  fundingSourceId
@@ -8937,22 +8961,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
8937
8961
  });
8938
8962
  };
8939
8963
 
8940
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
8941
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
8942
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
8964
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8965
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8966
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8943
8967
  var __objRest$6 = (source, exclude) => {
8944
8968
  var target = {};
8945
8969
  for (var prop in source)
8946
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
8970
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
8947
8971
  target[prop] = source[prop];
8948
- if (source != null && __getOwnPropSymbols$9)
8949
- for (var prop of __getOwnPropSymbols$9(source)) {
8950
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
8972
+ if (source != null && __getOwnPropSymbols$7)
8973
+ for (var prop of __getOwnPropSymbols$7(source)) {
8974
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
8951
8975
  target[prop] = source[prop];
8952
8976
  }
8953
8977
  return target;
8954
8978
  };
8955
- var __async$i = (__this, __arguments, generator) => {
8979
+ var __async$h = (__this, __arguments, generator) => {
8956
8980
  return new Promise((resolve, reject) => {
8957
8981
  var fulfilled = (value) => {
8958
8982
  try {
@@ -8975,7 +8999,7 @@ var __async$i = (__this, __arguments, generator) => {
8975
8999
  const useCreateLabel = () => {
8976
9000
  const { client } = useShipEngine();
8977
9001
  return useMutation({
8978
- mutationFn: (_a) => __async$i(void 0, null, function* () {
9002
+ mutationFn: (_a) => __async$h(void 0, null, function* () {
8979
9003
  var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
8980
9004
  const result = yield client.labels.createByRateId(rateId, options);
8981
9005
  return result.data;
@@ -9011,7 +9035,7 @@ const useListLabels = (params) => {
9011
9035
  });
9012
9036
  };
9013
9037
 
9014
- var __async$h = (__this, __arguments, generator) => {
9038
+ var __async$g = (__this, __arguments, generator) => {
9015
9039
  return new Promise((resolve, reject) => {
9016
9040
  var fulfilled = (value) => {
9017
9041
  try {
@@ -9034,7 +9058,7 @@ var __async$h = (__this, __arguments, generator) => {
9034
9058
  const useVoidLabel = () => {
9035
9059
  const { client } = useShipEngine();
9036
9060
  return useMutation({
9037
- mutationFn: (labelId) => __async$h(void 0, null, function* () {
9061
+ mutationFn: (labelId) => __async$g(void 0, null, function* () {
9038
9062
  const result = yield client.labels.void(labelId);
9039
9063
  return result.data;
9040
9064
  }),
@@ -9053,7 +9077,7 @@ const useListOrderSources = () => {
9053
9077
  });
9054
9078
  };
9055
9079
 
9056
- var __async$g = (__this, __arguments, generator) => {
9080
+ var __async$f = (__this, __arguments, generator) => {
9057
9081
  return new Promise((resolve, reject) => {
9058
9082
  var fulfilled = (value) => {
9059
9083
  try {
@@ -9076,7 +9100,7 @@ var __async$g = (__this, __arguments, generator) => {
9076
9100
  const useRefreshOrderSourceAsync = () => {
9077
9101
  const { client } = useShipEngine();
9078
9102
  return useMutation({
9079
- mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
9103
+ mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
9080
9104
  const result = yield client.orderSources.refresh(orderSourceId);
9081
9105
  return result.data;
9082
9106
  }),
@@ -9087,9 +9111,9 @@ const useRefreshOrderSource = () => {
9087
9111
  const { client } = useShipEngine();
9088
9112
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
9089
9113
  return useMutation({
9090
- mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
9114
+ mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
9091
9115
  yield refreshOrderSourceAsync(orderSourceId);
9092
- const waitResult = yield retryUntil(() => __async$g(void 0, null, function* () {
9116
+ const waitResult = yield retryUntil(() => __async$f(void 0, null, function* () {
9093
9117
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
9094
9118
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
9095
9119
  throw new CodedError("Order source is still refreshing");
@@ -9103,7 +9127,7 @@ const useRefreshOrderSource = () => {
9103
9127
  });
9104
9128
  };
9105
9129
 
9106
- var __async$f = (__this, __arguments, generator) => {
9130
+ var __async$e = (__this, __arguments, generator) => {
9107
9131
  return new Promise((resolve, reject) => {
9108
9132
  var fulfilled = (value) => {
9109
9133
  try {
@@ -9126,7 +9150,7 @@ var __async$f = (__this, __arguments, generator) => {
9126
9150
  const useCreateRateCard = () => {
9127
9151
  const { client } = useShipEngine();
9128
9152
  return useMutation({
9129
- mutationFn: (rateCard) => __async$f(void 0, null, function* () {
9153
+ mutationFn: (rateCard) => __async$e(void 0, null, function* () {
9130
9154
  const result = yield client.rateCards.create(rateCard);
9131
9155
  return result.data;
9132
9156
  }),
@@ -9173,7 +9197,7 @@ const useListRateCards = (carrierIds) => {
9173
9197
  });
9174
9198
  };
9175
9199
 
9176
- var __async$e = (__this, __arguments, generator) => {
9200
+ var __async$d = (__this, __arguments, generator) => {
9177
9201
  return new Promise((resolve, reject) => {
9178
9202
  var fulfilled = (value) => {
9179
9203
  try {
@@ -9196,7 +9220,7 @@ var __async$e = (__this, __arguments, generator) => {
9196
9220
  const usePublishRateCard = () => {
9197
9221
  const { client } = useShipEngine();
9198
9222
  return useMutation({
9199
- mutationFn: (rateCardId) => __async$e(void 0, null, function* () {
9223
+ mutationFn: (rateCardId) => __async$d(void 0, null, function* () {
9200
9224
  return yield client.rateCards.publish(rateCardId);
9201
9225
  }),
9202
9226
  mutationKey: ["usePublishRateCard"],
@@ -9204,7 +9228,7 @@ const usePublishRateCard = () => {
9204
9228
  });
9205
9229
  };
9206
9230
 
9207
- var __async$d = (__this, __arguments, generator) => {
9231
+ var __async$c = (__this, __arguments, generator) => {
9208
9232
  return new Promise((resolve, reject) => {
9209
9233
  var fulfilled = (value) => {
9210
9234
  try {
@@ -9227,7 +9251,7 @@ var __async$d = (__this, __arguments, generator) => {
9227
9251
  const useUpdateRateCard = () => {
9228
9252
  const { client } = useShipEngine();
9229
9253
  return useMutation({
9230
- mutationFn: (rateCard) => __async$d(void 0, null, function* () {
9254
+ mutationFn: (rateCard) => __async$c(void 0, null, function* () {
9231
9255
  const result = yield client.rateCards.update(rateCard);
9232
9256
  return result.data;
9233
9257
  }),
@@ -9236,7 +9260,7 @@ const useUpdateRateCard = () => {
9236
9260
  });
9237
9261
  };
9238
9262
 
9239
- var __async$c = (__this, __arguments, generator) => {
9263
+ var __async$b = (__this, __arguments, generator) => {
9240
9264
  return new Promise((resolve, reject) => {
9241
9265
  var fulfilled = (value) => {
9242
9266
  try {
@@ -9259,7 +9283,7 @@ var __async$c = (__this, __arguments, generator) => {
9259
9283
  const useUploadRateCard = () => {
9260
9284
  const { client } = useShipEngine();
9261
9285
  return useMutation({
9262
- mutationFn: (_0) => __async$c(void 0, [_0], function* ({ rateCardId, file }) {
9286
+ mutationFn: (_0) => __async$b(void 0, [_0], function* ({ rateCardId, file }) {
9263
9287
  const result = yield client.rateCards.upload(rateCardId, file);
9264
9288
  return result.data;
9265
9289
  }),
@@ -9268,7 +9292,7 @@ const useUploadRateCard = () => {
9268
9292
  });
9269
9293
  };
9270
9294
 
9271
- var __async$b = (__this, __arguments, generator) => {
9295
+ var __async$a = (__this, __arguments, generator) => {
9272
9296
  return new Promise((resolve, reject) => {
9273
9297
  var fulfilled = (value) => {
9274
9298
  try {
@@ -9291,7 +9315,7 @@ var __async$b = (__this, __arguments, generator) => {
9291
9315
  const useDeleteRateCard = () => {
9292
9316
  const { client } = useShipEngine();
9293
9317
  return useMutation({
9294
- mutationFn: (rateCardId) => __async$b(void 0, null, function* () {
9318
+ mutationFn: (rateCardId) => __async$a(void 0, null, function* () {
9295
9319
  const result = yield client.rateCards.delete(rateCardId);
9296
9320
  return result.data;
9297
9321
  }),
@@ -9300,7 +9324,7 @@ const useDeleteRateCard = () => {
9300
9324
  });
9301
9325
  };
9302
9326
 
9303
- var __async$a = (__this, __arguments, generator) => {
9327
+ var __async$9 = (__this, __arguments, generator) => {
9304
9328
  return new Promise((resolve, reject) => {
9305
9329
  var fulfilled = (value) => {
9306
9330
  try {
@@ -9323,7 +9347,7 @@ var __async$a = (__this, __arguments, generator) => {
9323
9347
  const useCalculateRates = () => {
9324
9348
  const { client } = useShipEngine();
9325
9349
  return useMutation({
9326
- mutationFn: (_0) => __async$a(void 0, [_0], function* ({ rateOptions, shipmentId }) {
9350
+ mutationFn: (_0) => __async$9(void 0, [_0], function* ({ rateOptions, shipmentId }) {
9327
9351
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
9328
9352
  return result.data;
9329
9353
  }),
@@ -9358,22 +9382,22 @@ const useListSalesOrders = (params = {}) => {
9358
9382
  });
9359
9383
  };
9360
9384
 
9361
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
9362
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
9363
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
9385
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
9386
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
9387
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
9364
9388
  var __objRest$5 = (source, exclude) => {
9365
9389
  var target = {};
9366
9390
  for (var prop in source)
9367
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
9391
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
9368
9392
  target[prop] = source[prop];
9369
- if (source != null && __getOwnPropSymbols$8)
9370
- for (var prop of __getOwnPropSymbols$8(source)) {
9371
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
9393
+ if (source != null && __getOwnPropSymbols$6)
9394
+ for (var prop of __getOwnPropSymbols$6(source)) {
9395
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
9372
9396
  target[prop] = source[prop];
9373
9397
  }
9374
9398
  return target;
9375
9399
  };
9376
- var __async$9 = (__this, __arguments, generator) => {
9400
+ var __async$8 = (__this, __arguments, generator) => {
9377
9401
  return new Promise((resolve, reject) => {
9378
9402
  var fulfilled = (value) => {
9379
9403
  try {
@@ -9396,7 +9420,7 @@ var __async$9 = (__this, __arguments, generator) => {
9396
9420
  const useNotifySalesOrderShipped = () => {
9397
9421
  const { client } = useShipEngine();
9398
9422
  return useMutation({
9399
- mutationFn: (_a) => __async$9(void 0, null, function* () {
9423
+ mutationFn: (_a) => __async$8(void 0, null, function* () {
9400
9424
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$5(_b, ["salesOrderId"]);
9401
9425
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
9402
9426
  return result.data;
@@ -9406,22 +9430,22 @@ const useNotifySalesOrderShipped = () => {
9406
9430
  });
9407
9431
  };
9408
9432
 
9409
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
9410
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
9411
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
9433
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
9434
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
9435
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
9412
9436
  var __objRest$4 = (source, exclude) => {
9413
9437
  var target = {};
9414
9438
  for (var prop in source)
9415
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
9439
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
9416
9440
  target[prop] = source[prop];
9417
- if (source != null && __getOwnPropSymbols$7)
9418
- for (var prop of __getOwnPropSymbols$7(source)) {
9419
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
9441
+ if (source != null && __getOwnPropSymbols$5)
9442
+ for (var prop of __getOwnPropSymbols$5(source)) {
9443
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
9420
9444
  target[prop] = source[prop];
9421
9445
  }
9422
9446
  return target;
9423
9447
  };
9424
- var __async$8 = (__this, __arguments, generator) => {
9448
+ var __async$7 = (__this, __arguments, generator) => {
9425
9449
  return new Promise((resolve, reject) => {
9426
9450
  var fulfilled = (value) => {
9427
9451
  try {
@@ -9444,7 +9468,7 @@ var __async$8 = (__this, __arguments, generator) => {
9444
9468
  const useCreateSalesOrderShipment = () => {
9445
9469
  const { client } = useShipEngine();
9446
9470
  return useMutation({
9447
- mutationFn: (_a) => __async$8(void 0, null, function* () {
9471
+ mutationFn: (_a) => __async$7(void 0, null, function* () {
9448
9472
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
9449
9473
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
9450
9474
  return result.data;
@@ -9480,22 +9504,22 @@ const useListSalesOrderShipments = (params) => {
9480
9504
  });
9481
9505
  };
9482
9506
 
9483
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
9484
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
9485
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
9507
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
9508
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
9509
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
9486
9510
  var __objRest$3 = (source, exclude) => {
9487
9511
  var target = {};
9488
9512
  for (var prop in source)
9489
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
9513
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
9490
9514
  target[prop] = source[prop];
9491
- if (source != null && __getOwnPropSymbols$6)
9492
- for (var prop of __getOwnPropSymbols$6(source)) {
9493
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
9515
+ if (source != null && __getOwnPropSymbols$4)
9516
+ for (var prop of __getOwnPropSymbols$4(source)) {
9517
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
9494
9518
  target[prop] = source[prop];
9495
9519
  }
9496
9520
  return target;
9497
9521
  };
9498
- var __async$7 = (__this, __arguments, generator) => {
9522
+ var __async$6 = (__this, __arguments, generator) => {
9499
9523
  return new Promise((resolve, reject) => {
9500
9524
  var fulfilled = (value) => {
9501
9525
  try {
@@ -9518,7 +9542,7 @@ var __async$7 = (__this, __arguments, generator) => {
9518
9542
  const useUpdateSalesOrderShipment = () => {
9519
9543
  const { client } = useShipEngine();
9520
9544
  return useMutation({
9521
- mutationFn: (_a) => __async$7(void 0, null, function* () {
9545
+ mutationFn: (_a) => __async$6(void 0, null, function* () {
9522
9546
  var _b = _a, { shipmentId } = _b, shipment = __objRest$3(_b, ["shipmentId"]);
9523
9547
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
9524
9548
  return result.data;
@@ -9528,26 +9552,26 @@ const useUpdateSalesOrderShipment = () => {
9528
9552
  });
9529
9553
  };
9530
9554
 
9531
- var __defProp$3 = Object.defineProperty;
9532
- var __defProps$2 = Object.defineProperties;
9533
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
9534
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
9535
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
9536
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
9537
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9538
- var __spreadValues$3 = (a, b) => {
9555
+ var __defProp$1 = Object.defineProperty;
9556
+ var __defProps = Object.defineProperties;
9557
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9558
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
9559
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
9560
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
9561
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9562
+ var __spreadValues$1 = (a, b) => {
9539
9563
  for (var prop in b || (b = {}))
9540
- if (__hasOwnProp$5.call(b, prop))
9541
- __defNormalProp$3(a, prop, b[prop]);
9542
- if (__getOwnPropSymbols$5)
9543
- for (var prop of __getOwnPropSymbols$5(b)) {
9544
- if (__propIsEnum$5.call(b, prop))
9545
- __defNormalProp$3(a, prop, b[prop]);
9564
+ if (__hasOwnProp$3.call(b, prop))
9565
+ __defNormalProp$1(a, prop, b[prop]);
9566
+ if (__getOwnPropSymbols$3)
9567
+ for (var prop of __getOwnPropSymbols$3(b)) {
9568
+ if (__propIsEnum$3.call(b, prop))
9569
+ __defNormalProp$1(a, prop, b[prop]);
9546
9570
  }
9547
9571
  return a;
9548
9572
  };
9549
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
9550
- var __async$6 = (__this, __arguments, generator) => {
9573
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9574
+ var __async$5 = (__this, __arguments, generator) => {
9551
9575
  return new Promise((resolve, reject) => {
9552
9576
  var fulfilled = (value) => {
9553
9577
  try {
@@ -9570,7 +9594,7 @@ var __async$6 = (__this, __arguments, generator) => {
9570
9594
  const useCreateShipment = () => {
9571
9595
  const { client } = useShipEngine();
9572
9596
  return useMutation({
9573
- mutationFn: (shipment) => __async$6(void 0, null, function* () {
9597
+ mutationFn: (shipment) => __async$5(void 0, null, function* () {
9574
9598
  var _a;
9575
9599
  if (shipment.warehouseId === void 0) {
9576
9600
  throw new CodedError("errorMessages.noWarehouses", {
@@ -9588,7 +9612,7 @@ const useCreateShipment = () => {
9588
9612
  postalCode: "",
9589
9613
  stateProvince: ""
9590
9614
  };
9591
- return (yield client.shipments.create(__spreadProps$2(__spreadValues$3({}, shipment), {
9615
+ return (yield client.shipments.create(__spreadProps(__spreadValues$1({}, shipment), {
9592
9616
  shipTo
9593
9617
  }))).data;
9594
9618
  }),
@@ -9629,17 +9653,17 @@ const useGetShipment = (shipmentId) => {
9629
9653
  });
9630
9654
  };
9631
9655
 
9632
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
9633
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
9634
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
9656
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
9657
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
9658
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
9635
9659
  var __objRest$2 = (source, exclude) => {
9636
9660
  var target = {};
9637
9661
  for (var prop in source)
9638
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
9662
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
9639
9663
  target[prop] = source[prop];
9640
- if (source != null && __getOwnPropSymbols$4)
9641
- for (var prop of __getOwnPropSymbols$4(source)) {
9642
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
9664
+ if (source != null && __getOwnPropSymbols$2)
9665
+ for (var prop of __getOwnPropSymbols$2(source)) {
9666
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
9643
9667
  target[prop] = source[prop];
9644
9668
  }
9645
9669
  return target;
@@ -9656,7 +9680,7 @@ const useListShipments = (_params) => {
9656
9680
  });
9657
9681
  };
9658
9682
 
9659
- var __async$5 = (__this, __arguments, generator) => {
9683
+ var __async$4 = (__this, __arguments, generator) => {
9660
9684
  return new Promise((resolve, reject) => {
9661
9685
  var fulfilled = (value) => {
9662
9686
  try {
@@ -9679,7 +9703,7 @@ var __async$5 = (__this, __arguments, generator) => {
9679
9703
  const useCreateWarehouse = () => {
9680
9704
  const { client } = useShipEngine();
9681
9705
  return useMutation({
9682
- mutationFn: (data) => __async$5(void 0, null, function* () {
9706
+ mutationFn: (data) => __async$4(void 0, null, function* () {
9683
9707
  const result = yield client.warehouses.create(data);
9684
9708
  return result.data;
9685
9709
  }),
@@ -9688,7 +9712,7 @@ const useCreateWarehouse = () => {
9688
9712
  });
9689
9713
  };
9690
9714
 
9691
- var __async$4 = (__this, __arguments, generator) => {
9715
+ var __async$3 = (__this, __arguments, generator) => {
9692
9716
  return new Promise((resolve, reject) => {
9693
9717
  var fulfilled = (value) => {
9694
9718
  try {
@@ -9711,7 +9735,7 @@ var __async$4 = (__this, __arguments, generator) => {
9711
9735
  const useDeleteWarehouse = () => {
9712
9736
  const { client } = useShipEngine();
9713
9737
  return useMutation({
9714
- mutationFn: (_0) => __async$4(void 0, [_0], function* ({ warehouseId }) {
9738
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({ warehouseId }) {
9715
9739
  const result = yield client.warehouses.delete(warehouseId);
9716
9740
  return result.data;
9717
9741
  }),
@@ -9732,22 +9756,22 @@ const useListWarehouses = (options) => {
9732
9756
  });
9733
9757
  };
9734
9758
 
9735
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
9736
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
9737
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
9759
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
9760
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
9761
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
9738
9762
  var __objRest$1 = (source, exclude) => {
9739
9763
  var target = {};
9740
9764
  for (var prop in source)
9741
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
9765
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
9742
9766
  target[prop] = source[prop];
9743
- if (source != null && __getOwnPropSymbols$3)
9744
- for (var prop of __getOwnPropSymbols$3(source)) {
9745
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
9767
+ if (source != null && __getOwnPropSymbols$1)
9768
+ for (var prop of __getOwnPropSymbols$1(source)) {
9769
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
9746
9770
  target[prop] = source[prop];
9747
9771
  }
9748
9772
  return target;
9749
9773
  };
9750
- var __async$3 = (__this, __arguments, generator) => {
9774
+ var __async$2 = (__this, __arguments, generator) => {
9751
9775
  return new Promise((resolve, reject) => {
9752
9776
  var fulfilled = (value) => {
9753
9777
  try {
@@ -9770,7 +9794,7 @@ var __async$3 = (__this, __arguments, generator) => {
9770
9794
  const useUpdateWarehouse = () => {
9771
9795
  const { client } = useShipEngine();
9772
9796
  return useMutation({
9773
- mutationFn: (_a) => __async$3(void 0, null, function* () {
9797
+ mutationFn: (_a) => __async$2(void 0, null, function* () {
9774
9798
  var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
9775
9799
  const result = yield client.warehouses.update(warehouseId, warehouse);
9776
9800
  return result.data;
@@ -9780,7 +9804,7 @@ const useUpdateWarehouse = () => {
9780
9804
  });
9781
9805
  };
9782
9806
 
9783
- var __async$2 = (__this, __arguments, generator) => {
9807
+ var __async$1 = (__this, __arguments, generator) => {
9784
9808
  return new Promise((resolve, reject) => {
9785
9809
  var fulfilled = (value) => {
9786
9810
  try {
@@ -9803,12 +9827,12 @@ var __async$2 = (__this, __arguments, generator) => {
9803
9827
  const useLoadFonts = ({ cdnURL = "/", scope, theme }) => {
9804
9828
  const [fontFamily, setFontFamily] = useState();
9805
9829
  useEffect(() => {
9806
- (() => __async$2(void 0, null, function* () {
9830
+ (() => __async$1(void 0, null, function* () {
9807
9831
  var _a;
9808
9832
  try {
9809
9833
  const fontFaces = (_a = theme == null ? void 0 : theme.fontFaces) != null ? _a : [];
9810
9834
  yield Promise.all(
9811
- fontFaces.map((_0) => __async$2(void 0, [_0], function* ({ family, source, descriptors }) {
9835
+ fontFaces.map((_0) => __async$1(void 0, [_0], function* ({ family, source, descriptors }) {
9812
9836
  const fontSources = source.map((url) => `url(${url.replace("$cdnUrl", cdnURL)})`).join(", ");
9813
9837
  try {
9814
9838
  const font = new FontFace(family, fontSources, descriptors);
@@ -9830,7 +9854,7 @@ const useLoadFonts = ({ cdnURL = "/", scope, theme }) => {
9830
9854
  });
9831
9855
  };
9832
9856
 
9833
- var __async$1 = (__this, __arguments, generator) => {
9857
+ var __async = (__this, __arguments, generator) => {
9834
9858
  return new Promise((resolve, reject) => {
9835
9859
  var fulfilled = (value) => {
9836
9860
  try {
@@ -9853,7 +9877,7 @@ var __async$1 = (__this, __arguments, generator) => {
9853
9877
  const useLoadIcons = ({ brandName, cdnURL = "/" }) => {
9854
9878
  const [iconIndex, setIconIndex] = useState();
9855
9879
  useEffect(() => {
9856
- (() => __async$1(void 0, null, function* () {
9880
+ (() => __async(void 0, null, function* () {
9857
9881
  try {
9858
9882
  const result = yield axios.get("/brand/iconIndex.json", { baseURL: cdnURL });
9859
9883
  setIconIndex(result.data);
@@ -9863,7 +9887,7 @@ const useLoadIcons = ({ brandName, cdnURL = "/" }) => {
9863
9887
  }))();
9864
9888
  }, [brandName, cdnURL]);
9865
9889
  return useCallback(
9866
- (iconName) => __async$1(void 0, null, function* () {
9890
+ (iconName) => __async(void 0, null, function* () {
9867
9891
  if (iconIndex) {
9868
9892
  const iconBrand = (iconIndex[iconName.toLowerCase()] || []).includes(brandName) ? brandName : BrandName.FALLBACK;
9869
9893
  const result = yield axios.get(
@@ -9889,39 +9913,7 @@ const useLoadTheme = ({ cdnURL = "/", brandName }) => {
9889
9913
  return theme;
9890
9914
  };
9891
9915
 
9892
- var __defProp$2 = Object.defineProperty;
9893
- var __defProps$1 = Object.defineProperties;
9894
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
9895
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
9896
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
9897
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
9898
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9899
- var __spreadValues$2 = (a, b) => {
9900
- for (var prop in b || (b = {}))
9901
- if (__hasOwnProp$2.call(b, prop))
9902
- __defNormalProp$2(a, prop, b[prop]);
9903
- if (__getOwnPropSymbols$2)
9904
- for (var prop of __getOwnPropSymbols$2(b)) {
9905
- if (__propIsEnum$2.call(b, prop))
9906
- __defNormalProp$2(a, prop, b[prop]);
9907
- }
9908
- return a;
9909
- };
9910
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
9911
9916
  const AlchemyContext = createContext(void 0);
9912
- const renderAlchemyProviders = ({
9913
- baseURL,
9914
- children,
9915
- getToken,
9916
- theme,
9917
- scope,
9918
- fontStyles,
9919
- iconCache,
9920
- resolveIcon
9921
- }) => /* @__PURE__ */ jsxs(ThemeProvider, { theme, children: [
9922
- /* @__PURE__ */ jsx(Global, { styles: [getEmotionResetStyles(scope), fontStyles] }),
9923
- /* @__PURE__ */ jsx(GigerConfigProvider, { iconCache, resolveIcon, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) })
9924
- ] });
9925
9917
  const AlchemyProvider = ({
9926
9918
  baseURL = "https://api.shipengine.com",
9927
9919
  brandName = BrandName.FALLBACK,
@@ -9939,7 +9931,10 @@ const AlchemyProvider = ({
9939
9931
  if (!theme)
9940
9932
  return null;
9941
9933
  const contextValue = { baseURL, brandName, cdnURL, getToken, locale, onError, scope, theme };
9942
- return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: renderAlchemyProviders(__spreadProps$1(__spreadValues$2({}, contextValue), { children, fontStyles, iconCache, resolveIcon })) });
9934
+ return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(ThemeProvider, { theme, children: [
9935
+ /* @__PURE__ */ jsx(Global, { styles: [getEmotionResetStyles(scope), fontStyles] }),
9936
+ /* @__PURE__ */ jsx(GigerConfigProvider, { iconCache, resolveIcon, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) })
9937
+ ] }) });
9943
9938
  };
9944
9939
  const useAlchemy = () => {
9945
9940
  const context = useContext(AlchemyContext);
@@ -9949,57 +9944,10 @@ const useAlchemy = () => {
9949
9944
  return context;
9950
9945
  };
9951
9946
 
9952
- var __defProp$1 = Object.defineProperty;
9953
- var __defProps = Object.defineProperties;
9954
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9955
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
9956
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
9957
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
9958
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9959
- var __spreadValues$1 = (a, b) => {
9960
- for (var prop in b || (b = {}))
9961
- if (__hasOwnProp$1.call(b, prop))
9962
- __defNormalProp$1(a, prop, b[prop]);
9963
- if (__getOwnPropSymbols$1)
9964
- for (var prop of __getOwnPropSymbols$1(b)) {
9965
- if (__propIsEnum$1.call(b, prop))
9966
- __defNormalProp$1(a, prop, b[prop]);
9967
- }
9968
- return a;
9969
- };
9970
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9971
- var __async = (__this, __arguments, generator) => {
9972
- return new Promise((resolve, reject) => {
9973
- var fulfilled = (value) => {
9974
- try {
9975
- step(generator.next(value));
9976
- } catch (e) {
9977
- reject(e);
9978
- }
9979
- };
9980
- var rejected = (value) => {
9981
- try {
9982
- step(generator.throw(value));
9983
- } catch (e) {
9984
- reject(e);
9985
- }
9986
- };
9987
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
9988
- step((generator = generator.apply(__this, __arguments)).next());
9989
- });
9990
- };
9991
9947
  const AlchemyTestProvider = ({ baseURL, children }) => {
9992
9948
  const scope = "lmnt";
9993
9949
  const theme = useMemo(() => new Theme(), []);
9994
- const fontStyles = css({ [`.${scope}`]: { fontFamily: theme.defaultFontFamily } });
9995
9950
  const getToken = useCallback(() => "none", []);
9996
- const iconCache = useMemo(createIconCache, []);
9997
- const resolveIcon = useCallback(
9998
- (iconName) => __async(void 0, null, function* () {
9999
- return `<svg data-svg-id="${iconName}">mock icon-${iconName}</svg>`;
10000
- }),
10001
- []
10002
- );
10003
9951
  const contextValue = {
10004
9952
  baseURL,
10005
9953
  brandName: BrandName.FALLBACK,
@@ -10009,7 +9957,7 @@ const AlchemyTestProvider = ({ baseURL, children }) => {
10009
9957
  scope,
10010
9958
  theme
10011
9959
  };
10012
- return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: renderAlchemyProviders(__spreadProps(__spreadValues$1({}, contextValue), { children, fontStyles, iconCache, resolveIcon })) });
9960
+ return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(GigerTestProvider, { theme, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) }) });
10013
9961
  };
10014
9962
 
10015
9963
  var classnamesExports = {};
@@ -10630,4 +10578,4 @@ const alchemy = {
10630
10578
  createElement
10631
10579
  };
10632
10580
 
10633
- export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ElementContainerProvider, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEndUserIpAddress, isCodedError, isCodedErrors, logger, memoizedCreateCache, onError, renderAlchemyProviders, retryUntil, useAddFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateWarehouse, useDeleteRateCard, useDeleteWarehouse, useDownloadRateCard, useElementContainer, useFundingSourcesAddFunds, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetWalletHistory, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListWarehouses, useLoadFonts, useLoadIcons, useLoadTheme, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
10581
+ export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ElementContainerProvider, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, WarehousesAPI, alchemy, alchemy as default, delay, getEndUserIpAddress, isCodedError, isCodedErrors, logger, memoizedCreateCache, onError, retryUntil, useAddFunds, useAlchemy, useCalculateRates, useConnectCarrier, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateShipment, useCreateWarehouse, useDeleteRateCard, useDeleteWarehouse, useDownloadRateCard, useElementContainer, 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, useLoadFonts, useLoadIcons, useLoadTheme, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };