@shipengine/alchemy 0.5.12 → 0.5.13

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.
Files changed (3) hide show
  1. package/index.js +96 -68
  2. package/index.mjs +96 -69
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -2476,17 +2476,17 @@ Object.defineProperty(dist, "__esModule", { value: true });
2476
2476
  var _default = dist.default = (function () {
2477
2477
  });
2478
2478
 
2479
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
2480
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
2481
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
2482
- var __objRest$7 = (source, exclude) => {
2479
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2480
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2481
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2482
+ var __objRest$8 = (source, exclude) => {
2483
2483
  var target = {};
2484
2484
  for (var prop in source)
2485
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2485
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2486
2486
  target[prop] = source[prop];
2487
- if (source != null && __getOwnPropSymbols$b)
2488
- for (var prop of __getOwnPropSymbols$b(source)) {
2489
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2487
+ if (source != null && __getOwnPropSymbols$c)
2488
+ for (var prop of __getOwnPropSymbols$c(source)) {
2489
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2490
2490
  target[prop] = source[prop];
2491
2491
  }
2492
2492
  return target;
@@ -2500,7 +2500,7 @@ class CodedError {
2500
2500
  this.message = message;
2501
2501
  }
2502
2502
  static fromObject(_a) {
2503
- var _b = _a, { message } = _b, options = __objRest$7(_b, ["message"]);
2503
+ var _b = _a, { message } = _b, options = __objRest$8(_b, ["message"]);
2504
2504
  return new CodedError(message, options);
2505
2505
  }
2506
2506
  }
@@ -5265,30 +5265,30 @@ const getEndUserIpAddress = () => __async$s(void 0, null, function* () {
5265
5265
  var __defProp$5 = Object.defineProperty;
5266
5266
  var __defProps$3 = Object.defineProperties;
5267
5267
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
5268
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
5269
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
5270
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
5268
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
5269
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
5270
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
5271
5271
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5272
5272
  var __spreadValues$5 = (a, b) => {
5273
5273
  for (var prop in b || (b = {}))
5274
- if (__hasOwnProp$a.call(b, prop))
5274
+ if (__hasOwnProp$b.call(b, prop))
5275
5275
  __defNormalProp$5(a, prop, b[prop]);
5276
- if (__getOwnPropSymbols$a)
5277
- for (var prop of __getOwnPropSymbols$a(b)) {
5278
- if (__propIsEnum$a.call(b, prop))
5276
+ if (__getOwnPropSymbols$b)
5277
+ for (var prop of __getOwnPropSymbols$b(b)) {
5278
+ if (__propIsEnum$b.call(b, prop))
5279
5279
  __defNormalProp$5(a, prop, b[prop]);
5280
5280
  }
5281
5281
  return a;
5282
5282
  };
5283
5283
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
5284
- var __objRest$6 = (source, exclude) => {
5284
+ var __objRest$7 = (source, exclude) => {
5285
5285
  var target = {};
5286
5286
  for (var prop in source)
5287
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
5287
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
5288
5288
  target[prop] = source[prop];
5289
- if (source != null && __getOwnPropSymbols$a)
5290
- for (var prop of __getOwnPropSymbols$a(source)) {
5291
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
5289
+ if (source != null && __getOwnPropSymbols$b)
5290
+ for (var prop of __getOwnPropSymbols$b(source)) {
5291
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
5292
5292
  target[prop] = source[prop];
5293
5293
  }
5294
5294
  return target;
@@ -5323,7 +5323,7 @@ class CarriersAPI {
5323
5323
  return this.client.get(`/v1/carriers/${carrierId}`);
5324
5324
  };
5325
5325
  this.connect = (_a) => __async$r(this, null, function* () {
5326
- var _b = _a, { carrierCode } = _b, connection = __objRest$6(_b, ["carrierCode"]);
5326
+ var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
5327
5327
  const endUserIpAddress = yield getEndUserIpAddress();
5328
5328
  if (!endUserIpAddress)
5329
5329
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -7560,17 +7560,17 @@ class CustomPackagesAPI {
7560
7560
  }
7561
7561
 
7562
7562
  var __defProp$4 = Object.defineProperty;
7563
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
7564
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
7565
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
7563
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
7564
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
7565
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
7566
7566
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7567
7567
  var __spreadValues$4 = (a, b) => {
7568
7568
  for (var prop in b || (b = {}))
7569
- if (__hasOwnProp$9.call(b, prop))
7569
+ if (__hasOwnProp$a.call(b, prop))
7570
7570
  __defNormalProp$4(a, prop, b[prop]);
7571
- if (__getOwnPropSymbols$9)
7572
- for (var prop of __getOwnPropSymbols$9(b)) {
7573
- if (__propIsEnum$9.call(b, prop))
7571
+ if (__getOwnPropSymbols$a)
7572
+ for (var prop of __getOwnPropSymbols$a(b)) {
7573
+ if (__propIsEnum$a.call(b, prop))
7574
7574
  __defNormalProp$4(a, prop, b[prop]);
7575
7575
  }
7576
7576
  return a;
@@ -7813,17 +7813,17 @@ class WarehousesAPI {
7813
7813
  var __defProp$3 = Object.defineProperty;
7814
7814
  var __defProps$2 = Object.defineProperties;
7815
7815
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
7816
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
7817
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
7818
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
7816
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
7817
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
7818
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
7819
7819
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7820
7820
  var __spreadValues$3 = (a, b) => {
7821
7821
  for (var prop in b || (b = {}))
7822
- if (__hasOwnProp$8.call(b, prop))
7822
+ if (__hasOwnProp$9.call(b, prop))
7823
7823
  __defNormalProp$3(a, prop, b[prop]);
7824
- if (__getOwnPropSymbols$8)
7825
- for (var prop of __getOwnPropSymbols$8(b)) {
7826
- if (__propIsEnum$8.call(b, prop))
7824
+ if (__getOwnPropSymbols$9)
7825
+ for (var prop of __getOwnPropSymbols$9(b)) {
7826
+ if (__propIsEnum$9.call(b, prop))
7827
7827
  __defNormalProp$3(a, prop, b[prop]);
7828
7828
  }
7829
7829
  return a;
@@ -8048,17 +8048,17 @@ const onError = (errors) => errors.forEach(console.log);
8048
8048
  var __defProp$2 = Object.defineProperty;
8049
8049
  var __defProps$1 = Object.defineProperties;
8050
8050
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
8051
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8052
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8053
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8051
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
8052
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
8053
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
8054
8054
  var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8055
8055
  var __spreadValues$2 = (a, b) => {
8056
8056
  for (var prop in b || (b = {}))
8057
- if (__hasOwnProp$7.call(b, prop))
8057
+ if (__hasOwnProp$8.call(b, prop))
8058
8058
  __defNormalProp$2(a, prop, b[prop]);
8059
- if (__getOwnPropSymbols$7)
8060
- for (var prop of __getOwnPropSymbols$7(b)) {
8061
- if (__propIsEnum$7.call(b, prop))
8059
+ if (__getOwnPropSymbols$8)
8060
+ for (var prop of __getOwnPropSymbols$8(b)) {
8061
+ if (__propIsEnum$8.call(b, prop))
8062
8062
  __defNormalProp$2(a, prop, b[prop]);
8063
8063
  }
8064
8064
  return a;
@@ -8225,17 +8225,17 @@ const useCreateFundingSource = () => {
8225
8225
  });
8226
8226
  };
8227
8227
 
8228
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
8229
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
8230
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
8231
- var __objRest$5 = (source, exclude) => {
8228
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8229
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8230
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8231
+ var __objRest$6 = (source, exclude) => {
8232
8232
  var target = {};
8233
8233
  for (var prop in source)
8234
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
8234
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
8235
8235
  target[prop] = source[prop];
8236
- if (source != null && __getOwnPropSymbols$6)
8237
- for (var prop of __getOwnPropSymbols$6(source)) {
8238
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
8236
+ if (source != null && __getOwnPropSymbols$7)
8237
+ for (var prop of __getOwnPropSymbols$7(source)) {
8238
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
8239
8239
  target[prop] = source[prop];
8240
8240
  }
8241
8241
  return target;
@@ -8264,7 +8264,7 @@ const useCreateLabel = () => {
8264
8264
  const { client } = useShipEngine();
8265
8265
  return reactQuery.useMutation({
8266
8266
  mutationFn: (_a) => __async$j(void 0, null, function* () {
8267
- var _b = _a, { rateId } = _b, options = __objRest$5(_b, ["rateId"]);
8267
+ var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
8268
8268
  const result = yield client.labels.createByRateId(rateId, options);
8269
8269
  return result.data;
8270
8270
  }),
@@ -8305,17 +8305,17 @@ const useCreateRateCard = () => {
8305
8305
  });
8306
8306
  };
8307
8307
 
8308
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
8309
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
8310
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
8311
- var __objRest$4 = (source, exclude) => {
8308
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
8309
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
8310
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
8311
+ var __objRest$5 = (source, exclude) => {
8312
8312
  var target = {};
8313
8313
  for (var prop in source)
8314
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
8314
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
8315
8315
  target[prop] = source[prop];
8316
- if (source != null && __getOwnPropSymbols$5)
8317
- for (var prop of __getOwnPropSymbols$5(source)) {
8318
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
8316
+ if (source != null && __getOwnPropSymbols$6)
8317
+ for (var prop of __getOwnPropSymbols$6(source)) {
8318
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
8319
8319
  target[prop] = source[prop];
8320
8320
  }
8321
8321
  return target;
@@ -8344,7 +8344,7 @@ const useCreateSalesOrderShipment = () => {
8344
8344
  const { client } = useShipEngine();
8345
8345
  return reactQuery.useMutation({
8346
8346
  mutationFn: (_a) => __async$h(void 0, null, function* () {
8347
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
8347
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$5(_b, ["salesOrderId"]);
8348
8348
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
8349
8349
  return result.data;
8350
8350
  }),
@@ -8356,17 +8356,17 @@ const useCreateSalesOrderShipment = () => {
8356
8356
  var __defProp$1 = Object.defineProperty;
8357
8357
  var __defProps = Object.defineProperties;
8358
8358
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8359
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
8360
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
8361
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
8359
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
8360
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
8361
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
8362
8362
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8363
8363
  var __spreadValues$1 = (a, b) => {
8364
8364
  for (var prop in b || (b = {}))
8365
- if (__hasOwnProp$4.call(b, prop))
8365
+ if (__hasOwnProp$5.call(b, prop))
8366
8366
  __defNormalProp$1(a, prop, b[prop]);
8367
- if (__getOwnPropSymbols$4)
8368
- for (var prop of __getOwnPropSymbols$4(b)) {
8369
- if (__propIsEnum$4.call(b, prop))
8367
+ if (__getOwnPropSymbols$5)
8368
+ for (var prop of __getOwnPropSymbols$5(b)) {
8369
+ if (__propIsEnum$5.call(b, prop))
8370
8370
  __defNormalProp$1(a, prop, b[prop]);
8371
8371
  }
8372
8372
  return a;
@@ -8752,6 +8752,33 @@ const useListSalesOrders = (params = {}) => {
8752
8752
  });
8753
8753
  };
8754
8754
 
8755
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
8756
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
8757
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
8758
+ var __objRest$4 = (source, exclude) => {
8759
+ var target = {};
8760
+ for (var prop in source)
8761
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
8762
+ target[prop] = source[prop];
8763
+ if (source != null && __getOwnPropSymbols$4)
8764
+ for (var prop of __getOwnPropSymbols$4(source)) {
8765
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
8766
+ target[prop] = source[prop];
8767
+ }
8768
+ return target;
8769
+ };
8770
+ const useListShipments = (_params) => {
8771
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$4(_a, ["enabled"]);
8772
+ const { client } = useShipEngine();
8773
+ return reactQuery.useQuery({
8774
+ enabled,
8775
+ onError,
8776
+ queryFn: () => client.shipments.list(params),
8777
+ queryKey: ["useListShipments", params],
8778
+ select: (result) => result.data
8779
+ });
8780
+ };
8781
+
8755
8782
  const useListWarehouses = (options) => {
8756
8783
  var _a;
8757
8784
  const { client } = useShipEngine();
@@ -10048,6 +10075,7 @@ exports.useListOrderSources = useListOrderSources;
10048
10075
  exports.useListRateCards = useListRateCards;
10049
10076
  exports.useListSalesOrderShipments = useListSalesOrderShipments;
10050
10077
  exports.useListSalesOrders = useListSalesOrders;
10078
+ exports.useListShipments = useListShipments;
10051
10079
  exports.useListWarehouses = useListWarehouses;
10052
10080
  exports.useLoadFonts = useLoadFonts;
10053
10081
  exports.useLoadIcons = useLoadIcons;
package/index.mjs CHANGED
@@ -2454,17 +2454,17 @@ Object.defineProperty(dist, "__esModule", { value: true });
2454
2454
  var _default = dist.default = (function () {
2455
2455
  });
2456
2456
 
2457
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
2458
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
2459
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
2460
- var __objRest$7 = (source, exclude) => {
2457
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2458
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2459
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2460
+ var __objRest$8 = (source, exclude) => {
2461
2461
  var target = {};
2462
2462
  for (var prop in source)
2463
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2463
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2464
2464
  target[prop] = source[prop];
2465
- if (source != null && __getOwnPropSymbols$b)
2466
- for (var prop of __getOwnPropSymbols$b(source)) {
2467
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2465
+ if (source != null && __getOwnPropSymbols$c)
2466
+ for (var prop of __getOwnPropSymbols$c(source)) {
2467
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2468
2468
  target[prop] = source[prop];
2469
2469
  }
2470
2470
  return target;
@@ -2478,7 +2478,7 @@ class CodedError {
2478
2478
  this.message = message;
2479
2479
  }
2480
2480
  static fromObject(_a) {
2481
- var _b = _a, { message } = _b, options = __objRest$7(_b, ["message"]);
2481
+ var _b = _a, { message } = _b, options = __objRest$8(_b, ["message"]);
2482
2482
  return new CodedError(message, options);
2483
2483
  }
2484
2484
  }
@@ -5243,30 +5243,30 @@ const getEndUserIpAddress = () => __async$s(void 0, null, function* () {
5243
5243
  var __defProp$5 = Object.defineProperty;
5244
5244
  var __defProps$3 = Object.defineProperties;
5245
5245
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
5246
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
5247
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
5248
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
5246
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
5247
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
5248
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
5249
5249
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5250
5250
  var __spreadValues$5 = (a, b) => {
5251
5251
  for (var prop in b || (b = {}))
5252
- if (__hasOwnProp$a.call(b, prop))
5252
+ if (__hasOwnProp$b.call(b, prop))
5253
5253
  __defNormalProp$5(a, prop, b[prop]);
5254
- if (__getOwnPropSymbols$a)
5255
- for (var prop of __getOwnPropSymbols$a(b)) {
5256
- if (__propIsEnum$a.call(b, prop))
5254
+ if (__getOwnPropSymbols$b)
5255
+ for (var prop of __getOwnPropSymbols$b(b)) {
5256
+ if (__propIsEnum$b.call(b, prop))
5257
5257
  __defNormalProp$5(a, prop, b[prop]);
5258
5258
  }
5259
5259
  return a;
5260
5260
  };
5261
5261
  var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
5262
- var __objRest$6 = (source, exclude) => {
5262
+ var __objRest$7 = (source, exclude) => {
5263
5263
  var target = {};
5264
5264
  for (var prop in source)
5265
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
5265
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
5266
5266
  target[prop] = source[prop];
5267
- if (source != null && __getOwnPropSymbols$a)
5268
- for (var prop of __getOwnPropSymbols$a(source)) {
5269
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
5267
+ if (source != null && __getOwnPropSymbols$b)
5268
+ for (var prop of __getOwnPropSymbols$b(source)) {
5269
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
5270
5270
  target[prop] = source[prop];
5271
5271
  }
5272
5272
  return target;
@@ -5301,7 +5301,7 @@ class CarriersAPI {
5301
5301
  return this.client.get(`/v1/carriers/${carrierId}`);
5302
5302
  };
5303
5303
  this.connect = (_a) => __async$r(this, null, function* () {
5304
- var _b = _a, { carrierCode } = _b, connection = __objRest$6(_b, ["carrierCode"]);
5304
+ var _b = _a, { carrierCode } = _b, connection = __objRest$7(_b, ["carrierCode"]);
5305
5305
  const endUserIpAddress = yield getEndUserIpAddress();
5306
5306
  if (!endUserIpAddress)
5307
5307
  return Promise.reject([new CodedError("Unable to get IP address")]);
@@ -7538,17 +7538,17 @@ class CustomPackagesAPI {
7538
7538
  }
7539
7539
 
7540
7540
  var __defProp$4 = Object.defineProperty;
7541
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
7542
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
7543
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
7541
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
7542
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
7543
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
7544
7544
  var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7545
7545
  var __spreadValues$4 = (a, b) => {
7546
7546
  for (var prop in b || (b = {}))
7547
- if (__hasOwnProp$9.call(b, prop))
7547
+ if (__hasOwnProp$a.call(b, prop))
7548
7548
  __defNormalProp$4(a, prop, b[prop]);
7549
- if (__getOwnPropSymbols$9)
7550
- for (var prop of __getOwnPropSymbols$9(b)) {
7551
- if (__propIsEnum$9.call(b, prop))
7549
+ if (__getOwnPropSymbols$a)
7550
+ for (var prop of __getOwnPropSymbols$a(b)) {
7551
+ if (__propIsEnum$a.call(b, prop))
7552
7552
  __defNormalProp$4(a, prop, b[prop]);
7553
7553
  }
7554
7554
  return a;
@@ -7791,17 +7791,17 @@ class WarehousesAPI {
7791
7791
  var __defProp$3 = Object.defineProperty;
7792
7792
  var __defProps$2 = Object.defineProperties;
7793
7793
  var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
7794
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
7795
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
7796
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
7794
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
7795
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
7796
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
7797
7797
  var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7798
7798
  var __spreadValues$3 = (a, b) => {
7799
7799
  for (var prop in b || (b = {}))
7800
- if (__hasOwnProp$8.call(b, prop))
7800
+ if (__hasOwnProp$9.call(b, prop))
7801
7801
  __defNormalProp$3(a, prop, b[prop]);
7802
- if (__getOwnPropSymbols$8)
7803
- for (var prop of __getOwnPropSymbols$8(b)) {
7804
- if (__propIsEnum$8.call(b, prop))
7802
+ if (__getOwnPropSymbols$9)
7803
+ for (var prop of __getOwnPropSymbols$9(b)) {
7804
+ if (__propIsEnum$9.call(b, prop))
7805
7805
  __defNormalProp$3(a, prop, b[prop]);
7806
7806
  }
7807
7807
  return a;
@@ -8026,17 +8026,17 @@ const onError = (errors) => errors.forEach(console.log);
8026
8026
  var __defProp$2 = Object.defineProperty;
8027
8027
  var __defProps$1 = Object.defineProperties;
8028
8028
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
8029
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8030
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8031
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8029
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
8030
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
8031
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
8032
8032
  var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8033
8033
  var __spreadValues$2 = (a, b) => {
8034
8034
  for (var prop in b || (b = {}))
8035
- if (__hasOwnProp$7.call(b, prop))
8035
+ if (__hasOwnProp$8.call(b, prop))
8036
8036
  __defNormalProp$2(a, prop, b[prop]);
8037
- if (__getOwnPropSymbols$7)
8038
- for (var prop of __getOwnPropSymbols$7(b)) {
8039
- if (__propIsEnum$7.call(b, prop))
8037
+ if (__getOwnPropSymbols$8)
8038
+ for (var prop of __getOwnPropSymbols$8(b)) {
8039
+ if (__propIsEnum$8.call(b, prop))
8040
8040
  __defNormalProp$2(a, prop, b[prop]);
8041
8041
  }
8042
8042
  return a;
@@ -8203,17 +8203,17 @@ const useCreateFundingSource = () => {
8203
8203
  });
8204
8204
  };
8205
8205
 
8206
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
8207
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
8208
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
8209
- var __objRest$5 = (source, exclude) => {
8206
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
8207
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
8208
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
8209
+ var __objRest$6 = (source, exclude) => {
8210
8210
  var target = {};
8211
8211
  for (var prop in source)
8212
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
8212
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
8213
8213
  target[prop] = source[prop];
8214
- if (source != null && __getOwnPropSymbols$6)
8215
- for (var prop of __getOwnPropSymbols$6(source)) {
8216
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
8214
+ if (source != null && __getOwnPropSymbols$7)
8215
+ for (var prop of __getOwnPropSymbols$7(source)) {
8216
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
8217
8217
  target[prop] = source[prop];
8218
8218
  }
8219
8219
  return target;
@@ -8242,7 +8242,7 @@ const useCreateLabel = () => {
8242
8242
  const { client } = useShipEngine();
8243
8243
  return useMutation({
8244
8244
  mutationFn: (_a) => __async$j(void 0, null, function* () {
8245
- var _b = _a, { rateId } = _b, options = __objRest$5(_b, ["rateId"]);
8245
+ var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
8246
8246
  const result = yield client.labels.createByRateId(rateId, options);
8247
8247
  return result.data;
8248
8248
  }),
@@ -8283,17 +8283,17 @@ const useCreateRateCard = () => {
8283
8283
  });
8284
8284
  };
8285
8285
 
8286
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
8287
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
8288
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
8289
- var __objRest$4 = (source, exclude) => {
8286
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
8287
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
8288
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
8289
+ var __objRest$5 = (source, exclude) => {
8290
8290
  var target = {};
8291
8291
  for (var prop in source)
8292
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
8292
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
8293
8293
  target[prop] = source[prop];
8294
- if (source != null && __getOwnPropSymbols$5)
8295
- for (var prop of __getOwnPropSymbols$5(source)) {
8296
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
8294
+ if (source != null && __getOwnPropSymbols$6)
8295
+ for (var prop of __getOwnPropSymbols$6(source)) {
8296
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
8297
8297
  target[prop] = source[prop];
8298
8298
  }
8299
8299
  return target;
@@ -8322,7 +8322,7 @@ const useCreateSalesOrderShipment = () => {
8322
8322
  const { client } = useShipEngine();
8323
8323
  return useMutation({
8324
8324
  mutationFn: (_a) => __async$h(void 0, null, function* () {
8325
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
8325
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$5(_b, ["salesOrderId"]);
8326
8326
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
8327
8327
  return result.data;
8328
8328
  }),
@@ -8334,17 +8334,17 @@ const useCreateSalesOrderShipment = () => {
8334
8334
  var __defProp$1 = Object.defineProperty;
8335
8335
  var __defProps = Object.defineProperties;
8336
8336
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8337
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
8338
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
8339
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
8337
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
8338
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
8339
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
8340
8340
  var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8341
8341
  var __spreadValues$1 = (a, b) => {
8342
8342
  for (var prop in b || (b = {}))
8343
- if (__hasOwnProp$4.call(b, prop))
8343
+ if (__hasOwnProp$5.call(b, prop))
8344
8344
  __defNormalProp$1(a, prop, b[prop]);
8345
- if (__getOwnPropSymbols$4)
8346
- for (var prop of __getOwnPropSymbols$4(b)) {
8347
- if (__propIsEnum$4.call(b, prop))
8345
+ if (__getOwnPropSymbols$5)
8346
+ for (var prop of __getOwnPropSymbols$5(b)) {
8347
+ if (__propIsEnum$5.call(b, prop))
8348
8348
  __defNormalProp$1(a, prop, b[prop]);
8349
8349
  }
8350
8350
  return a;
@@ -8730,6 +8730,33 @@ const useListSalesOrders = (params = {}) => {
8730
8730
  });
8731
8731
  };
8732
8732
 
8733
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
8734
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
8735
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
8736
+ var __objRest$4 = (source, exclude) => {
8737
+ var target = {};
8738
+ for (var prop in source)
8739
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
8740
+ target[prop] = source[prop];
8741
+ if (source != null && __getOwnPropSymbols$4)
8742
+ for (var prop of __getOwnPropSymbols$4(source)) {
8743
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
8744
+ target[prop] = source[prop];
8745
+ }
8746
+ return target;
8747
+ };
8748
+ const useListShipments = (_params) => {
8749
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$4(_a, ["enabled"]);
8750
+ const { client } = useShipEngine();
8751
+ return useQuery({
8752
+ enabled,
8753
+ onError,
8754
+ queryFn: () => client.shipments.list(params),
8755
+ queryKey: ["useListShipments", params],
8756
+ select: (result) => result.data
8757
+ });
8758
+ };
8759
+
8733
8760
  const useListWarehouses = (options) => {
8734
8761
  var _a;
8735
8762
  const { client } = useShipEngine();
@@ -9954,4 +9981,4 @@ const alchemy = {
9954
9981
  createElement
9955
9982
  };
9956
9983
 
9957
- export { AccountSettingsAPI, AddressesAPI, Alchemy, AlchemyContext, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, 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, useDeleteWarehouse, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetInsuranceAccount, useGetLabel, useGetSalesOrder, useGetSalesOrderShipment, useGetShipment, useGetShipmentRates, useGetWalletHistory, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListWarehouses, useLoadFonts, useLoadIcons, useLoadTheme, useNotifySalesOrderShipped, useParseAddress, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateSalesOrderShipment, useUpdateWarehouse, useValidateAddresses, useVoidLabel };
9984
+ export { AccountSettingsAPI, AddressesAPI, Alchemy, AlchemyContext, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, 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, useDeleteWarehouse, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetInsuranceAccount, useGetLabel, useGetSalesOrder, useGetSalesOrderShipment, useGetShipment, useGetShipmentRates, useGetWalletHistory, useI18n, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListShipments, useListWarehouses, useLoadFonts, useLoadIcons, useLoadTheme, useNotifySalesOrderShipped, useParseAddress, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateSalesOrderShipment, useUpdateWarehouse, useValidateAddresses, useVoidLabel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/alchemy",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {