@shipengine/react-api 3.13.1 → 3.14.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,25 +79,25 @@ 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$p = Object.defineProperty;
83
- var __defProps$o = Object.defineProperties;
84
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
85
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
86
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
87
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
88
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
89
- var __spreadValues$p = (a, b) => {
82
+ var __defProp$r = Object.defineProperty;
83
+ var __defProps$q = Object.defineProperties;
84
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
85
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
86
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
87
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
88
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
89
+ var __spreadValues$r = (a, b) => {
90
90
  for (var prop in b || (b = {}))
91
- if (__hasOwnProp$z.call(b, prop))
92
- __defNormalProp$p(a, prop, b[prop]);
93
- if (__getOwnPropSymbols$z)
94
- for (var prop of __getOwnPropSymbols$z(b)) {
95
- if (__propIsEnum$z.call(b, prop))
96
- __defNormalProp$p(a, prop, b[prop]);
91
+ if (__hasOwnProp$B.call(b, prop))
92
+ __defNormalProp$r(a, prop, b[prop]);
93
+ if (__getOwnPropSymbols$B)
94
+ for (var prop of __getOwnPropSymbols$B(b)) {
95
+ if (__propIsEnum$B.call(b, prop))
96
+ __defNormalProp$r(a, prop, b[prop]);
97
97
  }
98
98
  return a;
99
99
  };
100
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
100
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
101
101
  const streams = [];
102
102
  if (process.env.NODE_ENV === "production") {
103
103
  streams.push({
@@ -106,7 +106,7 @@ if (process.env.NODE_ENV === "production") {
106
106
  }
107
107
  const logger = E({
108
108
  name: "shipengine",
109
- serializers: __spreadProps$o(__spreadValues$p({}, k), {
109
+ serializers: __spreadProps$q(__spreadValues$r({}, 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$Q = (__this, __arguments, generator) => {
134
+ var __async$R = (__this, __arguments, generator) => {
135
135
  return new Promise((resolve, reject) => {
136
136
  var fulfilled = (value) => {
137
137
  try {
@@ -154,7 +154,7 @@ var __async$Q = (__this, __arguments, generator) => {
154
154
  const useCreateAccountImage = () => {
155
155
  const { client } = useShipEngine();
156
156
  return reactQuery.useMutation({
157
- mutationFn: (data) => __async$Q(void 0, null, function* () {
157
+ mutationFn: (data) => __async$R(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$P = (__this, __arguments, generator) => {
166
+ var __async$Q = (__this, __arguments, generator) => {
167
167
  return new Promise((resolve, reject) => {
168
168
  var fulfilled = (value) => {
169
169
  try {
@@ -186,7 +186,7 @@ var __async$P = (__this, __arguments, generator) => {
186
186
  const useDeleteAccountImage = () => {
187
187
  const { client } = useShipEngine();
188
188
  return reactQuery.useMutation({
189
- mutationFn: (labelImageId) => __async$P(void 0, null, function* () {
189
+ mutationFn: (labelImageId) => __async$Q(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$O = (__this, __arguments, generator) => {
218
+ var __async$P = (__this, __arguments, generator) => {
219
219
  return new Promise((resolve, reject) => {
220
220
  var fulfilled = (value) => {
221
221
  try {
@@ -238,7 +238,7 @@ var __async$O = (__this, __arguments, generator) => {
238
238
  const useUpdateAccountImage = () => {
239
239
  const { client } = useShipEngine();
240
240
  return reactQuery.useMutation({
241
- mutationFn: (data) => __async$O(void 0, null, function* () {
241
+ mutationFn: (data) => __async$P(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$N = (__this, __arguments, generator) => {
250
+ var __async$O = (__this, __arguments, generator) => {
251
251
  return new Promise((resolve, reject) => {
252
252
  var fulfilled = (value) => {
253
253
  try {
@@ -270,7 +270,7 @@ var __async$N = (__this, __arguments, generator) => {
270
270
  const useUpdateAccountSettings = () => {
271
271
  const { client } = useShipEngine();
272
272
  return reactQuery.useMutation({
273
- mutationFn: (settings) => __async$N(void 0, null, function* () {
273
+ mutationFn: (settings) => __async$O(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$M = (__this, __arguments, generator) => {
282
+ var __async$N = (__this, __arguments, generator) => {
283
283
  return new Promise((resolve, reject) => {
284
284
  var fulfilled = (value) => {
285
285
  try {
@@ -302,7 +302,7 @@ var __async$M = (__this, __arguments, generator) => {
302
302
  const useParseAddress = () => {
303
303
  const { client } = useShipEngine();
304
304
  return reactQuery.useMutation({
305
- mutationFn: (_0) => __async$M(void 0, [_0], function* ({ address, text }) {
305
+ mutationFn: (_0) => __async$N(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$L = (__this, __arguments, generator) => {
314
+ var __async$M = (__this, __arguments, generator) => {
315
315
  return new Promise((resolve, reject) => {
316
316
  var fulfilled = (value) => {
317
317
  try {
@@ -334,7 +334,7 @@ var __async$L = (__this, __arguments, generator) => {
334
334
  const useValidateAddresses = () => {
335
335
  const { client } = useShipEngine();
336
336
  return reactQuery.useMutation({
337
- mutationFn: (addresses) => __async$L(void 0, null, function* () {
337
+ mutationFn: (addresses) => __async$M(void 0, null, function* () {
338
338
  const result = yield client.addresses.validate(addresses);
339
339
  return result.data;
340
340
  }),
@@ -343,26 +343,26 @@ const useValidateAddresses = () => {
343
343
  });
344
344
  };
345
345
 
346
- var __defProp$o = Object.defineProperty;
347
- var __defProps$n = Object.defineProperties;
348
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
349
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
350
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
351
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
352
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
353
- var __spreadValues$o = (a, b) => {
346
+ var __defProp$q = Object.defineProperty;
347
+ var __defProps$p = Object.defineProperties;
348
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
349
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
350
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
351
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
352
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
353
+ var __spreadValues$q = (a, b) => {
354
354
  for (var prop in b || (b = {}))
355
- if (__hasOwnProp$y.call(b, prop))
356
- __defNormalProp$o(a, prop, b[prop]);
357
- if (__getOwnPropSymbols$y)
358
- for (var prop of __getOwnPropSymbols$y(b)) {
359
- if (__propIsEnum$y.call(b, prop))
360
- __defNormalProp$o(a, prop, b[prop]);
355
+ if (__hasOwnProp$A.call(b, prop))
356
+ __defNormalProp$q(a, prop, b[prop]);
357
+ if (__getOwnPropSymbols$A)
358
+ for (var prop of __getOwnPropSymbols$A(b)) {
359
+ if (__propIsEnum$A.call(b, prop))
360
+ __defNormalProp$q(a, prop, b[prop]);
361
361
  }
362
362
  return a;
363
363
  };
364
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
365
- var __async$K = (__this, __arguments, generator) => {
364
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
365
+ var __async$L = (__this, __arguments, generator) => {
366
366
  return new Promise((resolve, reject) => {
367
367
  var fulfilled = (value) => {
368
368
  try {
@@ -384,8 +384,8 @@ var __async$K = (__this, __arguments, generator) => {
384
384
  };
385
385
  const useCreateAuctanePaySession = (params) => {
386
386
  const { client } = useShipEngine();
387
- return reactQuery.useMutation(__spreadProps$n(__spreadValues$o({}, params), {
388
- mutationFn: (request) => __async$K(void 0, null, function* () {
387
+ return reactQuery.useMutation(__spreadProps$p(__spreadValues$q({}, params), {
388
+ mutationFn: (request) => __async$L(void 0, null, function* () {
389
389
  const result = yield client.auctanePay.createSession(request);
390
390
  return result.data;
391
391
  }),
@@ -394,7 +394,7 @@ const useCreateAuctanePaySession = (params) => {
394
394
  }));
395
395
  };
396
396
 
397
- var __async$J = (__this, __arguments, generator) => {
397
+ var __async$K = (__this, __arguments, generator) => {
398
398
  return new Promise((resolve, reject) => {
399
399
  var fulfilled = (value) => {
400
400
  try {
@@ -417,7 +417,7 @@ var __async$J = (__this, __arguments, generator) => {
417
417
  const useAddFunds = () => {
418
418
  const { client } = useShipEngine();
419
419
  return reactQuery.useMutation({
420
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierId, funds }) {
420
+ mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierId, funds }) {
421
421
  const result = yield client.carriers.addFunds(carrierId, funds);
422
422
  return result.data;
423
423
  }),
@@ -426,7 +426,7 @@ const useAddFunds = () => {
426
426
  });
427
427
  };
428
428
 
429
- var __async$I = (__this, __arguments, generator) => {
429
+ var __async$J = (__this, __arguments, generator) => {
430
430
  return new Promise((resolve, reject) => {
431
431
  var fulfilled = (value) => {
432
432
  try {
@@ -449,7 +449,7 @@ var __async$I = (__this, __arguments, generator) => {
449
449
  const useConnectCarrier = () => {
450
450
  const { client } = useShipEngine();
451
451
  return reactQuery.useMutation({
452
- mutationFn: (params) => __async$I(void 0, null, function* () {
452
+ mutationFn: (params) => __async$J(void 0, null, function* () {
453
453
  const result = yield client.carriers.connect(params);
454
454
  return result.data;
455
455
  }),
@@ -558,41 +558,41 @@ const useGetServicesByCarrier = (carrierId) => {
558
558
  });
559
559
  };
560
560
 
561
- var __defProp$n = Object.defineProperty;
562
- var __defProps$m = Object.defineProperties;
563
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
564
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
565
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
566
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
567
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
568
- var __spreadValues$n = (a, b) => {
561
+ var __defProp$p = Object.defineProperty;
562
+ var __defProps$o = Object.defineProperties;
563
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
564
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
565
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
566
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
567
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
568
+ var __spreadValues$p = (a, b) => {
569
569
  for (var prop in b || (b = {}))
570
- if (__hasOwnProp$x.call(b, prop))
571
- __defNormalProp$n(a, prop, b[prop]);
572
- if (__getOwnPropSymbols$x)
573
- for (var prop of __getOwnPropSymbols$x(b)) {
574
- if (__propIsEnum$x.call(b, prop))
575
- __defNormalProp$n(a, prop, b[prop]);
570
+ if (__hasOwnProp$z.call(b, prop))
571
+ __defNormalProp$p(a, prop, b[prop]);
572
+ if (__getOwnPropSymbols$z)
573
+ for (var prop of __getOwnPropSymbols$z(b)) {
574
+ if (__propIsEnum$z.call(b, prop))
575
+ __defNormalProp$p(a, prop, b[prop]);
576
576
  }
577
577
  return a;
578
578
  };
579
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
579
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
580
580
  var __objRest$l = (source, exclude) => {
581
581
  var target = {};
582
582
  for (var prop in source)
583
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
583
+ if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
584
584
  target[prop] = source[prop];
585
- if (source != null && __getOwnPropSymbols$x)
586
- for (var prop of __getOwnPropSymbols$x(source)) {
587
- if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
585
+ if (source != null && __getOwnPropSymbols$z)
586
+ for (var prop of __getOwnPropSymbols$z(source)) {
587
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
588
588
  target[prop] = source[prop];
589
589
  }
590
590
  return target;
591
591
  };
592
592
  const useListCarriers = (params) => {
593
593
  const { client } = useShipEngine();
594
- const _a = __spreadValues$n({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
595
- return reactQuery.useQuery(__spreadProps$m(__spreadValues$n({}, rest), {
594
+ const _a = __spreadValues$p({}, params), { queryFnParams } = _a, rest = __objRest$l(_a, ["queryFnParams"]);
595
+ return reactQuery.useQuery(__spreadProps$o(__spreadValues$p({}, rest), {
596
596
  onError,
597
597
  queryFn: () => client.carriers.list(queryFnParams),
598
598
  queryKey: ["useListCarriers", queryFnParams],
@@ -600,22 +600,22 @@ const useListCarriers = (params) => {
600
600
  }));
601
601
  };
602
602
 
603
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
604
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
605
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
603
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
604
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
605
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
606
606
  var __objRest$k = (source, exclude) => {
607
607
  var target = {};
608
608
  for (var prop in source)
609
- if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
609
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
610
610
  target[prop] = source[prop];
611
- if (source != null && __getOwnPropSymbols$w)
612
- for (var prop of __getOwnPropSymbols$w(source)) {
613
- if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
611
+ if (source != null && __getOwnPropSymbols$y)
612
+ for (var prop of __getOwnPropSymbols$y(source)) {
613
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
614
614
  target[prop] = source[prop];
615
615
  }
616
616
  return target;
617
617
  };
618
- var __async$H = (__this, __arguments, generator) => {
618
+ var __async$I = (__this, __arguments, generator) => {
619
619
  return new Promise((resolve, reject) => {
620
620
  var fulfilled = (value) => {
621
621
  try {
@@ -639,7 +639,7 @@ const useUpdateAutoFunding = () => {
639
639
  const { client } = useShipEngine();
640
640
  const queryClient = reactQuery.useQueryClient();
641
641
  return reactQuery.useMutation({
642
- mutationFn: (_a) => __async$H(void 0, null, function* () {
642
+ mutationFn: (_a) => __async$I(void 0, null, function* () {
643
643
  var _b = _a, { carrierId } = _b, options = __objRest$k(_b, ["carrierId"]);
644
644
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
645
645
  return result.data;
@@ -669,7 +669,7 @@ const useGetZonesByCarrier = (carrierId) => {
669
669
  });
670
670
  };
671
671
 
672
- var __async$G = (__this, __arguments, generator) => {
672
+ var __async$H = (__this, __arguments, generator) => {
673
673
  return new Promise((resolve, reject) => {
674
674
  var fulfilled = (value) => {
675
675
  try {
@@ -692,7 +692,7 @@ var __async$G = (__this, __arguments, generator) => {
692
692
  const useDeleteCarrier = () => {
693
693
  const { client } = useShipEngine();
694
694
  return reactQuery.useMutation({
695
- mutationFn: (carrierId) => __async$G(void 0, null, function* () {
695
+ mutationFn: (carrierId) => __async$H(void 0, null, function* () {
696
696
  const result = yield client.carriers.delete(carrierId);
697
697
  return result.data;
698
698
  }),
@@ -701,17 +701,17 @@ const useDeleteCarrier = () => {
701
701
  });
702
702
  };
703
703
 
704
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
705
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
706
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
704
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
705
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
706
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
707
707
  var __objRest$j = (source, exclude) => {
708
708
  var target = {};
709
709
  for (var prop in source)
710
- if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
710
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
711
711
  target[prop] = source[prop];
712
- if (source != null && __getOwnPropSymbols$v)
713
- for (var prop of __getOwnPropSymbols$v(source)) {
714
- if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
712
+ if (source != null && __getOwnPropSymbols$x)
713
+ for (var prop of __getOwnPropSymbols$x(source)) {
714
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
715
715
  target[prop] = source[prop];
716
716
  }
717
717
  return target;
@@ -728,17 +728,17 @@ const useGetCarrierConnectionForm = (_params) => {
728
728
  });
729
729
  };
730
730
 
731
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
732
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
733
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
731
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
732
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
733
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
734
734
  var __objRest$i = (source, exclude) => {
735
735
  var target = {};
736
736
  for (var prop in source)
737
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
737
+ if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
738
738
  target[prop] = source[prop];
739
- if (source != null && __getOwnPropSymbols$u)
740
- for (var prop of __getOwnPropSymbols$u(source)) {
741
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
739
+ if (source != null && __getOwnPropSymbols$w)
740
+ for (var prop of __getOwnPropSymbols$w(source)) {
741
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
742
742
  target[prop] = source[prop];
743
743
  }
744
744
  return target;
@@ -755,7 +755,7 @@ const useListCarrierConnections = (_params) => {
755
755
  });
756
756
  };
757
757
 
758
- var __async$F = (__this, __arguments, generator) => {
758
+ var __async$G = (__this, __arguments, generator) => {
759
759
  return new Promise((resolve, reject) => {
760
760
  var fulfilled = (value) => {
761
761
  try {
@@ -778,7 +778,7 @@ var __async$F = (__this, __arguments, generator) => {
778
778
  const useConnectCarrierAccount = () => {
779
779
  const { client } = useShipEngine();
780
780
  return reactQuery.useMutation({
781
- mutationFn: (_0) => __async$F(void 0, [_0], function* ({ carrierName, formData }) {
781
+ mutationFn: (_0) => __async$G(void 0, [_0], function* ({ carrierName, formData }) {
782
782
  const result = yield client.connections.connectCarrier(carrierName, formData);
783
783
  return result.data;
784
784
  }),
@@ -798,33 +798,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
798
798
  });
799
799
  };
800
800
 
801
- var __defProp$m = Object.defineProperty;
802
- var __defProps$l = Object.defineProperties;
803
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
804
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
805
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
806
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
807
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
808
- var __spreadValues$m = (a, b) => {
801
+ var __defProp$o = Object.defineProperty;
802
+ var __defProps$n = Object.defineProperties;
803
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
804
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
805
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
806
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
807
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
808
+ var __spreadValues$o = (a, b) => {
809
809
  for (var prop in b || (b = {}))
810
- if (__hasOwnProp$t.call(b, prop))
811
- __defNormalProp$m(a, prop, b[prop]);
812
- if (__getOwnPropSymbols$t)
813
- for (var prop of __getOwnPropSymbols$t(b)) {
814
- if (__propIsEnum$t.call(b, prop))
815
- __defNormalProp$m(a, prop, b[prop]);
810
+ if (__hasOwnProp$v.call(b, prop))
811
+ __defNormalProp$o(a, prop, b[prop]);
812
+ if (__getOwnPropSymbols$v)
813
+ for (var prop of __getOwnPropSymbols$v(b)) {
814
+ if (__propIsEnum$v.call(b, prop))
815
+ __defNormalProp$o(a, prop, b[prop]);
816
816
  }
817
817
  return a;
818
818
  };
819
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
819
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
820
820
  var __objRest$h = (source, exclude) => {
821
821
  var target = {};
822
822
  for (var prop in source)
823
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
823
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
824
824
  target[prop] = source[prop];
825
- if (source != null && __getOwnPropSymbols$t)
826
- for (var prop of __getOwnPropSymbols$t(source)) {
827
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
825
+ if (source != null && __getOwnPropSymbols$v)
826
+ for (var prop of __getOwnPropSymbols$v(source)) {
827
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
828
828
  target[prop] = source[prop];
829
829
  }
830
830
  return target;
@@ -837,7 +837,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
837
837
  ]);
838
838
  const { client } = useShipEngine();
839
839
  const { carrierName, carrierId } = queryFnParams;
840
- return reactQuery.useQuery(__spreadProps$l(__spreadValues$m({}, params), {
840
+ return reactQuery.useQuery(__spreadProps$n(__spreadValues$o({}, params), {
841
841
  onError,
842
842
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
843
843
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -845,26 +845,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
845
845
  }));
846
846
  };
847
847
 
848
- var __defProp$l = Object.defineProperty;
849
- var __defProps$k = Object.defineProperties;
850
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
851
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
852
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
853
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
854
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
855
- var __spreadValues$l = (a, b) => {
848
+ var __defProp$n = Object.defineProperty;
849
+ var __defProps$m = Object.defineProperties;
850
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
851
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
852
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
853
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
854
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
855
+ var __spreadValues$n = (a, b) => {
856
856
  for (var prop in b || (b = {}))
857
- if (__hasOwnProp$s.call(b, prop))
858
- __defNormalProp$l(a, prop, b[prop]);
859
- if (__getOwnPropSymbols$s)
860
- for (var prop of __getOwnPropSymbols$s(b)) {
861
- if (__propIsEnum$s.call(b, prop))
862
- __defNormalProp$l(a, prop, b[prop]);
857
+ if (__hasOwnProp$u.call(b, prop))
858
+ __defNormalProp$n(a, prop, b[prop]);
859
+ if (__getOwnPropSymbols$u)
860
+ for (var prop of __getOwnPropSymbols$u(b)) {
861
+ if (__propIsEnum$u.call(b, prop))
862
+ __defNormalProp$n(a, prop, b[prop]);
863
863
  }
864
864
  return a;
865
865
  };
866
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
867
- var __async$E = (__this, __arguments, generator) => {
866
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
867
+ var __async$F = (__this, __arguments, generator) => {
868
868
  return new Promise((resolve, reject) => {
869
869
  var fulfilled = (value) => {
870
870
  try {
@@ -886,8 +886,8 @@ var __async$E = (__this, __arguments, generator) => {
886
886
  };
887
887
  const useUpdateConnectionsCarrierSettings = (params) => {
888
888
  const { client } = useShipEngine();
889
- return reactQuery.useMutation(__spreadProps$k(__spreadValues$l({}, params), {
890
- mutationFn: (_0) => __async$E(void 0, [_0], function* ({
889
+ return reactQuery.useMutation(__spreadProps$m(__spreadValues$n({}, params), {
890
+ mutationFn: (_0) => __async$F(void 0, [_0], function* ({
891
891
  carrierName,
892
892
  carrierId,
893
893
  formData
@@ -914,7 +914,7 @@ const useListCustomPackageTypes = () => {
914
914
  });
915
915
  };
916
916
 
917
- var __async$D = (__this, __arguments, generator) => {
917
+ var __async$E = (__this, __arguments, generator) => {
918
918
  return new Promise((resolve, reject) => {
919
919
  var fulfilled = (value) => {
920
920
  try {
@@ -937,7 +937,7 @@ var __async$D = (__this, __arguments, generator) => {
937
937
  const useCreateFundingSource = () => {
938
938
  const { client } = useShipEngine();
939
939
  return reactQuery.useMutation({
940
- mutationFn: (fundingSource) => __async$D(void 0, null, function* () {
940
+ mutationFn: (fundingSource) => __async$E(void 0, null, function* () {
941
941
  const result = yield client.fundingSources.create(fundingSource);
942
942
  return result.data;
943
943
  }),
@@ -946,7 +946,7 @@ const useCreateFundingSource = () => {
946
946
  });
947
947
  };
948
948
 
949
- var __async$C = (__this, __arguments, generator) => {
949
+ var __async$D = (__this, __arguments, generator) => {
950
950
  return new Promise((resolve, reject) => {
951
951
  var fulfilled = (value) => {
952
952
  try {
@@ -969,7 +969,7 @@ var __async$C = (__this, __arguments, generator) => {
969
969
  const useFundingSourcesAddFunds = () => {
970
970
  const { client } = useShipEngine();
971
971
  return reactQuery.useMutation({
972
- mutationFn: (_0) => __async$C(void 0, [_0], function* ({ funds, fundingSourceId }) {
972
+ mutationFn: (_0) => __async$D(void 0, [_0], function* ({ funds, fundingSourceId }) {
973
973
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
974
974
  return result.data;
975
975
  }),
@@ -998,7 +998,7 @@ const useListFundingSources = () => {
998
998
  });
999
999
  };
1000
1000
 
1001
- var __async$B = (__this, __arguments, generator) => {
1001
+ var __async$C = (__this, __arguments, generator) => {
1002
1002
  return new Promise((resolve, reject) => {
1003
1003
  var fulfilled = (value) => {
1004
1004
  try {
@@ -1021,7 +1021,7 @@ var __async$B = (__this, __arguments, generator) => {
1021
1021
  const useRegisterCarrier = () => {
1022
1022
  const { client } = useShipEngine();
1023
1023
  return reactQuery.useMutation({
1024
- mutationFn: (carrier) => __async$B(void 0, null, function* () {
1024
+ mutationFn: (carrier) => __async$C(void 0, null, function* () {
1025
1025
  const result = yield client.fundingSources.registerCarrier(carrier);
1026
1026
  return result.data;
1027
1027
  }),
@@ -1030,7 +1030,7 @@ const useRegisterCarrier = () => {
1030
1030
  });
1031
1031
  };
1032
1032
 
1033
- var __async$A = (__this, __arguments, generator) => {
1033
+ var __async$B = (__this, __arguments, generator) => {
1034
1034
  return new Promise((resolve, reject) => {
1035
1035
  var fulfilled = (value) => {
1036
1036
  try {
@@ -1053,7 +1053,7 @@ var __async$A = (__this, __arguments, generator) => {
1053
1053
  const useUpdateFundingSource = () => {
1054
1054
  const { client } = useShipEngine();
1055
1055
  return reactQuery.useMutation({
1056
- mutationFn: (_0) => __async$A(void 0, [_0], function* ({
1056
+ mutationFn: (_0) => __async$B(void 0, [_0], function* ({
1057
1057
  billingInfo,
1058
1058
  creditCardInfo,
1059
1059
  fundingSourceId,
@@ -1094,29 +1094,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
1094
1094
  });
1095
1095
  };
1096
1096
 
1097
- var __defProp$k = Object.defineProperty;
1098
- var __defProps$j = Object.defineProperties;
1099
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
1100
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
1101
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
1102
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
1103
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1104
- var __spreadValues$k = (a, b) => {
1097
+ var __defProp$m = Object.defineProperty;
1098
+ var __defProps$l = Object.defineProperties;
1099
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
1100
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
1101
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
1102
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
1103
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1104
+ var __spreadValues$m = (a, b) => {
1105
1105
  for (var prop in b || (b = {}))
1106
- if (__hasOwnProp$r.call(b, prop))
1107
- __defNormalProp$k(a, prop, b[prop]);
1108
- if (__getOwnPropSymbols$r)
1109
- for (var prop of __getOwnPropSymbols$r(b)) {
1110
- if (__propIsEnum$r.call(b, prop))
1111
- __defNormalProp$k(a, prop, b[prop]);
1106
+ if (__hasOwnProp$t.call(b, prop))
1107
+ __defNormalProp$m(a, prop, b[prop]);
1108
+ if (__getOwnPropSymbols$t)
1109
+ for (var prop of __getOwnPropSymbols$t(b)) {
1110
+ if (__propIsEnum$t.call(b, prop))
1111
+ __defNormalProp$m(a, prop, b[prop]);
1112
1112
  }
1113
1113
  return a;
1114
1114
  };
1115
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
1115
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1116
1116
  const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
1117
1117
  const { client } = useShipEngine();
1118
- const queryParams = __spreadValues$k({}, params);
1119
- return reactQuery.useQuery(__spreadProps$j(__spreadValues$k({}, queryParams), {
1118
+ const queryParams = __spreadValues$m({}, params);
1119
+ return reactQuery.useQuery(__spreadProps$l(__spreadValues$m({}, queryParams), {
1120
1120
  onError,
1121
1121
  queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
1122
1122
  queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
@@ -1139,22 +1139,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
1139
1139
  });
1140
1140
  };
1141
1141
 
1142
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
1143
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
1144
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
1142
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
1143
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
1144
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
1145
1145
  var __objRest$g = (source, exclude) => {
1146
1146
  var target = {};
1147
1147
  for (var prop in source)
1148
- if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
1148
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
1149
1149
  target[prop] = source[prop];
1150
- if (source != null && __getOwnPropSymbols$q)
1151
- for (var prop of __getOwnPropSymbols$q(source)) {
1152
- if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
1150
+ if (source != null && __getOwnPropSymbols$s)
1151
+ for (var prop of __getOwnPropSymbols$s(source)) {
1152
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
1153
1153
  target[prop] = source[prop];
1154
1154
  }
1155
1155
  return target;
1156
1156
  };
1157
- var __async$z = (__this, __arguments, generator) => {
1157
+ var __async$A = (__this, __arguments, generator) => {
1158
1158
  return new Promise((resolve, reject) => {
1159
1159
  var fulfilled = (value) => {
1160
1160
  try {
@@ -1177,7 +1177,7 @@ var __async$z = (__this, __arguments, generator) => {
1177
1177
  const useAddInsuranceFunds = () => {
1178
1178
  const { client } = useShipEngine();
1179
1179
  return reactQuery.useMutation({
1180
- mutationFn: (_a) => __async$z(void 0, null, function* () {
1180
+ mutationFn: (_a) => __async$A(void 0, null, function* () {
1181
1181
  var _b = _a, { insuranceProvider } = _b, rest = __objRest$g(_b, ["insuranceProvider"]);
1182
1182
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
1183
1183
  return result.data;
@@ -1187,26 +1187,26 @@ const useAddInsuranceFunds = () => {
1187
1187
  });
1188
1188
  };
1189
1189
 
1190
- var __defProp$j = Object.defineProperty;
1191
- var __defProps$i = Object.defineProperties;
1192
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
1193
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
1194
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
1195
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
1196
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1197
- var __spreadValues$j = (a, b) => {
1190
+ var __defProp$l = Object.defineProperty;
1191
+ var __defProps$k = Object.defineProperties;
1192
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
1193
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
1194
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
1195
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
1196
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1197
+ var __spreadValues$l = (a, b) => {
1198
1198
  for (var prop in b || (b = {}))
1199
- if (__hasOwnProp$p.call(b, prop))
1200
- __defNormalProp$j(a, prop, b[prop]);
1201
- if (__getOwnPropSymbols$p)
1202
- for (var prop of __getOwnPropSymbols$p(b)) {
1203
- if (__propIsEnum$p.call(b, prop))
1204
- __defNormalProp$j(a, prop, b[prop]);
1199
+ if (__hasOwnProp$r.call(b, prop))
1200
+ __defNormalProp$l(a, prop, b[prop]);
1201
+ if (__getOwnPropSymbols$r)
1202
+ for (var prop of __getOwnPropSymbols$r(b)) {
1203
+ if (__propIsEnum$r.call(b, prop))
1204
+ __defNormalProp$l(a, prop, b[prop]);
1205
1205
  }
1206
1206
  return a;
1207
1207
  };
1208
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
1209
- var __async$y = (__this, __arguments, generator) => {
1208
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
1209
+ var __async$z = (__this, __arguments, generator) => {
1210
1210
  return new Promise((resolve, reject) => {
1211
1211
  var fulfilled = (value) => {
1212
1212
  try {
@@ -1228,8 +1228,8 @@ var __async$y = (__this, __arguments, generator) => {
1228
1228
  };
1229
1229
  const useCreateInvoiceAddress = (params) => {
1230
1230
  const { client } = useShipEngine();
1231
- return reactQuery.useMutation(__spreadProps$i(__spreadValues$j({}, params), {
1232
- mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
1231
+ return reactQuery.useMutation(__spreadProps$k(__spreadValues$l({}, params), {
1232
+ mutationFn: (invoiceAddress) => __async$z(void 0, null, function* () {
1233
1233
  const result = yield client.invoiceAddress.create(invoiceAddress);
1234
1234
  return result.data;
1235
1235
  }),
@@ -1238,26 +1238,26 @@ const useCreateInvoiceAddress = (params) => {
1238
1238
  }));
1239
1239
  };
1240
1240
 
1241
- var __defProp$i = Object.defineProperty;
1242
- var __defProps$h = Object.defineProperties;
1243
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
1244
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
1245
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
1246
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
1247
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1248
- var __spreadValues$i = (a, b) => {
1241
+ var __defProp$k = Object.defineProperty;
1242
+ var __defProps$j = Object.defineProperties;
1243
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
1244
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
1245
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
1246
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
1247
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1248
+ var __spreadValues$k = (a, b) => {
1249
1249
  for (var prop in b || (b = {}))
1250
- if (__hasOwnProp$o.call(b, prop))
1251
- __defNormalProp$i(a, prop, b[prop]);
1252
- if (__getOwnPropSymbols$o)
1253
- for (var prop of __getOwnPropSymbols$o(b)) {
1254
- if (__propIsEnum$o.call(b, prop))
1255
- __defNormalProp$i(a, prop, b[prop]);
1250
+ if (__hasOwnProp$q.call(b, prop))
1251
+ __defNormalProp$k(a, prop, b[prop]);
1252
+ if (__getOwnPropSymbols$q)
1253
+ for (var prop of __getOwnPropSymbols$q(b)) {
1254
+ if (__propIsEnum$q.call(b, prop))
1255
+ __defNormalProp$k(a, prop, b[prop]);
1256
1256
  }
1257
1257
  return a;
1258
1258
  };
1259
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
1260
- var __async$x = (__this, __arguments, generator) => {
1259
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
1260
+ var __async$y = (__this, __arguments, generator) => {
1261
1261
  return new Promise((resolve, reject) => {
1262
1262
  var fulfilled = (value) => {
1263
1263
  try {
@@ -1279,8 +1279,8 @@ var __async$x = (__this, __arguments, generator) => {
1279
1279
  };
1280
1280
  const useUpdateInvoiceAddress = (params) => {
1281
1281
  const { client } = useShipEngine();
1282
- return reactQuery.useMutation(__spreadProps$h(__spreadValues$i({}, params), {
1283
- mutationFn: (invoiceAddress) => __async$x(void 0, null, function* () {
1282
+ return reactQuery.useMutation(__spreadProps$j(__spreadValues$k({}, params), {
1283
+ mutationFn: (invoiceAddress) => __async$y(void 0, null, function* () {
1284
1284
  const result = yield client.invoiceAddress.update(invoiceAddress);
1285
1285
  return result.data;
1286
1286
  }),
@@ -1289,28 +1289,28 @@ const useUpdateInvoiceAddress = (params) => {
1289
1289
  }));
1290
1290
  };
1291
1291
 
1292
- var __defProp$h = Object.defineProperty;
1293
- var __defProps$g = Object.defineProperties;
1294
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
1295
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
1296
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
1297
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
1298
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1299
- var __spreadValues$h = (a, b) => {
1292
+ var __defProp$j = Object.defineProperty;
1293
+ var __defProps$i = Object.defineProperties;
1294
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
1295
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
1296
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
1297
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
1298
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1299
+ var __spreadValues$j = (a, b) => {
1300
1300
  for (var prop in b || (b = {}))
1301
- if (__hasOwnProp$n.call(b, prop))
1302
- __defNormalProp$h(a, prop, b[prop]);
1303
- if (__getOwnPropSymbols$n)
1304
- for (var prop of __getOwnPropSymbols$n(b)) {
1305
- if (__propIsEnum$n.call(b, prop))
1306
- __defNormalProp$h(a, prop, b[prop]);
1301
+ if (__hasOwnProp$p.call(b, prop))
1302
+ __defNormalProp$j(a, prop, b[prop]);
1303
+ if (__getOwnPropSymbols$p)
1304
+ for (var prop of __getOwnPropSymbols$p(b)) {
1305
+ if (__propIsEnum$p.call(b, prop))
1306
+ __defNormalProp$j(a, prop, b[prop]);
1307
1307
  }
1308
1308
  return a;
1309
1309
  };
1310
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
1310
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
1311
1311
  const useGetInvoiceAddress = (params) => {
1312
1312
  const { client } = useShipEngine();
1313
- return reactQuery.useQuery(__spreadProps$g(__spreadValues$h({}, params), {
1313
+ return reactQuery.useQuery(__spreadProps$i(__spreadValues$j({}, params), {
1314
1314
  onError,
1315
1315
  queryFn: () => client.invoiceAddress.get(),
1316
1316
  queryKey: ["useGetInvoiceAddress"],
@@ -1318,22 +1318,22 @@ const useGetInvoiceAddress = (params) => {
1318
1318
  }));
1319
1319
  };
1320
1320
 
1321
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
1322
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
1323
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
1321
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
1322
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
1323
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
1324
1324
  var __objRest$f = (source, exclude) => {
1325
1325
  var target = {};
1326
1326
  for (var prop in source)
1327
- if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
1327
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
1328
1328
  target[prop] = source[prop];
1329
- if (source != null && __getOwnPropSymbols$m)
1330
- for (var prop of __getOwnPropSymbols$m(source)) {
1331
- if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
1329
+ if (source != null && __getOwnPropSymbols$o)
1330
+ for (var prop of __getOwnPropSymbols$o(source)) {
1331
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
1332
1332
  target[prop] = source[prop];
1333
1333
  }
1334
1334
  return target;
1335
1335
  };
1336
- var __async$w = (__this, __arguments, generator) => {
1336
+ var __async$x = (__this, __arguments, generator) => {
1337
1337
  return new Promise((resolve, reject) => {
1338
1338
  var fulfilled = (value) => {
1339
1339
  try {
@@ -1356,7 +1356,7 @@ var __async$w = (__this, __arguments, generator) => {
1356
1356
  const useCreateLabel = () => {
1357
1357
  const { client } = useShipEngine();
1358
1358
  return reactQuery.useMutation({
1359
- mutationFn: (_a) => __async$w(void 0, null, function* () {
1359
+ mutationFn: (_a) => __async$x(void 0, null, function* () {
1360
1360
  var _b = _a, { rateId } = _b, options = __objRest$f(_b, ["rateId"]);
1361
1361
  const result = yield client.labels.createByRateId(rateId, options);
1362
1362
  return result.data;
@@ -1381,41 +1381,41 @@ const useGetLabel = (labelId) => {
1381
1381
  });
1382
1382
  };
1383
1383
 
1384
- var __defProp$g = Object.defineProperty;
1385
- var __defProps$f = Object.defineProperties;
1386
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
1387
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
1388
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
1389
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
1390
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1391
- var __spreadValues$g = (a, b) => {
1384
+ var __defProp$i = Object.defineProperty;
1385
+ var __defProps$h = Object.defineProperties;
1386
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
1387
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
1388
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
1389
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
1390
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1391
+ var __spreadValues$i = (a, b) => {
1392
1392
  for (var prop in b || (b = {}))
1393
- if (__hasOwnProp$l.call(b, prop))
1394
- __defNormalProp$g(a, prop, b[prop]);
1395
- if (__getOwnPropSymbols$l)
1396
- for (var prop of __getOwnPropSymbols$l(b)) {
1397
- if (__propIsEnum$l.call(b, prop))
1398
- __defNormalProp$g(a, prop, b[prop]);
1393
+ if (__hasOwnProp$n.call(b, prop))
1394
+ __defNormalProp$i(a, prop, b[prop]);
1395
+ if (__getOwnPropSymbols$n)
1396
+ for (var prop of __getOwnPropSymbols$n(b)) {
1397
+ if (__propIsEnum$n.call(b, prop))
1398
+ __defNormalProp$i(a, prop, b[prop]);
1399
1399
  }
1400
1400
  return a;
1401
1401
  };
1402
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
1402
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
1403
1403
  var __objRest$e = (source, exclude) => {
1404
1404
  var target = {};
1405
1405
  for (var prop in source)
1406
- if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
1406
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
1407
1407
  target[prop] = source[prop];
1408
- if (source != null && __getOwnPropSymbols$l)
1409
- for (var prop of __getOwnPropSymbols$l(source)) {
1410
- if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
1408
+ if (source != null && __getOwnPropSymbols$n)
1409
+ for (var prop of __getOwnPropSymbols$n(source)) {
1410
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
1411
1411
  target[prop] = source[prop];
1412
1412
  }
1413
1413
  return target;
1414
1414
  };
1415
1415
  const useListLabels = (params) => {
1416
1416
  const { client } = useShipEngine();
1417
- const _a = __spreadValues$g({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
1418
- return reactQuery.useQuery(__spreadProps$f(__spreadValues$g({}, rest), {
1417
+ const _a = __spreadValues$i({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
1418
+ return reactQuery.useQuery(__spreadProps$h(__spreadValues$i({}, rest), {
1419
1419
  onError,
1420
1420
  queryFn: () => client.labels.list(queryFnParams),
1421
1421
  queryKey: ["useListLabels", params],
@@ -1423,7 +1423,7 @@ const useListLabels = (params) => {
1423
1423
  }));
1424
1424
  };
1425
1425
 
1426
- var __async$v = (__this, __arguments, generator) => {
1426
+ var __async$w = (__this, __arguments, generator) => {
1427
1427
  return new Promise((resolve, reject) => {
1428
1428
  var fulfilled = (value) => {
1429
1429
  try {
@@ -1446,7 +1446,7 @@ var __async$v = (__this, __arguments, generator) => {
1446
1446
  const useVoidLabel = () => {
1447
1447
  const { client } = useShipEngine();
1448
1448
  return reactQuery.useMutation({
1449
- mutationFn: (labelId) => __async$v(void 0, null, function* () {
1449
+ mutationFn: (labelId) => __async$w(void 0, null, function* () {
1450
1450
  const result = yield client.labels.void(labelId);
1451
1451
  return result.data;
1452
1452
  }),
@@ -1455,38 +1455,38 @@ const useVoidLabel = () => {
1455
1455
  });
1456
1456
  };
1457
1457
 
1458
- var __defProp$f = Object.defineProperty;
1459
- var __defProps$e = Object.defineProperties;
1460
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
1461
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
1462
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
1463
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
1464
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1465
- var __spreadValues$f = (a, b) => {
1458
+ var __defProp$h = Object.defineProperty;
1459
+ var __defProps$g = Object.defineProperties;
1460
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
1461
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
1462
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
1463
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
1464
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1465
+ var __spreadValues$h = (a, b) => {
1466
1466
  for (var prop in b || (b = {}))
1467
- if (__hasOwnProp$k.call(b, prop))
1468
- __defNormalProp$f(a, prop, b[prop]);
1469
- if (__getOwnPropSymbols$k)
1470
- for (var prop of __getOwnPropSymbols$k(b)) {
1471
- if (__propIsEnum$k.call(b, prop))
1472
- __defNormalProp$f(a, prop, b[prop]);
1467
+ if (__hasOwnProp$m.call(b, prop))
1468
+ __defNormalProp$h(a, prop, b[prop]);
1469
+ if (__getOwnPropSymbols$m)
1470
+ for (var prop of __getOwnPropSymbols$m(b)) {
1471
+ if (__propIsEnum$m.call(b, prop))
1472
+ __defNormalProp$h(a, prop, b[prop]);
1473
1473
  }
1474
1474
  return a;
1475
1475
  };
1476
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
1476
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
1477
1477
  var __objRest$d = (source, exclude) => {
1478
1478
  var target = {};
1479
1479
  for (var prop in source)
1480
- if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
1480
+ if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
1481
1481
  target[prop] = source[prop];
1482
- if (source != null && __getOwnPropSymbols$k)
1483
- for (var prop of __getOwnPropSymbols$k(source)) {
1484
- if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
1482
+ if (source != null && __getOwnPropSymbols$m)
1483
+ for (var prop of __getOwnPropSymbols$m(source)) {
1484
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
1485
1485
  target[prop] = source[prop];
1486
1486
  }
1487
1487
  return target;
1488
1488
  };
1489
- var __async$u = (__this, __arguments, generator) => {
1489
+ var __async$v = (__this, __arguments, generator) => {
1490
1490
  return new Promise((resolve, reject) => {
1491
1491
  var fulfilled = (value) => {
1492
1492
  try {
@@ -1508,8 +1508,8 @@ var __async$u = (__this, __arguments, generator) => {
1508
1508
  };
1509
1509
  const useListLabelsInfinite = (params) => {
1510
1510
  const { client } = useShipEngine();
1511
- const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$d(_a, ["queryFnParams"]);
1512
- return reactQuery.useInfiniteQuery(__spreadProps$e(__spreadValues$f({}, rest), {
1511
+ const _a = __spreadValues$h({}, params), { queryFnParams } = _a, rest = __objRest$d(_a, ["queryFnParams"]);
1512
+ return reactQuery.useInfiniteQuery(__spreadProps$g(__spreadValues$h({}, rest), {
1513
1513
  getNextPageParam: (lastPage) => {
1514
1514
  if (lastPage.page < lastPage.pages) {
1515
1515
  return lastPage.page + 1;
@@ -1517,8 +1517,8 @@ const useListLabelsInfinite = (params) => {
1517
1517
  return void 0;
1518
1518
  },
1519
1519
  onError,
1520
- queryFn: (_0) => __async$u(void 0, [_0], function* ({ pageParam = 1 }) {
1521
- const response = yield client.labels.list(__spreadProps$e(__spreadValues$f({}, queryFnParams), { page: pageParam }));
1520
+ queryFn: (_0) => __async$v(void 0, [_0], function* ({ pageParam = 1 }) {
1521
+ const response = yield client.labels.list(__spreadProps$g(__spreadValues$h({}, queryFnParams), { page: pageParam }));
1522
1522
  return response.data;
1523
1523
  }),
1524
1524
  queryKey: ["useListLabelsInfinite", params],
@@ -1532,28 +1532,28 @@ const useListLabelsInfinite = (params) => {
1532
1532
  }));
1533
1533
  };
1534
1534
 
1535
- var __defProp$e = Object.defineProperty;
1536
- var __defProps$d = Object.defineProperties;
1537
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
1538
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1539
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1540
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1541
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1542
- var __spreadValues$e = (a, b) => {
1535
+ var __defProp$g = Object.defineProperty;
1536
+ var __defProps$f = Object.defineProperties;
1537
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
1538
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
1539
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
1540
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
1541
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1542
+ var __spreadValues$g = (a, b) => {
1543
1543
  for (var prop in b || (b = {}))
1544
- if (__hasOwnProp$j.call(b, prop))
1545
- __defNormalProp$e(a, prop, b[prop]);
1546
- if (__getOwnPropSymbols$j)
1547
- for (var prop of __getOwnPropSymbols$j(b)) {
1548
- if (__propIsEnum$j.call(b, prop))
1549
- __defNormalProp$e(a, prop, b[prop]);
1544
+ if (__hasOwnProp$l.call(b, prop))
1545
+ __defNormalProp$g(a, prop, b[prop]);
1546
+ if (__getOwnPropSymbols$l)
1547
+ for (var prop of __getOwnPropSymbols$l(b)) {
1548
+ if (__propIsEnum$l.call(b, prop))
1549
+ __defNormalProp$g(a, prop, b[prop]);
1550
1550
  }
1551
1551
  return a;
1552
1552
  };
1553
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
1553
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
1554
1554
  const useListOrderSources = (params) => {
1555
1555
  const { client } = useShipEngine();
1556
- return reactQuery.useQuery(__spreadProps$d(__spreadValues$e({}, params), {
1556
+ return reactQuery.useQuery(__spreadProps$f(__spreadValues$g({}, params), {
1557
1557
  onError,
1558
1558
  queryFn: () => client.orderSources.list(),
1559
1559
  queryKey: ["useListOrderSources"],
@@ -1561,7 +1561,7 @@ const useListOrderSources = (params) => {
1561
1561
  }));
1562
1562
  };
1563
1563
 
1564
- var __async$t = (__this, __arguments, generator) => {
1564
+ var __async$u = (__this, __arguments, generator) => {
1565
1565
  return new Promise((resolve, reject) => {
1566
1566
  var fulfilled = (value) => {
1567
1567
  try {
@@ -1584,7 +1584,7 @@ var __async$t = (__this, __arguments, generator) => {
1584
1584
  const useRefreshOrderSourceAsync = () => {
1585
1585
  const { client } = useShipEngine();
1586
1586
  return reactQuery.useMutation({
1587
- mutationFn: (orderSourceId) => __async$t(void 0, null, function* () {
1587
+ mutationFn: (orderSourceId) => __async$u(void 0, null, function* () {
1588
1588
  const result = yield client.orderSources.refresh(orderSourceId);
1589
1589
  return result.data;
1590
1590
  }),
@@ -1595,9 +1595,9 @@ const useRefreshOrderSource = () => {
1595
1595
  const { client } = useShipEngine();
1596
1596
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
1597
1597
  return reactQuery.useMutation({
1598
- mutationFn: (orderSourceId) => __async$t(void 0, null, function* () {
1598
+ mutationFn: (orderSourceId) => __async$u(void 0, null, function* () {
1599
1599
  yield refreshOrderSourceAsync(orderSourceId);
1600
- const waitResult = yield retryUntil(() => __async$t(void 0, null, function* () {
1600
+ const waitResult = yield retryUntil(() => __async$u(void 0, null, function* () {
1601
1601
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
1602
1602
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
1603
1603
  throw new jsApi.SE.CodedError("Order source is still refreshing");
@@ -1611,7 +1611,7 @@ const useRefreshOrderSource = () => {
1611
1611
  });
1612
1612
  };
1613
1613
 
1614
- var __async$s = (__this, __arguments, generator) => {
1614
+ var __async$t = (__this, __arguments, generator) => {
1615
1615
  return new Promise((resolve, reject) => {
1616
1616
  var fulfilled = (value) => {
1617
1617
  try {
@@ -1634,7 +1634,7 @@ var __async$s = (__this, __arguments, generator) => {
1634
1634
  const useDeactivateOrderSource = () => {
1635
1635
  const { client } = useShipEngine();
1636
1636
  return reactQuery.useMutation({
1637
- mutationFn: (orderSourceId) => __async$s(void 0, null, function* () {
1637
+ mutationFn: (orderSourceId) => __async$t(void 0, null, function* () {
1638
1638
  const result = yield client.orderSources.deactivate(orderSourceId);
1639
1639
  return result.data;
1640
1640
  }),
@@ -1653,7 +1653,7 @@ const useListOrderSourcesConnections = () => {
1653
1653
  });
1654
1654
  };
1655
1655
 
1656
- var __async$r = (__this, __arguments, generator) => {
1656
+ var __async$s = (__this, __arguments, generator) => {
1657
1657
  return new Promise((resolve, reject) => {
1658
1658
  var fulfilled = (value) => {
1659
1659
  try {
@@ -1676,7 +1676,7 @@ var __async$r = (__this, __arguments, generator) => {
1676
1676
  const useUpdateOrderSource = () => {
1677
1677
  const { client } = useShipEngine();
1678
1678
  return reactQuery.useMutation({
1679
- mutationFn: (params) => __async$r(void 0, null, function* () {
1679
+ mutationFn: (params) => __async$s(void 0, null, function* () {
1680
1680
  const result = yield client.orderSources.update(params);
1681
1681
  return result.data;
1682
1682
  }),
@@ -1685,7 +1685,7 @@ const useUpdateOrderSource = () => {
1685
1685
  });
1686
1686
  };
1687
1687
 
1688
- var __async$q = (__this, __arguments, generator) => {
1688
+ var __async$r = (__this, __arguments, generator) => {
1689
1689
  return new Promise((resolve, reject) => {
1690
1690
  var fulfilled = (value) => {
1691
1691
  try {
@@ -1708,7 +1708,7 @@ var __async$q = (__this, __arguments, generator) => {
1708
1708
  const useCreateRateCard = () => {
1709
1709
  const { client } = useShipEngine();
1710
1710
  return reactQuery.useMutation({
1711
- mutationFn: (rateCard) => __async$q(void 0, null, function* () {
1711
+ mutationFn: (rateCard) => __async$r(void 0, null, function* () {
1712
1712
  const result = yield client.rateCards.create(rateCard);
1713
1713
  return result.data;
1714
1714
  }),
@@ -1755,7 +1755,7 @@ const useListRateCards = (carrierIds) => {
1755
1755
  });
1756
1756
  };
1757
1757
 
1758
- var __async$p = (__this, __arguments, generator) => {
1758
+ var __async$q = (__this, __arguments, generator) => {
1759
1759
  return new Promise((resolve, reject) => {
1760
1760
  var fulfilled = (value) => {
1761
1761
  try {
@@ -1778,7 +1778,7 @@ var __async$p = (__this, __arguments, generator) => {
1778
1778
  const usePublishRateCard = () => {
1779
1779
  const { client } = useShipEngine();
1780
1780
  return reactQuery.useMutation({
1781
- mutationFn: (rateCardId) => __async$p(void 0, null, function* () {
1781
+ mutationFn: (rateCardId) => __async$q(void 0, null, function* () {
1782
1782
  return yield client.rateCards.publish(rateCardId);
1783
1783
  }),
1784
1784
  mutationKey: ["usePublishRateCard"],
@@ -1786,7 +1786,7 @@ const usePublishRateCard = () => {
1786
1786
  });
1787
1787
  };
1788
1788
 
1789
- var __async$o = (__this, __arguments, generator) => {
1789
+ var __async$p = (__this, __arguments, generator) => {
1790
1790
  return new Promise((resolve, reject) => {
1791
1791
  var fulfilled = (value) => {
1792
1792
  try {
@@ -1809,7 +1809,7 @@ var __async$o = (__this, __arguments, generator) => {
1809
1809
  const useUpdateRateCard = () => {
1810
1810
  const { client } = useShipEngine();
1811
1811
  return reactQuery.useMutation({
1812
- mutationFn: (rateCard) => __async$o(void 0, null, function* () {
1812
+ mutationFn: (rateCard) => __async$p(void 0, null, function* () {
1813
1813
  const result = yield client.rateCards.update(rateCard);
1814
1814
  return result.data;
1815
1815
  }),
@@ -1818,7 +1818,7 @@ const useUpdateRateCard = () => {
1818
1818
  });
1819
1819
  };
1820
1820
 
1821
- var __async$n = (__this, __arguments, generator) => {
1821
+ var __async$o = (__this, __arguments, generator) => {
1822
1822
  return new Promise((resolve, reject) => {
1823
1823
  var fulfilled = (value) => {
1824
1824
  try {
@@ -1841,7 +1841,7 @@ var __async$n = (__this, __arguments, generator) => {
1841
1841
  const useUploadRateCard = () => {
1842
1842
  const { client } = useShipEngine();
1843
1843
  return reactQuery.useMutation({
1844
- mutationFn: (_0) => __async$n(void 0, [_0], function* ({ rateCardId, file }) {
1844
+ mutationFn: (_0) => __async$o(void 0, [_0], function* ({ rateCardId, file }) {
1845
1845
  const result = yield client.rateCards.upload(rateCardId, file);
1846
1846
  return result.data;
1847
1847
  }),
@@ -1850,7 +1850,7 @@ const useUploadRateCard = () => {
1850
1850
  });
1851
1851
  };
1852
1852
 
1853
- var __async$m = (__this, __arguments, generator) => {
1853
+ var __async$n = (__this, __arguments, generator) => {
1854
1854
  return new Promise((resolve, reject) => {
1855
1855
  var fulfilled = (value) => {
1856
1856
  try {
@@ -1873,7 +1873,7 @@ var __async$m = (__this, __arguments, generator) => {
1873
1873
  const useDeleteRateCard = () => {
1874
1874
  const { client } = useShipEngine();
1875
1875
  return reactQuery.useMutation({
1876
- mutationFn: (rateCardId) => __async$m(void 0, null, function* () {
1876
+ mutationFn: (rateCardId) => __async$n(void 0, null, function* () {
1877
1877
  const result = yield client.rateCards.delete(rateCardId);
1878
1878
  return result.data;
1879
1879
  }),
@@ -1882,7 +1882,7 @@ const useDeleteRateCard = () => {
1882
1882
  });
1883
1883
  };
1884
1884
 
1885
- var __async$l = (__this, __arguments, generator) => {
1885
+ var __async$m = (__this, __arguments, generator) => {
1886
1886
  return new Promise((resolve, reject) => {
1887
1887
  var fulfilled = (value) => {
1888
1888
  try {
@@ -1905,7 +1905,7 @@ var __async$l = (__this, __arguments, generator) => {
1905
1905
  const useCalculateRates = () => {
1906
1906
  const { client } = useShipEngine();
1907
1907
  return reactQuery.useMutation({
1908
- mutationFn: (_0) => __async$l(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1908
+ mutationFn: (_0) => __async$m(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1909
1909
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1910
1910
  return result.data;
1911
1911
  }),
@@ -1914,7 +1914,7 @@ const useCalculateRates = () => {
1914
1914
  });
1915
1915
  };
1916
1916
 
1917
- var __async$k = (__this, __arguments, generator) => {
1917
+ var __async$l = (__this, __arguments, generator) => {
1918
1918
  return new Promise((resolve, reject) => {
1919
1919
  var fulfilled = (value) => {
1920
1920
  try {
@@ -1937,7 +1937,7 @@ var __async$k = (__this, __arguments, generator) => {
1937
1937
  const useRatesEstimate = () => {
1938
1938
  const { client } = useShipEngine();
1939
1939
  return reactQuery.useMutation({
1940
- mutationFn: (_0) => __async$k(void 0, [_0], function* ({ rateParams }) {
1940
+ mutationFn: (_0) => __async$l(void 0, [_0], function* ({ rateParams }) {
1941
1941
  const result = yield client.rates.estimate(rateParams);
1942
1942
  return result.data;
1943
1943
  }),
@@ -1991,22 +1991,22 @@ const useListSalesOrders = (params = {}) => {
1991
1991
  });
1992
1992
  };
1993
1993
 
1994
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1995
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1996
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1994
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
1995
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
1996
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
1997
1997
  var __objRest$c = (source, exclude) => {
1998
1998
  var target = {};
1999
1999
  for (var prop in source)
2000
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
2000
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
2001
2001
  target[prop] = source[prop];
2002
- if (source != null && __getOwnPropSymbols$i)
2003
- for (var prop of __getOwnPropSymbols$i(source)) {
2004
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
2002
+ if (source != null && __getOwnPropSymbols$k)
2003
+ for (var prop of __getOwnPropSymbols$k(source)) {
2004
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
2005
2005
  target[prop] = source[prop];
2006
2006
  }
2007
2007
  return target;
2008
2008
  };
2009
- var __async$j = (__this, __arguments, generator) => {
2009
+ var __async$k = (__this, __arguments, generator) => {
2010
2010
  return new Promise((resolve, reject) => {
2011
2011
  var fulfilled = (value) => {
2012
2012
  try {
@@ -2029,7 +2029,7 @@ var __async$j = (__this, __arguments, generator) => {
2029
2029
  const useNotifySalesOrderShipped = () => {
2030
2030
  const { client } = useShipEngine();
2031
2031
  return reactQuery.useMutation({
2032
- mutationFn: (_a) => __async$j(void 0, null, function* () {
2032
+ mutationFn: (_a) => __async$k(void 0, null, function* () {
2033
2033
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$c(_b, ["salesOrderId"]);
2034
2034
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
2035
2035
  return result.data;
@@ -2039,22 +2039,22 @@ const useNotifySalesOrderShipped = () => {
2039
2039
  });
2040
2040
  };
2041
2041
 
2042
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
2043
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
2044
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
2042
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
2043
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
2044
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
2045
2045
  var __objRest$b = (source, exclude) => {
2046
2046
  var target = {};
2047
2047
  for (var prop in source)
2048
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
2048
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
2049
2049
  target[prop] = source[prop];
2050
- if (source != null && __getOwnPropSymbols$h)
2051
- for (var prop of __getOwnPropSymbols$h(source)) {
2052
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
2050
+ if (source != null && __getOwnPropSymbols$j)
2051
+ for (var prop of __getOwnPropSymbols$j(source)) {
2052
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
2053
2053
  target[prop] = source[prop];
2054
2054
  }
2055
2055
  return target;
2056
2056
  };
2057
- var __async$i = (__this, __arguments, generator) => {
2057
+ var __async$j = (__this, __arguments, generator) => {
2058
2058
  return new Promise((resolve, reject) => {
2059
2059
  var fulfilled = (value) => {
2060
2060
  try {
@@ -2077,7 +2077,7 @@ var __async$i = (__this, __arguments, generator) => {
2077
2077
  const useCreateSalesOrderShipment = () => {
2078
2078
  const { client } = useShipEngine();
2079
2079
  return reactQuery.useMutation({
2080
- mutationFn: (_a) => __async$i(void 0, null, function* () {
2080
+ mutationFn: (_a) => __async$j(void 0, null, function* () {
2081
2081
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$b(_b, ["salesOrderId"]);
2082
2082
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
2083
2083
  return result.data;
@@ -2114,22 +2114,22 @@ const useListSalesOrderShipments = (body) => {
2114
2114
  });
2115
2115
  };
2116
2116
 
2117
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
2118
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
2119
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
2117
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
2118
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
2119
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
2120
2120
  var __objRest$a = (source, exclude) => {
2121
2121
  var target = {};
2122
2122
  for (var prop in source)
2123
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
2123
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
2124
2124
  target[prop] = source[prop];
2125
- if (source != null && __getOwnPropSymbols$g)
2126
- for (var prop of __getOwnPropSymbols$g(source)) {
2127
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
2125
+ if (source != null && __getOwnPropSymbols$i)
2126
+ for (var prop of __getOwnPropSymbols$i(source)) {
2127
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
2128
2128
  target[prop] = source[prop];
2129
2129
  }
2130
2130
  return target;
2131
2131
  };
2132
- var __async$h = (__this, __arguments, generator) => {
2132
+ var __async$i = (__this, __arguments, generator) => {
2133
2133
  return new Promise((resolve, reject) => {
2134
2134
  var fulfilled = (value) => {
2135
2135
  try {
@@ -2152,7 +2152,7 @@ var __async$h = (__this, __arguments, generator) => {
2152
2152
  const useUpdateSalesOrderShipment = () => {
2153
2153
  const { client } = useShipEngine();
2154
2154
  return reactQuery.useMutation({
2155
- mutationFn: (_a) => __async$h(void 0, null, function* () {
2155
+ mutationFn: (_a) => __async$i(void 0, null, function* () {
2156
2156
  var _b = _a, { shipmentId } = _b, shipment = __objRest$a(_b, ["shipmentId"]);
2157
2157
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
2158
2158
  return result.data;
@@ -2173,26 +2173,26 @@ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
2173
2173
  });
2174
2174
  };
2175
2175
 
2176
- var __defProp$d = Object.defineProperty;
2177
- var __defProps$c = Object.defineProperties;
2178
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
2179
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
2180
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
2181
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
2182
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2183
- var __spreadValues$d = (a, b) => {
2176
+ var __defProp$f = Object.defineProperty;
2177
+ var __defProps$e = Object.defineProperties;
2178
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
2179
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
2180
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
2181
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
2182
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2183
+ var __spreadValues$f = (a, b) => {
2184
2184
  for (var prop in b || (b = {}))
2185
- if (__hasOwnProp$f.call(b, prop))
2186
- __defNormalProp$d(a, prop, b[prop]);
2187
- if (__getOwnPropSymbols$f)
2188
- for (var prop of __getOwnPropSymbols$f(b)) {
2189
- if (__propIsEnum$f.call(b, prop))
2190
- __defNormalProp$d(a, prop, b[prop]);
2185
+ if (__hasOwnProp$h.call(b, prop))
2186
+ __defNormalProp$f(a, prop, b[prop]);
2187
+ if (__getOwnPropSymbols$h)
2188
+ for (var prop of __getOwnPropSymbols$h(b)) {
2189
+ if (__propIsEnum$h.call(b, prop))
2190
+ __defNormalProp$f(a, prop, b[prop]);
2191
2191
  }
2192
2192
  return a;
2193
2193
  };
2194
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
2195
- var __async$g = (__this, __arguments, generator) => {
2194
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
2195
+ var __async$h = (__this, __arguments, generator) => {
2196
2196
  return new Promise((resolve, reject) => {
2197
2197
  var fulfilled = (value) => {
2198
2198
  try {
@@ -2215,7 +2215,7 @@ var __async$g = (__this, __arguments, generator) => {
2215
2215
  const useCreateShipment = () => {
2216
2216
  const { client } = useShipEngine();
2217
2217
  return reactQuery.useMutation({
2218
- mutationFn: (shipment) => __async$g(void 0, null, function* () {
2218
+ mutationFn: (shipment) => __async$h(void 0, null, function* () {
2219
2219
  var _a;
2220
2220
  if (shipment.warehouseId === void 0 && shipment.shipFrom === void 0) {
2221
2221
  throw new jsApi.SE.CodedError("errorMessages.noWarehouses", {
@@ -2233,7 +2233,7 @@ const useCreateShipment = () => {
2233
2233
  postalCode: "",
2234
2234
  stateProvince: ""
2235
2235
  };
2236
- return (yield client.shipments.create(__spreadProps$c(__spreadValues$d({}, shipment), {
2236
+ return (yield client.shipments.create(__spreadProps$e(__spreadValues$f({}, shipment), {
2237
2237
  shipTo
2238
2238
  }))).data;
2239
2239
  }),
@@ -2242,33 +2242,33 @@ const useCreateShipment = () => {
2242
2242
  });
2243
2243
  };
2244
2244
 
2245
- var __defProp$c = Object.defineProperty;
2246
- var __defProps$b = Object.defineProperties;
2247
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
2248
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
2249
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
2250
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
2251
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2252
- var __spreadValues$c = (a, b) => {
2253
- for (var prop in b || (b = {}))
2254
- if (__hasOwnProp$e.call(b, prop))
2255
- __defNormalProp$c(a, prop, b[prop]);
2256
- if (__getOwnPropSymbols$e)
2257
- for (var prop of __getOwnPropSymbols$e(b)) {
2258
- if (__propIsEnum$e.call(b, prop))
2259
- __defNormalProp$c(a, prop, b[prop]);
2260
- }
2245
+ var __defProp$e = Object.defineProperty;
2246
+ var __defProps$d = Object.defineProperties;
2247
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
2248
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
2249
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
2250
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
2251
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2252
+ var __spreadValues$e = (a, b) => {
2253
+ for (var prop in b || (b = {}))
2254
+ if (__hasOwnProp$g.call(b, prop))
2255
+ __defNormalProp$e(a, prop, b[prop]);
2256
+ if (__getOwnPropSymbols$g)
2257
+ for (var prop of __getOwnPropSymbols$g(b)) {
2258
+ if (__propIsEnum$g.call(b, prop))
2259
+ __defNormalProp$e(a, prop, b[prop]);
2260
+ }
2261
2261
  return a;
2262
2262
  };
2263
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
2263
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
2264
2264
  var __objRest$9 = (source, exclude) => {
2265
2265
  var target = {};
2266
2266
  for (var prop in source)
2267
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
2267
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
2268
2268
  target[prop] = source[prop];
2269
- if (source != null && __getOwnPropSymbols$e)
2270
- for (var prop of __getOwnPropSymbols$e(source)) {
2271
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
2269
+ if (source != null && __getOwnPropSymbols$g)
2270
+ for (var prop of __getOwnPropSymbols$g(source)) {
2271
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
2272
2272
  target[prop] = source[prop];
2273
2273
  }
2274
2274
  return target;
@@ -2278,7 +2278,7 @@ const useGetShipmentRates = (params) => {
2278
2278
  const _a = params, { queryFnParams } = _a, rest = __objRest$9(_a, ["queryFnParams"]);
2279
2279
  const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
2280
2280
  const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
2281
- return reactQuery.useQuery(__spreadProps$b(__spreadValues$c({
2281
+ return reactQuery.useQuery(__spreadProps$d(__spreadValues$e({
2282
2282
  enabled: shipmentId !== void 0
2283
2283
  }, rest), {
2284
2284
  onError,
@@ -2293,33 +2293,33 @@ const useGetShipmentRates = (params) => {
2293
2293
  }));
2294
2294
  };
2295
2295
 
2296
- var __defProp$b = Object.defineProperty;
2297
- var __defProps$a = Object.defineProperties;
2298
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
2299
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
2300
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
2301
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
2302
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2303
- var __spreadValues$b = (a, b) => {
2296
+ var __defProp$d = Object.defineProperty;
2297
+ var __defProps$c = Object.defineProperties;
2298
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
2299
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
2300
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
2301
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
2302
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2303
+ var __spreadValues$d = (a, b) => {
2304
2304
  for (var prop in b || (b = {}))
2305
- if (__hasOwnProp$d.call(b, prop))
2306
- __defNormalProp$b(a, prop, b[prop]);
2307
- if (__getOwnPropSymbols$d)
2308
- for (var prop of __getOwnPropSymbols$d(b)) {
2309
- if (__propIsEnum$d.call(b, prop))
2310
- __defNormalProp$b(a, prop, b[prop]);
2305
+ if (__hasOwnProp$f.call(b, prop))
2306
+ __defNormalProp$d(a, prop, b[prop]);
2307
+ if (__getOwnPropSymbols$f)
2308
+ for (var prop of __getOwnPropSymbols$f(b)) {
2309
+ if (__propIsEnum$f.call(b, prop))
2310
+ __defNormalProp$d(a, prop, b[prop]);
2311
2311
  }
2312
2312
  return a;
2313
2313
  };
2314
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
2314
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
2315
2315
  var __objRest$8 = (source, exclude) => {
2316
2316
  var target = {};
2317
2317
  for (var prop in source)
2318
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
2318
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
2319
2319
  target[prop] = source[prop];
2320
- if (source != null && __getOwnPropSymbols$d)
2321
- for (var prop of __getOwnPropSymbols$d(source)) {
2322
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
2320
+ if (source != null && __getOwnPropSymbols$f)
2321
+ for (var prop of __getOwnPropSymbols$f(source)) {
2322
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
2323
2323
  target[prop] = source[prop];
2324
2324
  }
2325
2325
  return target;
@@ -2335,7 +2335,7 @@ const useGetShipment = (params) => {
2335
2335
  }
2336
2336
  return {};
2337
2337
  };
2338
- return reactQuery.useQuery(__spreadProps$a(__spreadValues$b({}, getQueryProps()), {
2338
+ return reactQuery.useQuery(__spreadProps$c(__spreadValues$d({}, getQueryProps()), {
2339
2339
  enabled: shipmentId !== void 0,
2340
2340
  onError,
2341
2341
  queryFn: () => {
@@ -2349,17 +2349,17 @@ const useGetShipment = (params) => {
2349
2349
  }));
2350
2350
  };
2351
2351
 
2352
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2353
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2354
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2352
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
2353
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
2354
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
2355
2355
  var __objRest$7 = (source, exclude) => {
2356
2356
  var target = {};
2357
2357
  for (var prop in source)
2358
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2358
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
2359
2359
  target[prop] = source[prop];
2360
- if (source != null && __getOwnPropSymbols$c)
2361
- for (var prop of __getOwnPropSymbols$c(source)) {
2362
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2360
+ if (source != null && __getOwnPropSymbols$e)
2361
+ for (var prop of __getOwnPropSymbols$e(source)) {
2362
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
2363
2363
  target[prop] = source[prop];
2364
2364
  }
2365
2365
  return target;
@@ -2376,33 +2376,33 @@ const useListShipments = (_params) => {
2376
2376
  });
2377
2377
  };
2378
2378
 
2379
- var __defProp$a = Object.defineProperty;
2380
- var __defProps$9 = Object.defineProperties;
2381
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
2382
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
2383
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
2384
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
2385
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2386
- var __spreadValues$a = (a, b) => {
2379
+ var __defProp$c = Object.defineProperty;
2380
+ var __defProps$b = Object.defineProperties;
2381
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
2382
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
2383
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
2384
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
2385
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2386
+ var __spreadValues$c = (a, b) => {
2387
2387
  for (var prop in b || (b = {}))
2388
- if (__hasOwnProp$b.call(b, prop))
2389
- __defNormalProp$a(a, prop, b[prop]);
2390
- if (__getOwnPropSymbols$b)
2391
- for (var prop of __getOwnPropSymbols$b(b)) {
2392
- if (__propIsEnum$b.call(b, prop))
2393
- __defNormalProp$a(a, prop, b[prop]);
2388
+ if (__hasOwnProp$d.call(b, prop))
2389
+ __defNormalProp$c(a, prop, b[prop]);
2390
+ if (__getOwnPropSymbols$d)
2391
+ for (var prop of __getOwnPropSymbols$d(b)) {
2392
+ if (__propIsEnum$d.call(b, prop))
2393
+ __defNormalProp$c(a, prop, b[prop]);
2394
2394
  }
2395
2395
  return a;
2396
2396
  };
2397
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2397
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
2398
2398
  var __objRest$6 = (source, exclude) => {
2399
2399
  var target = {};
2400
2400
  for (var prop in source)
2401
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2401
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
2402
2402
  target[prop] = source[prop];
2403
- if (source != null && __getOwnPropSymbols$b)
2404
- for (var prop of __getOwnPropSymbols$b(source)) {
2405
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2403
+ if (source != null && __getOwnPropSymbols$d)
2404
+ for (var prop of __getOwnPropSymbols$d(source)) {
2405
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
2406
2406
  target[prop] = source[prop];
2407
2407
  }
2408
2408
  return target;
@@ -2410,7 +2410,7 @@ var __objRest$6 = (source, exclude) => {
2410
2410
  const useGetShipmentByExternalId = (params) => {
2411
2411
  const { client } = useShipEngine();
2412
2412
  const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
2413
- return reactQuery.useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
2413
+ return reactQuery.useQuery(__spreadProps$b(__spreadValues$c({}, rest), {
2414
2414
  onError,
2415
2415
  queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
2416
2416
  queryKey: ["useGetShipmentByExternalId", queryFnParams],
@@ -2418,7 +2418,7 @@ const useGetShipmentByExternalId = (params) => {
2418
2418
  }));
2419
2419
  };
2420
2420
 
2421
- var __async$f = (__this, __arguments, generator) => {
2421
+ var __async$g = (__this, __arguments, generator) => {
2422
2422
  return new Promise((resolve, reject) => {
2423
2423
  var fulfilled = (value) => {
2424
2424
  try {
@@ -2441,7 +2441,7 @@ var __async$f = (__this, __arguments, generator) => {
2441
2441
  const useCancelShipment = () => {
2442
2442
  const { client } = useShipEngine();
2443
2443
  return reactQuery.useMutation({
2444
- mutationFn: (shipmentId) => __async$f(void 0, null, function* () {
2444
+ mutationFn: (shipmentId) => __async$g(void 0, null, function* () {
2445
2445
  const result = yield client.shipments.cancel(shipmentId);
2446
2446
  return result.data;
2447
2447
  }),
@@ -2450,41 +2450,41 @@ const useCancelShipment = () => {
2450
2450
  });
2451
2451
  };
2452
2452
 
2453
- var __defProp$9 = Object.defineProperty;
2454
- var __defProps$8 = Object.defineProperties;
2455
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2456
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
2457
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
2458
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
2459
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2460
- var __spreadValues$9 = (a, b) => {
2453
+ var __defProp$b = Object.defineProperty;
2454
+ var __defProps$a = Object.defineProperties;
2455
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
2456
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2457
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2458
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2459
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2460
+ var __spreadValues$b = (a, b) => {
2461
2461
  for (var prop in b || (b = {}))
2462
- if (__hasOwnProp$a.call(b, prop))
2463
- __defNormalProp$9(a, prop, b[prop]);
2464
- if (__getOwnPropSymbols$a)
2465
- for (var prop of __getOwnPropSymbols$a(b)) {
2466
- if (__propIsEnum$a.call(b, prop))
2467
- __defNormalProp$9(a, prop, b[prop]);
2462
+ if (__hasOwnProp$c.call(b, prop))
2463
+ __defNormalProp$b(a, prop, b[prop]);
2464
+ if (__getOwnPropSymbols$c)
2465
+ for (var prop of __getOwnPropSymbols$c(b)) {
2466
+ if (__propIsEnum$c.call(b, prop))
2467
+ __defNormalProp$b(a, prop, b[prop]);
2468
2468
  }
2469
2469
  return a;
2470
2470
  };
2471
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2471
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
2472
2472
  var __objRest$5 = (source, exclude) => {
2473
2473
  var target = {};
2474
2474
  for (var prop in source)
2475
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2475
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
2476
2476
  target[prop] = source[prop];
2477
- if (source != null && __getOwnPropSymbols$a)
2478
- for (var prop of __getOwnPropSymbols$a(source)) {
2479
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2477
+ if (source != null && __getOwnPropSymbols$c)
2478
+ for (var prop of __getOwnPropSymbols$c(source)) {
2479
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
2480
2480
  target[prop] = source[prop];
2481
2481
  }
2482
2482
  return target;
2483
2483
  };
2484
2484
  const useListShippingRules = (params) => {
2485
2485
  const { client } = useShipEngine();
2486
- const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2487
- return reactQuery.useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
2486
+ const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2487
+ return reactQuery.useQuery(__spreadProps$a(__spreadValues$b({}, rest), {
2488
2488
  onError,
2489
2489
  queryFn: () => {
2490
2490
  return client.shippingRules.list(queryFnParams);
@@ -2494,7 +2494,7 @@ const useListShippingRules = (params) => {
2494
2494
  }));
2495
2495
  };
2496
2496
 
2497
- var __async$e = (__this, __arguments, generator) => {
2497
+ var __async$f = (__this, __arguments, generator) => {
2498
2498
  return new Promise((resolve, reject) => {
2499
2499
  var fulfilled = (value) => {
2500
2500
  try {
@@ -2517,7 +2517,7 @@ var __async$e = (__this, __arguments, generator) => {
2517
2517
  const useCreateShippingRule = () => {
2518
2518
  const { client } = useShipEngine();
2519
2519
  return reactQuery.useMutation({
2520
- mutationFn: (props) => __async$e(void 0, null, function* () {
2520
+ mutationFn: (props) => __async$f(void 0, null, function* () {
2521
2521
  const result = yield client.shippingRules.create(props);
2522
2522
  return result.data;
2523
2523
  }),
@@ -2526,7 +2526,7 @@ const useCreateShippingRule = () => {
2526
2526
  });
2527
2527
  };
2528
2528
 
2529
- var __async$d = (__this, __arguments, generator) => {
2529
+ var __async$e = (__this, __arguments, generator) => {
2530
2530
  return new Promise((resolve, reject) => {
2531
2531
  var fulfilled = (value) => {
2532
2532
  try {
@@ -2549,7 +2549,7 @@ var __async$d = (__this, __arguments, generator) => {
2549
2549
  const useDeleteShippingRule = () => {
2550
2550
  const { client } = useShipEngine();
2551
2551
  return reactQuery.useMutation({
2552
- mutationFn: (props) => __async$d(void 0, null, function* () {
2552
+ mutationFn: (props) => __async$e(void 0, null, function* () {
2553
2553
  const result = yield client.shippingRules.delete(props);
2554
2554
  return result.data;
2555
2555
  }),
@@ -2558,7 +2558,7 @@ const useDeleteShippingRule = () => {
2558
2558
  });
2559
2559
  };
2560
2560
 
2561
- var __async$c = (__this, __arguments, generator) => {
2561
+ var __async$d = (__this, __arguments, generator) => {
2562
2562
  return new Promise((resolve, reject) => {
2563
2563
  var fulfilled = (value) => {
2564
2564
  try {
@@ -2581,7 +2581,7 @@ var __async$c = (__this, __arguments, generator) => {
2581
2581
  const useEditShippingRule = () => {
2582
2582
  const { client } = useShipEngine();
2583
2583
  return reactQuery.useMutation({
2584
- mutationFn: (props) => __async$c(void 0, null, function* () {
2584
+ mutationFn: (props) => __async$d(void 0, null, function* () {
2585
2585
  const result = yield client.shippingRules.edit(props);
2586
2586
  return result.data;
2587
2587
  }),
@@ -2590,41 +2590,41 @@ const useEditShippingRule = () => {
2590
2590
  });
2591
2591
  };
2592
2592
 
2593
- var __defProp$8 = Object.defineProperty;
2594
- var __defProps$7 = Object.defineProperties;
2595
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2596
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2597
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2598
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2599
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2600
- var __spreadValues$8 = (a, b) => {
2593
+ var __defProp$a = Object.defineProperty;
2594
+ var __defProps$9 = Object.defineProperties;
2595
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
2596
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
2597
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
2598
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
2599
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2600
+ var __spreadValues$a = (a, b) => {
2601
2601
  for (var prop in b || (b = {}))
2602
- if (__hasOwnProp$9.call(b, prop))
2603
- __defNormalProp$8(a, prop, b[prop]);
2604
- if (__getOwnPropSymbols$9)
2605
- for (var prop of __getOwnPropSymbols$9(b)) {
2606
- if (__propIsEnum$9.call(b, prop))
2607
- __defNormalProp$8(a, prop, b[prop]);
2602
+ if (__hasOwnProp$b.call(b, prop))
2603
+ __defNormalProp$a(a, prop, b[prop]);
2604
+ if (__getOwnPropSymbols$b)
2605
+ for (var prop of __getOwnPropSymbols$b(b)) {
2606
+ if (__propIsEnum$b.call(b, prop))
2607
+ __defNormalProp$a(a, prop, b[prop]);
2608
2608
  }
2609
2609
  return a;
2610
2610
  };
2611
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2611
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2612
2612
  var __objRest$4 = (source, exclude) => {
2613
2613
  var target = {};
2614
2614
  for (var prop in source)
2615
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2615
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2616
2616
  target[prop] = source[prop];
2617
- if (source != null && __getOwnPropSymbols$9)
2618
- for (var prop of __getOwnPropSymbols$9(source)) {
2619
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2617
+ if (source != null && __getOwnPropSymbols$b)
2618
+ for (var prop of __getOwnPropSymbols$b(source)) {
2619
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2620
2620
  target[prop] = source[prop];
2621
2621
  }
2622
2622
  return target;
2623
2623
  };
2624
2624
  const useGetShippingRuleConditionsOptions = (params) => {
2625
2625
  const { client } = useShipEngine();
2626
- const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2627
- return reactQuery.useQuery(__spreadProps$7(__spreadValues$8({}, rest), {
2626
+ const _a = __spreadValues$a({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2627
+ return reactQuery.useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
2628
2628
  onError,
2629
2629
  queryFn: () => {
2630
2630
  return client.shippingRules.getConditionOptions(queryFnParams);
@@ -2634,41 +2634,41 @@ const useGetShippingRuleConditionsOptions = (params) => {
2634
2634
  }));
2635
2635
  };
2636
2636
 
2637
- var __defProp$7 = Object.defineProperty;
2638
- var __defProps$6 = Object.defineProperties;
2639
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2640
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2641
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2642
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2643
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2644
- var __spreadValues$7 = (a, b) => {
2637
+ var __defProp$9 = Object.defineProperty;
2638
+ var __defProps$8 = Object.defineProperties;
2639
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2640
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
2641
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
2642
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
2643
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2644
+ var __spreadValues$9 = (a, b) => {
2645
2645
  for (var prop in b || (b = {}))
2646
- if (__hasOwnProp$8.call(b, prop))
2647
- __defNormalProp$7(a, prop, b[prop]);
2648
- if (__getOwnPropSymbols$8)
2649
- for (var prop of __getOwnPropSymbols$8(b)) {
2650
- if (__propIsEnum$8.call(b, prop))
2651
- __defNormalProp$7(a, prop, b[prop]);
2646
+ if (__hasOwnProp$a.call(b, prop))
2647
+ __defNormalProp$9(a, prop, b[prop]);
2648
+ if (__getOwnPropSymbols$a)
2649
+ for (var prop of __getOwnPropSymbols$a(b)) {
2650
+ if (__propIsEnum$a.call(b, prop))
2651
+ __defNormalProp$9(a, prop, b[prop]);
2652
2652
  }
2653
2653
  return a;
2654
2654
  };
2655
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2655
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2656
2656
  var __objRest$3 = (source, exclude) => {
2657
2657
  var target = {};
2658
2658
  for (var prop in source)
2659
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2659
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2660
2660
  target[prop] = source[prop];
2661
- if (source != null && __getOwnPropSymbols$8)
2662
- for (var prop of __getOwnPropSymbols$8(source)) {
2663
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2661
+ if (source != null && __getOwnPropSymbols$a)
2662
+ for (var prop of __getOwnPropSymbols$a(source)) {
2663
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2664
2664
  target[prop] = source[prop];
2665
2665
  }
2666
2666
  return target;
2667
2667
  };
2668
2668
  const useGetShippingRuleById = (params) => {
2669
2669
  const { client } = useShipEngine();
2670
- const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2671
- return reactQuery.useQuery(__spreadProps$6(__spreadValues$7({}, rest), {
2670
+ const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2671
+ return reactQuery.useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
2672
2672
  onError,
2673
2673
  queryFn: () => {
2674
2674
  return client.shippingRules.get(queryFnParams);
@@ -2693,7 +2693,7 @@ const useGetThemeById = (themeId) => {
2693
2693
  });
2694
2694
  };
2695
2695
 
2696
- var __async$b = (__this, __arguments, generator) => {
2696
+ var __async$c = (__this, __arguments, generator) => {
2697
2697
  return new Promise((resolve, reject) => {
2698
2698
  var fulfilled = (value) => {
2699
2699
  try {
@@ -2716,7 +2716,7 @@ var __async$b = (__this, __arguments, generator) => {
2716
2716
  const useCreateWarehouse = () => {
2717
2717
  const { client } = useShipEngine();
2718
2718
  return reactQuery.useMutation({
2719
- mutationFn: (data) => __async$b(void 0, null, function* () {
2719
+ mutationFn: (data) => __async$c(void 0, null, function* () {
2720
2720
  const result = yield client.warehouses.create(data);
2721
2721
  return result.data;
2722
2722
  }),
@@ -2725,7 +2725,7 @@ const useCreateWarehouse = () => {
2725
2725
  });
2726
2726
  };
2727
2727
 
2728
- var __async$a = (__this, __arguments, generator) => {
2728
+ var __async$b = (__this, __arguments, generator) => {
2729
2729
  return new Promise((resolve, reject) => {
2730
2730
  var fulfilled = (value) => {
2731
2731
  try {
@@ -2748,7 +2748,7 @@ var __async$a = (__this, __arguments, generator) => {
2748
2748
  const useDeleteWarehouse = () => {
2749
2749
  const { client } = useShipEngine();
2750
2750
  return reactQuery.useMutation({
2751
- mutationFn: (_0) => __async$a(void 0, [_0], function* ({ warehouseId }) {
2751
+ mutationFn: (_0) => __async$b(void 0, [_0], function* ({ warehouseId }) {
2752
2752
  const result = yield client.warehouses.delete(warehouseId);
2753
2753
  return result.data;
2754
2754
  }),
@@ -2757,41 +2757,41 @@ const useDeleteWarehouse = () => {
2757
2757
  });
2758
2758
  };
2759
2759
 
2760
- var __defProp$6 = Object.defineProperty;
2761
- var __defProps$5 = Object.defineProperties;
2762
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2763
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2764
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2765
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2766
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2767
- var __spreadValues$6 = (a, b) => {
2760
+ var __defProp$8 = Object.defineProperty;
2761
+ var __defProps$7 = Object.defineProperties;
2762
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2763
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2764
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2765
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2766
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2767
+ var __spreadValues$8 = (a, b) => {
2768
2768
  for (var prop in b || (b = {}))
2769
- if (__hasOwnProp$7.call(b, prop))
2770
- __defNormalProp$6(a, prop, b[prop]);
2771
- if (__getOwnPropSymbols$7)
2772
- for (var prop of __getOwnPropSymbols$7(b)) {
2773
- if (__propIsEnum$7.call(b, prop))
2774
- __defNormalProp$6(a, prop, b[prop]);
2769
+ if (__hasOwnProp$9.call(b, prop))
2770
+ __defNormalProp$8(a, prop, b[prop]);
2771
+ if (__getOwnPropSymbols$9)
2772
+ for (var prop of __getOwnPropSymbols$9(b)) {
2773
+ if (__propIsEnum$9.call(b, prop))
2774
+ __defNormalProp$8(a, prop, b[prop]);
2775
2775
  }
2776
2776
  return a;
2777
2777
  };
2778
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2778
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2779
2779
  var __objRest$2 = (source, exclude) => {
2780
2780
  var target = {};
2781
2781
  for (var prop in source)
2782
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2782
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2783
2783
  target[prop] = source[prop];
2784
- if (source != null && __getOwnPropSymbols$7)
2785
- for (var prop of __getOwnPropSymbols$7(source)) {
2786
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2784
+ if (source != null && __getOwnPropSymbols$9)
2785
+ for (var prop of __getOwnPropSymbols$9(source)) {
2786
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2787
2787
  target[prop] = source[prop];
2788
2788
  }
2789
2789
  return target;
2790
2790
  };
2791
2791
  const useListWarehouses = (params) => {
2792
2792
  const { client } = useShipEngine();
2793
- const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2794
- return reactQuery.useQuery(__spreadProps$5(__spreadValues$6({}, rest), {
2793
+ const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2794
+ return reactQuery.useQuery(__spreadProps$7(__spreadValues$8({}, rest), {
2795
2795
  onError,
2796
2796
  queryFn: () => client.warehouses.list(queryFnParams),
2797
2797
  queryKey: ["useListWarehouses", queryFnParams],
@@ -2799,22 +2799,22 @@ const useListWarehouses = (params) => {
2799
2799
  }));
2800
2800
  };
2801
2801
 
2802
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2803
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2804
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2802
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2803
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2804
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2805
2805
  var __objRest$1 = (source, exclude) => {
2806
2806
  var target = {};
2807
2807
  for (var prop in source)
2808
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2808
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2809
2809
  target[prop] = source[prop];
2810
- if (source != null && __getOwnPropSymbols$6)
2811
- for (var prop of __getOwnPropSymbols$6(source)) {
2812
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2810
+ if (source != null && __getOwnPropSymbols$8)
2811
+ for (var prop of __getOwnPropSymbols$8(source)) {
2812
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2813
2813
  target[prop] = source[prop];
2814
2814
  }
2815
2815
  return target;
2816
2816
  };
2817
- var __async$9 = (__this, __arguments, generator) => {
2817
+ var __async$a = (__this, __arguments, generator) => {
2818
2818
  return new Promise((resolve, reject) => {
2819
2819
  var fulfilled = (value) => {
2820
2820
  try {
@@ -2837,7 +2837,7 @@ var __async$9 = (__this, __arguments, generator) => {
2837
2837
  const useUpdateWarehouse = () => {
2838
2838
  const { client } = useShipEngine();
2839
2839
  return reactQuery.useMutation({
2840
- mutationFn: (_a) => __async$9(void 0, null, function* () {
2840
+ mutationFn: (_a) => __async$a(void 0, null, function* () {
2841
2841
  var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
2842
2842
  const result = yield client.warehouses.update(warehouseId, warehouse);
2843
2843
  return result.data;
@@ -2857,7 +2857,7 @@ const useGetAccountBillingPlan = () => {
2857
2857
  });
2858
2858
  };
2859
2859
 
2860
- var __async$8 = (__this, __arguments, generator) => {
2860
+ var __async$9 = (__this, __arguments, generator) => {
2861
2861
  return new Promise((resolve, reject) => {
2862
2862
  var fulfilled = (value) => {
2863
2863
  try {
@@ -2880,7 +2880,7 @@ var __async$8 = (__this, __arguments, generator) => {
2880
2880
  const useUpdateAccountBillingPlan = () => {
2881
2881
  const { client } = useShipEngine();
2882
2882
  return reactQuery.useMutation({
2883
- mutationFn: (code) => __async$8(void 0, null, function* () {
2883
+ mutationFn: (code) => __async$9(void 0, null, function* () {
2884
2884
  const result = yield client.accountBillingPlan.update({ code });
2885
2885
  return result.data;
2886
2886
  }),
@@ -2889,6 +2889,86 @@ const useUpdateAccountBillingPlan = () => {
2889
2889
  });
2890
2890
  };
2891
2891
 
2892
+ var __defProp$7 = Object.defineProperty;
2893
+ var __defProps$6 = Object.defineProperties;
2894
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2895
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2896
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2897
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2898
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2899
+ var __spreadValues$7 = (a, b) => {
2900
+ for (var prop in b || (b = {}))
2901
+ if (__hasOwnProp$7.call(b, prop))
2902
+ __defNormalProp$7(a, prop, b[prop]);
2903
+ if (__getOwnPropSymbols$7)
2904
+ for (var prop of __getOwnPropSymbols$7(b)) {
2905
+ if (__propIsEnum$7.call(b, prop))
2906
+ __defNormalProp$7(a, prop, b[prop]);
2907
+ }
2908
+ return a;
2909
+ };
2910
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2911
+ const useGetAccountBilling = (params) => {
2912
+ const { client } = useShipEngine();
2913
+ return reactQuery.useQuery(__spreadProps$6(__spreadValues$7({}, params), {
2914
+ onError,
2915
+ queryFn: () => client.accountBilling.get(),
2916
+ queryKey: ["useGetAccountBilling"],
2917
+ select: (result) => result.data
2918
+ }));
2919
+ };
2920
+
2921
+ var __defProp$6 = Object.defineProperty;
2922
+ var __defProps$5 = Object.defineProperties;
2923
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2924
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2925
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2926
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2927
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2928
+ var __spreadValues$6 = (a, b) => {
2929
+ for (var prop in b || (b = {}))
2930
+ if (__hasOwnProp$6.call(b, prop))
2931
+ __defNormalProp$6(a, prop, b[prop]);
2932
+ if (__getOwnPropSymbols$6)
2933
+ for (var prop of __getOwnPropSymbols$6(b)) {
2934
+ if (__propIsEnum$6.call(b, prop))
2935
+ __defNormalProp$6(a, prop, b[prop]);
2936
+ }
2937
+ return a;
2938
+ };
2939
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2940
+ var __async$8 = (__this, __arguments, generator) => {
2941
+ return new Promise((resolve, reject) => {
2942
+ var fulfilled = (value) => {
2943
+ try {
2944
+ step(generator.next(value));
2945
+ } catch (e) {
2946
+ reject(e);
2947
+ }
2948
+ };
2949
+ var rejected = (value) => {
2950
+ try {
2951
+ step(generator.throw(value));
2952
+ } catch (e) {
2953
+ reject(e);
2954
+ }
2955
+ };
2956
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2957
+ step((generator = generator.apply(__this, __arguments)).next());
2958
+ });
2959
+ };
2960
+ const useUpsertAccountBilling = (params) => {
2961
+ const { client } = useShipEngine();
2962
+ return reactQuery.useMutation(__spreadProps$5(__spreadValues$6({}, params), {
2963
+ mutationFn: (billing) => __async$8(void 0, null, function* () {
2964
+ const result = yield client.accountBilling.post(billing);
2965
+ return result.data;
2966
+ }),
2967
+ mutationKey: ["useUpsertAccountBilling"],
2968
+ onError
2969
+ }));
2970
+ };
2971
+
2892
2972
  var __defProp$5 = Object.defineProperty;
2893
2973
  var __defProps$4 = Object.defineProperties;
2894
2974
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
@@ -3398,6 +3478,7 @@ exports.useDeleteWebhook = useDeleteWebhook;
3398
3478
  exports.useDownloadRateCard = useDownloadRateCard;
3399
3479
  exports.useEditShippingRule = useEditShippingRule;
3400
3480
  exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
3481
+ exports.useGetAccountBilling = useGetAccountBilling;
3401
3482
  exports.useGetAccountBillingPlan = useGetAccountBillingPlan;
3402
3483
  exports.useGetAccountImages = useGetAccountImages;
3403
3484
  exports.useGetAccountSettings = useGetAccountSettings;
@@ -3469,6 +3550,7 @@ exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;
3469
3550
  exports.useUpdateWarehouse = useUpdateWarehouse;
3470
3551
  exports.useUpdateWebhook = useUpdateWebhook;
3471
3552
  exports.useUploadRateCard = useUploadRateCard;
3553
+ exports.useUpsertAccountBilling = useUpsertAccountBilling;
3472
3554
  exports.useValidateAddresses = useValidateAddresses;
3473
3555
  exports.useVoidLabel = useVoidLabel;
3474
3556
  Object.keys(jsApi).forEach(k => {