@shipengine/alchemy 2.2.4 → 2.3.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/index.js CHANGED
@@ -2477,17 +2477,17 @@ Object.defineProperty(dist, "__esModule", { value: true });
2477
2477
  var _default = dist.default = (function () {
2478
2478
  });
2479
2479
 
2480
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
2481
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
2482
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
2480
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2481
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2482
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2483
2483
  var __objRest$8 = (source, exclude) => {
2484
2484
  var target = {};
2485
2485
  for (var prop in source)
2486
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
2486
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2487
2487
  target[prop] = source[prop];
2488
- if (source != null && __getOwnPropSymbols$e)
2489
- for (var prop of __getOwnPropSymbols$e(source)) {
2490
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
2488
+ if (source != null && __getOwnPropSymbols$c)
2489
+ for (var prop of __getOwnPropSymbols$c(source)) {
2490
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2491
2491
  target[prop] = source[prop];
2492
2492
  }
2493
2493
  return target;
@@ -5254,7 +5254,7 @@ var ipaddr = {
5254
5254
  }).call(commonjsGlobal);
5255
5255
  } (ipaddr));
5256
5256
 
5257
- var __async$x = (__this, __arguments, generator) => {
5257
+ var __async$w = (__this, __arguments, generator) => {
5258
5258
  return new Promise((resolve, reject) => {
5259
5259
  var fulfilled = (value) => {
5260
5260
  try {
@@ -5274,7 +5274,7 @@ var __async$x = (__this, __arguments, generator) => {
5274
5274
  step((generator = generator.apply(__this, __arguments)).next());
5275
5275
  });
5276
5276
  };
5277
- const getEndUserIpAddress = () => __async$x(void 0, null, function* () {
5277
+ const getEndUserIpAddress = () => __async$w(void 0, null, function* () {
5278
5278
  try {
5279
5279
  const response = yield axios.get("https://api.ipify.org/?format=json");
5280
5280
  if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
@@ -5286,38 +5286,38 @@ const getEndUserIpAddress = () => __async$x(void 0, null, function* () {
5286
5286
  }
5287
5287
  });
5288
5288
 
5289
- var __defProp$7 = Object.defineProperty;
5290
- var __defProps$5 = Object.defineProperties;
5291
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
5292
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
5293
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
5294
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
5295
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5296
- var __spreadValues$7 = (a, b) => {
5289
+ var __defProp$5 = Object.defineProperty;
5290
+ var __defProps$3 = Object.defineProperties;
5291
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
5292
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
5293
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
5294
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
5295
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5296
+ var __spreadValues$5 = (a, b) => {
5297
5297
  for (var prop in b || (b = {}))
5298
- if (__hasOwnProp$d.call(b, prop))
5299
- __defNormalProp$7(a, prop, b[prop]);
5300
- if (__getOwnPropSymbols$d)
5301
- for (var prop of __getOwnPropSymbols$d(b)) {
5302
- if (__propIsEnum$d.call(b, prop))
5303
- __defNormalProp$7(a, prop, b[prop]);
5298
+ if (__hasOwnProp$b.call(b, prop))
5299
+ __defNormalProp$5(a, prop, b[prop]);
5300
+ if (__getOwnPropSymbols$b)
5301
+ for (var prop of __getOwnPropSymbols$b(b)) {
5302
+ if (__propIsEnum$b.call(b, prop))
5303
+ __defNormalProp$5(a, prop, b[prop]);
5304
5304
  }
5305
5305
  return a;
5306
5306
  };
5307
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
5307
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
5308
5308
  var __objRest$7 = (source, exclude) => {
5309
5309
  var target = {};
5310
5310
  for (var prop in source)
5311
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
5311
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
5312
5312
  target[prop] = source[prop];
5313
- if (source != null && __getOwnPropSymbols$d)
5314
- for (var prop of __getOwnPropSymbols$d(source)) {
5315
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
5313
+ if (source != null && __getOwnPropSymbols$b)
5314
+ for (var prop of __getOwnPropSymbols$b(source)) {
5315
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
5316
5316
  target[prop] = source[prop];
5317
5317
  }
5318
5318
  return target;
5319
5319
  };
5320
- var __async$w = (__this, __arguments, generator) => {
5320
+ var __async$v = (__this, __arguments, generator) => {
5321
5321
  return new Promise((resolve, reject) => {
5322
5322
  var fulfilled = (value) => {
5323
5323
  try {
@@ -5355,12 +5355,12 @@ class CarriersAPI {
5355
5355
  /**
5356
5356
  * The `connect` method connects a carrier account to a user's ShipEngine account.
5357
5357
  */
5358
- this.connect = (_a) => __async$w(this, null, function* () {
5358
+ this.connect = (_a) => __async$v(this, null, function* () {
5359
5359
  var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
5360
5360
  const endUserIpAddress = yield getEndUserIpAddress();
5361
5361
  if (!endUserIpAddress)
5362
5362
  return Promise.reject([new CodedError("Unable to get IP address")]);
5363
- return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$5(__spreadValues$7({}, connection), {
5363
+ return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$3(__spreadValues$5({}, connection), {
5364
5364
  endUserIpAddress
5365
5365
  }));
5366
5366
  });
@@ -7635,23 +7635,23 @@ class CustomPackagesAPI {
7635
7635
  }
7636
7636
  }
7637
7637
 
7638
- var __defProp$6 = Object.defineProperty;
7639
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
7640
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
7641
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
7642
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7643
- var __spreadValues$6 = (a, b) => {
7638
+ var __defProp$4 = Object.defineProperty;
7639
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
7640
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
7641
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
7642
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7643
+ var __spreadValues$4 = (a, b) => {
7644
7644
  for (var prop in b || (b = {}))
7645
- if (__hasOwnProp$c.call(b, prop))
7646
- __defNormalProp$6(a, prop, b[prop]);
7647
- if (__getOwnPropSymbols$c)
7648
- for (var prop of __getOwnPropSymbols$c(b)) {
7649
- if (__propIsEnum$c.call(b, prop))
7650
- __defNormalProp$6(a, prop, b[prop]);
7645
+ if (__hasOwnProp$a.call(b, prop))
7646
+ __defNormalProp$4(a, prop, b[prop]);
7647
+ if (__getOwnPropSymbols$a)
7648
+ for (var prop of __getOwnPropSymbols$a(b)) {
7649
+ if (__propIsEnum$a.call(b, prop))
7650
+ __defNormalProp$4(a, prop, b[prop]);
7651
7651
  }
7652
7652
  return a;
7653
7653
  };
7654
- var __async$v = (__this, __arguments, generator) => {
7654
+ var __async$u = (__this, __arguments, generator) => {
7655
7655
  return new Promise((resolve, reject) => {
7656
7656
  var fulfilled = (value) => {
7657
7657
  try {
@@ -7690,11 +7690,11 @@ class FundingSourcesAPI {
7690
7690
  * The `create` method creates a new funding source for a given user. This requires
7691
7691
  * payment information to be collected from the user.
7692
7692
  */
7693
- this.create = (createFundingSource) => __async$v(this, null, function* () {
7693
+ this.create = (createFundingSource) => __async$u(this, null, function* () {
7694
7694
  const endUserIpAddress = yield getEndUserIpAddress();
7695
7695
  if (!endUserIpAddress)
7696
7696
  return Promise.reject([new CodedError("Unable to get IP address")]);
7697
- return yield this.client.post("/v1/funding_sources", __spreadValues$6({
7697
+ return yield this.client.post("/v1/funding_sources", __spreadValues$4({
7698
7698
  endUserIpAddress
7699
7699
  }, createFundingSource));
7700
7700
  });
@@ -7703,7 +7703,7 @@ class FundingSourcesAPI {
7703
7703
  * user to update the billing address or payment information associated with the
7704
7704
  * funding source.
7705
7705
  */
7706
- this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$v(this, null, function* () {
7706
+ this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$u(this, null, function* () {
7707
7707
  const endUserIpAddress = yield getEndUserIpAddress();
7708
7708
  if (!endUserIpAddress)
7709
7709
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -7720,18 +7720,18 @@ class FundingSourcesAPI {
7720
7720
  * The `registerCarrier` method registers a carrier account and associates
7721
7721
  * it with a given funding source.
7722
7722
  */
7723
- this.registerCarrier = (carrier) => __async$v(this, null, function* () {
7723
+ this.registerCarrier = (carrier) => __async$u(this, null, function* () {
7724
7724
  const endUserIpAddress = yield getEndUserIpAddress();
7725
7725
  if (!endUserIpAddress)
7726
7726
  return Promise.reject([new CodedError("Unable to get IP address")]);
7727
- return yield this.client.post("/v1/registration/funding_source", __spreadValues$6({
7727
+ return yield this.client.post("/v1/registration/funding_source", __spreadValues$4({
7728
7728
  endUserIpAddress
7729
7729
  }, carrier));
7730
7730
  });
7731
7731
  /**
7732
7732
  * The `addFunds` method allows you to add funds to a funding source.
7733
7733
  */
7734
- this.addFunds = (amount, fundingSourceId) => __async$v(this, null, function* () {
7734
+ this.addFunds = (amount, fundingSourceId) => __async$u(this, null, function* () {
7735
7735
  return yield this.client.put(
7736
7736
  `/v1/funding_sources/${fundingSourceId}/add_funds`,
7737
7737
  amount
@@ -7965,7 +7965,7 @@ class SalesOrdersAPI {
7965
7965
  }
7966
7966
  }
7967
7967
 
7968
- var __async$u = (__this, __arguments, generator) => {
7968
+ var __async$t = (__this, __arguments, generator) => {
7969
7969
  return new Promise((resolve, reject) => {
7970
7970
  var fulfilled = (value) => {
7971
7971
  try {
@@ -8008,7 +8008,7 @@ class ShipmentsAPI {
8008
8008
  * The `create` method allows for creating shipments based on a list of shipment
8009
8009
  * items passed into this method.
8010
8010
  */
8011
- this.create = (...shipments) => __async$u(this, null, function* () {
8011
+ this.create = (...shipments) => __async$t(this, null, function* () {
8012
8012
  return this.client.post("/v1/shipments", {
8013
8013
  shipments
8014
8014
  });
@@ -8052,26 +8052,26 @@ class WarehousesAPI {
8052
8052
  }
8053
8053
  }
8054
8054
 
8055
- var __defProp$5 = Object.defineProperty;
8056
- var __defProps$4 = Object.defineProperties;
8057
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
8058
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
8059
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
8060
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
8061
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8062
- var __spreadValues$5 = (a, b) => {
8055
+ var __defProp$3 = Object.defineProperty;
8056
+ var __defProps$2 = Object.defineProperties;
8057
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
8058
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
8059
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
8060
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
8061
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8062
+ var __spreadValues$3 = (a, b) => {
8063
8063
  for (var prop in b || (b = {}))
8064
- if (__hasOwnProp$b.call(b, prop))
8065
- __defNormalProp$5(a, prop, b[prop]);
8066
- if (__getOwnPropSymbols$b)
8067
- for (var prop of __getOwnPropSymbols$b(b)) {
8068
- if (__propIsEnum$b.call(b, prop))
8069
- __defNormalProp$5(a, prop, b[prop]);
8064
+ if (__hasOwnProp$9.call(b, prop))
8065
+ __defNormalProp$3(a, prop, b[prop]);
8066
+ if (__getOwnPropSymbols$9)
8067
+ for (var prop of __getOwnPropSymbols$9(b)) {
8068
+ if (__propIsEnum$9.call(b, prop))
8069
+ __defNormalProp$3(a, prop, b[prop]);
8070
8070
  }
8071
8071
  return a;
8072
8072
  };
8073
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
8074
- var __async$t = (__this, __arguments, generator) => {
8073
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
8074
+ var __async$s = (__this, __arguments, generator) => {
8075
8075
  return new Promise((resolve, reject) => {
8076
8076
  var fulfilled = (value) => {
8077
8077
  try {
@@ -8093,7 +8093,7 @@ var __async$t = (__this, __arguments, generator) => {
8093
8093
  };
8094
8094
  const logger$1 = E({
8095
8095
  name: "shipengine-api",
8096
- serializers: __spreadProps$4(__spreadValues$5({}, k), {
8096
+ serializers: __spreadProps$2(__spreadValues$3({}, k), {
8097
8097
  req: (req) => ({
8098
8098
  headers: req.headers,
8099
8099
  method: req.method,
@@ -8118,7 +8118,7 @@ class ShipEngineAPI {
8118
8118
  constructor(token, { baseURL, headers, getToken }) {
8119
8119
  const client = axios.create({
8120
8120
  baseURL,
8121
- headers: __spreadProps$4(__spreadValues$5({}, headers), {
8121
+ headers: __spreadProps$2(__spreadValues$3({}, headers), {
8122
8122
  Authorization: `Bearer ${token}`,
8123
8123
  "Content-Type": "application/json"
8124
8124
  }),
@@ -8165,7 +8165,7 @@ class ShipEngineAPI {
8165
8165
  );
8166
8166
  return res;
8167
8167
  },
8168
- (err) => __async$t(this, null, function* () {
8168
+ (err) => __async$s(this, null, function* () {
8169
8169
  var _a, _b, _c, _d, _e, _f, _g;
8170
8170
  logger$1.error(
8171
8171
  { err, req: err.config, res: err.response },
@@ -8392,25 +8392,25 @@ const delay = (ms) => new Promise((resolve) => {
8392
8392
 
8393
8393
  const onError = (errors) => errors.forEach(console.log);
8394
8394
 
8395
- var __defProp$4 = Object.defineProperty;
8396
- var __defProps$3 = Object.defineProperties;
8397
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
8398
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
8399
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
8400
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
8401
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8402
- var __spreadValues$4 = (a, b) => {
8395
+ var __defProp$2 = Object.defineProperty;
8396
+ var __defProps$1 = Object.defineProperties;
8397
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
8398
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
8399
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
8400
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
8401
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8402
+ var __spreadValues$2 = (a, b) => {
8403
8403
  for (var prop in b || (b = {}))
8404
- if (__hasOwnProp$a.call(b, prop))
8405
- __defNormalProp$4(a, prop, b[prop]);
8406
- if (__getOwnPropSymbols$a)
8407
- for (var prop of __getOwnPropSymbols$a(b)) {
8408
- if (__propIsEnum$a.call(b, prop))
8409
- __defNormalProp$4(a, prop, b[prop]);
8404
+ if (__hasOwnProp$8.call(b, prop))
8405
+ __defNormalProp$2(a, prop, b[prop]);
8406
+ if (__getOwnPropSymbols$8)
8407
+ for (var prop of __getOwnPropSymbols$8(b)) {
8408
+ if (__propIsEnum$8.call(b, prop))
8409
+ __defNormalProp$2(a, prop, b[prop]);
8410
8410
  }
8411
8411
  return a;
8412
8412
  };
8413
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
8413
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
8414
8414
  const streams = [];
8415
8415
  if (process.env.NODE_ENV === "production") {
8416
8416
  streams.push({
@@ -8419,7 +8419,7 @@ if (process.env.NODE_ENV === "production") {
8419
8419
  }
8420
8420
  const logger = E({
8421
8421
  name: "shipengine",
8422
- serializers: __spreadProps$3(__spreadValues$4({}, k), {
8422
+ serializers: __spreadProps$1(__spreadValues$2({}, k), {
8423
8423
  req: (req) => ({
8424
8424
  headers: req.headers,
8425
8425
  method: req.method,
@@ -8454,7 +8454,7 @@ const useGetAccountSettings = () => {
8454
8454
  });
8455
8455
  };
8456
8456
 
8457
- var __async$s = (__this, __arguments, generator) => {
8457
+ var __async$r = (__this, __arguments, generator) => {
8458
8458
  return new Promise((resolve, reject) => {
8459
8459
  var fulfilled = (value) => {
8460
8460
  try {
@@ -8477,7 +8477,7 @@ var __async$s = (__this, __arguments, generator) => {
8477
8477
  const useUpdateAccountSettings = () => {
8478
8478
  const { client } = useShipEngine();
8479
8479
  return reactQuery.useMutation({
8480
- mutationFn: (settings) => __async$s(void 0, null, function* () {
8480
+ mutationFn: (settings) => __async$r(void 0, null, function* () {
8481
8481
  const result = yield client.accountSettings.update(settings);
8482
8482
  return result.data;
8483
8483
  }),
@@ -8486,7 +8486,7 @@ const useUpdateAccountSettings = () => {
8486
8486
  });
8487
8487
  };
8488
8488
 
8489
- var __async$r = (__this, __arguments, generator) => {
8489
+ var __async$q = (__this, __arguments, generator) => {
8490
8490
  return new Promise((resolve, reject) => {
8491
8491
  var fulfilled = (value) => {
8492
8492
  try {
@@ -8509,7 +8509,7 @@ var __async$r = (__this, __arguments, generator) => {
8509
8509
  const useParseAddress = () => {
8510
8510
  const { client } = useShipEngine();
8511
8511
  return reactQuery.useMutation({
8512
- mutationFn: (_0) => __async$r(void 0, [_0], function* ({ address, text }) {
8512
+ mutationFn: (_0) => __async$q(void 0, [_0], function* ({ address, text }) {
8513
8513
  const result = yield client.addresses.parse(text, address);
8514
8514
  return result.data;
8515
8515
  }),
@@ -8518,7 +8518,7 @@ const useParseAddress = () => {
8518
8518
  });
8519
8519
  };
8520
8520
 
8521
- var __async$q = (__this, __arguments, generator) => {
8521
+ var __async$p = (__this, __arguments, generator) => {
8522
8522
  return new Promise((resolve, reject) => {
8523
8523
  var fulfilled = (value) => {
8524
8524
  try {
@@ -8541,7 +8541,7 @@ var __async$q = (__this, __arguments, generator) => {
8541
8541
  const useValidateAddresses = () => {
8542
8542
  const { client } = useShipEngine();
8543
8543
  return reactQuery.useMutation({
8544
- mutationFn: (addresses) => __async$q(void 0, null, function* () {
8544
+ mutationFn: (addresses) => __async$p(void 0, null, function* () {
8545
8545
  const result = yield client.addresses.validate(addresses);
8546
8546
  return result.data;
8547
8547
  }),
@@ -8550,7 +8550,7 @@ const useValidateAddresses = () => {
8550
8550
  });
8551
8551
  };
8552
8552
 
8553
- var __async$p = (__this, __arguments, generator) => {
8553
+ var __async$o = (__this, __arguments, generator) => {
8554
8554
  return new Promise((resolve, reject) => {
8555
8555
  var fulfilled = (value) => {
8556
8556
  try {
@@ -8573,7 +8573,7 @@ var __async$p = (__this, __arguments, generator) => {
8573
8573
  const useAddFunds = (carrierId) => {
8574
8574
  const { client } = useShipEngine();
8575
8575
  return reactQuery.useMutation({
8576
- mutationFn: (funds) => __async$p(void 0, null, function* () {
8576
+ mutationFn: (funds) => __async$o(void 0, null, function* () {
8577
8577
  const result = yield client.carriers.addFunds(carrierId, funds);
8578
8578
  return result.data;
8579
8579
  }),
@@ -8582,7 +8582,7 @@ const useAddFunds = (carrierId) => {
8582
8582
  });
8583
8583
  };
8584
8584
 
8585
- var __async$o = (__this, __arguments, generator) => {
8585
+ var __async$n = (__this, __arguments, generator) => {
8586
8586
  return new Promise((resolve, reject) => {
8587
8587
  var fulfilled = (value) => {
8588
8588
  try {
@@ -8605,7 +8605,7 @@ var __async$o = (__this, __arguments, generator) => {
8605
8605
  const useConnectCarrier = () => {
8606
8606
  const { client } = useShipEngine();
8607
8607
  return reactQuery.useMutation({
8608
- mutationFn: (params) => __async$o(void 0, null, function* () {
8608
+ mutationFn: (params) => __async$n(void 0, null, function* () {
8609
8609
  const result = yield client.carriers.connect(params);
8610
8610
  return result.data;
8611
8611
  }),
@@ -8742,7 +8742,7 @@ const useListCarriers = () => {
8742
8742
  });
8743
8743
  };
8744
8744
 
8745
- var __async$n = (__this, __arguments, generator) => {
8745
+ var __async$m = (__this, __arguments, generator) => {
8746
8746
  return new Promise((resolve, reject) => {
8747
8747
  var fulfilled = (value) => {
8748
8748
  try {
@@ -8766,7 +8766,7 @@ const useUpdateAutoFunding = (carrierId) => {
8766
8766
  const { client } = useShipEngine();
8767
8767
  const queryClient = reactQuery.useQueryClient();
8768
8768
  return reactQuery.useMutation({
8769
- mutationFn: (options) => __async$n(void 0, null, function* () {
8769
+ mutationFn: (options) => __async$m(void 0, null, function* () {
8770
8770
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
8771
8771
  return result.data;
8772
8772
  }),
@@ -8788,7 +8788,7 @@ const useListCustomPackageTypes = () => {
8788
8788
  });
8789
8789
  };
8790
8790
 
8791
- var __async$m = (__this, __arguments, generator) => {
8791
+ var __async$l = (__this, __arguments, generator) => {
8792
8792
  return new Promise((resolve, reject) => {
8793
8793
  var fulfilled = (value) => {
8794
8794
  try {
@@ -8811,7 +8811,7 @@ var __async$m = (__this, __arguments, generator) => {
8811
8811
  const useCreateFundingSource = () => {
8812
8812
  const { client } = useShipEngine();
8813
8813
  return reactQuery.useMutation({
8814
- mutationFn: (fundingSource) => __async$m(void 0, null, function* () {
8814
+ mutationFn: (fundingSource) => __async$l(void 0, null, function* () {
8815
8815
  const result = yield client.fundingSources.create(fundingSource);
8816
8816
  return result.data;
8817
8817
  }),
@@ -8820,7 +8820,7 @@ const useCreateFundingSource = () => {
8820
8820
  });
8821
8821
  };
8822
8822
 
8823
- var __async$l = (__this, __arguments, generator) => {
8823
+ var __async$k = (__this, __arguments, generator) => {
8824
8824
  return new Promise((resolve, reject) => {
8825
8825
  var fulfilled = (value) => {
8826
8826
  try {
@@ -8843,7 +8843,7 @@ var __async$l = (__this, __arguments, generator) => {
8843
8843
  const useFundingSourcesAddFunds = (fundingSourceId) => {
8844
8844
  const { client } = useShipEngine();
8845
8845
  return reactQuery.useMutation({
8846
- mutationFn: (funds) => __async$l(void 0, null, function* () {
8846
+ mutationFn: (funds) => __async$k(void 0, null, function* () {
8847
8847
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
8848
8848
  return result.data;
8849
8849
  }),
@@ -8872,7 +8872,7 @@ const useListFundingSources = () => {
8872
8872
  });
8873
8873
  };
8874
8874
 
8875
- var __async$k = (__this, __arguments, generator) => {
8875
+ var __async$j = (__this, __arguments, generator) => {
8876
8876
  return new Promise((resolve, reject) => {
8877
8877
  var fulfilled = (value) => {
8878
8878
  try {
@@ -8895,7 +8895,7 @@ var __async$k = (__this, __arguments, generator) => {
8895
8895
  const useRegisterCarrier = () => {
8896
8896
  const { client } = useShipEngine();
8897
8897
  return reactQuery.useMutation({
8898
- mutationFn: (carrier) => __async$k(void 0, null, function* () {
8898
+ mutationFn: (carrier) => __async$j(void 0, null, function* () {
8899
8899
  const result = yield client.fundingSources.registerCarrier(carrier);
8900
8900
  return result.data;
8901
8901
  }),
@@ -8904,7 +8904,7 @@ const useRegisterCarrier = () => {
8904
8904
  });
8905
8905
  };
8906
8906
 
8907
- var __async$j = (__this, __arguments, generator) => {
8907
+ var __async$i = (__this, __arguments, generator) => {
8908
8908
  return new Promise((resolve, reject) => {
8909
8909
  var fulfilled = (value) => {
8910
8910
  try {
@@ -8927,7 +8927,7 @@ var __async$j = (__this, __arguments, generator) => {
8927
8927
  const useUpdateFundingSource = () => {
8928
8928
  const { client } = useShipEngine();
8929
8929
  return reactQuery.useMutation({
8930
- mutationFn: (_0) => __async$j(void 0, [_0], function* ({
8930
+ mutationFn: (_0) => __async$i(void 0, [_0], function* ({
8931
8931
  billingInfo,
8932
8932
  creditCardInfo,
8933
8933
  fundingSourceId
@@ -8959,22 +8959,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
8959
8959
  });
8960
8960
  };
8961
8961
 
8962
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
8963
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
8964
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
8962
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8963
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8964
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8965
8965
  var __objRest$6 = (source, exclude) => {
8966
8966
  var target = {};
8967
8967
  for (var prop in source)
8968
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
8968
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
8969
8969
  target[prop] = source[prop];
8970
- if (source != null && __getOwnPropSymbols$9)
8971
- for (var prop of __getOwnPropSymbols$9(source)) {
8972
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
8970
+ if (source != null && __getOwnPropSymbols$7)
8971
+ for (var prop of __getOwnPropSymbols$7(source)) {
8972
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
8973
8973
  target[prop] = source[prop];
8974
8974
  }
8975
8975
  return target;
8976
8976
  };
8977
- var __async$i = (__this, __arguments, generator) => {
8977
+ var __async$h = (__this, __arguments, generator) => {
8978
8978
  return new Promise((resolve, reject) => {
8979
8979
  var fulfilled = (value) => {
8980
8980
  try {
@@ -8997,7 +8997,7 @@ var __async$i = (__this, __arguments, generator) => {
8997
8997
  const useCreateLabel = () => {
8998
8998
  const { client } = useShipEngine();
8999
8999
  return reactQuery.useMutation({
9000
- mutationFn: (_a) => __async$i(void 0, null, function* () {
9000
+ mutationFn: (_a) => __async$h(void 0, null, function* () {
9001
9001
  var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
9002
9002
  const result = yield client.labels.createByRateId(rateId, options);
9003
9003
  return result.data;
@@ -9033,7 +9033,7 @@ const useListLabels = (params) => {
9033
9033
  });
9034
9034
  };
9035
9035
 
9036
- var __async$h = (__this, __arguments, generator) => {
9036
+ var __async$g = (__this, __arguments, generator) => {
9037
9037
  return new Promise((resolve, reject) => {
9038
9038
  var fulfilled = (value) => {
9039
9039
  try {
@@ -9056,7 +9056,7 @@ var __async$h = (__this, __arguments, generator) => {
9056
9056
  const useVoidLabel = () => {
9057
9057
  const { client } = useShipEngine();
9058
9058
  return reactQuery.useMutation({
9059
- mutationFn: (labelId) => __async$h(void 0, null, function* () {
9059
+ mutationFn: (labelId) => __async$g(void 0, null, function* () {
9060
9060
  const result = yield client.labels.void(labelId);
9061
9061
  return result.data;
9062
9062
  }),
@@ -9075,7 +9075,7 @@ const useListOrderSources = () => {
9075
9075
  });
9076
9076
  };
9077
9077
 
9078
- var __async$g = (__this, __arguments, generator) => {
9078
+ var __async$f = (__this, __arguments, generator) => {
9079
9079
  return new Promise((resolve, reject) => {
9080
9080
  var fulfilled = (value) => {
9081
9081
  try {
@@ -9098,7 +9098,7 @@ var __async$g = (__this, __arguments, generator) => {
9098
9098
  const useRefreshOrderSourceAsync = () => {
9099
9099
  const { client } = useShipEngine();
9100
9100
  return reactQuery.useMutation({
9101
- mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
9101
+ mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
9102
9102
  const result = yield client.orderSources.refresh(orderSourceId);
9103
9103
  return result.data;
9104
9104
  }),
@@ -9109,9 +9109,9 @@ const useRefreshOrderSource = () => {
9109
9109
  const { client } = useShipEngine();
9110
9110
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
9111
9111
  return reactQuery.useMutation({
9112
- mutationFn: (orderSourceId) => __async$g(void 0, null, function* () {
9112
+ mutationFn: (orderSourceId) => __async$f(void 0, null, function* () {
9113
9113
  yield refreshOrderSourceAsync(orderSourceId);
9114
- const waitResult = yield retryUntil(() => __async$g(void 0, null, function* () {
9114
+ const waitResult = yield retryUntil(() => __async$f(void 0, null, function* () {
9115
9115
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
9116
9116
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
9117
9117
  throw new CodedError("Order source is still refreshing");
@@ -9125,7 +9125,7 @@ const useRefreshOrderSource = () => {
9125
9125
  });
9126
9126
  };
9127
9127
 
9128
- var __async$f = (__this, __arguments, generator) => {
9128
+ var __async$e = (__this, __arguments, generator) => {
9129
9129
  return new Promise((resolve, reject) => {
9130
9130
  var fulfilled = (value) => {
9131
9131
  try {
@@ -9148,7 +9148,7 @@ var __async$f = (__this, __arguments, generator) => {
9148
9148
  const useCreateRateCard = () => {
9149
9149
  const { client } = useShipEngine();
9150
9150
  return reactQuery.useMutation({
9151
- mutationFn: (rateCard) => __async$f(void 0, null, function* () {
9151
+ mutationFn: (rateCard) => __async$e(void 0, null, function* () {
9152
9152
  const result = yield client.rateCards.create(rateCard);
9153
9153
  return result.data;
9154
9154
  }),
@@ -9195,7 +9195,7 @@ const useListRateCards = (carrierIds) => {
9195
9195
  });
9196
9196
  };
9197
9197
 
9198
- var __async$e = (__this, __arguments, generator) => {
9198
+ var __async$d = (__this, __arguments, generator) => {
9199
9199
  return new Promise((resolve, reject) => {
9200
9200
  var fulfilled = (value) => {
9201
9201
  try {
@@ -9218,7 +9218,7 @@ var __async$e = (__this, __arguments, generator) => {
9218
9218
  const usePublishRateCard = () => {
9219
9219
  const { client } = useShipEngine();
9220
9220
  return reactQuery.useMutation({
9221
- mutationFn: (rateCardId) => __async$e(void 0, null, function* () {
9221
+ mutationFn: (rateCardId) => __async$d(void 0, null, function* () {
9222
9222
  return yield client.rateCards.publish(rateCardId);
9223
9223
  }),
9224
9224
  mutationKey: ["usePublishRateCard"],
@@ -9226,7 +9226,7 @@ const usePublishRateCard = () => {
9226
9226
  });
9227
9227
  };
9228
9228
 
9229
- var __async$d = (__this, __arguments, generator) => {
9229
+ var __async$c = (__this, __arguments, generator) => {
9230
9230
  return new Promise((resolve, reject) => {
9231
9231
  var fulfilled = (value) => {
9232
9232
  try {
@@ -9249,7 +9249,7 @@ var __async$d = (__this, __arguments, generator) => {
9249
9249
  const useUpdateRateCard = () => {
9250
9250
  const { client } = useShipEngine();
9251
9251
  return reactQuery.useMutation({
9252
- mutationFn: (rateCard) => __async$d(void 0, null, function* () {
9252
+ mutationFn: (rateCard) => __async$c(void 0, null, function* () {
9253
9253
  const result = yield client.rateCards.update(rateCard);
9254
9254
  return result.data;
9255
9255
  }),
@@ -9258,7 +9258,7 @@ const useUpdateRateCard = () => {
9258
9258
  });
9259
9259
  };
9260
9260
 
9261
- var __async$c = (__this, __arguments, generator) => {
9261
+ var __async$b = (__this, __arguments, generator) => {
9262
9262
  return new Promise((resolve, reject) => {
9263
9263
  var fulfilled = (value) => {
9264
9264
  try {
@@ -9281,7 +9281,7 @@ var __async$c = (__this, __arguments, generator) => {
9281
9281
  const useUploadRateCard = () => {
9282
9282
  const { client } = useShipEngine();
9283
9283
  return reactQuery.useMutation({
9284
- mutationFn: (_0) => __async$c(void 0, [_0], function* ({ rateCardId, file }) {
9284
+ mutationFn: (_0) => __async$b(void 0, [_0], function* ({ rateCardId, file }) {
9285
9285
  const result = yield client.rateCards.upload(rateCardId, file);
9286
9286
  return result.data;
9287
9287
  }),
@@ -9290,7 +9290,7 @@ const useUploadRateCard = () => {
9290
9290
  });
9291
9291
  };
9292
9292
 
9293
- var __async$b = (__this, __arguments, generator) => {
9293
+ var __async$a = (__this, __arguments, generator) => {
9294
9294
  return new Promise((resolve, reject) => {
9295
9295
  var fulfilled = (value) => {
9296
9296
  try {
@@ -9313,7 +9313,7 @@ var __async$b = (__this, __arguments, generator) => {
9313
9313
  const useDeleteRateCard = () => {
9314
9314
  const { client } = useShipEngine();
9315
9315
  return reactQuery.useMutation({
9316
- mutationFn: (rateCardId) => __async$b(void 0, null, function* () {
9316
+ mutationFn: (rateCardId) => __async$a(void 0, null, function* () {
9317
9317
  const result = yield client.rateCards.delete(rateCardId);
9318
9318
  return result.data;
9319
9319
  }),
@@ -9322,7 +9322,7 @@ const useDeleteRateCard = () => {
9322
9322
  });
9323
9323
  };
9324
9324
 
9325
- var __async$a = (__this, __arguments, generator) => {
9325
+ var __async$9 = (__this, __arguments, generator) => {
9326
9326
  return new Promise((resolve, reject) => {
9327
9327
  var fulfilled = (value) => {
9328
9328
  try {
@@ -9345,7 +9345,7 @@ var __async$a = (__this, __arguments, generator) => {
9345
9345
  const useCalculateRates = () => {
9346
9346
  const { client } = useShipEngine();
9347
9347
  return reactQuery.useMutation({
9348
- mutationFn: (_0) => __async$a(void 0, [_0], function* ({ rateOptions, shipmentId }) {
9348
+ mutationFn: (_0) => __async$9(void 0, [_0], function* ({ rateOptions, shipmentId }) {
9349
9349
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
9350
9350
  return result.data;
9351
9351
  }),
@@ -9380,22 +9380,22 @@ const useListSalesOrders = (params = {}) => {
9380
9380
  });
9381
9381
  };
9382
9382
 
9383
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
9384
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
9385
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
9383
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
9384
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
9385
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
9386
9386
  var __objRest$5 = (source, exclude) => {
9387
9387
  var target = {};
9388
9388
  for (var prop in source)
9389
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
9389
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
9390
9390
  target[prop] = source[prop];
9391
- if (source != null && __getOwnPropSymbols$8)
9392
- for (var prop of __getOwnPropSymbols$8(source)) {
9393
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
9391
+ if (source != null && __getOwnPropSymbols$6)
9392
+ for (var prop of __getOwnPropSymbols$6(source)) {
9393
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
9394
9394
  target[prop] = source[prop];
9395
9395
  }
9396
9396
  return target;
9397
9397
  };
9398
- var __async$9 = (__this, __arguments, generator) => {
9398
+ var __async$8 = (__this, __arguments, generator) => {
9399
9399
  return new Promise((resolve, reject) => {
9400
9400
  var fulfilled = (value) => {
9401
9401
  try {
@@ -9418,7 +9418,7 @@ var __async$9 = (__this, __arguments, generator) => {
9418
9418
  const useNotifySalesOrderShipped = () => {
9419
9419
  const { client } = useShipEngine();
9420
9420
  return reactQuery.useMutation({
9421
- mutationFn: (_a) => __async$9(void 0, null, function* () {
9421
+ mutationFn: (_a) => __async$8(void 0, null, function* () {
9422
9422
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$5(_b, ["salesOrderId"]);
9423
9423
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
9424
9424
  return result.data;
@@ -9428,22 +9428,22 @@ const useNotifySalesOrderShipped = () => {
9428
9428
  });
9429
9429
  };
9430
9430
 
9431
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
9432
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
9433
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
9431
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
9432
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
9433
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
9434
9434
  var __objRest$4 = (source, exclude) => {
9435
9435
  var target = {};
9436
9436
  for (var prop in source)
9437
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
9437
+ if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
9438
9438
  target[prop] = source[prop];
9439
- if (source != null && __getOwnPropSymbols$7)
9440
- for (var prop of __getOwnPropSymbols$7(source)) {
9441
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
9439
+ if (source != null && __getOwnPropSymbols$5)
9440
+ for (var prop of __getOwnPropSymbols$5(source)) {
9441
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
9442
9442
  target[prop] = source[prop];
9443
9443
  }
9444
9444
  return target;
9445
9445
  };
9446
- var __async$8 = (__this, __arguments, generator) => {
9446
+ var __async$7 = (__this, __arguments, generator) => {
9447
9447
  return new Promise((resolve, reject) => {
9448
9448
  var fulfilled = (value) => {
9449
9449
  try {
@@ -9466,7 +9466,7 @@ var __async$8 = (__this, __arguments, generator) => {
9466
9466
  const useCreateSalesOrderShipment = () => {
9467
9467
  const { client } = useShipEngine();
9468
9468
  return reactQuery.useMutation({
9469
- mutationFn: (_a) => __async$8(void 0, null, function* () {
9469
+ mutationFn: (_a) => __async$7(void 0, null, function* () {
9470
9470
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
9471
9471
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
9472
9472
  return result.data;
@@ -9502,22 +9502,22 @@ const useListSalesOrderShipments = (params) => {
9502
9502
  });
9503
9503
  };
9504
9504
 
9505
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
9506
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
9507
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
9505
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
9506
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
9507
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
9508
9508
  var __objRest$3 = (source, exclude) => {
9509
9509
  var target = {};
9510
9510
  for (var prop in source)
9511
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
9511
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
9512
9512
  target[prop] = source[prop];
9513
- if (source != null && __getOwnPropSymbols$6)
9514
- for (var prop of __getOwnPropSymbols$6(source)) {
9515
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
9513
+ if (source != null && __getOwnPropSymbols$4)
9514
+ for (var prop of __getOwnPropSymbols$4(source)) {
9515
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
9516
9516
  target[prop] = source[prop];
9517
9517
  }
9518
9518
  return target;
9519
9519
  };
9520
- var __async$7 = (__this, __arguments, generator) => {
9520
+ var __async$6 = (__this, __arguments, generator) => {
9521
9521
  return new Promise((resolve, reject) => {
9522
9522
  var fulfilled = (value) => {
9523
9523
  try {
@@ -9540,7 +9540,7 @@ var __async$7 = (__this, __arguments, generator) => {
9540
9540
  const useUpdateSalesOrderShipment = () => {
9541
9541
  const { client } = useShipEngine();
9542
9542
  return reactQuery.useMutation({
9543
- mutationFn: (_a) => __async$7(void 0, null, function* () {
9543
+ mutationFn: (_a) => __async$6(void 0, null, function* () {
9544
9544
  var _b = _a, { shipmentId } = _b, shipment = __objRest$3(_b, ["shipmentId"]);
9545
9545
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
9546
9546
  return result.data;
@@ -9550,26 +9550,26 @@ const useUpdateSalesOrderShipment = () => {
9550
9550
  });
9551
9551
  };
9552
9552
 
9553
- var __defProp$3 = Object.defineProperty;
9554
- var __defProps$2 = Object.defineProperties;
9555
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
9556
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
9557
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
9558
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
9559
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9560
- var __spreadValues$3 = (a, b) => {
9553
+ var __defProp$1 = Object.defineProperty;
9554
+ var __defProps = Object.defineProperties;
9555
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9556
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
9557
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
9558
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
9559
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9560
+ var __spreadValues$1 = (a, b) => {
9561
9561
  for (var prop in b || (b = {}))
9562
- if (__hasOwnProp$5.call(b, prop))
9563
- __defNormalProp$3(a, prop, b[prop]);
9564
- if (__getOwnPropSymbols$5)
9565
- for (var prop of __getOwnPropSymbols$5(b)) {
9566
- if (__propIsEnum$5.call(b, prop))
9567
- __defNormalProp$3(a, prop, b[prop]);
9562
+ if (__hasOwnProp$3.call(b, prop))
9563
+ __defNormalProp$1(a, prop, b[prop]);
9564
+ if (__getOwnPropSymbols$3)
9565
+ for (var prop of __getOwnPropSymbols$3(b)) {
9566
+ if (__propIsEnum$3.call(b, prop))
9567
+ __defNormalProp$1(a, prop, b[prop]);
9568
9568
  }
9569
9569
  return a;
9570
9570
  };
9571
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
9572
- var __async$6 = (__this, __arguments, generator) => {
9571
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9572
+ var __async$5 = (__this, __arguments, generator) => {
9573
9573
  return new Promise((resolve, reject) => {
9574
9574
  var fulfilled = (value) => {
9575
9575
  try {
@@ -9592,7 +9592,7 @@ var __async$6 = (__this, __arguments, generator) => {
9592
9592
  const useCreateShipment = () => {
9593
9593
  const { client } = useShipEngine();
9594
9594
  return reactQuery.useMutation({
9595
- mutationFn: (shipment) => __async$6(void 0, null, function* () {
9595
+ mutationFn: (shipment) => __async$5(void 0, null, function* () {
9596
9596
  var _a;
9597
9597
  if (shipment.warehouseId === void 0) {
9598
9598
  throw new CodedError("errorMessages.noWarehouses", {
@@ -9610,7 +9610,7 @@ const useCreateShipment = () => {
9610
9610
  postalCode: "",
9611
9611
  stateProvince: ""
9612
9612
  };
9613
- return (yield client.shipments.create(__spreadProps$2(__spreadValues$3({}, shipment), {
9613
+ return (yield client.shipments.create(__spreadProps(__spreadValues$1({}, shipment), {
9614
9614
  shipTo
9615
9615
  }))).data;
9616
9616
  }),
@@ -9651,17 +9651,17 @@ const useGetShipment = (shipmentId) => {
9651
9651
  });
9652
9652
  };
9653
9653
 
9654
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
9655
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
9656
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
9654
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
9655
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
9656
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
9657
9657
  var __objRest$2 = (source, exclude) => {
9658
9658
  var target = {};
9659
9659
  for (var prop in source)
9660
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
9660
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
9661
9661
  target[prop] = source[prop];
9662
- if (source != null && __getOwnPropSymbols$4)
9663
- for (var prop of __getOwnPropSymbols$4(source)) {
9664
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
9662
+ if (source != null && __getOwnPropSymbols$2)
9663
+ for (var prop of __getOwnPropSymbols$2(source)) {
9664
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
9665
9665
  target[prop] = source[prop];
9666
9666
  }
9667
9667
  return target;
@@ -9678,7 +9678,7 @@ const useListShipments = (_params) => {
9678
9678
  });
9679
9679
  };
9680
9680
 
9681
- var __async$5 = (__this, __arguments, generator) => {
9681
+ var __async$4 = (__this, __arguments, generator) => {
9682
9682
  return new Promise((resolve, reject) => {
9683
9683
  var fulfilled = (value) => {
9684
9684
  try {
@@ -9701,7 +9701,7 @@ var __async$5 = (__this, __arguments, generator) => {
9701
9701
  const useCreateWarehouse = () => {
9702
9702
  const { client } = useShipEngine();
9703
9703
  return reactQuery.useMutation({
9704
- mutationFn: (data) => __async$5(void 0, null, function* () {
9704
+ mutationFn: (data) => __async$4(void 0, null, function* () {
9705
9705
  const result = yield client.warehouses.create(data);
9706
9706
  return result.data;
9707
9707
  }),
@@ -9710,7 +9710,7 @@ const useCreateWarehouse = () => {
9710
9710
  });
9711
9711
  };
9712
9712
 
9713
- var __async$4 = (__this, __arguments, generator) => {
9713
+ var __async$3 = (__this, __arguments, generator) => {
9714
9714
  return new Promise((resolve, reject) => {
9715
9715
  var fulfilled = (value) => {
9716
9716
  try {
@@ -9733,7 +9733,7 @@ var __async$4 = (__this, __arguments, generator) => {
9733
9733
  const useDeleteWarehouse = () => {
9734
9734
  const { client } = useShipEngine();
9735
9735
  return reactQuery.useMutation({
9736
- mutationFn: (_0) => __async$4(void 0, [_0], function* ({ warehouseId }) {
9736
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({ warehouseId }) {
9737
9737
  const result = yield client.warehouses.delete(warehouseId);
9738
9738
  return result.data;
9739
9739
  }),
@@ -9754,22 +9754,22 @@ const useListWarehouses = (options) => {
9754
9754
  });
9755
9755
  };
9756
9756
 
9757
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
9758
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
9759
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
9757
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
9758
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
9759
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
9760
9760
  var __objRest$1 = (source, exclude) => {
9761
9761
  var target = {};
9762
9762
  for (var prop in source)
9763
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
9763
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
9764
9764
  target[prop] = source[prop];
9765
- if (source != null && __getOwnPropSymbols$3)
9766
- for (var prop of __getOwnPropSymbols$3(source)) {
9767
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
9765
+ if (source != null && __getOwnPropSymbols$1)
9766
+ for (var prop of __getOwnPropSymbols$1(source)) {
9767
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
9768
9768
  target[prop] = source[prop];
9769
9769
  }
9770
9770
  return target;
9771
9771
  };
9772
- var __async$3 = (__this, __arguments, generator) => {
9772
+ var __async$2 = (__this, __arguments, generator) => {
9773
9773
  return new Promise((resolve, reject) => {
9774
9774
  var fulfilled = (value) => {
9775
9775
  try {
@@ -9792,7 +9792,7 @@ var __async$3 = (__this, __arguments, generator) => {
9792
9792
  const useUpdateWarehouse = () => {
9793
9793
  const { client } = useShipEngine();
9794
9794
  return reactQuery.useMutation({
9795
- mutationFn: (_a) => __async$3(void 0, null, function* () {
9795
+ mutationFn: (_a) => __async$2(void 0, null, function* () {
9796
9796
  var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
9797
9797
  const result = yield client.warehouses.update(warehouseId, warehouse);
9798
9798
  return result.data;
@@ -9802,7 +9802,7 @@ const useUpdateWarehouse = () => {
9802
9802
  });
9803
9803
  };
9804
9804
 
9805
- var __async$2 = (__this, __arguments, generator) => {
9805
+ var __async$1 = (__this, __arguments, generator) => {
9806
9806
  return new Promise((resolve, reject) => {
9807
9807
  var fulfilled = (value) => {
9808
9808
  try {
@@ -9825,12 +9825,12 @@ var __async$2 = (__this, __arguments, generator) => {
9825
9825
  const useLoadFonts = ({ cdnURL = "/", scope, theme }) => {
9826
9826
  const [fontFamily, setFontFamily] = React.useState();
9827
9827
  React.useEffect(() => {
9828
- (() => __async$2(void 0, null, function* () {
9828
+ (() => __async$1(void 0, null, function* () {
9829
9829
  var _a;
9830
9830
  try {
9831
9831
  const fontFaces = (_a = theme == null ? void 0 : theme.fontFaces) != null ? _a : [];
9832
9832
  yield Promise.all(
9833
- fontFaces.map((_0) => __async$2(void 0, [_0], function* ({ family, source, descriptors }) {
9833
+ fontFaces.map((_0) => __async$1(void 0, [_0], function* ({ family, source, descriptors }) {
9834
9834
  const fontSources = source.map((url) => `url(${url.replace("$cdnUrl", cdnURL)})`).join(", ");
9835
9835
  try {
9836
9836
  const font = new FontFace(family, fontSources, descriptors);
@@ -9852,7 +9852,7 @@ const useLoadFonts = ({ cdnURL = "/", scope, theme }) => {
9852
9852
  });
9853
9853
  };
9854
9854
 
9855
- var __async$1 = (__this, __arguments, generator) => {
9855
+ var __async = (__this, __arguments, generator) => {
9856
9856
  return new Promise((resolve, reject) => {
9857
9857
  var fulfilled = (value) => {
9858
9858
  try {
@@ -9875,7 +9875,7 @@ var __async$1 = (__this, __arguments, generator) => {
9875
9875
  const useLoadIcons = ({ brandName, cdnURL = "/" }) => {
9876
9876
  const [iconIndex, setIconIndex] = React.useState();
9877
9877
  React.useEffect(() => {
9878
- (() => __async$1(void 0, null, function* () {
9878
+ (() => __async(void 0, null, function* () {
9879
9879
  try {
9880
9880
  const result = yield axios.get("/brand/iconIndex.json", { baseURL: cdnURL });
9881
9881
  setIconIndex(result.data);
@@ -9885,7 +9885,7 @@ const useLoadIcons = ({ brandName, cdnURL = "/" }) => {
9885
9885
  }))();
9886
9886
  }, [brandName, cdnURL]);
9887
9887
  return React.useCallback(
9888
- (iconName) => __async$1(void 0, null, function* () {
9888
+ (iconName) => __async(void 0, null, function* () {
9889
9889
  if (iconIndex) {
9890
9890
  const iconBrand = (iconIndex[iconName.toLowerCase()] || []).includes(brandName) ? brandName : brands.BrandName.FALLBACK;
9891
9891
  const result = yield axios.get(
@@ -9911,39 +9911,7 @@ const useLoadTheme = ({ cdnURL = "/", brandName }) => {
9911
9911
  return theme;
9912
9912
  };
9913
9913
 
9914
- var __defProp$2 = Object.defineProperty;
9915
- var __defProps$1 = Object.defineProperties;
9916
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
9917
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
9918
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
9919
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
9920
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9921
- var __spreadValues$2 = (a, b) => {
9922
- for (var prop in b || (b = {}))
9923
- if (__hasOwnProp$2.call(b, prop))
9924
- __defNormalProp$2(a, prop, b[prop]);
9925
- if (__getOwnPropSymbols$2)
9926
- for (var prop of __getOwnPropSymbols$2(b)) {
9927
- if (__propIsEnum$2.call(b, prop))
9928
- __defNormalProp$2(a, prop, b[prop]);
9929
- }
9930
- return a;
9931
- };
9932
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
9933
9914
  const AlchemyContext = React.createContext(void 0);
9934
- const renderAlchemyProviders = ({
9935
- baseURL,
9936
- children,
9937
- getToken,
9938
- theme,
9939
- scope,
9940
- fontStyles,
9941
- iconCache,
9942
- resolveIcon
9943
- }) => /* @__PURE__ */ jsxs(react.ThemeProvider, { theme, children: [
9944
- /* @__PURE__ */ jsx(react.Global, { styles: [giger.getEmotionResetStyles(scope), fontStyles] }),
9945
- /* @__PURE__ */ jsx(giger.GigerConfigProvider, { iconCache, resolveIcon, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) })
9946
- ] });
9947
9915
  const AlchemyProvider = ({
9948
9916
  baseURL = "https://api.shipengine.com",
9949
9917
  brandName = brands.BrandName.FALLBACK,
@@ -9961,7 +9929,10 @@ const AlchemyProvider = ({
9961
9929
  if (!theme)
9962
9930
  return null;
9963
9931
  const contextValue = { baseURL, brandName, cdnURL, getToken, locale, onError, scope, theme };
9964
- return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: renderAlchemyProviders(__spreadProps$1(__spreadValues$2({}, contextValue), { children, fontStyles, iconCache, resolveIcon })) });
9932
+ return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(react.ThemeProvider, { theme, children: [
9933
+ /* @__PURE__ */ jsx(react.Global, { styles: [giger.getEmotionResetStyles(scope), fontStyles] }),
9934
+ /* @__PURE__ */ jsx(giger.GigerConfigProvider, { iconCache, resolveIcon, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) })
9935
+ ] }) });
9965
9936
  };
9966
9937
  const useAlchemy = () => {
9967
9938
  const context = React.useContext(AlchemyContext);
@@ -9971,57 +9942,10 @@ const useAlchemy = () => {
9971
9942
  return context;
9972
9943
  };
9973
9944
 
9974
- var __defProp$1 = Object.defineProperty;
9975
- var __defProps = Object.defineProperties;
9976
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9977
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
9978
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
9979
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
9980
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9981
- var __spreadValues$1 = (a, b) => {
9982
- for (var prop in b || (b = {}))
9983
- if (__hasOwnProp$1.call(b, prop))
9984
- __defNormalProp$1(a, prop, b[prop]);
9985
- if (__getOwnPropSymbols$1)
9986
- for (var prop of __getOwnPropSymbols$1(b)) {
9987
- if (__propIsEnum$1.call(b, prop))
9988
- __defNormalProp$1(a, prop, b[prop]);
9989
- }
9990
- return a;
9991
- };
9992
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9993
- var __async = (__this, __arguments, generator) => {
9994
- return new Promise((resolve, reject) => {
9995
- var fulfilled = (value) => {
9996
- try {
9997
- step(generator.next(value));
9998
- } catch (e) {
9999
- reject(e);
10000
- }
10001
- };
10002
- var rejected = (value) => {
10003
- try {
10004
- step(generator.throw(value));
10005
- } catch (e) {
10006
- reject(e);
10007
- }
10008
- };
10009
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
10010
- step((generator = generator.apply(__this, __arguments)).next());
10011
- });
10012
- };
10013
9945
  const AlchemyTestProvider = ({ baseURL, children }) => {
10014
9946
  const scope = "lmnt";
10015
9947
  const theme = React.useMemo(() => new gigerTheme.Theme(), []);
10016
- const fontStyles = react.css({ [`.${scope}`]: { fontFamily: theme.defaultFontFamily } });
10017
9948
  const getToken = React.useCallback(() => "none", []);
10018
- const iconCache = React.useMemo(giger.createIconCache, []);
10019
- const resolveIcon = React.useCallback(
10020
- (iconName) => __async(void 0, null, function* () {
10021
- return `<svg data-svg-id="${iconName}">mock icon-${iconName}</svg>`;
10022
- }),
10023
- []
10024
- );
10025
9949
  const contextValue = {
10026
9950
  baseURL,
10027
9951
  brandName: brands.BrandName.FALLBACK,
@@ -10031,7 +9955,7 @@ const AlchemyTestProvider = ({ baseURL, children }) => {
10031
9955
  scope,
10032
9956
  theme
10033
9957
  };
10034
- return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: renderAlchemyProviders(__spreadProps(__spreadValues$1({}, contextValue), { children, fontStyles, iconCache, resolveIcon })) });
9958
+ return /* @__PURE__ */ jsx(AlchemyContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(giger.GigerTestProvider, { theme, children: /* @__PURE__ */ jsx(ShipEngine, { baseURL, getToken, children }) }) });
10035
9959
  };
10036
9960
 
10037
9961
  var classnamesExports = {};
@@ -10693,7 +10617,6 @@ exports.isCodedErrors = isCodedErrors;
10693
10617
  exports.logger = logger;
10694
10618
  exports.memoizedCreateCache = memoizedCreateCache;
10695
10619
  exports.onError = onError;
10696
- exports.renderAlchemyProviders = renderAlchemyProviders;
10697
10620
  exports.retryUntil = retryUntil;
10698
10621
  exports.useAddFunds = useAddFunds;
10699
10622
  exports.useAlchemy = useAlchemy;