@shipengine/react-api 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -79,21 +79,21 @@ const onError = (_errors) => _default();
79
79
 
80
80
  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}();
81
81
 
82
- var __defProp$g = Object.defineProperty;
82
+ var __defProp$h = Object.defineProperty;
83
83
  var __defProps$g = Object.defineProperties;
84
84
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
85
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
86
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
87
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
88
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
89
- var __spreadValues$g = (a, b) => {
85
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
86
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
87
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
88
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
89
+ var __spreadValues$h = (a, b) => {
90
90
  for (var prop in b || (b = {}))
91
- if (__hasOwnProp$q.call(b, prop))
92
- __defNormalProp$g(a, prop, b[prop]);
93
- if (__getOwnPropSymbols$q)
94
- for (var prop of __getOwnPropSymbols$q(b)) {
95
- if (__propIsEnum$q.call(b, prop))
96
- __defNormalProp$g(a, prop, b[prop]);
91
+ if (__hasOwnProp$r.call(b, prop))
92
+ __defNormalProp$h(a, prop, b[prop]);
93
+ if (__getOwnPropSymbols$r)
94
+ for (var prop of __getOwnPropSymbols$r(b)) {
95
+ if (__propIsEnum$r.call(b, prop))
96
+ __defNormalProp$h(a, prop, b[prop]);
97
97
  }
98
98
  return a;
99
99
  };
@@ -106,7 +106,7 @@ if (process.env.NODE_ENV === "production") {
106
106
  }
107
107
  const logger = E({
108
108
  name: "shipengine",
109
- serializers: __spreadProps$g(__spreadValues$g({}, k), {
109
+ serializers: __spreadProps$g(__spreadValues$h({}, k), {
110
110
  req: (req) => ({
111
111
  headers: req.headers,
112
112
  method: req.method,
@@ -131,7 +131,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
131
131
  throw error;
132
132
  });
133
133
 
134
- var __async$H = (__this, __arguments, generator) => {
134
+ var __async$K = (__this, __arguments, generator) => {
135
135
  return new Promise((resolve, reject) => {
136
136
  var fulfilled = (value) => {
137
137
  try {
@@ -154,7 +154,7 @@ var __async$H = (__this, __arguments, generator) => {
154
154
  const useCreateAccountImage = () => {
155
155
  const { client } = useShipEngine();
156
156
  return reactQuery.useMutation({
157
- mutationFn: (data) => __async$H(void 0, null, function* () {
157
+ mutationFn: (data) => __async$K(void 0, null, function* () {
158
158
  const result = yield client.accountSettings.createImage(data);
159
159
  return result.data;
160
160
  }),
@@ -163,7 +163,7 @@ const useCreateAccountImage = () => {
163
163
  });
164
164
  };
165
165
 
166
- var __async$G = (__this, __arguments, generator) => {
166
+ var __async$J = (__this, __arguments, generator) => {
167
167
  return new Promise((resolve, reject) => {
168
168
  var fulfilled = (value) => {
169
169
  try {
@@ -186,7 +186,7 @@ var __async$G = (__this, __arguments, generator) => {
186
186
  const useDeleteAccountImage = () => {
187
187
  const { client } = useShipEngine();
188
188
  return reactQuery.useMutation({
189
- mutationFn: (labelImageId) => __async$G(void 0, null, function* () {
189
+ mutationFn: (labelImageId) => __async$J(void 0, null, function* () {
190
190
  const result = yield client.accountSettings.deleteImage(labelImageId);
191
191
  return result.data;
192
192
  }),
@@ -215,7 +215,7 @@ const useGetAccountSettings = () => {
215
215
  });
216
216
  };
217
217
 
218
- var __async$F = (__this, __arguments, generator) => {
218
+ var __async$I = (__this, __arguments, generator) => {
219
219
  return new Promise((resolve, reject) => {
220
220
  var fulfilled = (value) => {
221
221
  try {
@@ -238,7 +238,7 @@ var __async$F = (__this, __arguments, generator) => {
238
238
  const useUpdateAccountImage = () => {
239
239
  const { client } = useShipEngine();
240
240
  return reactQuery.useMutation({
241
- mutationFn: (data) => __async$F(void 0, null, function* () {
241
+ mutationFn: (data) => __async$I(void 0, null, function* () {
242
242
  const result = yield client.accountSettings.updateImage(data);
243
243
  return result.data;
244
244
  }),
@@ -247,7 +247,7 @@ const useUpdateAccountImage = () => {
247
247
  });
248
248
  };
249
249
 
250
- var __async$E = (__this, __arguments, generator) => {
250
+ var __async$H = (__this, __arguments, generator) => {
251
251
  return new Promise((resolve, reject) => {
252
252
  var fulfilled = (value) => {
253
253
  try {
@@ -270,7 +270,7 @@ var __async$E = (__this, __arguments, generator) => {
270
270
  const useUpdateAccountSettings = () => {
271
271
  const { client } = useShipEngine();
272
272
  return reactQuery.useMutation({
273
- mutationFn: (settings) => __async$E(void 0, null, function* () {
273
+ mutationFn: (settings) => __async$H(void 0, null, function* () {
274
274
  const result = yield client.accountSettings.update(settings);
275
275
  return result.data;
276
276
  }),
@@ -279,7 +279,7 @@ const useUpdateAccountSettings = () => {
279
279
  });
280
280
  };
281
281
 
282
- var __async$D = (__this, __arguments, generator) => {
282
+ var __async$G = (__this, __arguments, generator) => {
283
283
  return new Promise((resolve, reject) => {
284
284
  var fulfilled = (value) => {
285
285
  try {
@@ -302,7 +302,7 @@ var __async$D = (__this, __arguments, generator) => {
302
302
  const useParseAddress = () => {
303
303
  const { client } = useShipEngine();
304
304
  return reactQuery.useMutation({
305
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ address, text }) {
305
+ mutationFn: (_0) => __async$G(void 0, [_0], function* ({ address, text }) {
306
306
  const result = yield client.addresses.parse(text, address);
307
307
  return result.data;
308
308
  }),
@@ -311,7 +311,7 @@ const useParseAddress = () => {
311
311
  });
312
312
  };
313
313
 
314
- var __async$C = (__this, __arguments, generator) => {
314
+ var __async$F = (__this, __arguments, generator) => {
315
315
  return new Promise((resolve, reject) => {
316
316
  var fulfilled = (value) => {
317
317
  try {
@@ -334,7 +334,7 @@ var __async$C = (__this, __arguments, generator) => {
334
334
  const useValidateAddresses = () => {
335
335
  const { client } = useShipEngine();
336
336
  return reactQuery.useMutation({
337
- mutationFn: (addresses) => __async$C(void 0, null, function* () {
337
+ mutationFn: (addresses) => __async$F(void 0, null, function* () {
338
338
  const result = yield client.addresses.validate(addresses);
339
339
  return result.data;
340
340
  }),
@@ -343,7 +343,7 @@ const useValidateAddresses = () => {
343
343
  });
344
344
  };
345
345
 
346
- var __async$B = (__this, __arguments, generator) => {
346
+ var __async$E = (__this, __arguments, generator) => {
347
347
  return new Promise((resolve, reject) => {
348
348
  var fulfilled = (value) => {
349
349
  try {
@@ -366,7 +366,7 @@ var __async$B = (__this, __arguments, generator) => {
366
366
  const useAddFunds = () => {
367
367
  const { client } = useShipEngine();
368
368
  return reactQuery.useMutation({
369
- mutationFn: (_0) => __async$B(void 0, [_0], function* ({ carrierId, funds }) {
369
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({ carrierId, funds }) {
370
370
  const result = yield client.carriers.addFunds(carrierId, funds);
371
371
  return result.data;
372
372
  }),
@@ -375,7 +375,7 @@ const useAddFunds = () => {
375
375
  });
376
376
  };
377
377
 
378
- var __async$A = (__this, __arguments, generator) => {
378
+ var __async$D = (__this, __arguments, generator) => {
379
379
  return new Promise((resolve, reject) => {
380
380
  var fulfilled = (value) => {
381
381
  try {
@@ -398,7 +398,7 @@ var __async$A = (__this, __arguments, generator) => {
398
398
  const useConnectCarrier = () => {
399
399
  const { client } = useShipEngine();
400
400
  return reactQuery.useMutation({
401
- mutationFn: (params) => __async$A(void 0, null, function* () {
401
+ mutationFn: (params) => __async$D(void 0, null, function* () {
402
402
  const result = yield client.carriers.connect(params);
403
403
  return result.data;
404
404
  }),
@@ -507,21 +507,21 @@ const useGetServicesByCarrier = (carrierId) => {
507
507
  });
508
508
  };
509
509
 
510
- var __defProp$f = Object.defineProperty;
510
+ var __defProp$g = Object.defineProperty;
511
511
  var __defProps$f = Object.defineProperties;
512
512
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
513
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
514
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
515
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
516
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
517
- var __spreadValues$f = (a, b) => {
513
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
514
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
515
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
516
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
517
+ var __spreadValues$g = (a, b) => {
518
518
  for (var prop in b || (b = {}))
519
- if (__hasOwnProp$p.call(b, prop))
520
- __defNormalProp$f(a, prop, b[prop]);
521
- if (__getOwnPropSymbols$p)
522
- for (var prop of __getOwnPropSymbols$p(b)) {
523
- if (__propIsEnum$p.call(b, prop))
524
- __defNormalProp$f(a, prop, b[prop]);
519
+ if (__hasOwnProp$q.call(b, prop))
520
+ __defNormalProp$g(a, prop, b[prop]);
521
+ if (__getOwnPropSymbols$q)
522
+ for (var prop of __getOwnPropSymbols$q(b)) {
523
+ if (__propIsEnum$q.call(b, prop))
524
+ __defNormalProp$g(a, prop, b[prop]);
525
525
  }
526
526
  return a;
527
527
  };
@@ -529,19 +529,19 @@ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
529
529
  var __objRest$j = (source, exclude) => {
530
530
  var target = {};
531
531
  for (var prop in source)
532
- if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
532
+ if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
533
533
  target[prop] = source[prop];
534
- if (source != null && __getOwnPropSymbols$p)
535
- for (var prop of __getOwnPropSymbols$p(source)) {
536
- if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
534
+ if (source != null && __getOwnPropSymbols$q)
535
+ for (var prop of __getOwnPropSymbols$q(source)) {
536
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
537
537
  target[prop] = source[prop];
538
538
  }
539
539
  return target;
540
540
  };
541
541
  const useListCarriers = (params) => {
542
542
  const { client } = useShipEngine();
543
- const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
544
- return reactQuery.useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
543
+ const _a = __spreadValues$g({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
544
+ return reactQuery.useQuery(__spreadProps$f(__spreadValues$g({}, rest), {
545
545
  onError,
546
546
  queryFn: () => client.carriers.list(queryFnParams),
547
547
  queryKey: ["useListCarriers", queryFnParams],
@@ -549,22 +549,22 @@ const useListCarriers = (params) => {
549
549
  }));
550
550
  };
551
551
 
552
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
553
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
554
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
552
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
553
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
554
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
555
555
  var __objRest$i = (source, exclude) => {
556
556
  var target = {};
557
557
  for (var prop in source)
558
- if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
558
+ if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
559
559
  target[prop] = source[prop];
560
- if (source != null && __getOwnPropSymbols$o)
561
- for (var prop of __getOwnPropSymbols$o(source)) {
562
- if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
560
+ if (source != null && __getOwnPropSymbols$p)
561
+ for (var prop of __getOwnPropSymbols$p(source)) {
562
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
563
563
  target[prop] = source[prop];
564
564
  }
565
565
  return target;
566
566
  };
567
- var __async$z = (__this, __arguments, generator) => {
567
+ var __async$C = (__this, __arguments, generator) => {
568
568
  return new Promise((resolve, reject) => {
569
569
  var fulfilled = (value) => {
570
570
  try {
@@ -588,7 +588,7 @@ const useUpdateAutoFunding = () => {
588
588
  const { client } = useShipEngine();
589
589
  const queryClient = reactQuery.useQueryClient();
590
590
  return reactQuery.useMutation({
591
- mutationFn: (_a) => __async$z(void 0, null, function* () {
591
+ mutationFn: (_a) => __async$C(void 0, null, function* () {
592
592
  var _b = _a, { carrierId } = _b, options = __objRest$i(_b, ["carrierId"]);
593
593
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
594
594
  return result.data;
@@ -618,7 +618,7 @@ const useGetZonesByCarrier = (carrierId) => {
618
618
  });
619
619
  };
620
620
 
621
- var __async$y = (__this, __arguments, generator) => {
621
+ var __async$B = (__this, __arguments, generator) => {
622
622
  return new Promise((resolve, reject) => {
623
623
  var fulfilled = (value) => {
624
624
  try {
@@ -641,7 +641,7 @@ var __async$y = (__this, __arguments, generator) => {
641
641
  const useDeleteCarrier = () => {
642
642
  const { client } = useShipEngine();
643
643
  return reactQuery.useMutation({
644
- mutationFn: (carrierId) => __async$y(void 0, null, function* () {
644
+ mutationFn: (carrierId) => __async$B(void 0, null, function* () {
645
645
  const result = yield client.carriers.delete(carrierId);
646
646
  return result.data;
647
647
  }),
@@ -650,17 +650,17 @@ const useDeleteCarrier = () => {
650
650
  });
651
651
  };
652
652
 
653
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
654
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
655
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
653
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
654
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
655
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
656
656
  var __objRest$h = (source, exclude) => {
657
657
  var target = {};
658
658
  for (var prop in source)
659
- if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
659
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
660
660
  target[prop] = source[prop];
661
- if (source != null && __getOwnPropSymbols$n)
662
- for (var prop of __getOwnPropSymbols$n(source)) {
663
- if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
661
+ if (source != null && __getOwnPropSymbols$o)
662
+ for (var prop of __getOwnPropSymbols$o(source)) {
663
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
664
664
  target[prop] = source[prop];
665
665
  }
666
666
  return target;
@@ -677,17 +677,17 @@ const useGetCarrierConnectionForm = (_params) => {
677
677
  });
678
678
  };
679
679
 
680
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
681
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
682
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
680
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
681
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
682
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
683
683
  var __objRest$g = (source, exclude) => {
684
684
  var target = {};
685
685
  for (var prop in source)
686
- if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
686
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
687
687
  target[prop] = source[prop];
688
- if (source != null && __getOwnPropSymbols$m)
689
- for (var prop of __getOwnPropSymbols$m(source)) {
690
- if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
688
+ if (source != null && __getOwnPropSymbols$n)
689
+ for (var prop of __getOwnPropSymbols$n(source)) {
690
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
691
691
  target[prop] = source[prop];
692
692
  }
693
693
  return target;
@@ -704,7 +704,7 @@ const useListCarrierConnections = (_params) => {
704
704
  });
705
705
  };
706
706
 
707
- var __async$x = (__this, __arguments, generator) => {
707
+ var __async$A = (__this, __arguments, generator) => {
708
708
  return new Promise((resolve, reject) => {
709
709
  var fulfilled = (value) => {
710
710
  try {
@@ -727,7 +727,7 @@ var __async$x = (__this, __arguments, generator) => {
727
727
  const useConnectCarrierAccount = () => {
728
728
  const { client } = useShipEngine();
729
729
  return reactQuery.useMutation({
730
- mutationFn: (_0) => __async$x(void 0, [_0], function* ({ carrierName, formData }) {
730
+ mutationFn: (_0) => __async$A(void 0, [_0], function* ({ carrierName, formData }) {
731
731
  const result = yield client.connections.connectCarrier(carrierName, formData);
732
732
  return result.data;
733
733
  }),
@@ -747,21 +747,21 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
747
747
  });
748
748
  };
749
749
 
750
- var __defProp$e = Object.defineProperty;
750
+ var __defProp$f = Object.defineProperty;
751
751
  var __defProps$e = Object.defineProperties;
752
752
  var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
753
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
754
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
755
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
756
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
757
- var __spreadValues$e = (a, b) => {
753
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
754
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
755
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
756
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
757
+ var __spreadValues$f = (a, b) => {
758
758
  for (var prop in b || (b = {}))
759
- if (__hasOwnProp$l.call(b, prop))
760
- __defNormalProp$e(a, prop, b[prop]);
761
- if (__getOwnPropSymbols$l)
762
- for (var prop of __getOwnPropSymbols$l(b)) {
763
- if (__propIsEnum$l.call(b, prop))
764
- __defNormalProp$e(a, prop, b[prop]);
759
+ if (__hasOwnProp$m.call(b, prop))
760
+ __defNormalProp$f(a, prop, b[prop]);
761
+ if (__getOwnPropSymbols$m)
762
+ for (var prop of __getOwnPropSymbols$m(b)) {
763
+ if (__propIsEnum$m.call(b, prop))
764
+ __defNormalProp$f(a, prop, b[prop]);
765
765
  }
766
766
  return a;
767
767
  };
@@ -769,11 +769,11 @@ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
769
769
  var __objRest$f = (source, exclude) => {
770
770
  var target = {};
771
771
  for (var prop in source)
772
- if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
772
+ if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
773
773
  target[prop] = source[prop];
774
- if (source != null && __getOwnPropSymbols$l)
775
- for (var prop of __getOwnPropSymbols$l(source)) {
776
- if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
774
+ if (source != null && __getOwnPropSymbols$m)
775
+ for (var prop of __getOwnPropSymbols$m(source)) {
776
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
777
777
  target[prop] = source[prop];
778
778
  }
779
779
  return target;
@@ -786,7 +786,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
786
786
  ]);
787
787
  const { client } = useShipEngine();
788
788
  const { carrierName, carrierId } = queryFnParams;
789
- return reactQuery.useQuery(__spreadProps$e(__spreadValues$e({}, params), {
789
+ return reactQuery.useQuery(__spreadProps$e(__spreadValues$f({}, params), {
790
790
  onError,
791
791
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
792
792
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -794,26 +794,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
794
794
  }));
795
795
  };
796
796
 
797
- var __defProp$d = Object.defineProperty;
797
+ var __defProp$e = Object.defineProperty;
798
798
  var __defProps$d = Object.defineProperties;
799
799
  var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
800
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
801
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
802
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
803
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
804
- var __spreadValues$d = (a, b) => {
800
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
801
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
802
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
803
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
804
+ var __spreadValues$e = (a, b) => {
805
805
  for (var prop in b || (b = {}))
806
- if (__hasOwnProp$k.call(b, prop))
807
- __defNormalProp$d(a, prop, b[prop]);
808
- if (__getOwnPropSymbols$k)
809
- for (var prop of __getOwnPropSymbols$k(b)) {
810
- if (__propIsEnum$k.call(b, prop))
811
- __defNormalProp$d(a, prop, b[prop]);
806
+ if (__hasOwnProp$l.call(b, prop))
807
+ __defNormalProp$e(a, prop, b[prop]);
808
+ if (__getOwnPropSymbols$l)
809
+ for (var prop of __getOwnPropSymbols$l(b)) {
810
+ if (__propIsEnum$l.call(b, prop))
811
+ __defNormalProp$e(a, prop, b[prop]);
812
812
  }
813
813
  return a;
814
814
  };
815
815
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
816
- var __async$w = (__this, __arguments, generator) => {
816
+ var __async$z = (__this, __arguments, generator) => {
817
817
  return new Promise((resolve, reject) => {
818
818
  var fulfilled = (value) => {
819
819
  try {
@@ -835,8 +835,8 @@ var __async$w = (__this, __arguments, generator) => {
835
835
  };
836
836
  const useUpdateConnectionsCarrierSettings = (params) => {
837
837
  const { client } = useShipEngine();
838
- return reactQuery.useMutation(__spreadProps$d(__spreadValues$d({}, params), {
839
- mutationFn: (_0) => __async$w(void 0, [_0], function* ({
838
+ return reactQuery.useMutation(__spreadProps$d(__spreadValues$e({}, params), {
839
+ mutationFn: (_0) => __async$z(void 0, [_0], function* ({
840
840
  carrierName,
841
841
  carrierId,
842
842
  formData
@@ -863,7 +863,7 @@ const useListCustomPackageTypes = () => {
863
863
  });
864
864
  };
865
865
 
866
- var __async$v = (__this, __arguments, generator) => {
866
+ var __async$y = (__this, __arguments, generator) => {
867
867
  return new Promise((resolve, reject) => {
868
868
  var fulfilled = (value) => {
869
869
  try {
@@ -886,7 +886,7 @@ var __async$v = (__this, __arguments, generator) => {
886
886
  const useCreateFundingSource = () => {
887
887
  const { client } = useShipEngine();
888
888
  return reactQuery.useMutation({
889
- mutationFn: (fundingSource) => __async$v(void 0, null, function* () {
889
+ mutationFn: (fundingSource) => __async$y(void 0, null, function* () {
890
890
  const result = yield client.fundingSources.create(fundingSource);
891
891
  return result.data;
892
892
  }),
@@ -895,7 +895,7 @@ const useCreateFundingSource = () => {
895
895
  });
896
896
  };
897
897
 
898
- var __async$u = (__this, __arguments, generator) => {
898
+ var __async$x = (__this, __arguments, generator) => {
899
899
  return new Promise((resolve, reject) => {
900
900
  var fulfilled = (value) => {
901
901
  try {
@@ -918,7 +918,7 @@ var __async$u = (__this, __arguments, generator) => {
918
918
  const useFundingSourcesAddFunds = () => {
919
919
  const { client } = useShipEngine();
920
920
  return reactQuery.useMutation({
921
- mutationFn: (_0) => __async$u(void 0, [_0], function* ({ funds, fundingSourceId }) {
921
+ mutationFn: (_0) => __async$x(void 0, [_0], function* ({ funds, fundingSourceId }) {
922
922
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
923
923
  return result.data;
924
924
  }),
@@ -947,7 +947,7 @@ const useListFundingSources = () => {
947
947
  });
948
948
  };
949
949
 
950
- var __async$t = (__this, __arguments, generator) => {
950
+ var __async$w = (__this, __arguments, generator) => {
951
951
  return new Promise((resolve, reject) => {
952
952
  var fulfilled = (value) => {
953
953
  try {
@@ -970,7 +970,7 @@ var __async$t = (__this, __arguments, generator) => {
970
970
  const useRegisterCarrier = () => {
971
971
  const { client } = useShipEngine();
972
972
  return reactQuery.useMutation({
973
- mutationFn: (carrier) => __async$t(void 0, null, function* () {
973
+ mutationFn: (carrier) => __async$w(void 0, null, function* () {
974
974
  const result = yield client.fundingSources.registerCarrier(carrier);
975
975
  return result.data;
976
976
  }),
@@ -979,7 +979,7 @@ const useRegisterCarrier = () => {
979
979
  });
980
980
  };
981
981
 
982
- var __async$s = (__this, __arguments, generator) => {
982
+ var __async$v = (__this, __arguments, generator) => {
983
983
  return new Promise((resolve, reject) => {
984
984
  var fulfilled = (value) => {
985
985
  try {
@@ -1002,7 +1002,7 @@ var __async$s = (__this, __arguments, generator) => {
1002
1002
  const useUpdateFundingSource = () => {
1003
1003
  const { client } = useShipEngine();
1004
1004
  return reactQuery.useMutation({
1005
- mutationFn: (_0) => __async$s(void 0, [_0], function* ({
1005
+ mutationFn: (_0) => __async$v(void 0, [_0], function* ({
1006
1006
  billingInfo,
1007
1007
  creditCardInfo,
1008
1008
  fundingSourceId
@@ -1066,22 +1066,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
1066
1066
  });
1067
1067
  };
1068
1068
 
1069
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1070
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1071
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1069
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
1070
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
1071
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
1072
1072
  var __objRest$e = (source, exclude) => {
1073
1073
  var target = {};
1074
1074
  for (var prop in source)
1075
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
1075
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
1076
1076
  target[prop] = source[prop];
1077
- if (source != null && __getOwnPropSymbols$j)
1078
- for (var prop of __getOwnPropSymbols$j(source)) {
1079
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
1077
+ if (source != null && __getOwnPropSymbols$k)
1078
+ for (var prop of __getOwnPropSymbols$k(source)) {
1079
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
1080
1080
  target[prop] = source[prop];
1081
1081
  }
1082
1082
  return target;
1083
1083
  };
1084
- var __async$r = (__this, __arguments, generator) => {
1084
+ var __async$u = (__this, __arguments, generator) => {
1085
1085
  return new Promise((resolve, reject) => {
1086
1086
  var fulfilled = (value) => {
1087
1087
  try {
@@ -1104,7 +1104,7 @@ var __async$r = (__this, __arguments, generator) => {
1104
1104
  const useAddInsuranceFunds = () => {
1105
1105
  const { client } = useShipEngine();
1106
1106
  return reactQuery.useMutation({
1107
- mutationFn: (_a) => __async$r(void 0, null, function* () {
1107
+ mutationFn: (_a) => __async$u(void 0, null, function* () {
1108
1108
  var _b = _a, { insuranceProvider } = _b, rest = __objRest$e(_b, ["insuranceProvider"]);
1109
1109
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
1110
1110
  return result.data;
@@ -1114,22 +1114,22 @@ const useAddInsuranceFunds = () => {
1114
1114
  });
1115
1115
  };
1116
1116
 
1117
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1118
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1119
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1117
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1118
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1119
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1120
1120
  var __objRest$d = (source, exclude) => {
1121
1121
  var target = {};
1122
1122
  for (var prop in source)
1123
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
1123
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
1124
1124
  target[prop] = source[prop];
1125
- if (source != null && __getOwnPropSymbols$i)
1126
- for (var prop of __getOwnPropSymbols$i(source)) {
1127
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
1125
+ if (source != null && __getOwnPropSymbols$j)
1126
+ for (var prop of __getOwnPropSymbols$j(source)) {
1127
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
1128
1128
  target[prop] = source[prop];
1129
1129
  }
1130
1130
  return target;
1131
1131
  };
1132
- var __async$q = (__this, __arguments, generator) => {
1132
+ var __async$t = (__this, __arguments, generator) => {
1133
1133
  return new Promise((resolve, reject) => {
1134
1134
  var fulfilled = (value) => {
1135
1135
  try {
@@ -1152,7 +1152,7 @@ var __async$q = (__this, __arguments, generator) => {
1152
1152
  const useCreateLabel = () => {
1153
1153
  const { client } = useShipEngine();
1154
1154
  return reactQuery.useMutation({
1155
- mutationFn: (_a) => __async$q(void 0, null, function* () {
1155
+ mutationFn: (_a) => __async$t(void 0, null, function* () {
1156
1156
  var _b = _a, { rateId } = _b, options = __objRest$d(_b, ["rateId"]);
1157
1157
  const result = yield client.labels.createByRateId(rateId, options);
1158
1158
  return result.data;
@@ -1177,21 +1177,21 @@ const useGetLabel = (labelId) => {
1177
1177
  });
1178
1178
  };
1179
1179
 
1180
- var __defProp$c = Object.defineProperty;
1180
+ var __defProp$d = Object.defineProperty;
1181
1181
  var __defProps$c = Object.defineProperties;
1182
1182
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
1183
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1184
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1185
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1186
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1187
- var __spreadValues$c = (a, b) => {
1183
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1184
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1185
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1186
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1187
+ var __spreadValues$d = (a, b) => {
1188
1188
  for (var prop in b || (b = {}))
1189
- if (__hasOwnProp$h.call(b, prop))
1190
- __defNormalProp$c(a, prop, b[prop]);
1191
- if (__getOwnPropSymbols$h)
1192
- for (var prop of __getOwnPropSymbols$h(b)) {
1193
- if (__propIsEnum$h.call(b, prop))
1194
- __defNormalProp$c(a, prop, b[prop]);
1189
+ if (__hasOwnProp$i.call(b, prop))
1190
+ __defNormalProp$d(a, prop, b[prop]);
1191
+ if (__getOwnPropSymbols$i)
1192
+ for (var prop of __getOwnPropSymbols$i(b)) {
1193
+ if (__propIsEnum$i.call(b, prop))
1194
+ __defNormalProp$d(a, prop, b[prop]);
1195
1195
  }
1196
1196
  return a;
1197
1197
  };
@@ -1199,19 +1199,19 @@ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
1199
1199
  var __objRest$c = (source, exclude) => {
1200
1200
  var target = {};
1201
1201
  for (var prop in source)
1202
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1202
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
1203
1203
  target[prop] = source[prop];
1204
- if (source != null && __getOwnPropSymbols$h)
1205
- for (var prop of __getOwnPropSymbols$h(source)) {
1206
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1204
+ if (source != null && __getOwnPropSymbols$i)
1205
+ for (var prop of __getOwnPropSymbols$i(source)) {
1206
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
1207
1207
  target[prop] = source[prop];
1208
1208
  }
1209
1209
  return target;
1210
1210
  };
1211
1211
  const useListLabels = (params) => {
1212
1212
  const { client } = useShipEngine();
1213
- const _a = __spreadValues$c({}, params), { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
1214
- return reactQuery.useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
1213
+ const _a = __spreadValues$d({}, params), { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
1214
+ return reactQuery.useQuery(__spreadProps$c(__spreadValues$d({}, rest), {
1215
1215
  onError,
1216
1216
  queryFn: () => client.labels.list(queryFnParams),
1217
1217
  queryKey: ["useListLabels", params],
@@ -1219,7 +1219,7 @@ const useListLabels = (params) => {
1219
1219
  }));
1220
1220
  };
1221
1221
 
1222
- var __async$p = (__this, __arguments, generator) => {
1222
+ var __async$s = (__this, __arguments, generator) => {
1223
1223
  return new Promise((resolve, reject) => {
1224
1224
  var fulfilled = (value) => {
1225
1225
  try {
@@ -1242,7 +1242,7 @@ var __async$p = (__this, __arguments, generator) => {
1242
1242
  const useVoidLabel = () => {
1243
1243
  const { client } = useShipEngine();
1244
1244
  return reactQuery.useMutation({
1245
- mutationFn: (labelId) => __async$p(void 0, null, function* () {
1245
+ mutationFn: (labelId) => __async$s(void 0, null, function* () {
1246
1246
  const result = yield client.labels.void(labelId);
1247
1247
  return result.data;
1248
1248
  }),
@@ -1261,7 +1261,7 @@ const useListOrderSources = () => {
1261
1261
  });
1262
1262
  };
1263
1263
 
1264
- var __async$o = (__this, __arguments, generator) => {
1264
+ var __async$r = (__this, __arguments, generator) => {
1265
1265
  return new Promise((resolve, reject) => {
1266
1266
  var fulfilled = (value) => {
1267
1267
  try {
@@ -1284,7 +1284,7 @@ var __async$o = (__this, __arguments, generator) => {
1284
1284
  const useRefreshOrderSourceAsync = () => {
1285
1285
  const { client } = useShipEngine();
1286
1286
  return reactQuery.useMutation({
1287
- mutationFn: (orderSourceId) => __async$o(void 0, null, function* () {
1287
+ mutationFn: (orderSourceId) => __async$r(void 0, null, function* () {
1288
1288
  const result = yield client.orderSources.refresh(orderSourceId);
1289
1289
  return result.data;
1290
1290
  }),
@@ -1295,9 +1295,9 @@ const useRefreshOrderSource = () => {
1295
1295
  const { client } = useShipEngine();
1296
1296
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
1297
1297
  return reactQuery.useMutation({
1298
- mutationFn: (orderSourceId) => __async$o(void 0, null, function* () {
1298
+ mutationFn: (orderSourceId) => __async$r(void 0, null, function* () {
1299
1299
  yield refreshOrderSourceAsync(orderSourceId);
1300
- const waitResult = yield retryUntil(() => __async$o(void 0, null, function* () {
1300
+ const waitResult = yield retryUntil(() => __async$r(void 0, null, function* () {
1301
1301
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
1302
1302
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
1303
1303
  throw new jsApi.SE.CodedError("Order source is still refreshing");
@@ -1311,7 +1311,7 @@ const useRefreshOrderSource = () => {
1311
1311
  });
1312
1312
  };
1313
1313
 
1314
- var __async$n = (__this, __arguments, generator) => {
1314
+ var __async$q = (__this, __arguments, generator) => {
1315
1315
  return new Promise((resolve, reject) => {
1316
1316
  var fulfilled = (value) => {
1317
1317
  try {
@@ -1334,7 +1334,7 @@ var __async$n = (__this, __arguments, generator) => {
1334
1334
  const useDeactivateOrderSource = () => {
1335
1335
  const { client } = useShipEngine();
1336
1336
  return reactQuery.useMutation({
1337
- mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1337
+ mutationFn: (orderSourceId) => __async$q(void 0, null, function* () {
1338
1338
  const result = yield client.orderSources.deactivate(orderSourceId);
1339
1339
  return result.data;
1340
1340
  }),
@@ -1353,7 +1353,7 @@ const useListOrderSourcesConnections = () => {
1353
1353
  });
1354
1354
  };
1355
1355
 
1356
- var __async$m = (__this, __arguments, generator) => {
1356
+ var __async$p = (__this, __arguments, generator) => {
1357
1357
  return new Promise((resolve, reject) => {
1358
1358
  var fulfilled = (value) => {
1359
1359
  try {
@@ -1376,7 +1376,7 @@ var __async$m = (__this, __arguments, generator) => {
1376
1376
  const useCreateRateCard = () => {
1377
1377
  const { client } = useShipEngine();
1378
1378
  return reactQuery.useMutation({
1379
- mutationFn: (rateCard) => __async$m(void 0, null, function* () {
1379
+ mutationFn: (rateCard) => __async$p(void 0, null, function* () {
1380
1380
  const result = yield client.rateCards.create(rateCard);
1381
1381
  return result.data;
1382
1382
  }),
@@ -1423,7 +1423,7 @@ const useListRateCards = (carrierIds) => {
1423
1423
  });
1424
1424
  };
1425
1425
 
1426
- var __async$l = (__this, __arguments, generator) => {
1426
+ var __async$o = (__this, __arguments, generator) => {
1427
1427
  return new Promise((resolve, reject) => {
1428
1428
  var fulfilled = (value) => {
1429
1429
  try {
@@ -1446,7 +1446,7 @@ var __async$l = (__this, __arguments, generator) => {
1446
1446
  const usePublishRateCard = () => {
1447
1447
  const { client } = useShipEngine();
1448
1448
  return reactQuery.useMutation({
1449
- mutationFn: (rateCardId) => __async$l(void 0, null, function* () {
1449
+ mutationFn: (rateCardId) => __async$o(void 0, null, function* () {
1450
1450
  return yield client.rateCards.publish(rateCardId);
1451
1451
  }),
1452
1452
  mutationKey: ["usePublishRateCard"],
@@ -1454,7 +1454,7 @@ const usePublishRateCard = () => {
1454
1454
  });
1455
1455
  };
1456
1456
 
1457
- var __async$k = (__this, __arguments, generator) => {
1457
+ var __async$n = (__this, __arguments, generator) => {
1458
1458
  return new Promise((resolve, reject) => {
1459
1459
  var fulfilled = (value) => {
1460
1460
  try {
@@ -1477,7 +1477,7 @@ var __async$k = (__this, __arguments, generator) => {
1477
1477
  const useUpdateRateCard = () => {
1478
1478
  const { client } = useShipEngine();
1479
1479
  return reactQuery.useMutation({
1480
- mutationFn: (rateCard) => __async$k(void 0, null, function* () {
1480
+ mutationFn: (rateCard) => __async$n(void 0, null, function* () {
1481
1481
  const result = yield client.rateCards.update(rateCard);
1482
1482
  return result.data;
1483
1483
  }),
@@ -1486,7 +1486,7 @@ const useUpdateRateCard = () => {
1486
1486
  });
1487
1487
  };
1488
1488
 
1489
- var __async$j = (__this, __arguments, generator) => {
1489
+ var __async$m = (__this, __arguments, generator) => {
1490
1490
  return new Promise((resolve, reject) => {
1491
1491
  var fulfilled = (value) => {
1492
1492
  try {
@@ -1509,7 +1509,7 @@ var __async$j = (__this, __arguments, generator) => {
1509
1509
  const useUploadRateCard = () => {
1510
1510
  const { client } = useShipEngine();
1511
1511
  return reactQuery.useMutation({
1512
- mutationFn: (_0) => __async$j(void 0, [_0], function* ({ rateCardId, file }) {
1512
+ mutationFn: (_0) => __async$m(void 0, [_0], function* ({ rateCardId, file }) {
1513
1513
  const result = yield client.rateCards.upload(rateCardId, file);
1514
1514
  return result.data;
1515
1515
  }),
@@ -1518,7 +1518,7 @@ const useUploadRateCard = () => {
1518
1518
  });
1519
1519
  };
1520
1520
 
1521
- var __async$i = (__this, __arguments, generator) => {
1521
+ var __async$l = (__this, __arguments, generator) => {
1522
1522
  return new Promise((resolve, reject) => {
1523
1523
  var fulfilled = (value) => {
1524
1524
  try {
@@ -1541,7 +1541,7 @@ var __async$i = (__this, __arguments, generator) => {
1541
1541
  const useDeleteRateCard = () => {
1542
1542
  const { client } = useShipEngine();
1543
1543
  return reactQuery.useMutation({
1544
- mutationFn: (rateCardId) => __async$i(void 0, null, function* () {
1544
+ mutationFn: (rateCardId) => __async$l(void 0, null, function* () {
1545
1545
  const result = yield client.rateCards.delete(rateCardId);
1546
1546
  return result.data;
1547
1547
  }),
@@ -1550,7 +1550,7 @@ const useDeleteRateCard = () => {
1550
1550
  });
1551
1551
  };
1552
1552
 
1553
- var __async$h = (__this, __arguments, generator) => {
1553
+ var __async$k = (__this, __arguments, generator) => {
1554
1554
  return new Promise((resolve, reject) => {
1555
1555
  var fulfilled = (value) => {
1556
1556
  try {
@@ -1573,7 +1573,7 @@ var __async$h = (__this, __arguments, generator) => {
1573
1573
  const useCalculateRates = () => {
1574
1574
  const { client } = useShipEngine();
1575
1575
  return reactQuery.useMutation({
1576
- mutationFn: (_0) => __async$h(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1576
+ mutationFn: (_0) => __async$k(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1577
1577
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1578
1578
  return result.data;
1579
1579
  }),
@@ -1582,7 +1582,7 @@ const useCalculateRates = () => {
1582
1582
  });
1583
1583
  };
1584
1584
 
1585
- var __async$g = (__this, __arguments, generator) => {
1585
+ var __async$j = (__this, __arguments, generator) => {
1586
1586
  return new Promise((resolve, reject) => {
1587
1587
  var fulfilled = (value) => {
1588
1588
  try {
@@ -1605,7 +1605,7 @@ var __async$g = (__this, __arguments, generator) => {
1605
1605
  const useRatesEstimate = () => {
1606
1606
  const { client } = useShipEngine();
1607
1607
  return reactQuery.useMutation({
1608
- mutationFn: (_0) => __async$g(void 0, [_0], function* ({ rateParams }) {
1608
+ mutationFn: (_0) => __async$j(void 0, [_0], function* ({ rateParams }) {
1609
1609
  const result = yield client.rates.estimate(rateParams);
1610
1610
  return result.data;
1611
1611
  }),
@@ -1640,22 +1640,22 @@ const useListSalesOrders = (params = {}) => {
1640
1640
  });
1641
1641
  };
1642
1642
 
1643
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1644
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1645
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1643
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1644
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1645
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1646
1646
  var __objRest$b = (source, exclude) => {
1647
1647
  var target = {};
1648
1648
  for (var prop in source)
1649
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1649
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1650
1650
  target[prop] = source[prop];
1651
- if (source != null && __getOwnPropSymbols$g)
1652
- for (var prop of __getOwnPropSymbols$g(source)) {
1653
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1651
+ if (source != null && __getOwnPropSymbols$h)
1652
+ for (var prop of __getOwnPropSymbols$h(source)) {
1653
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1654
1654
  target[prop] = source[prop];
1655
1655
  }
1656
1656
  return target;
1657
1657
  };
1658
- var __async$f = (__this, __arguments, generator) => {
1658
+ var __async$i = (__this, __arguments, generator) => {
1659
1659
  return new Promise((resolve, reject) => {
1660
1660
  var fulfilled = (value) => {
1661
1661
  try {
@@ -1678,7 +1678,7 @@ var __async$f = (__this, __arguments, generator) => {
1678
1678
  const useNotifySalesOrderShipped = () => {
1679
1679
  const { client } = useShipEngine();
1680
1680
  return reactQuery.useMutation({
1681
- mutationFn: (_a) => __async$f(void 0, null, function* () {
1681
+ mutationFn: (_a) => __async$i(void 0, null, function* () {
1682
1682
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$b(_b, ["salesOrderId"]);
1683
1683
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1684
1684
  return result.data;
@@ -1688,22 +1688,22 @@ const useNotifySalesOrderShipped = () => {
1688
1688
  });
1689
1689
  };
1690
1690
 
1691
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1692
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1693
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1691
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1692
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1693
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1694
1694
  var __objRest$a = (source, exclude) => {
1695
1695
  var target = {};
1696
1696
  for (var prop in source)
1697
- if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1697
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1698
1698
  target[prop] = source[prop];
1699
- if (source != null && __getOwnPropSymbols$f)
1700
- for (var prop of __getOwnPropSymbols$f(source)) {
1701
- if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1699
+ if (source != null && __getOwnPropSymbols$g)
1700
+ for (var prop of __getOwnPropSymbols$g(source)) {
1701
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1702
1702
  target[prop] = source[prop];
1703
1703
  }
1704
1704
  return target;
1705
1705
  };
1706
- var __async$e = (__this, __arguments, generator) => {
1706
+ var __async$h = (__this, __arguments, generator) => {
1707
1707
  return new Promise((resolve, reject) => {
1708
1708
  var fulfilled = (value) => {
1709
1709
  try {
@@ -1726,7 +1726,7 @@ var __async$e = (__this, __arguments, generator) => {
1726
1726
  const useCreateSalesOrderShipment = () => {
1727
1727
  const { client } = useShipEngine();
1728
1728
  return reactQuery.useMutation({
1729
- mutationFn: (_a) => __async$e(void 0, null, function* () {
1729
+ mutationFn: (_a) => __async$h(void 0, null, function* () {
1730
1730
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$a(_b, ["salesOrderId"]);
1731
1731
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1732
1732
  return result.data;
@@ -1762,22 +1762,22 @@ const useListSalesOrderShipments = (params) => {
1762
1762
  });
1763
1763
  };
1764
1764
 
1765
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1766
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1767
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1765
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1766
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1767
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1768
1768
  var __objRest$9 = (source, exclude) => {
1769
1769
  var target = {};
1770
1770
  for (var prop in source)
1771
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1771
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1772
1772
  target[prop] = source[prop];
1773
- if (source != null && __getOwnPropSymbols$e)
1774
- for (var prop of __getOwnPropSymbols$e(source)) {
1775
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
1773
+ if (source != null && __getOwnPropSymbols$f)
1774
+ for (var prop of __getOwnPropSymbols$f(source)) {
1775
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1776
1776
  target[prop] = source[prop];
1777
1777
  }
1778
1778
  return target;
1779
1779
  };
1780
- var __async$d = (__this, __arguments, generator) => {
1780
+ var __async$g = (__this, __arguments, generator) => {
1781
1781
  return new Promise((resolve, reject) => {
1782
1782
  var fulfilled = (value) => {
1783
1783
  try {
@@ -1800,7 +1800,7 @@ var __async$d = (__this, __arguments, generator) => {
1800
1800
  const useUpdateSalesOrderShipment = () => {
1801
1801
  const { client } = useShipEngine();
1802
1802
  return reactQuery.useMutation({
1803
- mutationFn: (_a) => __async$d(void 0, null, function* () {
1803
+ mutationFn: (_a) => __async$g(void 0, null, function* () {
1804
1804
  var _b = _a, { shipmentId } = _b, shipment = __objRest$9(_b, ["shipmentId"]);
1805
1805
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1806
1806
  return result.data;
@@ -1810,26 +1810,26 @@ const useUpdateSalesOrderShipment = () => {
1810
1810
  });
1811
1811
  };
1812
1812
 
1813
- var __defProp$b = Object.defineProperty;
1813
+ var __defProp$c = Object.defineProperty;
1814
1814
  var __defProps$b = Object.defineProperties;
1815
1815
  var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1816
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1817
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1818
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1819
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1820
- var __spreadValues$b = (a, b) => {
1816
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1817
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1818
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1819
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1820
+ var __spreadValues$c = (a, b) => {
1821
1821
  for (var prop in b || (b = {}))
1822
- if (__hasOwnProp$d.call(b, prop))
1823
- __defNormalProp$b(a, prop, b[prop]);
1824
- if (__getOwnPropSymbols$d)
1825
- for (var prop of __getOwnPropSymbols$d(b)) {
1826
- if (__propIsEnum$d.call(b, prop))
1827
- __defNormalProp$b(a, prop, b[prop]);
1822
+ if (__hasOwnProp$e.call(b, prop))
1823
+ __defNormalProp$c(a, prop, b[prop]);
1824
+ if (__getOwnPropSymbols$e)
1825
+ for (var prop of __getOwnPropSymbols$e(b)) {
1826
+ if (__propIsEnum$e.call(b, prop))
1827
+ __defNormalProp$c(a, prop, b[prop]);
1828
1828
  }
1829
1829
  return a;
1830
1830
  };
1831
1831
  var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1832
- var __async$c = (__this, __arguments, generator) => {
1832
+ var __async$f = (__this, __arguments, generator) => {
1833
1833
  return new Promise((resolve, reject) => {
1834
1834
  var fulfilled = (value) => {
1835
1835
  try {
@@ -1852,7 +1852,7 @@ var __async$c = (__this, __arguments, generator) => {
1852
1852
  const useCreateShipment = () => {
1853
1853
  const { client } = useShipEngine();
1854
1854
  return reactQuery.useMutation({
1855
- mutationFn: (shipment) => __async$c(void 0, null, function* () {
1855
+ mutationFn: (shipment) => __async$f(void 0, null, function* () {
1856
1856
  var _a;
1857
1857
  if (shipment.warehouseId === void 0) {
1858
1858
  throw new jsApi.SE.CodedError("errorMessages.noWarehouses", {
@@ -1870,7 +1870,7 @@ const useCreateShipment = () => {
1870
1870
  postalCode: "",
1871
1871
  stateProvince: ""
1872
1872
  };
1873
- return (yield client.shipments.create(__spreadProps$b(__spreadValues$b({}, shipment), {
1873
+ return (yield client.shipments.create(__spreadProps$b(__spreadValues$c({}, shipment), {
1874
1874
  shipTo
1875
1875
  }))).data;
1876
1876
  }),
@@ -1895,21 +1895,21 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
1895
1895
  });
1896
1896
  };
1897
1897
 
1898
- var __defProp$a = Object.defineProperty;
1898
+ var __defProp$b = Object.defineProperty;
1899
1899
  var __defProps$a = Object.defineProperties;
1900
1900
  var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1901
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1902
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1903
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1904
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1905
- var __spreadValues$a = (a, b) => {
1901
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1902
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1903
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1904
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1905
+ var __spreadValues$b = (a, b) => {
1906
1906
  for (var prop in b || (b = {}))
1907
- if (__hasOwnProp$c.call(b, prop))
1908
- __defNormalProp$a(a, prop, b[prop]);
1909
- if (__getOwnPropSymbols$c)
1910
- for (var prop of __getOwnPropSymbols$c(b)) {
1911
- if (__propIsEnum$c.call(b, prop))
1912
- __defNormalProp$a(a, prop, b[prop]);
1907
+ if (__hasOwnProp$d.call(b, prop))
1908
+ __defNormalProp$b(a, prop, b[prop]);
1909
+ if (__getOwnPropSymbols$d)
1910
+ for (var prop of __getOwnPropSymbols$d(b)) {
1911
+ if (__propIsEnum$d.call(b, prop))
1912
+ __defNormalProp$b(a, prop, b[prop]);
1913
1913
  }
1914
1914
  return a;
1915
1915
  };
@@ -1917,11 +1917,11 @@ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1917
1917
  var __objRest$8 = (source, exclude) => {
1918
1918
  var target = {};
1919
1919
  for (var prop in source)
1920
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1920
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
1921
1921
  target[prop] = source[prop];
1922
- if (source != null && __getOwnPropSymbols$c)
1923
- for (var prop of __getOwnPropSymbols$c(source)) {
1924
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1922
+ if (source != null && __getOwnPropSymbols$d)
1923
+ for (var prop of __getOwnPropSymbols$d(source)) {
1924
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
1925
1925
  target[prop] = source[prop];
1926
1926
  }
1927
1927
  return target;
@@ -1937,7 +1937,7 @@ const useGetShipment = (params) => {
1937
1937
  }
1938
1938
  return {};
1939
1939
  };
1940
- return reactQuery.useQuery(__spreadProps$a(__spreadValues$a({}, getQueryProps()), {
1940
+ return reactQuery.useQuery(__spreadProps$a(__spreadValues$b({}, getQueryProps()), {
1941
1941
  enabled: shipmentId !== void 0,
1942
1942
  onError,
1943
1943
  queryFn: () => {
@@ -1951,17 +1951,17 @@ const useGetShipment = (params) => {
1951
1951
  }));
1952
1952
  };
1953
1953
 
1954
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1955
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1956
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1954
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1955
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1956
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1957
1957
  var __objRest$7 = (source, exclude) => {
1958
1958
  var target = {};
1959
1959
  for (var prop in source)
1960
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1960
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1961
1961
  target[prop] = source[prop];
1962
- if (source != null && __getOwnPropSymbols$b)
1963
- for (var prop of __getOwnPropSymbols$b(source)) {
1964
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1962
+ if (source != null && __getOwnPropSymbols$c)
1963
+ for (var prop of __getOwnPropSymbols$c(source)) {
1964
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1965
1965
  target[prop] = source[prop];
1966
1966
  }
1967
1967
  return target;
@@ -1978,21 +1978,21 @@ const useListShipments = (_params) => {
1978
1978
  });
1979
1979
  };
1980
1980
 
1981
- var __defProp$9 = Object.defineProperty;
1981
+ var __defProp$a = Object.defineProperty;
1982
1982
  var __defProps$9 = Object.defineProperties;
1983
1983
  var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1984
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1985
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1986
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1987
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1988
- var __spreadValues$9 = (a, b) => {
1984
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1985
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1986
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1987
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1988
+ var __spreadValues$a = (a, b) => {
1989
1989
  for (var prop in b || (b = {}))
1990
- if (__hasOwnProp$a.call(b, prop))
1991
- __defNormalProp$9(a, prop, b[prop]);
1992
- if (__getOwnPropSymbols$a)
1993
- for (var prop of __getOwnPropSymbols$a(b)) {
1994
- if (__propIsEnum$a.call(b, prop))
1995
- __defNormalProp$9(a, prop, b[prop]);
1990
+ if (__hasOwnProp$b.call(b, prop))
1991
+ __defNormalProp$a(a, prop, b[prop]);
1992
+ if (__getOwnPropSymbols$b)
1993
+ for (var prop of __getOwnPropSymbols$b(b)) {
1994
+ if (__propIsEnum$b.call(b, prop))
1995
+ __defNormalProp$a(a, prop, b[prop]);
1996
1996
  }
1997
1997
  return a;
1998
1998
  };
@@ -2000,11 +2000,11 @@ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2000
2000
  var __objRest$6 = (source, exclude) => {
2001
2001
  var target = {};
2002
2002
  for (var prop in source)
2003
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2003
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2004
2004
  target[prop] = source[prop];
2005
- if (source != null && __getOwnPropSymbols$a)
2006
- for (var prop of __getOwnPropSymbols$a(source)) {
2007
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2005
+ if (source != null && __getOwnPropSymbols$b)
2006
+ for (var prop of __getOwnPropSymbols$b(source)) {
2007
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2008
2008
  target[prop] = source[prop];
2009
2009
  }
2010
2010
  return target;
@@ -2012,7 +2012,7 @@ var __objRest$6 = (source, exclude) => {
2012
2012
  const useGetShipmentByExternalId = (params) => {
2013
2013
  const { client } = useShipEngine();
2014
2014
  const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
2015
- return reactQuery.useQuery(__spreadProps$9(__spreadValues$9({}, rest), {
2015
+ return reactQuery.useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
2016
2016
  onError,
2017
2017
  queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
2018
2018
  queryKey: ["useGetShipmentByExternalId", queryFnParams],
@@ -2020,21 +2020,21 @@ const useGetShipmentByExternalId = (params) => {
2020
2020
  }));
2021
2021
  };
2022
2022
 
2023
- var __defProp$8 = Object.defineProperty;
2023
+ var __defProp$9 = Object.defineProperty;
2024
2024
  var __defProps$8 = Object.defineProperties;
2025
2025
  var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2026
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2027
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2028
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2029
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2030
- var __spreadValues$8 = (a, b) => {
2026
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
2027
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
2028
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
2029
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2030
+ var __spreadValues$9 = (a, b) => {
2031
2031
  for (var prop in b || (b = {}))
2032
- if (__hasOwnProp$9.call(b, prop))
2033
- __defNormalProp$8(a, prop, b[prop]);
2034
- if (__getOwnPropSymbols$9)
2035
- for (var prop of __getOwnPropSymbols$9(b)) {
2036
- if (__propIsEnum$9.call(b, prop))
2037
- __defNormalProp$8(a, prop, b[prop]);
2032
+ if (__hasOwnProp$a.call(b, prop))
2033
+ __defNormalProp$9(a, prop, b[prop]);
2034
+ if (__getOwnPropSymbols$a)
2035
+ for (var prop of __getOwnPropSymbols$a(b)) {
2036
+ if (__propIsEnum$a.call(b, prop))
2037
+ __defNormalProp$9(a, prop, b[prop]);
2038
2038
  }
2039
2039
  return a;
2040
2040
  };
@@ -2042,19 +2042,19 @@ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2042
2042
  var __objRest$5 = (source, exclude) => {
2043
2043
  var target = {};
2044
2044
  for (var prop in source)
2045
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2045
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2046
2046
  target[prop] = source[prop];
2047
- if (source != null && __getOwnPropSymbols$9)
2048
- for (var prop of __getOwnPropSymbols$9(source)) {
2049
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2047
+ if (source != null && __getOwnPropSymbols$a)
2048
+ for (var prop of __getOwnPropSymbols$a(source)) {
2049
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2050
2050
  target[prop] = source[prop];
2051
2051
  }
2052
2052
  return target;
2053
2053
  };
2054
2054
  const useListShippingRules = (params) => {
2055
2055
  const { client } = useShipEngine();
2056
- const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2057
- return reactQuery.useQuery(__spreadProps$8(__spreadValues$8({}, rest), {
2056
+ const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2057
+ return reactQuery.useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
2058
2058
  onError,
2059
2059
  queryFn: () => {
2060
2060
  return client.shippingRules.list(queryFnParams);
@@ -2064,7 +2064,7 @@ const useListShippingRules = (params) => {
2064
2064
  }));
2065
2065
  };
2066
2066
 
2067
- var __async$b = (__this, __arguments, generator) => {
2067
+ var __async$e = (__this, __arguments, generator) => {
2068
2068
  return new Promise((resolve, reject) => {
2069
2069
  var fulfilled = (value) => {
2070
2070
  try {
@@ -2087,7 +2087,7 @@ var __async$b = (__this, __arguments, generator) => {
2087
2087
  const useCreateShippingRule = () => {
2088
2088
  const { client } = useShipEngine();
2089
2089
  return reactQuery.useMutation({
2090
- mutationFn: (props) => __async$b(void 0, null, function* () {
2090
+ mutationFn: (props) => __async$e(void 0, null, function* () {
2091
2091
  const result = yield client.shippingRules.create(props);
2092
2092
  return result.data;
2093
2093
  }),
@@ -2096,7 +2096,7 @@ const useCreateShippingRule = () => {
2096
2096
  });
2097
2097
  };
2098
2098
 
2099
- var __async$a = (__this, __arguments, generator) => {
2099
+ var __async$d = (__this, __arguments, generator) => {
2100
2100
  return new Promise((resolve, reject) => {
2101
2101
  var fulfilled = (value) => {
2102
2102
  try {
@@ -2119,7 +2119,7 @@ var __async$a = (__this, __arguments, generator) => {
2119
2119
  const useDeleteShippingRule = () => {
2120
2120
  const { client } = useShipEngine();
2121
2121
  return reactQuery.useMutation({
2122
- mutationFn: (props) => __async$a(void 0, null, function* () {
2122
+ mutationFn: (props) => __async$d(void 0, null, function* () {
2123
2123
  const result = yield client.shippingRules.delete(props);
2124
2124
  return result.data;
2125
2125
  }),
@@ -2128,7 +2128,7 @@ const useDeleteShippingRule = () => {
2128
2128
  });
2129
2129
  };
2130
2130
 
2131
- var __async$9 = (__this, __arguments, generator) => {
2131
+ var __async$c = (__this, __arguments, generator) => {
2132
2132
  return new Promise((resolve, reject) => {
2133
2133
  var fulfilled = (value) => {
2134
2134
  try {
@@ -2151,7 +2151,7 @@ var __async$9 = (__this, __arguments, generator) => {
2151
2151
  const useEditShippingRule = () => {
2152
2152
  const { client } = useShipEngine();
2153
2153
  return reactQuery.useMutation({
2154
- mutationFn: (props) => __async$9(void 0, null, function* () {
2154
+ mutationFn: (props) => __async$c(void 0, null, function* () {
2155
2155
  const result = yield client.shippingRules.edit(props);
2156
2156
  return result.data;
2157
2157
  }),
@@ -2160,21 +2160,21 @@ const useEditShippingRule = () => {
2160
2160
  });
2161
2161
  };
2162
2162
 
2163
- var __defProp$7 = Object.defineProperty;
2163
+ var __defProp$8 = Object.defineProperty;
2164
2164
  var __defProps$7 = Object.defineProperties;
2165
2165
  var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2166
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2167
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2168
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2169
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2170
- var __spreadValues$7 = (a, b) => {
2166
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2167
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2168
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2169
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2170
+ var __spreadValues$8 = (a, b) => {
2171
2171
  for (var prop in b || (b = {}))
2172
- if (__hasOwnProp$8.call(b, prop))
2173
- __defNormalProp$7(a, prop, b[prop]);
2174
- if (__getOwnPropSymbols$8)
2175
- for (var prop of __getOwnPropSymbols$8(b)) {
2176
- if (__propIsEnum$8.call(b, prop))
2177
- __defNormalProp$7(a, prop, b[prop]);
2172
+ if (__hasOwnProp$9.call(b, prop))
2173
+ __defNormalProp$8(a, prop, b[prop]);
2174
+ if (__getOwnPropSymbols$9)
2175
+ for (var prop of __getOwnPropSymbols$9(b)) {
2176
+ if (__propIsEnum$9.call(b, prop))
2177
+ __defNormalProp$8(a, prop, b[prop]);
2178
2178
  }
2179
2179
  return a;
2180
2180
  };
@@ -2182,19 +2182,19 @@ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2182
2182
  var __objRest$4 = (source, exclude) => {
2183
2183
  var target = {};
2184
2184
  for (var prop in source)
2185
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2185
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2186
2186
  target[prop] = source[prop];
2187
- if (source != null && __getOwnPropSymbols$8)
2188
- for (var prop of __getOwnPropSymbols$8(source)) {
2189
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2187
+ if (source != null && __getOwnPropSymbols$9)
2188
+ for (var prop of __getOwnPropSymbols$9(source)) {
2189
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2190
2190
  target[prop] = source[prop];
2191
2191
  }
2192
2192
  return target;
2193
2193
  };
2194
2194
  const useGetShippingRuleConditionsOptions = (params) => {
2195
2195
  const { client } = useShipEngine();
2196
- const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2197
- return reactQuery.useQuery(__spreadProps$7(__spreadValues$7({}, rest), {
2196
+ const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2197
+ return reactQuery.useQuery(__spreadProps$7(__spreadValues$8({}, rest), {
2198
2198
  onError,
2199
2199
  queryFn: () => {
2200
2200
  return client.shippingRules.getConditionOptions(queryFnParams);
@@ -2204,21 +2204,21 @@ const useGetShippingRuleConditionsOptions = (params) => {
2204
2204
  }));
2205
2205
  };
2206
2206
 
2207
- var __defProp$6 = Object.defineProperty;
2207
+ var __defProp$7 = Object.defineProperty;
2208
2208
  var __defProps$6 = Object.defineProperties;
2209
2209
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2210
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2211
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2212
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2213
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2214
- var __spreadValues$6 = (a, b) => {
2210
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2211
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2212
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2213
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2214
+ var __spreadValues$7 = (a, b) => {
2215
2215
  for (var prop in b || (b = {}))
2216
- if (__hasOwnProp$7.call(b, prop))
2217
- __defNormalProp$6(a, prop, b[prop]);
2218
- if (__getOwnPropSymbols$7)
2219
- for (var prop of __getOwnPropSymbols$7(b)) {
2220
- if (__propIsEnum$7.call(b, prop))
2221
- __defNormalProp$6(a, prop, b[prop]);
2216
+ if (__hasOwnProp$8.call(b, prop))
2217
+ __defNormalProp$7(a, prop, b[prop]);
2218
+ if (__getOwnPropSymbols$8)
2219
+ for (var prop of __getOwnPropSymbols$8(b)) {
2220
+ if (__propIsEnum$8.call(b, prop))
2221
+ __defNormalProp$7(a, prop, b[prop]);
2222
2222
  }
2223
2223
  return a;
2224
2224
  };
@@ -2226,19 +2226,19 @@ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2226
2226
  var __objRest$3 = (source, exclude) => {
2227
2227
  var target = {};
2228
2228
  for (var prop in source)
2229
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2229
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2230
2230
  target[prop] = source[prop];
2231
- if (source != null && __getOwnPropSymbols$7)
2232
- for (var prop of __getOwnPropSymbols$7(source)) {
2233
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2231
+ if (source != null && __getOwnPropSymbols$8)
2232
+ for (var prop of __getOwnPropSymbols$8(source)) {
2233
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2234
2234
  target[prop] = source[prop];
2235
2235
  }
2236
2236
  return target;
2237
2237
  };
2238
2238
  const useGetShippingRuleById = (params) => {
2239
2239
  const { client } = useShipEngine();
2240
- const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2241
- return reactQuery.useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
2240
+ const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2241
+ return reactQuery.useQuery(__spreadProps$6(__spreadValues$7({}, rest), {
2242
2242
  onError,
2243
2243
  queryFn: () => {
2244
2244
  return client.shippingRules.get(queryFnParams);
@@ -2263,7 +2263,7 @@ const useGetThemeById = (themeId) => {
2263
2263
  });
2264
2264
  };
2265
2265
 
2266
- var __async$8 = (__this, __arguments, generator) => {
2266
+ var __async$b = (__this, __arguments, generator) => {
2267
2267
  return new Promise((resolve, reject) => {
2268
2268
  var fulfilled = (value) => {
2269
2269
  try {
@@ -2286,7 +2286,7 @@ var __async$8 = (__this, __arguments, generator) => {
2286
2286
  const useCreateWarehouse = () => {
2287
2287
  const { client } = useShipEngine();
2288
2288
  return reactQuery.useMutation({
2289
- mutationFn: (data) => __async$8(void 0, null, function* () {
2289
+ mutationFn: (data) => __async$b(void 0, null, function* () {
2290
2290
  const result = yield client.warehouses.create(data);
2291
2291
  return result.data;
2292
2292
  }),
@@ -2295,7 +2295,7 @@ const useCreateWarehouse = () => {
2295
2295
  });
2296
2296
  };
2297
2297
 
2298
- var __async$7 = (__this, __arguments, generator) => {
2298
+ var __async$a = (__this, __arguments, generator) => {
2299
2299
  return new Promise((resolve, reject) => {
2300
2300
  var fulfilled = (value) => {
2301
2301
  try {
@@ -2318,7 +2318,7 @@ var __async$7 = (__this, __arguments, generator) => {
2318
2318
  const useDeleteWarehouse = () => {
2319
2319
  const { client } = useShipEngine();
2320
2320
  return reactQuery.useMutation({
2321
- mutationFn: (_0) => __async$7(void 0, [_0], function* ({ warehouseId }) {
2321
+ mutationFn: (_0) => __async$a(void 0, [_0], function* ({ warehouseId }) {
2322
2322
  const result = yield client.warehouses.delete(warehouseId);
2323
2323
  return result.data;
2324
2324
  }),
@@ -2327,21 +2327,21 @@ const useDeleteWarehouse = () => {
2327
2327
  });
2328
2328
  };
2329
2329
 
2330
- var __defProp$5 = Object.defineProperty;
2330
+ var __defProp$6 = Object.defineProperty;
2331
2331
  var __defProps$5 = Object.defineProperties;
2332
2332
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2333
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2334
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2335
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2336
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2337
- var __spreadValues$5 = (a, b) => {
2333
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2334
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2335
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2336
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2337
+ var __spreadValues$6 = (a, b) => {
2338
2338
  for (var prop in b || (b = {}))
2339
- if (__hasOwnProp$6.call(b, prop))
2340
- __defNormalProp$5(a, prop, b[prop]);
2341
- if (__getOwnPropSymbols$6)
2342
- for (var prop of __getOwnPropSymbols$6(b)) {
2343
- if (__propIsEnum$6.call(b, prop))
2344
- __defNormalProp$5(a, prop, b[prop]);
2339
+ if (__hasOwnProp$7.call(b, prop))
2340
+ __defNormalProp$6(a, prop, b[prop]);
2341
+ if (__getOwnPropSymbols$7)
2342
+ for (var prop of __getOwnPropSymbols$7(b)) {
2343
+ if (__propIsEnum$7.call(b, prop))
2344
+ __defNormalProp$6(a, prop, b[prop]);
2345
2345
  }
2346
2346
  return a;
2347
2347
  };
@@ -2349,19 +2349,19 @@ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2349
2349
  var __objRest$2 = (source, exclude) => {
2350
2350
  var target = {};
2351
2351
  for (var prop in source)
2352
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2352
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2353
2353
  target[prop] = source[prop];
2354
- if (source != null && __getOwnPropSymbols$6)
2355
- for (var prop of __getOwnPropSymbols$6(source)) {
2356
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2354
+ if (source != null && __getOwnPropSymbols$7)
2355
+ for (var prop of __getOwnPropSymbols$7(source)) {
2356
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2357
2357
  target[prop] = source[prop];
2358
2358
  }
2359
2359
  return target;
2360
2360
  };
2361
2361
  const useListWarehouses = (params) => {
2362
2362
  const { client } = useShipEngine();
2363
- const _a = __spreadValues$5({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2364
- return reactQuery.useQuery(__spreadProps$5(__spreadValues$5({}, rest), {
2363
+ const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2364
+ return reactQuery.useQuery(__spreadProps$5(__spreadValues$6({}, rest), {
2365
2365
  onError,
2366
2366
  queryFn: () => client.warehouses.list(queryFnParams),
2367
2367
  queryKey: ["useListWarehouses", queryFnParams],
@@ -2369,22 +2369,22 @@ const useListWarehouses = (params) => {
2369
2369
  }));
2370
2370
  };
2371
2371
 
2372
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2373
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2374
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2372
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2373
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2374
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2375
2375
  var __objRest$1 = (source, exclude) => {
2376
2376
  var target = {};
2377
2377
  for (var prop in source)
2378
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
2378
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2379
2379
  target[prop] = source[prop];
2380
- if (source != null && __getOwnPropSymbols$5)
2381
- for (var prop of __getOwnPropSymbols$5(source)) {
2382
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
2380
+ if (source != null && __getOwnPropSymbols$6)
2381
+ for (var prop of __getOwnPropSymbols$6(source)) {
2382
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2383
2383
  target[prop] = source[prop];
2384
2384
  }
2385
2385
  return target;
2386
2386
  };
2387
- var __async$6 = (__this, __arguments, generator) => {
2387
+ var __async$9 = (__this, __arguments, generator) => {
2388
2388
  return new Promise((resolve, reject) => {
2389
2389
  var fulfilled = (value) => {
2390
2390
  try {
@@ -2407,7 +2407,7 @@ var __async$6 = (__this, __arguments, generator) => {
2407
2407
  const useUpdateWarehouse = () => {
2408
2408
  const { client } = useShipEngine();
2409
2409
  return reactQuery.useMutation({
2410
- mutationFn: (_a) => __async$6(void 0, null, function* () {
2410
+ mutationFn: (_a) => __async$9(void 0, null, function* () {
2411
2411
  var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
2412
2412
  const result = yield client.warehouses.update(warehouseId, warehouse);
2413
2413
  return result.data;
@@ -2427,7 +2427,7 @@ const useGetAccountBillingPlan = () => {
2427
2427
  });
2428
2428
  };
2429
2429
 
2430
- var __async$5 = (__this, __arguments, generator) => {
2430
+ var __async$8 = (__this, __arguments, generator) => {
2431
2431
  return new Promise((resolve, reject) => {
2432
2432
  var fulfilled = (value) => {
2433
2433
  try {
@@ -2450,7 +2450,7 @@ var __async$5 = (__this, __arguments, generator) => {
2450
2450
  const useUpdateAccountBillingPlan = () => {
2451
2451
  const { client } = useShipEngine();
2452
2452
  return reactQuery.useMutation({
2453
- mutationFn: (code) => __async$5(void 0, null, function* () {
2453
+ mutationFn: (code) => __async$8(void 0, null, function* () {
2454
2454
  const result = yield client.accountBillingPlan.update({ code });
2455
2455
  return result.data;
2456
2456
  }),
@@ -2459,28 +2459,28 @@ const useUpdateAccountBillingPlan = () => {
2459
2459
  });
2460
2460
  };
2461
2461
 
2462
- var __defProp$4 = Object.defineProperty;
2462
+ var __defProp$5 = Object.defineProperty;
2463
2463
  var __defProps$4 = Object.defineProperties;
2464
2464
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2465
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2466
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2467
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2468
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2469
- var __spreadValues$4 = (a, b) => {
2465
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2466
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2467
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2468
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2469
+ var __spreadValues$5 = (a, b) => {
2470
2470
  for (var prop in b || (b = {}))
2471
- if (__hasOwnProp$4.call(b, prop))
2472
- __defNormalProp$4(a, prop, b[prop]);
2473
- if (__getOwnPropSymbols$4)
2474
- for (var prop of __getOwnPropSymbols$4(b)) {
2475
- if (__propIsEnum$4.call(b, prop))
2476
- __defNormalProp$4(a, prop, b[prop]);
2471
+ if (__hasOwnProp$5.call(b, prop))
2472
+ __defNormalProp$5(a, prop, b[prop]);
2473
+ if (__getOwnPropSymbols$5)
2474
+ for (var prop of __getOwnPropSymbols$5(b)) {
2475
+ if (__propIsEnum$5.call(b, prop))
2476
+ __defNormalProp$5(a, prop, b[prop]);
2477
2477
  }
2478
2478
  return a;
2479
2479
  };
2480
2480
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2481
2481
  const useGetHereToken = (params) => {
2482
2482
  const { client } = useShipEngine();
2483
- return reactQuery.useQuery(__spreadProps$4(__spreadValues$4({}, params), {
2483
+ return reactQuery.useQuery(__spreadProps$4(__spreadValues$5({}, params), {
2484
2484
  onError,
2485
2485
  queryFn: () => client.servicePoints.getHereToken(),
2486
2486
  queryKey: ["useGetHereToken"],
@@ -2523,7 +2523,7 @@ const useListServicePoints = (options) => {
2523
2523
  });
2524
2524
  };
2525
2525
 
2526
- var __async$4 = (__this, __arguments, generator) => {
2526
+ var __async$7 = (__this, __arguments, generator) => {
2527
2527
  return new Promise((resolve, reject) => {
2528
2528
  var fulfilled = (value) => {
2529
2529
  try {
@@ -2546,7 +2546,7 @@ var __async$4 = (__this, __arguments, generator) => {
2546
2546
  const useAddSandboxCarriers = () => {
2547
2547
  const { client } = useShipEngine();
2548
2548
  return reactQuery.useMutation({
2549
- mutationFn: (props) => __async$4(void 0, null, function* () {
2549
+ mutationFn: (props) => __async$7(void 0, null, function* () {
2550
2550
  const result = yield client.sellers.addSandboxCarriers(props);
2551
2551
  return result.data;
2552
2552
  }),
@@ -2555,7 +2555,7 @@ const useAddSandboxCarriers = () => {
2555
2555
  });
2556
2556
  };
2557
2557
 
2558
- var __async$3 = (__this, __arguments, generator) => {
2558
+ var __async$6 = (__this, __arguments, generator) => {
2559
2559
  return new Promise((resolve, reject) => {
2560
2560
  var fulfilled = (value) => {
2561
2561
  try {
@@ -2578,7 +2578,7 @@ var __async$3 = (__this, __arguments, generator) => {
2578
2578
  const useCreateSandboxSeller = () => {
2579
2579
  const { client } = useShipEngine();
2580
2580
  return reactQuery.useMutation({
2581
- mutationFn: (_0) => __async$3(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2581
+ mutationFn: (_0) => __async$6(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2582
2582
  const result = yield client.sellers.createSandboxSeller({
2583
2583
  sellerId,
2584
2584
  tryReuseCarrierConnection
@@ -2600,6 +2600,141 @@ const useListSandboxSellerIds = (sellerId) => {
2600
2600
  });
2601
2601
  };
2602
2602
 
2603
+ var __defProp$4 = Object.defineProperty;
2604
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2605
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2606
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2607
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2608
+ var __spreadValues$4 = (a, b) => {
2609
+ for (var prop in b || (b = {}))
2610
+ if (__hasOwnProp$4.call(b, prop))
2611
+ __defNormalProp$4(a, prop, b[prop]);
2612
+ if (__getOwnPropSymbols$4)
2613
+ for (var prop of __getOwnPropSymbols$4(b)) {
2614
+ if (__propIsEnum$4.call(b, prop))
2615
+ __defNormalProp$4(a, prop, b[prop]);
2616
+ }
2617
+ return a;
2618
+ };
2619
+ var __async$5 = (__this, __arguments, generator) => {
2620
+ return new Promise((resolve, reject) => {
2621
+ var fulfilled = (value) => {
2622
+ try {
2623
+ step(generator.next(value));
2624
+ } catch (e) {
2625
+ reject(e);
2626
+ }
2627
+ };
2628
+ var rejected = (value) => {
2629
+ try {
2630
+ step(generator.throw(value));
2631
+ } catch (e) {
2632
+ reject(e);
2633
+ }
2634
+ };
2635
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2636
+ step((generator = generator.apply(__this, __arguments)).next());
2637
+ });
2638
+ };
2639
+ const useListSellerApiKeys = (params) => {
2640
+ const { client } = useShipEngine();
2641
+ return reactQuery.useQuery({
2642
+ onError,
2643
+ queryFn: () => __async$5(void 0, null, function* () {
2644
+ var _a;
2645
+ const sellerId = yield client.getTenant((_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.isSandbox);
2646
+ if (sellerId) {
2647
+ return client.sellers.listSellerApiKeys(__spreadValues$4({ sellerId }, params));
2648
+ }
2649
+ return Promise.reject([new jsApi.CodedError("Missing Seller ID from Token")]);
2650
+ }),
2651
+ queryKey: ["useListSellerApiKeys", client, params],
2652
+ select: (result) => result.data
2653
+ });
2654
+ };
2655
+
2656
+ var __async$4 = (__this, __arguments, generator) => {
2657
+ return new Promise((resolve, reject) => {
2658
+ var fulfilled = (value) => {
2659
+ try {
2660
+ step(generator.next(value));
2661
+ } catch (e) {
2662
+ reject(e);
2663
+ }
2664
+ };
2665
+ var rejected = (value) => {
2666
+ try {
2667
+ step(generator.throw(value));
2668
+ } catch (e) {
2669
+ reject(e);
2670
+ }
2671
+ };
2672
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2673
+ step((generator = generator.apply(__this, __arguments)).next());
2674
+ });
2675
+ };
2676
+ const useCreateSellerApiKey = () => {
2677
+ const { client } = useShipEngine();
2678
+ return reactQuery.useMutation({
2679
+ mutationFn: (props) => __async$4(void 0, null, function* () {
2680
+ const sellerId = yield client.getTenant(props.isSandbox);
2681
+ if (sellerId) {
2682
+ const result = yield client.sellers.createSellerApiKey({
2683
+ description: props.description,
2684
+ sellerId
2685
+ });
2686
+ return result.data;
2687
+ }
2688
+ return Promise.reject([new jsApi.CodedError("Missing Seller ID from Token")]);
2689
+ }),
2690
+ mutationKey: ["useCreateSellerApiKey"],
2691
+ onError
2692
+ });
2693
+ };
2694
+
2695
+ var __async$3 = (__this, __arguments, generator) => {
2696
+ return new Promise((resolve, reject) => {
2697
+ var fulfilled = (value) => {
2698
+ try {
2699
+ step(generator.next(value));
2700
+ } catch (e) {
2701
+ reject(e);
2702
+ }
2703
+ };
2704
+ var rejected = (value) => {
2705
+ try {
2706
+ step(generator.throw(value));
2707
+ } catch (e) {
2708
+ reject(e);
2709
+ }
2710
+ };
2711
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2712
+ step((generator = generator.apply(__this, __arguments)).next());
2713
+ });
2714
+ };
2715
+ const useDeleteSellerApiKey = () => {
2716
+ const { client } = useShipEngine();
2717
+ return reactQuery.useMutation({
2718
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({
2719
+ encryptedApiKey,
2720
+ isSandbox
2721
+ }) {
2722
+ const sellerId = yield client.getTenant(isSandbox);
2723
+ if (sellerId) {
2724
+ const result = yield client.sellers.deleteSellerApiKey({
2725
+ encryptedApiKey,
2726
+ isSandbox,
2727
+ sellerId
2728
+ });
2729
+ return result.data;
2730
+ }
2731
+ return Promise.reject([new jsApi.CodedError("Missing Seller ID from Token")]);
2732
+ }),
2733
+ mutationKey: ["useDeleteSellerApiKey"],
2734
+ onError
2735
+ });
2736
+ };
2737
+
2603
2738
  var __defProp$3 = Object.defineProperty;
2604
2739
  var __defProps$3 = Object.defineProperties;
2605
2740
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
@@ -2814,6 +2949,7 @@ exports.useCreateLabel = useCreateLabel;
2814
2949
  exports.useCreateRateCard = useCreateRateCard;
2815
2950
  exports.useCreateSalesOrderShipment = useCreateSalesOrderShipment;
2816
2951
  exports.useCreateSandboxSeller = useCreateSandboxSeller;
2952
+ exports.useCreateSellerApiKey = useCreateSellerApiKey;
2817
2953
  exports.useCreateShipment = useCreateShipment;
2818
2954
  exports.useCreateShippingRule = useCreateShippingRule;
2819
2955
  exports.useCreateWarehouse = useCreateWarehouse;
@@ -2822,6 +2958,7 @@ exports.useDeactivateOrderSource = useDeactivateOrderSource;
2822
2958
  exports.useDeleteAccountImage = useDeleteAccountImage;
2823
2959
  exports.useDeleteCarrier = useDeleteCarrier;
2824
2960
  exports.useDeleteRateCard = useDeleteRateCard;
2961
+ exports.useDeleteSellerApiKey = useDeleteSellerApiKey;
2825
2962
  exports.useDeleteShippingRule = useDeleteShippingRule;
2826
2963
  exports.useDeleteWarehouse = useDeleteWarehouse;
2827
2964
  exports.useDeleteWebhook = useDeleteWebhook;
@@ -2868,6 +3005,7 @@ exports.useListRateCards = useListRateCards;
2868
3005
  exports.useListSalesOrderShipments = useListSalesOrderShipments;
2869
3006
  exports.useListSalesOrders = useListSalesOrders;
2870
3007
  exports.useListSandboxSellerIds = useListSandboxSellerIds;
3008
+ exports.useListSellerApiKeys = useListSellerApiKeys;
2871
3009
  exports.useListServicePoints = useListServicePoints;
2872
3010
  exports.useListShipments = useListShipments;
2873
3011
  exports.useListShippingRules = useListShippingRules;