@shipengine/react-api 2.15.3 → 3.0.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$f = Object.defineProperty;
80
+ var __defProps$f = Object.defineProperties;
81
+ var __getOwnPropDescs$f = 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$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
+ var __spreadValues$f = (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$f(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$f(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$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(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$f(__spreadValues$f({}, 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$e = Object.defineProperty;
508
+ var __defProps$e = Object.defineProperties;
509
+ var __getOwnPropDescs$e = 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$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
514
+ var __spreadValues$e = (a, b) => {
515
+ for (var prop in b || (b = {}))
516
+ if (__hasOwnProp$p.call(b, prop))
517
+ __defNormalProp$e(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$e(a, prop, b[prop]);
522
+ }
523
+ return a;
524
+ };
525
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(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$e({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
541
+ return useQuery(__spreadProps$e(__spreadValues$e({}, 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$d = Object.defineProperty;
748
+ var __defProps$d = Object.defineProperties;
749
+ var __getOwnPropDescs$d = 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$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
754
+ var __spreadValues$d = (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$d(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$d(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$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(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$d(__spreadValues$d({}, 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$c = Object.defineProperty;
795
+ var __defProps$c = Object.defineProperties;
796
+ var __getOwnPropDescs$c = 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$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
801
+ var __spreadValues$c = (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$c(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$c(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$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(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$c(__spreadValues$c({}, 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,24 +1174,24 @@ 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 __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1178
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1179
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1180
+ var __objRest$c = (source, exclude) => {
1147
1181
  var target = {};
1148
1182
  for (var prop in source)
1149
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1183
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1150
1184
  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))
1185
+ if (source != null && __getOwnPropSymbols$h)
1186
+ for (var prop of __getOwnPropSymbols$h(source)) {
1187
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1154
1188
  target[prop] = source[prop];
1155
1189
  }
1156
1190
  return target;
1157
1191
  };
1158
1192
  const useListLabels = (_params) => {
1159
1193
  const { client } = useShipEngine();
1160
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
1194
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$c(_a, ["enabled"]);
1161
1195
  return useQuery({
1162
1196
  enabled,
1163
1197
  onError,
@@ -1578,17 +1612,17 @@ const useListSalesOrders = (params = {}) => {
1578
1612
  });
1579
1613
  };
1580
1614
 
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) => {
1615
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1616
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1617
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1618
+ var __objRest$b = (source, exclude) => {
1585
1619
  var target = {};
1586
1620
  for (var prop in source)
1587
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
1621
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1588
1622
  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))
1623
+ if (source != null && __getOwnPropSymbols$g)
1624
+ for (var prop of __getOwnPropSymbols$g(source)) {
1625
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1592
1626
  target[prop] = source[prop];
1593
1627
  }
1594
1628
  return target;
@@ -1617,7 +1651,7 @@ const useNotifySalesOrderShipped = () => {
1617
1651
  const { client } = useShipEngine();
1618
1652
  return useMutation({
1619
1653
  mutationFn: (_a) => __async$f(void 0, null, function* () {
1620
- var _b = _a, { salesOrderId } = _b, tracking = __objRest$7(_b, ["salesOrderId"]);
1654
+ var _b = _a, { salesOrderId } = _b, tracking = __objRest$b(_b, ["salesOrderId"]);
1621
1655
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1622
1656
  return result.data;
1623
1657
  }),
@@ -1626,17 +1660,17 @@ const useNotifySalesOrderShipped = () => {
1626
1660
  });
1627
1661
  };
1628
1662
 
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) => {
1663
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1664
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1665
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1666
+ var __objRest$a = (source, exclude) => {
1633
1667
  var target = {};
1634
1668
  for (var prop in source)
1635
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1669
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1636
1670
  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))
1671
+ if (source != null && __getOwnPropSymbols$f)
1672
+ for (var prop of __getOwnPropSymbols$f(source)) {
1673
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1640
1674
  target[prop] = source[prop];
1641
1675
  }
1642
1676
  return target;
@@ -1665,7 +1699,7 @@ const useCreateSalesOrderShipment = () => {
1665
1699
  const { client } = useShipEngine();
1666
1700
  return useMutation({
1667
1701
  mutationFn: (_a) => __async$e(void 0, null, function* () {
1668
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$6(_b, ["salesOrderId"]);
1702
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$a(_b, ["salesOrderId"]);
1669
1703
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1670
1704
  return result.data;
1671
1705
  }),
@@ -1700,17 +1734,17 @@ const useListSalesOrderShipments = (params) => {
1700
1734
  });
1701
1735
  };
1702
1736
 
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) => {
1737
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1738
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1739
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1740
+ var __objRest$9 = (source, exclude) => {
1707
1741
  var target = {};
1708
1742
  for (var prop in source)
1709
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1743
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1710
1744
  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))
1745
+ if (source != null && __getOwnPropSymbols$e)
1746
+ for (var prop of __getOwnPropSymbols$e(source)) {
1747
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
1714
1748
  target[prop] = source[prop];
1715
1749
  }
1716
1750
  return target;
@@ -1739,7 +1773,7 @@ const useUpdateSalesOrderShipment = () => {
1739
1773
  const { client } = useShipEngine();
1740
1774
  return useMutation({
1741
1775
  mutationFn: (_a) => __async$d(void 0, null, function* () {
1742
- var _b = _a, { shipmentId } = _b, shipment = __objRest$5(_b, ["shipmentId"]);
1776
+ var _b = _a, { shipmentId } = _b, shipment = __objRest$9(_b, ["shipmentId"]);
1743
1777
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1744
1778
  return result.data;
1745
1779
  }),
@@ -1748,25 +1782,25 @@ const useUpdateSalesOrderShipment = () => {
1748
1782
  });
1749
1783
  };
1750
1784
 
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) => {
1785
+ var __defProp$b = Object.defineProperty;
1786
+ var __defProps$b = Object.defineProperties;
1787
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1788
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1789
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1790
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1791
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1792
+ var __spreadValues$b = (a, b) => {
1759
1793
  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]);
1794
+ if (__hasOwnProp$d.call(b, prop))
1795
+ __defNormalProp$b(a, prop, b[prop]);
1796
+ if (__getOwnPropSymbols$d)
1797
+ for (var prop of __getOwnPropSymbols$d(b)) {
1798
+ if (__propIsEnum$d.call(b, prop))
1799
+ __defNormalProp$b(a, prop, b[prop]);
1766
1800
  }
1767
1801
  return a;
1768
1802
  };
1769
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
1803
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1770
1804
  var __async$c = (__this, __arguments, generator) => {
1771
1805
  return new Promise((resolve, reject) => {
1772
1806
  var fulfilled = (value) => {
@@ -1808,7 +1842,7 @@ const useCreateShipment = () => {
1808
1842
  postalCode: "",
1809
1843
  stateProvince: ""
1810
1844
  };
1811
- return (yield client.shipments.create(__spreadProps$8(__spreadValues$8({}, shipment), {
1845
+ return (yield client.shipments.create(__spreadProps$b(__spreadValues$b({}, shipment), {
1812
1846
  shipTo
1813
1847
  }))).data;
1814
1848
  }),
@@ -1833,33 +1867,33 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
1833
1867
  });
1834
1868
  };
1835
1869
 
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) => {
1870
+ var __defProp$a = Object.defineProperty;
1871
+ var __defProps$a = Object.defineProperties;
1872
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1873
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1874
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1875
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1876
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1877
+ var __spreadValues$a = (a, b) => {
1844
1878
  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]);
1879
+ if (__hasOwnProp$c.call(b, prop))
1880
+ __defNormalProp$a(a, prop, b[prop]);
1881
+ if (__getOwnPropSymbols$c)
1882
+ for (var prop of __getOwnPropSymbols$c(b)) {
1883
+ if (__propIsEnum$c.call(b, prop))
1884
+ __defNormalProp$a(a, prop, b[prop]);
1851
1885
  }
1852
1886
  return a;
1853
1887
  };
1854
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1855
- var __objRest$4 = (source, exclude) => {
1888
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1889
+ var __objRest$8 = (source, exclude) => {
1856
1890
  var target = {};
1857
1891
  for (var prop in source)
1858
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1892
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1859
1893
  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))
1894
+ if (source != null && __getOwnPropSymbols$c)
1895
+ for (var prop of __getOwnPropSymbols$c(source)) {
1896
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1863
1897
  target[prop] = source[prop];
1864
1898
  }
1865
1899
  return target;
@@ -1870,12 +1904,12 @@ const useGetShipment = (params) => {
1870
1904
  const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
1871
1905
  const getQueryProps = () => {
1872
1906
  if (typeof params !== "string") {
1873
- const _a2 = params, rest = __objRest$4(_a2, ["queryFnParams"]);
1907
+ const _a2 = params, rest = __objRest$8(_a2, ["queryFnParams"]);
1874
1908
  return rest;
1875
1909
  }
1876
1910
  return {};
1877
1911
  };
1878
- return useQuery(__spreadProps$7(__spreadValues$7({}, getQueryProps()), {
1912
+ return useQuery(__spreadProps$a(__spreadValues$a({}, getQueryProps()), {
1879
1913
  enabled: shipmentId !== void 0,
1880
1914
  onError,
1881
1915
  queryFn: () => {
@@ -1889,23 +1923,23 @@ const useGetShipment = (params) => {
1889
1923
  }));
1890
1924
  };
1891
1925
 
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) => {
1926
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1927
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1928
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1929
+ var __objRest$7 = (source, exclude) => {
1896
1930
  var target = {};
1897
1931
  for (var prop in source)
1898
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1932
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1899
1933
  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))
1934
+ if (source != null && __getOwnPropSymbols$b)
1935
+ for (var prop of __getOwnPropSymbols$b(source)) {
1936
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1903
1937
  target[prop] = source[prop];
1904
1938
  }
1905
1939
  return target;
1906
1940
  };
1907
1941
  const useListShipments = (_params) => {
1908
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$3(_a, ["enabled"]);
1942
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$7(_a, ["enabled"]);
1909
1943
  const { client } = useShipEngine();
1910
1944
  return useQuery({
1911
1945
  enabled,
@@ -1916,41 +1950,41 @@ const useListShipments = (_params) => {
1916
1950
  });
1917
1951
  };
1918
1952
 
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) => {
1953
+ var __defProp$9 = Object.defineProperty;
1954
+ var __defProps$9 = Object.defineProperties;
1955
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1956
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1957
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1958
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1959
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1960
+ var __spreadValues$9 = (a, b) => {
1927
1961
  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]);
1962
+ if (__hasOwnProp$a.call(b, prop))
1963
+ __defNormalProp$9(a, prop, b[prop]);
1964
+ if (__getOwnPropSymbols$a)
1965
+ for (var prop of __getOwnPropSymbols$a(b)) {
1966
+ if (__propIsEnum$a.call(b, prop))
1967
+ __defNormalProp$9(a, prop, b[prop]);
1934
1968
  }
1935
1969
  return a;
1936
1970
  };
1937
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1938
- var __objRest$2 = (source, exclude) => {
1971
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
1972
+ var __objRest$6 = (source, exclude) => {
1939
1973
  var target = {};
1940
1974
  for (var prop in source)
1941
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
1975
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
1942
1976
  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))
1977
+ if (source != null && __getOwnPropSymbols$a)
1978
+ for (var prop of __getOwnPropSymbols$a(source)) {
1979
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
1946
1980
  target[prop] = source[prop];
1947
1981
  }
1948
1982
  return target;
1949
1983
  };
1950
1984
  const useGetShipmentByExternalId = (params) => {
1951
1985
  const { client } = useShipEngine();
1952
- const _a = params, { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
1953
- return useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
1986
+ const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
1987
+ return useQuery(__spreadProps$9(__spreadValues$9({}, rest), {
1954
1988
  onError,
1955
1989
  queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
1956
1990
  queryKey: ["useGetShipmentByExternalId", queryFnParams],
@@ -1958,33 +1992,46 @@ const useGetShipmentByExternalId = (params) => {
1958
1992
  }));
1959
1993
  };
1960
1994
 
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) => {
1995
+ var __defProp$8 = Object.defineProperty;
1996
+ var __defProps$8 = Object.defineProperties;
1997
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1998
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1999
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2000
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2001
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2002
+ var __spreadValues$8 = (a, b) => {
1969
2003
  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]);
2004
+ if (__hasOwnProp$9.call(b, prop))
2005
+ __defNormalProp$8(a, prop, b[prop]);
2006
+ if (__getOwnPropSymbols$9)
2007
+ for (var prop of __getOwnPropSymbols$9(b)) {
2008
+ if (__propIsEnum$9.call(b, prop))
2009
+ __defNormalProp$8(a, prop, b[prop]);
1976
2010
  }
1977
2011
  return a;
1978
2012
  };
1979
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2013
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2014
+ var __objRest$5 = (source, exclude) => {
2015
+ var target = {};
2016
+ for (var prop in source)
2017
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2018
+ target[prop] = source[prop];
2019
+ if (source != null && __getOwnPropSymbols$9)
2020
+ for (var prop of __getOwnPropSymbols$9(source)) {
2021
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2022
+ target[prop] = source[prop];
2023
+ }
2024
+ return target;
2025
+ };
1980
2026
  const useListShippingRules = (params) => {
1981
2027
  const { client } = useShipEngine();
1982
- return useQuery(__spreadProps$5(__spreadValues$5({}, params), {
2028
+ const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2029
+ return useQuery(__spreadProps$8(__spreadValues$8({}, rest), {
1983
2030
  onError,
1984
2031
  queryFn: () => {
1985
- return client.shippingRules.list();
2032
+ return client.shippingRules.list(queryFnParams);
1986
2033
  },
1987
- queryKey: ["useListShippingRules"],
2034
+ queryKey: ["useListShippingRules", queryFnParams],
1988
2035
  select: (result) => result.data.shippingRules
1989
2036
  }));
1990
2037
  };
@@ -2012,8 +2059,8 @@ var __async$b = (__this, __arguments, generator) => {
2012
2059
  const useCreateShippingRule = () => {
2013
2060
  const { client } = useShipEngine();
2014
2061
  return useMutation({
2015
- mutationFn: (shippingRule) => __async$b(void 0, null, function* () {
2016
- const result = yield client.shippingRules.create(shippingRule);
2062
+ mutationFn: (props) => __async$b(void 0, null, function* () {
2063
+ const result = yield client.shippingRules.create(props);
2017
2064
  return result.data;
2018
2065
  }),
2019
2066
  mutationKey: ["useCreateShippingRule"],
@@ -2044,8 +2091,8 @@ var __async$a = (__this, __arguments, generator) => {
2044
2091
  const useDeleteShippingRule = () => {
2045
2092
  const { client } = useShipEngine();
2046
2093
  return useMutation({
2047
- mutationFn: (shippingRuleId) => __async$a(void 0, null, function* () {
2048
- const result = yield client.shippingRules.delete(shippingRuleId);
2094
+ mutationFn: (props) => __async$a(void 0, null, function* () {
2095
+ const result = yield client.shippingRules.delete(props);
2049
2096
  return result.data;
2050
2097
  }),
2051
2098
  mutationKey: ["useDeleteShippingRule"],
@@ -2076,8 +2123,8 @@ var __async$9 = (__this, __arguments, generator) => {
2076
2123
  const useEditShippingRule = () => {
2077
2124
  const { client } = useShipEngine();
2078
2125
  return useMutation({
2079
- mutationFn: (shippingRule) => __async$9(void 0, null, function* () {
2080
- const result = yield client.shippingRules.edit(shippingRule);
2126
+ mutationFn: (props) => __async$9(void 0, null, function* () {
2127
+ const result = yield client.shippingRules.edit(props);
2081
2128
  return result.data;
2082
2129
  }),
2083
2130
  mutationKey: ["useEditShippingRule"],
@@ -2085,29 +2132,92 @@ const useEditShippingRule = () => {
2085
2132
  });
2086
2133
  };
2087
2134
 
2088
- const useGetShippingRuleConditionsOptions = () => {
2135
+ var __defProp$7 = Object.defineProperty;
2136
+ var __defProps$7 = Object.defineProperties;
2137
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2138
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2139
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2140
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2141
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2142
+ var __spreadValues$7 = (a, b) => {
2143
+ for (var prop in b || (b = {}))
2144
+ if (__hasOwnProp$8.call(b, prop))
2145
+ __defNormalProp$7(a, prop, b[prop]);
2146
+ if (__getOwnPropSymbols$8)
2147
+ for (var prop of __getOwnPropSymbols$8(b)) {
2148
+ if (__propIsEnum$8.call(b, prop))
2149
+ __defNormalProp$7(a, prop, b[prop]);
2150
+ }
2151
+ return a;
2152
+ };
2153
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2154
+ var __objRest$4 = (source, exclude) => {
2155
+ var target = {};
2156
+ for (var prop in source)
2157
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2158
+ target[prop] = source[prop];
2159
+ if (source != null && __getOwnPropSymbols$8)
2160
+ for (var prop of __getOwnPropSymbols$8(source)) {
2161
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2162
+ target[prop] = source[prop];
2163
+ }
2164
+ return target;
2165
+ };
2166
+ const useGetShippingRuleConditionsOptions = (params) => {
2089
2167
  const { client } = useShipEngine();
2090
- return useQuery({
2168
+ const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2169
+ return useQuery(__spreadProps$7(__spreadValues$7({}, rest), {
2091
2170
  onError,
2092
2171
  queryFn: () => {
2093
- return client.shippingRules.getConditionOptions();
2172
+ return client.shippingRules.getConditionOptions(queryFnParams);
2094
2173
  },
2095
- queryKey: ["useGetShippingRuleConditionsOptions"],
2174
+ queryKey: ["useGetShippingRuleConditionsOptions", queryFnParams],
2096
2175
  select: (result) => result.data
2097
- });
2176
+ }));
2098
2177
  };
2099
2178
 
2100
- const useGetShippingRuleById = (shippingRuleId) => {
2179
+ var __defProp$6 = Object.defineProperty;
2180
+ var __defProps$6 = Object.defineProperties;
2181
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2182
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2183
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2184
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2185
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2186
+ var __spreadValues$6 = (a, b) => {
2187
+ for (var prop in b || (b = {}))
2188
+ if (__hasOwnProp$7.call(b, prop))
2189
+ __defNormalProp$6(a, prop, b[prop]);
2190
+ if (__getOwnPropSymbols$7)
2191
+ for (var prop of __getOwnPropSymbols$7(b)) {
2192
+ if (__propIsEnum$7.call(b, prop))
2193
+ __defNormalProp$6(a, prop, b[prop]);
2194
+ }
2195
+ return a;
2196
+ };
2197
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2198
+ var __objRest$3 = (source, exclude) => {
2199
+ var target = {};
2200
+ for (var prop in source)
2201
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2202
+ target[prop] = source[prop];
2203
+ if (source != null && __getOwnPropSymbols$7)
2204
+ for (var prop of __getOwnPropSymbols$7(source)) {
2205
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2206
+ target[prop] = source[prop];
2207
+ }
2208
+ return target;
2209
+ };
2210
+ const useGetShippingRuleById = (params) => {
2101
2211
  const { client } = useShipEngine();
2102
- return useQuery({
2103
- enabled: !!shippingRuleId,
2212
+ const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2213
+ return useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
2104
2214
  onError,
2105
2215
  queryFn: () => {
2106
- return client.shippingRules.get(shippingRuleId);
2216
+ return client.shippingRules.get(queryFnParams);
2107
2217
  },
2108
- queryKey: ["useGetShippingRuleById", shippingRuleId],
2218
+ queryKey: ["useGetShippingRuleById", queryFnParams],
2109
2219
  select: (result) => result.data
2110
- });
2220
+ }));
2111
2221
  };
2112
2222
 
2113
2223
  const useGetThemeById = (themeId) => {
@@ -2189,16 +2299,46 @@ const useDeleteWarehouse = () => {
2189
2299
  });
2190
2300
  };
2191
2301
 
2192
- const useListWarehouses = (options) => {
2193
- var _a;
2302
+ var __defProp$5 = Object.defineProperty;
2303
+ var __defProps$5 = Object.defineProperties;
2304
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2305
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2306
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2307
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2308
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2309
+ var __spreadValues$5 = (a, b) => {
2310
+ for (var prop in b || (b = {}))
2311
+ if (__hasOwnProp$6.call(b, prop))
2312
+ __defNormalProp$5(a, prop, b[prop]);
2313
+ if (__getOwnPropSymbols$6)
2314
+ for (var prop of __getOwnPropSymbols$6(b)) {
2315
+ if (__propIsEnum$6.call(b, prop))
2316
+ __defNormalProp$5(a, prop, b[prop]);
2317
+ }
2318
+ return a;
2319
+ };
2320
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2321
+ var __objRest$2 = (source, exclude) => {
2322
+ var target = {};
2323
+ for (var prop in source)
2324
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2325
+ target[prop] = source[prop];
2326
+ if (source != null && __getOwnPropSymbols$6)
2327
+ for (var prop of __getOwnPropSymbols$6(source)) {
2328
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2329
+ target[prop] = source[prop];
2330
+ }
2331
+ return target;
2332
+ };
2333
+ const useListWarehouses = (params) => {
2194
2334
  const { client } = useShipEngine();
2195
- return useQuery({
2196
- enabled: (_a = options == null ? void 0 : options.enabled) != null ? _a : true,
2335
+ const _a = __spreadValues$5({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2336
+ return useQuery(__spreadProps$5(__spreadValues$5({}, rest), {
2197
2337
  onError,
2198
- queryFn: () => client.warehouses.list(),
2199
- queryKey: ["useListWarehouses"],
2338
+ queryFn: () => client.warehouses.list(queryFnParams),
2339
+ queryKey: ["useListWarehouses", queryFnParams],
2200
2340
  select: (result) => result.data.warehouses
2201
- });
2341
+ }));
2202
2342
  };
2203
2343
 
2204
2344
  var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;