@shipengine/react-api 2.15.3 → 3.1.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.mjs CHANGED
@@ -9,6 +9,7 @@ const ShipEngine = ({
9
9
  baseURL,
10
10
  children,
11
11
  headers,
12
+ getSandboxToken,
12
13
  getToken,
13
14
  onApiError,
14
15
  defaultQueryClientOptions = {}
@@ -23,6 +24,7 @@ const ShipEngine = ({
23
24
  const token = getToken();
24
25
  const commonClientProps = {
25
26
  baseURL,
27
+ getSandboxToken,
26
28
  getToken,
27
29
  headers: headers != null ? headers : {},
28
30
  onApiError
@@ -74,25 +76,25 @@ const onError = (_errors) => _default();
74
76
 
75
77
  var o={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},l={};function a(e){return "string"==typeof e?o[e.toLowerCase()]:e}function c(e,r){return c=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},c(e,r)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function f(e,r,t){return f=u()?Reflect.construct:function(e,r,t){var s=[null];s.push.apply(s,r);var i=new(Function.bind.apply(e,s));return t&&c(i,t.prototype),i},f.apply(null,arguments)}function h(e){if(null==e)return e;if(Array.isArray(e))return e.slice();if("object"==typeof e){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t];}),r}return e}function v(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"[ "+e.map(function(e){return v(e)}).join(", ")+" ]":"object"==typeof e?JSON.stringify(e):"function"==typeof e?"[Function: "+e.name+"]":"boolean"==typeof e||"number"==typeof e?e:"'"+e.toString()+"'"}function p(e){if("string"!=typeof e){for(var r=new Array(arguments.length),t=0;t<arguments.length;t++)r[t]=v(arguments[t]);return r.join(" ")}for(var s=/%[sdj%]/g,i=1,n=arguments,o=n.length,l=String(e).replace(s,function(e){if("%%"===e)return "%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return "[Circular]"}default:return e}}),a=n[i];i<o;a=n[++i])l+=null===a||"object"!=typeof a?" "+a:" "+v(a);return l}function m(e,r){var t=e.split("\n");t[0]&&t[0].indexOf("call-stack-error")>=0&&t.shift();var s=t[r],i=null;if(s){var n=/^\s*(at|.*@)\s*(.+)?$/.exec(s);i=Array.isArray(n)&&n[2]?n[2]:s;}return i}Object.keys(o).forEach(function(e){l[o[e]]=e;});var y={};function d(e,r){if(r){if(y[r])return;y[r]=!0;}console.error(e+"\n");}function g(e){return y[e]}function w(){var e=[];return function(r,t){return t&&"object"==typeof t?-1!==e.indexOf(t)?"[Circular]":(e.push(t),t):t}}var b=/*#__PURE__*/function(){function e(){}return e.prototype.write=function(e){e.level<30?console.log(e):e.level<40?console.info(e):e.level<50?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj);},e}(),j=/*#__PURE__*/function(){function e(r,t,s){var i,n,o,l,a=this;if(!(this instanceof e))return new e(r,t);if(void 0!==t&&(i=r,r=t,!(i instanceof e)))throw new TypeError("invalid Logger creation: do not pass a second arg");if(!r)throw new TypeError("options (object) is required");if(i){if(r.name)throw new TypeError("invalid options.name: child cannot set logger name")}else if(!r.name)throw new TypeError("options.name (string) is required");if(r.stream&&r.streams)throw new TypeError('cannot mix "streams" and "stream" options');if(r.streams&&!Array.isArray(r.streams))throw new TypeError("invalid options.streams: must be an array");if(r.serializers&&("object"!=typeof r.serializers||Array.isArray(r.serializers)))throw new TypeError("invalid options.serializers: must be an object");if(i&&s){this._level=i._level,this.streams=i.streams,this.serializers=i.serializers,this.src=i.src,n=this.fields={};var c=Object.keys(i.fields);for(l=0;l<c.length;l++)n[o=c[l]]=i.fields[o];var u=Object.keys(r);for(l=0;l<u.length;l++)n[o=u[l]]=r[o];}else {if(i){for(this._level=i._level,this.streams=[],l=0;l<i.streams.length;l++){var f=h(i.streams[l]);this.streams.push(f);}this.serializers=h(i.serializers),this.src=i.src,this.fields=h(i.fields),r.level&&this.level(r.level);}else this._level=Number.POSITIVE_INFINITY,this.streams=[],this.serializers=null,this.src=!1,this.fields={};r.stream?this.addStream({type:"stream",stream:r.stream,level:r.level}):r.streams?r.streams.forEach(function(e){a.addStream(e,r.level);}):i&&r.level?this.level(r.level):i||this.addStream({type:"raw",stream:new b,level:r.level}),r.serializers&&this.addSerializers(r.serializers),r.src&&(this.src=!0),delete(n=h(r)).stream,delete n.level,delete n.streams,delete n.serializers,delete n.src,this.serializers&&this._applySerializers(n),Object.keys(n).forEach(function(e){a.fields[e]=n[e];});}}var r=e.prototype;return r.addStream=function(e,r){void 0===r&&(r=30),(e=h(e)).type="raw",e.level=a(e.level||r),e.level<this._level&&(this._level=e.level),this.streams.push(e),delete this.haveNonRawStreams;},r.addSerializers=function(e){var r=this;this.serializers||(this.serializers={}),Object.keys(e).forEach(function(t){var s=e[t];if("function"!=typeof s)throw new TypeError(p('invalid serializer for "%s" field: must be a function',t));r.serializers[t]=s;});},r.child=function(e,r){return new this.constructor(this,e||{},r)},r.level=function(e){if(void 0===e)return this._level;for(var r=a(e),t=this.streams.length,s=0;s<t;s++)this.streams[s].level=r;this._level=r;},r.levels=function(e,r){if(void 0===e)return this.streams.map(function(e){return e.level});var t;if("number"==typeof e){if(void 0===(t=this.streams[e]))throw new Error("invalid stream index: "+e)}else {for(var s=this.streams.length,i=0;i<s;i++){var n=this.streams[i];if(n.name===e){t=n;break}}if(!t)throw new Error(p('no stream with name "%s"',e))}if(void 0===r)return t.level;var o=a(r);t.level=o,o<this._level&&(this._level=o);},r._applySerializers=function(e,r){var t=this;Object.keys(this.serializers).forEach(function(s){if(!(void 0===e[s]||r&&r[s]))try{e[s]=t.serializers[s](e[s]);}catch(r){d(p('bunyan: ERROR: Exception thrown from the "%s" Bunyan serializer. This should never happen. This is a bugin that serializer function.\n%s',s,r.stack||r)),e[s]=p('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)',s);}});},r._emit=function(e,r){var t,s;if(void 0===this.haveNonRawStreams)for(this.haveNonRawStreams=!1,t=0;t<this.streams.length;t++)if(!this.streams[t].raw){this.haveNonRawStreams=!0;break}if(r||this.haveNonRawStreams)try{s=JSON.stringify(e,w())+"\n";}catch(r){var i=r.stack.split(/\n/g,2).join("\n");d('bunyan: ERROR: Exception in `JSON.stringify(rec)`. You can install the "safe-json-stringify" module to have Bunyan fallback to safer stringification. Record:\n'+function(e,r){return r||(r=" "),r+e.split(/\r?\n/g).join("\n"+r)}(p("%s\n%s",e,r.stack)),i),s=p("(Exception in JSON.stringify(rec): %j. See stderr for details.)\n",r.message);}if(r)return s;var n=e.level;for(t=0;t<this.streams.length;t++){var o=this.streams[t];o.level<=n&&o.stream.write(e);}return s},e}();function z(e){return function(){var r=this;function t(t){var n;t[0]instanceof Error?(s={err:r.serializers&&r.serializers.err?r.serializers.err(t[0]):k.err(t[0])},n={err:!0},i=1===t.length?[s.err.message]:Array.prototype.slice.call(t,1)):"object"!=typeof t[0]&&null!==t[0]||Array.isArray(t[0])?(s=null,i=Array.prototype.slice.call(t)):(s=t[0],i=1===t.length&&s.err&&s.err instanceof Error?[s.err.message]:Array.prototype.slice.call(t,1));var o=h(r.fields);o.level=e;var a=s?h(s):null;if(a&&(r.serializers&&r._applySerializers(a,n),Object.keys(a).forEach(function(e){o[e]=a[e];})),o.levelName=l[e],o.msg=i.length?p.apply(r,i):"",o.time||(o.time=new Date),r.src&&!o.src)try{throw new Error("call-stack-error")}catch(e){var c=e.stack?m(e.stack,2):"";c||g("src")||d("Unable to determine src line info","src"),o.src=c||"";}return o.v=1,o}var s=null,i=arguments,n=null;if(0===arguments.length)return this._level<=e;this._level>e||(n=t(i),this._emit(n));}}function S(e){var r=e.stack||e.toString();if(e.cause&&"function"==typeof e.cause){var t=e.cause();t&&(r+="\nCaused by: "+S(t));}return r}j.prototype.trace=z(10),j.prototype.debug=z(20),j.prototype.info=z(30),j.prototype.warn=z(40),j.prototype.error=z(50),j.prototype.fatal=z(60);var k={err:function(e){return e&&e.stack?{message:e.message,name:e.name,stack:S(e),code:e.code,signal:e.signal}:e}};function E(){return f(j,[].slice.call(arguments))}var A={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},R=/*#__PURE__*/function(){function e(e){var r=void 0===e?{}:e,t=r.logByLevel,s=r.css,i=void 0===s?A:s;this.logByLevel=void 0!==t&&t,this.css=i;}return e.prototype.write=function(e){var r,t,s=this.css.def,i=this.css.msg,n=this.css.src,o=e.childName?e.name+"/"+e.childName:e.name,a=l[e.level],c=(Array(6-a.length).join(" ")+a).toUpperCase();this.logByLevel?(10===e.level?a="debug":60===e.level&&(a="error"),t="function"==typeof console[a]?console[a]:console.log):t=console.log,r=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var u=function(e,r){return Array(r+1-(e+"").length).join("0")+e},f=[];f.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),f.push(u(e.time.getHours(),2)),f.push(u(e.time.getMinutes(),2)),f.push(u(e.time.getSeconds(),2)),f.push(u(e.time.getMilliseconds(),4)),f.push(r),f.push(c),f.push(s),f.push(o),f.push(i),f.push(e.msg),e.src&&(f.push(n),f.push(e.src)),e.obj&&(f.push("\n"),f.push(e.obj)),e.err&&e.err.stack&&(f.push("\n"),f.push(e.err.stack)),t.apply(console,f);},e.getDefaultCss=function(){return A},e}();
76
78
 
77
- var __defProp$b = Object.defineProperty;
78
- var __defProps$b = Object.defineProperties;
79
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
80
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
81
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
82
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
83
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
84
- var __spreadValues$b = (a, b) => {
79
+ var __defProp$g = Object.defineProperty;
80
+ var __defProps$g = Object.defineProperties;
81
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
82
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
83
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
84
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
85
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
+ var __spreadValues$g = (a, b) => {
85
87
  for (var prop in b || (b = {}))
86
- if (__hasOwnProp$m.call(b, prop))
87
- __defNormalProp$b(a, prop, b[prop]);
88
- if (__getOwnPropSymbols$m)
89
- for (var prop of __getOwnPropSymbols$m(b)) {
90
- if (__propIsEnum$m.call(b, prop))
91
- __defNormalProp$b(a, prop, b[prop]);
88
+ if (__hasOwnProp$q.call(b, prop))
89
+ __defNormalProp$g(a, prop, b[prop]);
90
+ if (__getOwnPropSymbols$q)
91
+ for (var prop of __getOwnPropSymbols$q(b)) {
92
+ if (__propIsEnum$q.call(b, prop))
93
+ __defNormalProp$g(a, prop, b[prop]);
92
94
  }
93
95
  return a;
94
96
  };
95
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
97
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
96
98
  const streams = [];
97
99
  if (process.env.NODE_ENV === "production") {
98
100
  streams.push({
@@ -101,7 +103,7 @@ if (process.env.NODE_ENV === "production") {
101
103
  }
102
104
  const logger = E({
103
105
  name: "shipengine",
104
- serializers: __spreadProps$b(__spreadValues$b({}, k), {
106
+ serializers: __spreadProps$g(__spreadValues$g({}, k), {
105
107
  req: (req) => ({
106
108
  headers: req.headers,
107
109
  method: req.method,
@@ -502,27 +504,59 @@ const useGetServicesByCarrier = (carrierId) => {
502
504
  });
503
505
  };
504
506
 
505
- const useListCarriers = () => {
507
+ var __defProp$f = Object.defineProperty;
508
+ var __defProps$f = Object.defineProperties;
509
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
510
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
511
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
512
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
513
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
514
+ var __spreadValues$f = (a, b) => {
515
+ for (var prop in b || (b = {}))
516
+ if (__hasOwnProp$p.call(b, prop))
517
+ __defNormalProp$f(a, prop, b[prop]);
518
+ if (__getOwnPropSymbols$p)
519
+ for (var prop of __getOwnPropSymbols$p(b)) {
520
+ if (__propIsEnum$p.call(b, prop))
521
+ __defNormalProp$f(a, prop, b[prop]);
522
+ }
523
+ return a;
524
+ };
525
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
526
+ var __objRest$j = (source, exclude) => {
527
+ var target = {};
528
+ for (var prop in source)
529
+ if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
530
+ target[prop] = source[prop];
531
+ if (source != null && __getOwnPropSymbols$p)
532
+ for (var prop of __getOwnPropSymbols$p(source)) {
533
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
534
+ target[prop] = source[prop];
535
+ }
536
+ return target;
537
+ };
538
+ const useListCarriers = (params) => {
506
539
  const { client } = useShipEngine();
507
- return useQuery({
540
+ const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
541
+ return useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
508
542
  onError,
509
- queryFn: () => client.carriers.list(),
510
- queryKey: ["useListCarriers"],
543
+ queryFn: () => client.carriers.list(queryFnParams),
544
+ queryKey: ["useListCarriers", queryFnParams],
511
545
  select: (result) => result.data.carriers
512
- });
546
+ }));
513
547
  };
514
548
 
515
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
516
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
517
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
518
- var __objRest$e = (source, exclude) => {
549
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
550
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
551
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
552
+ var __objRest$i = (source, exclude) => {
519
553
  var target = {};
520
554
  for (var prop in source)
521
- if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
555
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
522
556
  target[prop] = source[prop];
523
- if (source != null && __getOwnPropSymbols$l)
524
- for (var prop of __getOwnPropSymbols$l(source)) {
525
- if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
557
+ if (source != null && __getOwnPropSymbols$o)
558
+ for (var prop of __getOwnPropSymbols$o(source)) {
559
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
526
560
  target[prop] = source[prop];
527
561
  }
528
562
  return target;
@@ -552,7 +586,7 @@ const useUpdateAutoFunding = () => {
552
586
  const queryClient = useQueryClient();
553
587
  return useMutation({
554
588
  mutationFn: (_a) => __async$z(void 0, null, function* () {
555
- var _b = _a, { carrierId } = _b, options = __objRest$e(_b, ["carrierId"]);
589
+ var _b = _a, { carrierId } = _b, options = __objRest$i(_b, ["carrierId"]);
556
590
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
557
591
  return result.data;
558
592
  }),
@@ -613,24 +647,24 @@ const useDeleteCarrier = () => {
613
647
  });
614
648
  };
615
649
 
616
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
617
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
618
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
619
- var __objRest$d = (source, exclude) => {
650
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
651
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
652
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
653
+ var __objRest$h = (source, exclude) => {
620
654
  var target = {};
621
655
  for (var prop in source)
622
- if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
656
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
623
657
  target[prop] = source[prop];
624
- if (source != null && __getOwnPropSymbols$k)
625
- for (var prop of __getOwnPropSymbols$k(source)) {
626
- if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
658
+ if (source != null && __getOwnPropSymbols$n)
659
+ for (var prop of __getOwnPropSymbols$n(source)) {
660
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
627
661
  target[prop] = source[prop];
628
662
  }
629
663
  return target;
630
664
  };
631
665
  const useGetCarrierConnectionForm = (_params) => {
632
666
  const { client } = useShipEngine();
633
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$d(_a, ["carrierName", "enabled"]);
667
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$h(_a, ["carrierName", "enabled"]);
634
668
  return useQuery({
635
669
  enabled,
636
670
  onError,
@@ -640,24 +674,24 @@ const useGetCarrierConnectionForm = (_params) => {
640
674
  });
641
675
  };
642
676
 
643
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
644
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
645
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
646
- var __objRest$c = (source, exclude) => {
677
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
678
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
679
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
680
+ var __objRest$g = (source, exclude) => {
647
681
  var target = {};
648
682
  for (var prop in source)
649
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
683
+ if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
650
684
  target[prop] = source[prop];
651
- if (source != null && __getOwnPropSymbols$j)
652
- for (var prop of __getOwnPropSymbols$j(source)) {
653
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
685
+ if (source != null && __getOwnPropSymbols$m)
686
+ for (var prop of __getOwnPropSymbols$m(source)) {
687
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
654
688
  target[prop] = source[prop];
655
689
  }
656
690
  return target;
657
691
  };
658
692
  const useListCarrierConnections = (_params) => {
659
693
  const { client } = useShipEngine();
660
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$c(_a, ["enabled"]);
694
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$g(_a, ["enabled"]);
661
695
  return useQuery({
662
696
  enabled,
663
697
  onError,
@@ -710,33 +744,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
710
744
  });
711
745
  };
712
746
 
713
- var __defProp$a = Object.defineProperty;
714
- var __defProps$a = Object.defineProperties;
715
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
716
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
717
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
718
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
719
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
720
- var __spreadValues$a = (a, b) => {
747
+ var __defProp$e = Object.defineProperty;
748
+ var __defProps$e = Object.defineProperties;
749
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
750
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
751
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
752
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
753
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
754
+ var __spreadValues$e = (a, b) => {
721
755
  for (var prop in b || (b = {}))
722
- if (__hasOwnProp$i.call(b, prop))
723
- __defNormalProp$a(a, prop, b[prop]);
724
- if (__getOwnPropSymbols$i)
725
- for (var prop of __getOwnPropSymbols$i(b)) {
726
- if (__propIsEnum$i.call(b, prop))
727
- __defNormalProp$a(a, prop, b[prop]);
756
+ if (__hasOwnProp$l.call(b, prop))
757
+ __defNormalProp$e(a, prop, b[prop]);
758
+ if (__getOwnPropSymbols$l)
759
+ for (var prop of __getOwnPropSymbols$l(b)) {
760
+ if (__propIsEnum$l.call(b, prop))
761
+ __defNormalProp$e(a, prop, b[prop]);
728
762
  }
729
763
  return a;
730
764
  };
731
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
732
- var __objRest$b = (source, exclude) => {
765
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
766
+ var __objRest$f = (source, exclude) => {
733
767
  var target = {};
734
768
  for (var prop in source)
735
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
769
+ if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
736
770
  target[prop] = source[prop];
737
- if (source != null && __getOwnPropSymbols$i)
738
- for (var prop of __getOwnPropSymbols$i(source)) {
739
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
771
+ if (source != null && __getOwnPropSymbols$l)
772
+ for (var prop of __getOwnPropSymbols$l(source)) {
773
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
740
774
  target[prop] = source[prop];
741
775
  }
742
776
  return target;
@@ -744,12 +778,12 @@ var __objRest$b = (source, exclude) => {
744
778
  const useGetConnectionsCarrierSettings = (_a) => {
745
779
  var _b = _a, {
746
780
  queryFnParams
747
- } = _b, params = __objRest$b(_b, [
781
+ } = _b, params = __objRest$f(_b, [
748
782
  "queryFnParams"
749
783
  ]);
750
784
  const { client } = useShipEngine();
751
785
  const { carrierName, carrierCode } = queryFnParams;
752
- return useQuery(__spreadProps$a(__spreadValues$a({}, params), {
786
+ return useQuery(__spreadProps$e(__spreadValues$e({}, params), {
753
787
  onError,
754
788
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
755
789
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
@@ -757,25 +791,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
757
791
  }));
758
792
  };
759
793
 
760
- var __defProp$9 = Object.defineProperty;
761
- var __defProps$9 = Object.defineProperties;
762
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
763
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
764
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
765
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
766
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
767
- var __spreadValues$9 = (a, b) => {
794
+ var __defProp$d = Object.defineProperty;
795
+ var __defProps$d = Object.defineProperties;
796
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
797
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
798
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
799
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
800
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
801
+ var __spreadValues$d = (a, b) => {
768
802
  for (var prop in b || (b = {}))
769
- if (__hasOwnProp$h.call(b, prop))
770
- __defNormalProp$9(a, prop, b[prop]);
771
- if (__getOwnPropSymbols$h)
772
- for (var prop of __getOwnPropSymbols$h(b)) {
773
- if (__propIsEnum$h.call(b, prop))
774
- __defNormalProp$9(a, prop, b[prop]);
803
+ if (__hasOwnProp$k.call(b, prop))
804
+ __defNormalProp$d(a, prop, b[prop]);
805
+ if (__getOwnPropSymbols$k)
806
+ for (var prop of __getOwnPropSymbols$k(b)) {
807
+ if (__propIsEnum$k.call(b, prop))
808
+ __defNormalProp$d(a, prop, b[prop]);
775
809
  }
776
810
  return a;
777
811
  };
778
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
812
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
779
813
  var __async$w = (__this, __arguments, generator) => {
780
814
  return new Promise((resolve, reject) => {
781
815
  var fulfilled = (value) => {
@@ -798,7 +832,7 @@ var __async$w = (__this, __arguments, generator) => {
798
832
  };
799
833
  const useUpdateConnectionsCarrierSettings = (params) => {
800
834
  const { client } = useShipEngine();
801
- return useMutation(__spreadProps$9(__spreadValues$9({}, params), {
835
+ return useMutation(__spreadProps$d(__spreadValues$d({}, params), {
802
836
  mutationFn: (_0) => __async$w(void 0, [_0], function* ({
803
837
  carrierName,
804
838
  carrierCode,
@@ -1029,17 +1063,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
1029
1063
  });
1030
1064
  };
1031
1065
 
1032
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1033
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1034
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1035
- var __objRest$a = (source, exclude) => {
1066
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1067
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1068
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1069
+ var __objRest$e = (source, exclude) => {
1036
1070
  var target = {};
1037
1071
  for (var prop in source)
1038
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1072
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
1039
1073
  target[prop] = source[prop];
1040
- if (source != null && __getOwnPropSymbols$g)
1041
- for (var prop of __getOwnPropSymbols$g(source)) {
1042
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1074
+ if (source != null && __getOwnPropSymbols$j)
1075
+ for (var prop of __getOwnPropSymbols$j(source)) {
1076
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
1043
1077
  target[prop] = source[prop];
1044
1078
  }
1045
1079
  return target;
@@ -1068,7 +1102,7 @@ const useAddInsuranceFunds = () => {
1068
1102
  const { client } = useShipEngine();
1069
1103
  return useMutation({
1070
1104
  mutationFn: (_a) => __async$r(void 0, null, function* () {
1071
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$a(_b, ["insuranceProvider"]);
1105
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$e(_b, ["insuranceProvider"]);
1072
1106
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
1073
1107
  return result.data;
1074
1108
  }),
@@ -1077,17 +1111,17 @@ const useAddInsuranceFunds = () => {
1077
1111
  });
1078
1112
  };
1079
1113
 
1080
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1081
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1082
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1083
- var __objRest$9 = (source, exclude) => {
1114
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1115
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1116
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1117
+ var __objRest$d = (source, exclude) => {
1084
1118
  var target = {};
1085
1119
  for (var prop in source)
1086
- if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1120
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
1087
1121
  target[prop] = source[prop];
1088
- if (source != null && __getOwnPropSymbols$f)
1089
- for (var prop of __getOwnPropSymbols$f(source)) {
1090
- if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1122
+ if (source != null && __getOwnPropSymbols$i)
1123
+ for (var prop of __getOwnPropSymbols$i(source)) {
1124
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
1091
1125
  target[prop] = source[prop];
1092
1126
  }
1093
1127
  return target;
@@ -1116,7 +1150,7 @@ const useCreateLabel = () => {
1116
1150
  const { client } = useShipEngine();
1117
1151
  return useMutation({
1118
1152
  mutationFn: (_a) => __async$q(void 0, null, function* () {
1119
- var _b = _a, { rateId } = _b, options = __objRest$9(_b, ["rateId"]);
1153
+ var _b = _a, { rateId } = _b, options = __objRest$d(_b, ["rateId"]);
1120
1154
  const result = yield client.labels.createByRateId(rateId, options);
1121
1155
  return result.data;
1122
1156
  }),
@@ -1140,31 +1174,46 @@ const useGetLabel = (labelId) => {
1140
1174
  });
1141
1175
  };
1142
1176
 
1143
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1144
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1145
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1146
- var __objRest$8 = (source, exclude) => {
1177
+ var __defProp$c = Object.defineProperty;
1178
+ var __defProps$c = Object.defineProperties;
1179
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
1180
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1181
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1182
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1183
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1184
+ var __spreadValues$c = (a, b) => {
1185
+ for (var prop in b || (b = {}))
1186
+ if (__hasOwnProp$h.call(b, prop))
1187
+ __defNormalProp$c(a, prop, b[prop]);
1188
+ if (__getOwnPropSymbols$h)
1189
+ for (var prop of __getOwnPropSymbols$h(b)) {
1190
+ if (__propIsEnum$h.call(b, prop))
1191
+ __defNormalProp$c(a, prop, b[prop]);
1192
+ }
1193
+ return a;
1194
+ };
1195
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
1196
+ var __objRest$c = (source, exclude) => {
1147
1197
  var target = {};
1148
1198
  for (var prop in source)
1149
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1199
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1150
1200
  target[prop] = source[prop];
1151
- if (source != null && __getOwnPropSymbols$e)
1152
- for (var prop of __getOwnPropSymbols$e(source)) {
1153
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
1201
+ if (source != null && __getOwnPropSymbols$h)
1202
+ for (var prop of __getOwnPropSymbols$h(source)) {
1203
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1154
1204
  target[prop] = source[prop];
1155
1205
  }
1156
1206
  return target;
1157
1207
  };
1158
- const useListLabels = (_params) => {
1208
+ const useListLabels = (params) => {
1159
1209
  const { client } = useShipEngine();
1160
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
1161
- return useQuery({
1162
- enabled,
1210
+ const _a = params, { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
1211
+ return useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
1163
1212
  onError,
1164
- queryFn: () => client.labels.list(params),
1213
+ queryFn: () => client.labels.list(queryFnParams),
1165
1214
  queryKey: ["useListLabels", params],
1166
1215
  select: (result) => result.data
1167
- });
1216
+ }));
1168
1217
  };
1169
1218
 
1170
1219
  var __async$p = (__this, __arguments, generator) => {
@@ -1578,17 +1627,17 @@ const useListSalesOrders = (params = {}) => {
1578
1627
  });
1579
1628
  };
1580
1629
 
1581
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1582
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1583
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1584
- var __objRest$7 = (source, exclude) => {
1630
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1631
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1632
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1633
+ var __objRest$b = (source, exclude) => {
1585
1634
  var target = {};
1586
1635
  for (var prop in source)
1587
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
1636
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1588
1637
  target[prop] = source[prop];
1589
- if (source != null && __getOwnPropSymbols$d)
1590
- for (var prop of __getOwnPropSymbols$d(source)) {
1591
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
1638
+ if (source != null && __getOwnPropSymbols$g)
1639
+ for (var prop of __getOwnPropSymbols$g(source)) {
1640
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1592
1641
  target[prop] = source[prop];
1593
1642
  }
1594
1643
  return target;
@@ -1617,7 +1666,7 @@ const useNotifySalesOrderShipped = () => {
1617
1666
  const { client } = useShipEngine();
1618
1667
  return useMutation({
1619
1668
  mutationFn: (_a) => __async$f(void 0, null, function* () {
1620
- var _b = _a, { salesOrderId } = _b, tracking = __objRest$7(_b, ["salesOrderId"]);
1669
+ var _b = _a, { salesOrderId } = _b, tracking = __objRest$b(_b, ["salesOrderId"]);
1621
1670
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1622
1671
  return result.data;
1623
1672
  }),
@@ -1626,17 +1675,17 @@ const useNotifySalesOrderShipped = () => {
1626
1675
  });
1627
1676
  };
1628
1677
 
1629
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1630
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1631
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1632
- var __objRest$6 = (source, exclude) => {
1678
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1679
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1680
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1681
+ var __objRest$a = (source, exclude) => {
1633
1682
  var target = {};
1634
1683
  for (var prop in source)
1635
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1684
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1636
1685
  target[prop] = source[prop];
1637
- if (source != null && __getOwnPropSymbols$c)
1638
- for (var prop of __getOwnPropSymbols$c(source)) {
1639
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1686
+ if (source != null && __getOwnPropSymbols$f)
1687
+ for (var prop of __getOwnPropSymbols$f(source)) {
1688
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1640
1689
  target[prop] = source[prop];
1641
1690
  }
1642
1691
  return target;
@@ -1665,7 +1714,7 @@ const useCreateSalesOrderShipment = () => {
1665
1714
  const { client } = useShipEngine();
1666
1715
  return useMutation({
1667
1716
  mutationFn: (_a) => __async$e(void 0, null, function* () {
1668
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$6(_b, ["salesOrderId"]);
1717
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$a(_b, ["salesOrderId"]);
1669
1718
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1670
1719
  return result.data;
1671
1720
  }),
@@ -1700,17 +1749,17 @@ const useListSalesOrderShipments = (params) => {
1700
1749
  });
1701
1750
  };
1702
1751
 
1703
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1704
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1705
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1706
- var __objRest$5 = (source, exclude) => {
1752
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1753
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1754
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1755
+ var __objRest$9 = (source, exclude) => {
1707
1756
  var target = {};
1708
1757
  for (var prop in source)
1709
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1758
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1710
1759
  target[prop] = source[prop];
1711
- if (source != null && __getOwnPropSymbols$b)
1712
- for (var prop of __getOwnPropSymbols$b(source)) {
1713
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1760
+ if (source != null && __getOwnPropSymbols$e)
1761
+ for (var prop of __getOwnPropSymbols$e(source)) {
1762
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
1714
1763
  target[prop] = source[prop];
1715
1764
  }
1716
1765
  return target;
@@ -1739,7 +1788,7 @@ const useUpdateSalesOrderShipment = () => {
1739
1788
  const { client } = useShipEngine();
1740
1789
  return useMutation({
1741
1790
  mutationFn: (_a) => __async$d(void 0, null, function* () {
1742
- var _b = _a, { shipmentId } = _b, shipment = __objRest$5(_b, ["shipmentId"]);
1791
+ var _b = _a, { shipmentId } = _b, shipment = __objRest$9(_b, ["shipmentId"]);
1743
1792
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1744
1793
  return result.data;
1745
1794
  }),
@@ -1748,25 +1797,25 @@ const useUpdateSalesOrderShipment = () => {
1748
1797
  });
1749
1798
  };
1750
1799
 
1751
- var __defProp$8 = Object.defineProperty;
1752
- var __defProps$8 = Object.defineProperties;
1753
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1754
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1755
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1756
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1757
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1758
- var __spreadValues$8 = (a, b) => {
1800
+ var __defProp$b = Object.defineProperty;
1801
+ var __defProps$b = Object.defineProperties;
1802
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1803
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1804
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1805
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1806
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1807
+ var __spreadValues$b = (a, b) => {
1759
1808
  for (var prop in b || (b = {}))
1760
- if (__hasOwnProp$a.call(b, prop))
1761
- __defNormalProp$8(a, prop, b[prop]);
1762
- if (__getOwnPropSymbols$a)
1763
- for (var prop of __getOwnPropSymbols$a(b)) {
1764
- if (__propIsEnum$a.call(b, prop))
1765
- __defNormalProp$8(a, prop, b[prop]);
1809
+ if (__hasOwnProp$d.call(b, prop))
1810
+ __defNormalProp$b(a, prop, b[prop]);
1811
+ if (__getOwnPropSymbols$d)
1812
+ for (var prop of __getOwnPropSymbols$d(b)) {
1813
+ if (__propIsEnum$d.call(b, prop))
1814
+ __defNormalProp$b(a, prop, b[prop]);
1766
1815
  }
1767
1816
  return a;
1768
1817
  };
1769
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
1818
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1770
1819
  var __async$c = (__this, __arguments, generator) => {
1771
1820
  return new Promise((resolve, reject) => {
1772
1821
  var fulfilled = (value) => {
@@ -1808,7 +1857,7 @@ const useCreateShipment = () => {
1808
1857
  postalCode: "",
1809
1858
  stateProvince: ""
1810
1859
  };
1811
- return (yield client.shipments.create(__spreadProps$8(__spreadValues$8({}, shipment), {
1860
+ return (yield client.shipments.create(__spreadProps$b(__spreadValues$b({}, shipment), {
1812
1861
  shipTo
1813
1862
  }))).data;
1814
1863
  }),
@@ -1833,33 +1882,33 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
1833
1882
  });
1834
1883
  };
1835
1884
 
1836
- var __defProp$7 = Object.defineProperty;
1837
- var __defProps$7 = Object.defineProperties;
1838
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1839
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1840
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1841
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1842
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1843
- var __spreadValues$7 = (a, b) => {
1885
+ var __defProp$a = Object.defineProperty;
1886
+ var __defProps$a = Object.defineProperties;
1887
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1888
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1889
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1890
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1891
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1892
+ var __spreadValues$a = (a, b) => {
1844
1893
  for (var prop in b || (b = {}))
1845
- if (__hasOwnProp$9.call(b, prop))
1846
- __defNormalProp$7(a, prop, b[prop]);
1847
- if (__getOwnPropSymbols$9)
1848
- for (var prop of __getOwnPropSymbols$9(b)) {
1849
- if (__propIsEnum$9.call(b, prop))
1850
- __defNormalProp$7(a, prop, b[prop]);
1894
+ if (__hasOwnProp$c.call(b, prop))
1895
+ __defNormalProp$a(a, prop, b[prop]);
1896
+ if (__getOwnPropSymbols$c)
1897
+ for (var prop of __getOwnPropSymbols$c(b)) {
1898
+ if (__propIsEnum$c.call(b, prop))
1899
+ __defNormalProp$a(a, prop, b[prop]);
1851
1900
  }
1852
1901
  return a;
1853
1902
  };
1854
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1855
- var __objRest$4 = (source, exclude) => {
1903
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1904
+ var __objRest$8 = (source, exclude) => {
1856
1905
  var target = {};
1857
1906
  for (var prop in source)
1858
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1907
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1859
1908
  target[prop] = source[prop];
1860
- if (source != null && __getOwnPropSymbols$9)
1861
- for (var prop of __getOwnPropSymbols$9(source)) {
1862
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
1909
+ if (source != null && __getOwnPropSymbols$c)
1910
+ for (var prop of __getOwnPropSymbols$c(source)) {
1911
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1863
1912
  target[prop] = source[prop];
1864
1913
  }
1865
1914
  return target;
@@ -1870,12 +1919,12 @@ const useGetShipment = (params) => {
1870
1919
  const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
1871
1920
  const getQueryProps = () => {
1872
1921
  if (typeof params !== "string") {
1873
- const _a2 = params, rest = __objRest$4(_a2, ["queryFnParams"]);
1922
+ const _a2 = params, rest = __objRest$8(_a2, ["queryFnParams"]);
1874
1923
  return rest;
1875
1924
  }
1876
1925
  return {};
1877
1926
  };
1878
- return useQuery(__spreadProps$7(__spreadValues$7({}, getQueryProps()), {
1927
+ return useQuery(__spreadProps$a(__spreadValues$a({}, getQueryProps()), {
1879
1928
  enabled: shipmentId !== void 0,
1880
1929
  onError,
1881
1930
  queryFn: () => {
@@ -1889,23 +1938,23 @@ const useGetShipment = (params) => {
1889
1938
  }));
1890
1939
  };
1891
1940
 
1892
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1893
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1894
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1895
- var __objRest$3 = (source, exclude) => {
1941
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1942
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1943
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1944
+ var __objRest$7 = (source, exclude) => {
1896
1945
  var target = {};
1897
1946
  for (var prop in source)
1898
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1947
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1899
1948
  target[prop] = source[prop];
1900
- if (source != null && __getOwnPropSymbols$8)
1901
- for (var prop of __getOwnPropSymbols$8(source)) {
1902
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
1949
+ if (source != null && __getOwnPropSymbols$b)
1950
+ for (var prop of __getOwnPropSymbols$b(source)) {
1951
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1903
1952
  target[prop] = source[prop];
1904
1953
  }
1905
1954
  return target;
1906
1955
  };
1907
1956
  const useListShipments = (_params) => {
1908
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$3(_a, ["enabled"]);
1957
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$7(_a, ["enabled"]);
1909
1958
  const { client } = useShipEngine();
1910
1959
  return useQuery({
1911
1960
  enabled,
@@ -1916,41 +1965,41 @@ const useListShipments = (_params) => {
1916
1965
  });
1917
1966
  };
1918
1967
 
1919
- var __defProp$6 = Object.defineProperty;
1920
- var __defProps$6 = Object.defineProperties;
1921
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1922
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1923
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1924
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1925
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1926
- var __spreadValues$6 = (a, b) => {
1968
+ var __defProp$9 = Object.defineProperty;
1969
+ var __defProps$9 = Object.defineProperties;
1970
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1971
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1972
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1973
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1974
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1975
+ var __spreadValues$9 = (a, b) => {
1927
1976
  for (var prop in b || (b = {}))
1928
- if (__hasOwnProp$7.call(b, prop))
1929
- __defNormalProp$6(a, prop, b[prop]);
1930
- if (__getOwnPropSymbols$7)
1931
- for (var prop of __getOwnPropSymbols$7(b)) {
1932
- if (__propIsEnum$7.call(b, prop))
1933
- __defNormalProp$6(a, prop, b[prop]);
1977
+ if (__hasOwnProp$a.call(b, prop))
1978
+ __defNormalProp$9(a, prop, b[prop]);
1979
+ if (__getOwnPropSymbols$a)
1980
+ for (var prop of __getOwnPropSymbols$a(b)) {
1981
+ if (__propIsEnum$a.call(b, prop))
1982
+ __defNormalProp$9(a, prop, b[prop]);
1934
1983
  }
1935
1984
  return a;
1936
1985
  };
1937
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1938
- var __objRest$2 = (source, exclude) => {
1986
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
1987
+ var __objRest$6 = (source, exclude) => {
1939
1988
  var target = {};
1940
1989
  for (var prop in source)
1941
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
1990
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
1942
1991
  target[prop] = source[prop];
1943
- if (source != null && __getOwnPropSymbols$7)
1944
- for (var prop of __getOwnPropSymbols$7(source)) {
1945
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
1992
+ if (source != null && __getOwnPropSymbols$a)
1993
+ for (var prop of __getOwnPropSymbols$a(source)) {
1994
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
1946
1995
  target[prop] = source[prop];
1947
1996
  }
1948
1997
  return target;
1949
1998
  };
1950
1999
  const useGetShipmentByExternalId = (params) => {
1951
2000
  const { client } = useShipEngine();
1952
- const _a = params, { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
1953
- return useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
2001
+ const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
2002
+ return useQuery(__spreadProps$9(__spreadValues$9({}, rest), {
1954
2003
  onError,
1955
2004
  queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
1956
2005
  queryKey: ["useGetShipmentByExternalId", queryFnParams],
@@ -1958,33 +2007,46 @@ const useGetShipmentByExternalId = (params) => {
1958
2007
  }));
1959
2008
  };
1960
2009
 
1961
- var __defProp$5 = Object.defineProperty;
1962
- var __defProps$5 = Object.defineProperties;
1963
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1964
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1965
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1966
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1967
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1968
- var __spreadValues$5 = (a, b) => {
2010
+ var __defProp$8 = Object.defineProperty;
2011
+ var __defProps$8 = Object.defineProperties;
2012
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2013
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2014
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2015
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2016
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2017
+ var __spreadValues$8 = (a, b) => {
1969
2018
  for (var prop in b || (b = {}))
1970
- if (__hasOwnProp$6.call(b, prop))
1971
- __defNormalProp$5(a, prop, b[prop]);
1972
- if (__getOwnPropSymbols$6)
1973
- for (var prop of __getOwnPropSymbols$6(b)) {
1974
- if (__propIsEnum$6.call(b, prop))
1975
- __defNormalProp$5(a, prop, b[prop]);
2019
+ if (__hasOwnProp$9.call(b, prop))
2020
+ __defNormalProp$8(a, prop, b[prop]);
2021
+ if (__getOwnPropSymbols$9)
2022
+ for (var prop of __getOwnPropSymbols$9(b)) {
2023
+ if (__propIsEnum$9.call(b, prop))
2024
+ __defNormalProp$8(a, prop, b[prop]);
1976
2025
  }
1977
2026
  return a;
1978
2027
  };
1979
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2028
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2029
+ var __objRest$5 = (source, exclude) => {
2030
+ var target = {};
2031
+ for (var prop in source)
2032
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2033
+ target[prop] = source[prop];
2034
+ if (source != null && __getOwnPropSymbols$9)
2035
+ for (var prop of __getOwnPropSymbols$9(source)) {
2036
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2037
+ target[prop] = source[prop];
2038
+ }
2039
+ return target;
2040
+ };
1980
2041
  const useListShippingRules = (params) => {
1981
2042
  const { client } = useShipEngine();
1982
- return useQuery(__spreadProps$5(__spreadValues$5({}, params), {
2043
+ const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2044
+ return useQuery(__spreadProps$8(__spreadValues$8({}, rest), {
1983
2045
  onError,
1984
2046
  queryFn: () => {
1985
- return client.shippingRules.list();
2047
+ return client.shippingRules.list(queryFnParams);
1986
2048
  },
1987
- queryKey: ["useListShippingRules"],
2049
+ queryKey: ["useListShippingRules", queryFnParams],
1988
2050
  select: (result) => result.data.shippingRules
1989
2051
  }));
1990
2052
  };
@@ -2012,8 +2074,8 @@ var __async$b = (__this, __arguments, generator) => {
2012
2074
  const useCreateShippingRule = () => {
2013
2075
  const { client } = useShipEngine();
2014
2076
  return useMutation({
2015
- mutationFn: (shippingRule) => __async$b(void 0, null, function* () {
2016
- const result = yield client.shippingRules.create(shippingRule);
2077
+ mutationFn: (props) => __async$b(void 0, null, function* () {
2078
+ const result = yield client.shippingRules.create(props);
2017
2079
  return result.data;
2018
2080
  }),
2019
2081
  mutationKey: ["useCreateShippingRule"],
@@ -2044,8 +2106,8 @@ var __async$a = (__this, __arguments, generator) => {
2044
2106
  const useDeleteShippingRule = () => {
2045
2107
  const { client } = useShipEngine();
2046
2108
  return useMutation({
2047
- mutationFn: (shippingRuleId) => __async$a(void 0, null, function* () {
2048
- const result = yield client.shippingRules.delete(shippingRuleId);
2109
+ mutationFn: (props) => __async$a(void 0, null, function* () {
2110
+ const result = yield client.shippingRules.delete(props);
2049
2111
  return result.data;
2050
2112
  }),
2051
2113
  mutationKey: ["useDeleteShippingRule"],
@@ -2076,8 +2138,8 @@ var __async$9 = (__this, __arguments, generator) => {
2076
2138
  const useEditShippingRule = () => {
2077
2139
  const { client } = useShipEngine();
2078
2140
  return useMutation({
2079
- mutationFn: (shippingRule) => __async$9(void 0, null, function* () {
2080
- const result = yield client.shippingRules.edit(shippingRule);
2141
+ mutationFn: (props) => __async$9(void 0, null, function* () {
2142
+ const result = yield client.shippingRules.edit(props);
2081
2143
  return result.data;
2082
2144
  }),
2083
2145
  mutationKey: ["useEditShippingRule"],
@@ -2085,29 +2147,92 @@ const useEditShippingRule = () => {
2085
2147
  });
2086
2148
  };
2087
2149
 
2088
- const useGetShippingRuleConditionsOptions = () => {
2150
+ var __defProp$7 = Object.defineProperty;
2151
+ var __defProps$7 = Object.defineProperties;
2152
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2153
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2154
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2155
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2156
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2157
+ var __spreadValues$7 = (a, b) => {
2158
+ for (var prop in b || (b = {}))
2159
+ if (__hasOwnProp$8.call(b, prop))
2160
+ __defNormalProp$7(a, prop, b[prop]);
2161
+ if (__getOwnPropSymbols$8)
2162
+ for (var prop of __getOwnPropSymbols$8(b)) {
2163
+ if (__propIsEnum$8.call(b, prop))
2164
+ __defNormalProp$7(a, prop, b[prop]);
2165
+ }
2166
+ return a;
2167
+ };
2168
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2169
+ var __objRest$4 = (source, exclude) => {
2170
+ var target = {};
2171
+ for (var prop in source)
2172
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2173
+ target[prop] = source[prop];
2174
+ if (source != null && __getOwnPropSymbols$8)
2175
+ for (var prop of __getOwnPropSymbols$8(source)) {
2176
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2177
+ target[prop] = source[prop];
2178
+ }
2179
+ return target;
2180
+ };
2181
+ const useGetShippingRuleConditionsOptions = (params) => {
2089
2182
  const { client } = useShipEngine();
2090
- return useQuery({
2183
+ const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2184
+ return useQuery(__spreadProps$7(__spreadValues$7({}, rest), {
2091
2185
  onError,
2092
2186
  queryFn: () => {
2093
- return client.shippingRules.getConditionOptions();
2187
+ return client.shippingRules.getConditionOptions(queryFnParams);
2094
2188
  },
2095
- queryKey: ["useGetShippingRuleConditionsOptions"],
2189
+ queryKey: ["useGetShippingRuleConditionsOptions", queryFnParams],
2096
2190
  select: (result) => result.data
2097
- });
2191
+ }));
2098
2192
  };
2099
2193
 
2100
- const useGetShippingRuleById = (shippingRuleId) => {
2194
+ var __defProp$6 = Object.defineProperty;
2195
+ var __defProps$6 = Object.defineProperties;
2196
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2197
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2198
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2199
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2200
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2201
+ var __spreadValues$6 = (a, b) => {
2202
+ for (var prop in b || (b = {}))
2203
+ if (__hasOwnProp$7.call(b, prop))
2204
+ __defNormalProp$6(a, prop, b[prop]);
2205
+ if (__getOwnPropSymbols$7)
2206
+ for (var prop of __getOwnPropSymbols$7(b)) {
2207
+ if (__propIsEnum$7.call(b, prop))
2208
+ __defNormalProp$6(a, prop, b[prop]);
2209
+ }
2210
+ return a;
2211
+ };
2212
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2213
+ var __objRest$3 = (source, exclude) => {
2214
+ var target = {};
2215
+ for (var prop in source)
2216
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2217
+ target[prop] = source[prop];
2218
+ if (source != null && __getOwnPropSymbols$7)
2219
+ for (var prop of __getOwnPropSymbols$7(source)) {
2220
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2221
+ target[prop] = source[prop];
2222
+ }
2223
+ return target;
2224
+ };
2225
+ const useGetShippingRuleById = (params) => {
2101
2226
  const { client } = useShipEngine();
2102
- return useQuery({
2103
- enabled: !!shippingRuleId,
2227
+ const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2228
+ return useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
2104
2229
  onError,
2105
2230
  queryFn: () => {
2106
- return client.shippingRules.get(shippingRuleId);
2231
+ return client.shippingRules.get(queryFnParams);
2107
2232
  },
2108
- queryKey: ["useGetShippingRuleById", shippingRuleId],
2233
+ queryKey: ["useGetShippingRuleById", queryFnParams],
2109
2234
  select: (result) => result.data
2110
- });
2235
+ }));
2111
2236
  };
2112
2237
 
2113
2238
  const useGetThemeById = (themeId) => {
@@ -2189,16 +2314,46 @@ const useDeleteWarehouse = () => {
2189
2314
  });
2190
2315
  };
2191
2316
 
2192
- const useListWarehouses = (options) => {
2193
- var _a;
2317
+ var __defProp$5 = Object.defineProperty;
2318
+ var __defProps$5 = Object.defineProperties;
2319
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2320
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2321
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2322
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2323
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2324
+ var __spreadValues$5 = (a, b) => {
2325
+ for (var prop in b || (b = {}))
2326
+ if (__hasOwnProp$6.call(b, prop))
2327
+ __defNormalProp$5(a, prop, b[prop]);
2328
+ if (__getOwnPropSymbols$6)
2329
+ for (var prop of __getOwnPropSymbols$6(b)) {
2330
+ if (__propIsEnum$6.call(b, prop))
2331
+ __defNormalProp$5(a, prop, b[prop]);
2332
+ }
2333
+ return a;
2334
+ };
2335
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2336
+ var __objRest$2 = (source, exclude) => {
2337
+ var target = {};
2338
+ for (var prop in source)
2339
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2340
+ target[prop] = source[prop];
2341
+ if (source != null && __getOwnPropSymbols$6)
2342
+ for (var prop of __getOwnPropSymbols$6(source)) {
2343
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2344
+ target[prop] = source[prop];
2345
+ }
2346
+ return target;
2347
+ };
2348
+ const useListWarehouses = (params) => {
2194
2349
  const { client } = useShipEngine();
2195
- return useQuery({
2196
- enabled: (_a = options == null ? void 0 : options.enabled) != null ? _a : true,
2350
+ const _a = __spreadValues$5({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2351
+ return useQuery(__spreadProps$5(__spreadValues$5({}, rest), {
2197
2352
  onError,
2198
- queryFn: () => client.warehouses.list(),
2199
- queryKey: ["useListWarehouses"],
2353
+ queryFn: () => client.warehouses.list(queryFnParams),
2354
+ queryKey: ["useListWarehouses", queryFnParams],
2200
2355
  select: (result) => result.data.warehouses
2201
- });
2356
+ }));
2202
2357
  };
2203
2358
 
2204
2359
  var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;