@shipengine/react-api 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { QueryClient, QueryClientProvider, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { createContext, useState, useEffect, useContext } from 'react';
4
- import { ShipEngineAPI, SE } from '@shipengine/js-api';
4
+ import { ShipEngineAPI, SE, CodedError } from '@shipengine/js-api';
5
5
  export * from '@shipengine/js-api';
6
6
 
7
7
  const ShipEngineContext = createContext(void 0);
@@ -76,21 +76,21 @@ const onError = (_errors) => _default();
76
76
 
77
77
  var o={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},l={};function a(e){return "string"==typeof e?o[e.toLowerCase()]:e}function c(e,r){return c=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},c(e,r)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function f(e,r,t){return f=u()?Reflect.construct:function(e,r,t){var s=[null];s.push.apply(s,r);var i=new(Function.bind.apply(e,s));return t&&c(i,t.prototype),i},f.apply(null,arguments)}function h(e){if(null==e)return e;if(Array.isArray(e))return e.slice();if("object"==typeof e){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t];}),r}return e}function v(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"[ "+e.map(function(e){return v(e)}).join(", ")+" ]":"object"==typeof e?JSON.stringify(e):"function"==typeof e?"[Function: "+e.name+"]":"boolean"==typeof e||"number"==typeof e?e:"'"+e.toString()+"'"}function p(e){if("string"!=typeof e){for(var r=new Array(arguments.length),t=0;t<arguments.length;t++)r[t]=v(arguments[t]);return r.join(" ")}for(var s=/%[sdj%]/g,i=1,n=arguments,o=n.length,l=String(e).replace(s,function(e){if("%%"===e)return "%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return "[Circular]"}default:return e}}),a=n[i];i<o;a=n[++i])l+=null===a||"object"!=typeof a?" "+a:" "+v(a);return l}function m(e,r){var t=e.split("\n");t[0]&&t[0].indexOf("call-stack-error")>=0&&t.shift();var s=t[r],i=null;if(s){var n=/^\s*(at|.*@)\s*(.+)?$/.exec(s);i=Array.isArray(n)&&n[2]?n[2]:s;}return i}Object.keys(o).forEach(function(e){l[o[e]]=e;});var y={};function d(e,r){if(r){if(y[r])return;y[r]=!0;}console.error(e+"\n");}function g(e){return y[e]}function w(){var e=[];return function(r,t){return t&&"object"==typeof t?-1!==e.indexOf(t)?"[Circular]":(e.push(t),t):t}}var b=/*#__PURE__*/function(){function e(){}return e.prototype.write=function(e){e.level<30?console.log(e):e.level<40?console.info(e):e.level<50?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj);},e}(),j=/*#__PURE__*/function(){function e(r,t,s){var i,n,o,l,a=this;if(!(this instanceof e))return new e(r,t);if(void 0!==t&&(i=r,r=t,!(i instanceof e)))throw new TypeError("invalid Logger creation: do not pass a second arg");if(!r)throw new TypeError("options (object) is required");if(i){if(r.name)throw new TypeError("invalid options.name: child cannot set logger name")}else if(!r.name)throw new TypeError("options.name (string) is required");if(r.stream&&r.streams)throw new TypeError('cannot mix "streams" and "stream" options');if(r.streams&&!Array.isArray(r.streams))throw new TypeError("invalid options.streams: must be an array");if(r.serializers&&("object"!=typeof r.serializers||Array.isArray(r.serializers)))throw new TypeError("invalid options.serializers: must be an object");if(i&&s){this._level=i._level,this.streams=i.streams,this.serializers=i.serializers,this.src=i.src,n=this.fields={};var c=Object.keys(i.fields);for(l=0;l<c.length;l++)n[o=c[l]]=i.fields[o];var u=Object.keys(r);for(l=0;l<u.length;l++)n[o=u[l]]=r[o];}else {if(i){for(this._level=i._level,this.streams=[],l=0;l<i.streams.length;l++){var f=h(i.streams[l]);this.streams.push(f);}this.serializers=h(i.serializers),this.src=i.src,this.fields=h(i.fields),r.level&&this.level(r.level);}else this._level=Number.POSITIVE_INFINITY,this.streams=[],this.serializers=null,this.src=!1,this.fields={};r.stream?this.addStream({type:"stream",stream:r.stream,level:r.level}):r.streams?r.streams.forEach(function(e){a.addStream(e,r.level);}):i&&r.level?this.level(r.level):i||this.addStream({type:"raw",stream:new b,level:r.level}),r.serializers&&this.addSerializers(r.serializers),r.src&&(this.src=!0),delete(n=h(r)).stream,delete n.level,delete n.streams,delete n.serializers,delete n.src,this.serializers&&this._applySerializers(n),Object.keys(n).forEach(function(e){a.fields[e]=n[e];});}}var r=e.prototype;return r.addStream=function(e,r){void 0===r&&(r=30),(e=h(e)).type="raw",e.level=a(e.level||r),e.level<this._level&&(this._level=e.level),this.streams.push(e),delete this.haveNonRawStreams;},r.addSerializers=function(e){var r=this;this.serializers||(this.serializers={}),Object.keys(e).forEach(function(t){var s=e[t];if("function"!=typeof s)throw new TypeError(p('invalid serializer for "%s" field: must be a function',t));r.serializers[t]=s;});},r.child=function(e,r){return new this.constructor(this,e||{},r)},r.level=function(e){if(void 0===e)return this._level;for(var r=a(e),t=this.streams.length,s=0;s<t;s++)this.streams[s].level=r;this._level=r;},r.levels=function(e,r){if(void 0===e)return this.streams.map(function(e){return e.level});var t;if("number"==typeof e){if(void 0===(t=this.streams[e]))throw new Error("invalid stream index: "+e)}else {for(var s=this.streams.length,i=0;i<s;i++){var n=this.streams[i];if(n.name===e){t=n;break}}if(!t)throw new Error(p('no stream with name "%s"',e))}if(void 0===r)return t.level;var o=a(r);t.level=o,o<this._level&&(this._level=o);},r._applySerializers=function(e,r){var t=this;Object.keys(this.serializers).forEach(function(s){if(!(void 0===e[s]||r&&r[s]))try{e[s]=t.serializers[s](e[s]);}catch(r){d(p('bunyan: ERROR: Exception thrown from the "%s" Bunyan serializer. This should never happen. This is a bugin that serializer function.\n%s',s,r.stack||r)),e[s]=p('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)',s);}});},r._emit=function(e,r){var t,s;if(void 0===this.haveNonRawStreams)for(this.haveNonRawStreams=!1,t=0;t<this.streams.length;t++)if(!this.streams[t].raw){this.haveNonRawStreams=!0;break}if(r||this.haveNonRawStreams)try{s=JSON.stringify(e,w())+"\n";}catch(r){var i=r.stack.split(/\n/g,2).join("\n");d('bunyan: ERROR: Exception in `JSON.stringify(rec)`. You can install the "safe-json-stringify" module to have Bunyan fallback to safer stringification. Record:\n'+function(e,r){return r||(r=" "),r+e.split(/\r?\n/g).join("\n"+r)}(p("%s\n%s",e,r.stack)),i),s=p("(Exception in JSON.stringify(rec): %j. See stderr for details.)\n",r.message);}if(r)return s;var n=e.level;for(t=0;t<this.streams.length;t++){var o=this.streams[t];o.level<=n&&o.stream.write(e);}return s},e}();function z(e){return function(){var r=this;function t(t){var n;t[0]instanceof Error?(s={err:r.serializers&&r.serializers.err?r.serializers.err(t[0]):k.err(t[0])},n={err:!0},i=1===t.length?[s.err.message]:Array.prototype.slice.call(t,1)):"object"!=typeof t[0]&&null!==t[0]||Array.isArray(t[0])?(s=null,i=Array.prototype.slice.call(t)):(s=t[0],i=1===t.length&&s.err&&s.err instanceof Error?[s.err.message]:Array.prototype.slice.call(t,1));var o=h(r.fields);o.level=e;var a=s?h(s):null;if(a&&(r.serializers&&r._applySerializers(a,n),Object.keys(a).forEach(function(e){o[e]=a[e];})),o.levelName=l[e],o.msg=i.length?p.apply(r,i):"",o.time||(o.time=new Date),r.src&&!o.src)try{throw new Error("call-stack-error")}catch(e){var c=e.stack?m(e.stack,2):"";c||g("src")||d("Unable to determine src line info","src"),o.src=c||"";}return o.v=1,o}var s=null,i=arguments,n=null;if(0===arguments.length)return this._level<=e;this._level>e||(n=t(i),this._emit(n));}}function S(e){var r=e.stack||e.toString();if(e.cause&&"function"==typeof e.cause){var t=e.cause();t&&(r+="\nCaused by: "+S(t));}return r}j.prototype.trace=z(10),j.prototype.debug=z(20),j.prototype.info=z(30),j.prototype.warn=z(40),j.prototype.error=z(50),j.prototype.fatal=z(60);var k={err:function(e){return e&&e.stack?{message:e.message,name:e.name,stack:S(e),code:e.code,signal:e.signal}:e}};function E(){return f(j,[].slice.call(arguments))}var A={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},R=/*#__PURE__*/function(){function e(e){var r=void 0===e?{}:e,t=r.logByLevel,s=r.css,i=void 0===s?A:s;this.logByLevel=void 0!==t&&t,this.css=i;}return e.prototype.write=function(e){var r,t,s=this.css.def,i=this.css.msg,n=this.css.src,o=e.childName?e.name+"/"+e.childName:e.name,a=l[e.level],c=(Array(6-a.length).join(" ")+a).toUpperCase();this.logByLevel?(10===e.level?a="debug":60===e.level&&(a="error"),t="function"==typeof console[a]?console[a]:console.log):t=console.log,r=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var u=function(e,r){return Array(r+1-(e+"").length).join("0")+e},f=[];f.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),f.push(u(e.time.getHours(),2)),f.push(u(e.time.getMinutes(),2)),f.push(u(e.time.getSeconds(),2)),f.push(u(e.time.getMilliseconds(),4)),f.push(r),f.push(c),f.push(s),f.push(o),f.push(i),f.push(e.msg),e.src&&(f.push(n),f.push(e.src)),e.obj&&(f.push("\n"),f.push(e.obj)),e.err&&e.err.stack&&(f.push("\n"),f.push(e.err.stack)),t.apply(console,f);},e.getDefaultCss=function(){return A},e}();
78
78
 
79
- var __defProp$g = Object.defineProperty;
79
+ var __defProp$h = Object.defineProperty;
80
80
  var __defProps$g = Object.defineProperties;
81
81
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
82
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
83
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
84
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
85
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
- var __spreadValues$g = (a, b) => {
82
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
83
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
84
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
85
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
+ var __spreadValues$h = (a, b) => {
87
87
  for (var prop in b || (b = {}))
88
- if (__hasOwnProp$q.call(b, prop))
89
- __defNormalProp$g(a, prop, b[prop]);
90
- if (__getOwnPropSymbols$q)
91
- for (var prop of __getOwnPropSymbols$q(b)) {
92
- if (__propIsEnum$q.call(b, prop))
93
- __defNormalProp$g(a, prop, b[prop]);
88
+ if (__hasOwnProp$r.call(b, prop))
89
+ __defNormalProp$h(a, prop, b[prop]);
90
+ if (__getOwnPropSymbols$r)
91
+ for (var prop of __getOwnPropSymbols$r(b)) {
92
+ if (__propIsEnum$r.call(b, prop))
93
+ __defNormalProp$h(a, prop, b[prop]);
94
94
  }
95
95
  return a;
96
96
  };
@@ -103,7 +103,7 @@ if (process.env.NODE_ENV === "production") {
103
103
  }
104
104
  const logger = E({
105
105
  name: "shipengine",
106
- serializers: __spreadProps$g(__spreadValues$g({}, k), {
106
+ serializers: __spreadProps$g(__spreadValues$h({}, k), {
107
107
  req: (req) => ({
108
108
  headers: req.headers,
109
109
  method: req.method,
@@ -128,7 +128,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
128
128
  throw error;
129
129
  });
130
130
 
131
- var __async$H = (__this, __arguments, generator) => {
131
+ var __async$K = (__this, __arguments, generator) => {
132
132
  return new Promise((resolve, reject) => {
133
133
  var fulfilled = (value) => {
134
134
  try {
@@ -151,7 +151,7 @@ var __async$H = (__this, __arguments, generator) => {
151
151
  const useCreateAccountImage = () => {
152
152
  const { client } = useShipEngine();
153
153
  return useMutation({
154
- mutationFn: (data) => __async$H(void 0, null, function* () {
154
+ mutationFn: (data) => __async$K(void 0, null, function* () {
155
155
  const result = yield client.accountSettings.createImage(data);
156
156
  return result.data;
157
157
  }),
@@ -160,7 +160,7 @@ const useCreateAccountImage = () => {
160
160
  });
161
161
  };
162
162
 
163
- var __async$G = (__this, __arguments, generator) => {
163
+ var __async$J = (__this, __arguments, generator) => {
164
164
  return new Promise((resolve, reject) => {
165
165
  var fulfilled = (value) => {
166
166
  try {
@@ -183,7 +183,7 @@ var __async$G = (__this, __arguments, generator) => {
183
183
  const useDeleteAccountImage = () => {
184
184
  const { client } = useShipEngine();
185
185
  return useMutation({
186
- mutationFn: (labelImageId) => __async$G(void 0, null, function* () {
186
+ mutationFn: (labelImageId) => __async$J(void 0, null, function* () {
187
187
  const result = yield client.accountSettings.deleteImage(labelImageId);
188
188
  return result.data;
189
189
  }),
@@ -212,7 +212,7 @@ const useGetAccountSettings = () => {
212
212
  });
213
213
  };
214
214
 
215
- var __async$F = (__this, __arguments, generator) => {
215
+ var __async$I = (__this, __arguments, generator) => {
216
216
  return new Promise((resolve, reject) => {
217
217
  var fulfilled = (value) => {
218
218
  try {
@@ -235,7 +235,7 @@ var __async$F = (__this, __arguments, generator) => {
235
235
  const useUpdateAccountImage = () => {
236
236
  const { client } = useShipEngine();
237
237
  return useMutation({
238
- mutationFn: (data) => __async$F(void 0, null, function* () {
238
+ mutationFn: (data) => __async$I(void 0, null, function* () {
239
239
  const result = yield client.accountSettings.updateImage(data);
240
240
  return result.data;
241
241
  }),
@@ -244,7 +244,7 @@ const useUpdateAccountImage = () => {
244
244
  });
245
245
  };
246
246
 
247
- var __async$E = (__this, __arguments, generator) => {
247
+ var __async$H = (__this, __arguments, generator) => {
248
248
  return new Promise((resolve, reject) => {
249
249
  var fulfilled = (value) => {
250
250
  try {
@@ -267,7 +267,7 @@ var __async$E = (__this, __arguments, generator) => {
267
267
  const useUpdateAccountSettings = () => {
268
268
  const { client } = useShipEngine();
269
269
  return useMutation({
270
- mutationFn: (settings) => __async$E(void 0, null, function* () {
270
+ mutationFn: (settings) => __async$H(void 0, null, function* () {
271
271
  const result = yield client.accountSettings.update(settings);
272
272
  return result.data;
273
273
  }),
@@ -276,7 +276,7 @@ const useUpdateAccountSettings = () => {
276
276
  });
277
277
  };
278
278
 
279
- var __async$D = (__this, __arguments, generator) => {
279
+ var __async$G = (__this, __arguments, generator) => {
280
280
  return new Promise((resolve, reject) => {
281
281
  var fulfilled = (value) => {
282
282
  try {
@@ -299,7 +299,7 @@ var __async$D = (__this, __arguments, generator) => {
299
299
  const useParseAddress = () => {
300
300
  const { client } = useShipEngine();
301
301
  return useMutation({
302
- mutationFn: (_0) => __async$D(void 0, [_0], function* ({ address, text }) {
302
+ mutationFn: (_0) => __async$G(void 0, [_0], function* ({ address, text }) {
303
303
  const result = yield client.addresses.parse(text, address);
304
304
  return result.data;
305
305
  }),
@@ -308,7 +308,7 @@ const useParseAddress = () => {
308
308
  });
309
309
  };
310
310
 
311
- var __async$C = (__this, __arguments, generator) => {
311
+ var __async$F = (__this, __arguments, generator) => {
312
312
  return new Promise((resolve, reject) => {
313
313
  var fulfilled = (value) => {
314
314
  try {
@@ -331,7 +331,7 @@ var __async$C = (__this, __arguments, generator) => {
331
331
  const useValidateAddresses = () => {
332
332
  const { client } = useShipEngine();
333
333
  return useMutation({
334
- mutationFn: (addresses) => __async$C(void 0, null, function* () {
334
+ mutationFn: (addresses) => __async$F(void 0, null, function* () {
335
335
  const result = yield client.addresses.validate(addresses);
336
336
  return result.data;
337
337
  }),
@@ -340,7 +340,7 @@ const useValidateAddresses = () => {
340
340
  });
341
341
  };
342
342
 
343
- var __async$B = (__this, __arguments, generator) => {
343
+ var __async$E = (__this, __arguments, generator) => {
344
344
  return new Promise((resolve, reject) => {
345
345
  var fulfilled = (value) => {
346
346
  try {
@@ -363,7 +363,7 @@ var __async$B = (__this, __arguments, generator) => {
363
363
  const useAddFunds = () => {
364
364
  const { client } = useShipEngine();
365
365
  return useMutation({
366
- mutationFn: (_0) => __async$B(void 0, [_0], function* ({ carrierId, funds }) {
366
+ mutationFn: (_0) => __async$E(void 0, [_0], function* ({ carrierId, funds }) {
367
367
  const result = yield client.carriers.addFunds(carrierId, funds);
368
368
  return result.data;
369
369
  }),
@@ -372,7 +372,7 @@ const useAddFunds = () => {
372
372
  });
373
373
  };
374
374
 
375
- var __async$A = (__this, __arguments, generator) => {
375
+ var __async$D = (__this, __arguments, generator) => {
376
376
  return new Promise((resolve, reject) => {
377
377
  var fulfilled = (value) => {
378
378
  try {
@@ -395,7 +395,7 @@ var __async$A = (__this, __arguments, generator) => {
395
395
  const useConnectCarrier = () => {
396
396
  const { client } = useShipEngine();
397
397
  return useMutation({
398
- mutationFn: (params) => __async$A(void 0, null, function* () {
398
+ mutationFn: (params) => __async$D(void 0, null, function* () {
399
399
  const result = yield client.carriers.connect(params);
400
400
  return result.data;
401
401
  }),
@@ -504,21 +504,21 @@ const useGetServicesByCarrier = (carrierId) => {
504
504
  });
505
505
  };
506
506
 
507
- var __defProp$f = Object.defineProperty;
507
+ var __defProp$g = Object.defineProperty;
508
508
  var __defProps$f = Object.defineProperties;
509
509
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
510
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
511
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
512
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
513
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
514
- var __spreadValues$f = (a, b) => {
510
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
511
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
512
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
513
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
514
+ var __spreadValues$g = (a, b) => {
515
515
  for (var prop in b || (b = {}))
516
- if (__hasOwnProp$p.call(b, prop))
517
- __defNormalProp$f(a, prop, b[prop]);
518
- if (__getOwnPropSymbols$p)
519
- for (var prop of __getOwnPropSymbols$p(b)) {
520
- if (__propIsEnum$p.call(b, prop))
521
- __defNormalProp$f(a, prop, b[prop]);
516
+ if (__hasOwnProp$q.call(b, prop))
517
+ __defNormalProp$g(a, prop, b[prop]);
518
+ if (__getOwnPropSymbols$q)
519
+ for (var prop of __getOwnPropSymbols$q(b)) {
520
+ if (__propIsEnum$q.call(b, prop))
521
+ __defNormalProp$g(a, prop, b[prop]);
522
522
  }
523
523
  return a;
524
524
  };
@@ -526,19 +526,19 @@ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
526
526
  var __objRest$j = (source, exclude) => {
527
527
  var target = {};
528
528
  for (var prop in source)
529
- if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
529
+ if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
530
530
  target[prop] = source[prop];
531
- if (source != null && __getOwnPropSymbols$p)
532
- for (var prop of __getOwnPropSymbols$p(source)) {
533
- if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
531
+ if (source != null && __getOwnPropSymbols$q)
532
+ for (var prop of __getOwnPropSymbols$q(source)) {
533
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
534
534
  target[prop] = source[prop];
535
535
  }
536
536
  return target;
537
537
  };
538
538
  const useListCarriers = (params) => {
539
539
  const { client } = useShipEngine();
540
- const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
541
- return useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
540
+ const _a = __spreadValues$g({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
541
+ return useQuery(__spreadProps$f(__spreadValues$g({}, rest), {
542
542
  onError,
543
543
  queryFn: () => client.carriers.list(queryFnParams),
544
544
  queryKey: ["useListCarriers", queryFnParams],
@@ -546,22 +546,22 @@ const useListCarriers = (params) => {
546
546
  }));
547
547
  };
548
548
 
549
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
550
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
551
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
549
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
550
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
551
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
552
552
  var __objRest$i = (source, exclude) => {
553
553
  var target = {};
554
554
  for (var prop in source)
555
- if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
555
+ if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
556
556
  target[prop] = source[prop];
557
- if (source != null && __getOwnPropSymbols$o)
558
- for (var prop of __getOwnPropSymbols$o(source)) {
559
- if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
557
+ if (source != null && __getOwnPropSymbols$p)
558
+ for (var prop of __getOwnPropSymbols$p(source)) {
559
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
560
560
  target[prop] = source[prop];
561
561
  }
562
562
  return target;
563
563
  };
564
- var __async$z = (__this, __arguments, generator) => {
564
+ var __async$C = (__this, __arguments, generator) => {
565
565
  return new Promise((resolve, reject) => {
566
566
  var fulfilled = (value) => {
567
567
  try {
@@ -585,7 +585,7 @@ const useUpdateAutoFunding = () => {
585
585
  const { client } = useShipEngine();
586
586
  const queryClient = useQueryClient();
587
587
  return useMutation({
588
- mutationFn: (_a) => __async$z(void 0, null, function* () {
588
+ mutationFn: (_a) => __async$C(void 0, null, function* () {
589
589
  var _b = _a, { carrierId } = _b, options = __objRest$i(_b, ["carrierId"]);
590
590
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
591
591
  return result.data;
@@ -615,7 +615,7 @@ const useGetZonesByCarrier = (carrierId) => {
615
615
  });
616
616
  };
617
617
 
618
- var __async$y = (__this, __arguments, generator) => {
618
+ var __async$B = (__this, __arguments, generator) => {
619
619
  return new Promise((resolve, reject) => {
620
620
  var fulfilled = (value) => {
621
621
  try {
@@ -638,7 +638,7 @@ var __async$y = (__this, __arguments, generator) => {
638
638
  const useDeleteCarrier = () => {
639
639
  const { client } = useShipEngine();
640
640
  return useMutation({
641
- mutationFn: (carrierId) => __async$y(void 0, null, function* () {
641
+ mutationFn: (carrierId) => __async$B(void 0, null, function* () {
642
642
  const result = yield client.carriers.delete(carrierId);
643
643
  return result.data;
644
644
  }),
@@ -647,17 +647,17 @@ const useDeleteCarrier = () => {
647
647
  });
648
648
  };
649
649
 
650
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
651
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
652
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
650
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
651
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
652
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
653
653
  var __objRest$h = (source, exclude) => {
654
654
  var target = {};
655
655
  for (var prop in source)
656
- if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
656
+ if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
657
657
  target[prop] = source[prop];
658
- if (source != null && __getOwnPropSymbols$n)
659
- for (var prop of __getOwnPropSymbols$n(source)) {
660
- if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
658
+ if (source != null && __getOwnPropSymbols$o)
659
+ for (var prop of __getOwnPropSymbols$o(source)) {
660
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
661
661
  target[prop] = source[prop];
662
662
  }
663
663
  return target;
@@ -674,17 +674,17 @@ const useGetCarrierConnectionForm = (_params) => {
674
674
  });
675
675
  };
676
676
 
677
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
678
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
679
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
677
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
678
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
679
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
680
680
  var __objRest$g = (source, exclude) => {
681
681
  var target = {};
682
682
  for (var prop in source)
683
- if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
683
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
684
684
  target[prop] = source[prop];
685
- if (source != null && __getOwnPropSymbols$m)
686
- for (var prop of __getOwnPropSymbols$m(source)) {
687
- if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
685
+ if (source != null && __getOwnPropSymbols$n)
686
+ for (var prop of __getOwnPropSymbols$n(source)) {
687
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
688
688
  target[prop] = source[prop];
689
689
  }
690
690
  return target;
@@ -701,7 +701,7 @@ const useListCarrierConnections = (_params) => {
701
701
  });
702
702
  };
703
703
 
704
- var __async$x = (__this, __arguments, generator) => {
704
+ var __async$A = (__this, __arguments, generator) => {
705
705
  return new Promise((resolve, reject) => {
706
706
  var fulfilled = (value) => {
707
707
  try {
@@ -724,7 +724,7 @@ var __async$x = (__this, __arguments, generator) => {
724
724
  const useConnectCarrierAccount = () => {
725
725
  const { client } = useShipEngine();
726
726
  return useMutation({
727
- mutationFn: (_0) => __async$x(void 0, [_0], function* ({ carrierName, formData }) {
727
+ mutationFn: (_0) => __async$A(void 0, [_0], function* ({ carrierName, formData }) {
728
728
  const result = yield client.connections.connectCarrier(carrierName, formData);
729
729
  return result.data;
730
730
  }),
@@ -744,21 +744,21 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
744
744
  });
745
745
  };
746
746
 
747
- var __defProp$e = Object.defineProperty;
747
+ var __defProp$f = Object.defineProperty;
748
748
  var __defProps$e = Object.defineProperties;
749
749
  var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
750
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
751
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
752
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
753
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
754
- var __spreadValues$e = (a, b) => {
750
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
751
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
752
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
753
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
754
+ var __spreadValues$f = (a, b) => {
755
755
  for (var prop in b || (b = {}))
756
- if (__hasOwnProp$l.call(b, prop))
757
- __defNormalProp$e(a, prop, b[prop]);
758
- if (__getOwnPropSymbols$l)
759
- for (var prop of __getOwnPropSymbols$l(b)) {
760
- if (__propIsEnum$l.call(b, prop))
761
- __defNormalProp$e(a, prop, b[prop]);
756
+ if (__hasOwnProp$m.call(b, prop))
757
+ __defNormalProp$f(a, prop, b[prop]);
758
+ if (__getOwnPropSymbols$m)
759
+ for (var prop of __getOwnPropSymbols$m(b)) {
760
+ if (__propIsEnum$m.call(b, prop))
761
+ __defNormalProp$f(a, prop, b[prop]);
762
762
  }
763
763
  return a;
764
764
  };
@@ -766,11 +766,11 @@ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
766
766
  var __objRest$f = (source, exclude) => {
767
767
  var target = {};
768
768
  for (var prop in source)
769
- if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
769
+ if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
770
770
  target[prop] = source[prop];
771
- if (source != null && __getOwnPropSymbols$l)
772
- for (var prop of __getOwnPropSymbols$l(source)) {
773
- if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
771
+ if (source != null && __getOwnPropSymbols$m)
772
+ for (var prop of __getOwnPropSymbols$m(source)) {
773
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
774
774
  target[prop] = source[prop];
775
775
  }
776
776
  return target;
@@ -783,7 +783,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
783
783
  ]);
784
784
  const { client } = useShipEngine();
785
785
  const { carrierName, carrierId } = queryFnParams;
786
- return useQuery(__spreadProps$e(__spreadValues$e({}, params), {
786
+ return useQuery(__spreadProps$e(__spreadValues$f({}, params), {
787
787
  onError,
788
788
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
789
789
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -791,26 +791,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
791
791
  }));
792
792
  };
793
793
 
794
- var __defProp$d = Object.defineProperty;
794
+ var __defProp$e = Object.defineProperty;
795
795
  var __defProps$d = Object.defineProperties;
796
796
  var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
797
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
798
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
799
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
800
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
801
- var __spreadValues$d = (a, b) => {
797
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
798
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
799
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
800
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
801
+ var __spreadValues$e = (a, b) => {
802
802
  for (var prop in b || (b = {}))
803
- if (__hasOwnProp$k.call(b, prop))
804
- __defNormalProp$d(a, prop, b[prop]);
805
- if (__getOwnPropSymbols$k)
806
- for (var prop of __getOwnPropSymbols$k(b)) {
807
- if (__propIsEnum$k.call(b, prop))
808
- __defNormalProp$d(a, prop, b[prop]);
803
+ if (__hasOwnProp$l.call(b, prop))
804
+ __defNormalProp$e(a, prop, b[prop]);
805
+ if (__getOwnPropSymbols$l)
806
+ for (var prop of __getOwnPropSymbols$l(b)) {
807
+ if (__propIsEnum$l.call(b, prop))
808
+ __defNormalProp$e(a, prop, b[prop]);
809
809
  }
810
810
  return a;
811
811
  };
812
812
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
813
- var __async$w = (__this, __arguments, generator) => {
813
+ var __async$z = (__this, __arguments, generator) => {
814
814
  return new Promise((resolve, reject) => {
815
815
  var fulfilled = (value) => {
816
816
  try {
@@ -832,8 +832,8 @@ var __async$w = (__this, __arguments, generator) => {
832
832
  };
833
833
  const useUpdateConnectionsCarrierSettings = (params) => {
834
834
  const { client } = useShipEngine();
835
- return useMutation(__spreadProps$d(__spreadValues$d({}, params), {
836
- mutationFn: (_0) => __async$w(void 0, [_0], function* ({
835
+ return useMutation(__spreadProps$d(__spreadValues$e({}, params), {
836
+ mutationFn: (_0) => __async$z(void 0, [_0], function* ({
837
837
  carrierName,
838
838
  carrierId,
839
839
  formData
@@ -860,7 +860,7 @@ const useListCustomPackageTypes = () => {
860
860
  });
861
861
  };
862
862
 
863
- var __async$v = (__this, __arguments, generator) => {
863
+ var __async$y = (__this, __arguments, generator) => {
864
864
  return new Promise((resolve, reject) => {
865
865
  var fulfilled = (value) => {
866
866
  try {
@@ -883,7 +883,7 @@ var __async$v = (__this, __arguments, generator) => {
883
883
  const useCreateFundingSource = () => {
884
884
  const { client } = useShipEngine();
885
885
  return useMutation({
886
- mutationFn: (fundingSource) => __async$v(void 0, null, function* () {
886
+ mutationFn: (fundingSource) => __async$y(void 0, null, function* () {
887
887
  const result = yield client.fundingSources.create(fundingSource);
888
888
  return result.data;
889
889
  }),
@@ -892,7 +892,7 @@ const useCreateFundingSource = () => {
892
892
  });
893
893
  };
894
894
 
895
- var __async$u = (__this, __arguments, generator) => {
895
+ var __async$x = (__this, __arguments, generator) => {
896
896
  return new Promise((resolve, reject) => {
897
897
  var fulfilled = (value) => {
898
898
  try {
@@ -915,7 +915,7 @@ var __async$u = (__this, __arguments, generator) => {
915
915
  const useFundingSourcesAddFunds = () => {
916
916
  const { client } = useShipEngine();
917
917
  return useMutation({
918
- mutationFn: (_0) => __async$u(void 0, [_0], function* ({ funds, fundingSourceId }) {
918
+ mutationFn: (_0) => __async$x(void 0, [_0], function* ({ funds, fundingSourceId }) {
919
919
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
920
920
  return result.data;
921
921
  }),
@@ -944,7 +944,7 @@ const useListFundingSources = () => {
944
944
  });
945
945
  };
946
946
 
947
- var __async$t = (__this, __arguments, generator) => {
947
+ var __async$w = (__this, __arguments, generator) => {
948
948
  return new Promise((resolve, reject) => {
949
949
  var fulfilled = (value) => {
950
950
  try {
@@ -967,7 +967,7 @@ var __async$t = (__this, __arguments, generator) => {
967
967
  const useRegisterCarrier = () => {
968
968
  const { client } = useShipEngine();
969
969
  return useMutation({
970
- mutationFn: (carrier) => __async$t(void 0, null, function* () {
970
+ mutationFn: (carrier) => __async$w(void 0, null, function* () {
971
971
  const result = yield client.fundingSources.registerCarrier(carrier);
972
972
  return result.data;
973
973
  }),
@@ -976,7 +976,7 @@ const useRegisterCarrier = () => {
976
976
  });
977
977
  };
978
978
 
979
- var __async$s = (__this, __arguments, generator) => {
979
+ var __async$v = (__this, __arguments, generator) => {
980
980
  return new Promise((resolve, reject) => {
981
981
  var fulfilled = (value) => {
982
982
  try {
@@ -999,7 +999,7 @@ var __async$s = (__this, __arguments, generator) => {
999
999
  const useUpdateFundingSource = () => {
1000
1000
  const { client } = useShipEngine();
1001
1001
  return useMutation({
1002
- mutationFn: (_0) => __async$s(void 0, [_0], function* ({
1002
+ mutationFn: (_0) => __async$v(void 0, [_0], function* ({
1003
1003
  billingInfo,
1004
1004
  creditCardInfo,
1005
1005
  fundingSourceId
@@ -1063,22 +1063,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
1063
1063
  });
1064
1064
  };
1065
1065
 
1066
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1067
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1068
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1066
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
1067
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
1068
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
1069
1069
  var __objRest$e = (source, exclude) => {
1070
1070
  var target = {};
1071
1071
  for (var prop in source)
1072
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
1072
+ if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
1073
1073
  target[prop] = source[prop];
1074
- if (source != null && __getOwnPropSymbols$j)
1075
- for (var prop of __getOwnPropSymbols$j(source)) {
1076
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
1074
+ if (source != null && __getOwnPropSymbols$k)
1075
+ for (var prop of __getOwnPropSymbols$k(source)) {
1076
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
1077
1077
  target[prop] = source[prop];
1078
1078
  }
1079
1079
  return target;
1080
1080
  };
1081
- var __async$r = (__this, __arguments, generator) => {
1081
+ var __async$u = (__this, __arguments, generator) => {
1082
1082
  return new Promise((resolve, reject) => {
1083
1083
  var fulfilled = (value) => {
1084
1084
  try {
@@ -1101,7 +1101,7 @@ var __async$r = (__this, __arguments, generator) => {
1101
1101
  const useAddInsuranceFunds = () => {
1102
1102
  const { client } = useShipEngine();
1103
1103
  return useMutation({
1104
- mutationFn: (_a) => __async$r(void 0, null, function* () {
1104
+ mutationFn: (_a) => __async$u(void 0, null, function* () {
1105
1105
  var _b = _a, { insuranceProvider } = _b, rest = __objRest$e(_b, ["insuranceProvider"]);
1106
1106
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
1107
1107
  return result.data;
@@ -1111,22 +1111,22 @@ const useAddInsuranceFunds = () => {
1111
1111
  });
1112
1112
  };
1113
1113
 
1114
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1115
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1116
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1114
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1115
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1116
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1117
1117
  var __objRest$d = (source, exclude) => {
1118
1118
  var target = {};
1119
1119
  for (var prop in source)
1120
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
1120
+ if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
1121
1121
  target[prop] = source[prop];
1122
- if (source != null && __getOwnPropSymbols$i)
1123
- for (var prop of __getOwnPropSymbols$i(source)) {
1124
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
1122
+ if (source != null && __getOwnPropSymbols$j)
1123
+ for (var prop of __getOwnPropSymbols$j(source)) {
1124
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
1125
1125
  target[prop] = source[prop];
1126
1126
  }
1127
1127
  return target;
1128
1128
  };
1129
- var __async$q = (__this, __arguments, generator) => {
1129
+ var __async$t = (__this, __arguments, generator) => {
1130
1130
  return new Promise((resolve, reject) => {
1131
1131
  var fulfilled = (value) => {
1132
1132
  try {
@@ -1149,7 +1149,7 @@ var __async$q = (__this, __arguments, generator) => {
1149
1149
  const useCreateLabel = () => {
1150
1150
  const { client } = useShipEngine();
1151
1151
  return useMutation({
1152
- mutationFn: (_a) => __async$q(void 0, null, function* () {
1152
+ mutationFn: (_a) => __async$t(void 0, null, function* () {
1153
1153
  var _b = _a, { rateId } = _b, options = __objRest$d(_b, ["rateId"]);
1154
1154
  const result = yield client.labels.createByRateId(rateId, options);
1155
1155
  return result.data;
@@ -1174,21 +1174,21 @@ const useGetLabel = (labelId) => {
1174
1174
  });
1175
1175
  };
1176
1176
 
1177
- var __defProp$c = Object.defineProperty;
1177
+ var __defProp$d = Object.defineProperty;
1178
1178
  var __defProps$c = Object.defineProperties;
1179
1179
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
1180
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1181
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1182
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1183
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1184
- var __spreadValues$c = (a, b) => {
1180
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1181
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1182
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1183
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1184
+ var __spreadValues$d = (a, b) => {
1185
1185
  for (var prop in b || (b = {}))
1186
- if (__hasOwnProp$h.call(b, prop))
1187
- __defNormalProp$c(a, prop, b[prop]);
1188
- if (__getOwnPropSymbols$h)
1189
- for (var prop of __getOwnPropSymbols$h(b)) {
1190
- if (__propIsEnum$h.call(b, prop))
1191
- __defNormalProp$c(a, prop, b[prop]);
1186
+ if (__hasOwnProp$i.call(b, prop))
1187
+ __defNormalProp$d(a, prop, b[prop]);
1188
+ if (__getOwnPropSymbols$i)
1189
+ for (var prop of __getOwnPropSymbols$i(b)) {
1190
+ if (__propIsEnum$i.call(b, prop))
1191
+ __defNormalProp$d(a, prop, b[prop]);
1192
1192
  }
1193
1193
  return a;
1194
1194
  };
@@ -1196,19 +1196,19 @@ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
1196
1196
  var __objRest$c = (source, exclude) => {
1197
1197
  var target = {};
1198
1198
  for (var prop in source)
1199
- if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1199
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
1200
1200
  target[prop] = source[prop];
1201
- if (source != null && __getOwnPropSymbols$h)
1202
- for (var prop of __getOwnPropSymbols$h(source)) {
1203
- if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1201
+ if (source != null && __getOwnPropSymbols$i)
1202
+ for (var prop of __getOwnPropSymbols$i(source)) {
1203
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
1204
1204
  target[prop] = source[prop];
1205
1205
  }
1206
1206
  return target;
1207
1207
  };
1208
1208
  const useListLabels = (params) => {
1209
1209
  const { client } = useShipEngine();
1210
- const _a = __spreadValues$c({}, params), { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
1211
- return useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
1210
+ const _a = __spreadValues$d({}, params), { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
1211
+ return useQuery(__spreadProps$c(__spreadValues$d({}, rest), {
1212
1212
  onError,
1213
1213
  queryFn: () => client.labels.list(queryFnParams),
1214
1214
  queryKey: ["useListLabels", params],
@@ -1216,7 +1216,7 @@ const useListLabels = (params) => {
1216
1216
  }));
1217
1217
  };
1218
1218
 
1219
- var __async$p = (__this, __arguments, generator) => {
1219
+ var __async$s = (__this, __arguments, generator) => {
1220
1220
  return new Promise((resolve, reject) => {
1221
1221
  var fulfilled = (value) => {
1222
1222
  try {
@@ -1239,7 +1239,7 @@ var __async$p = (__this, __arguments, generator) => {
1239
1239
  const useVoidLabel = () => {
1240
1240
  const { client } = useShipEngine();
1241
1241
  return useMutation({
1242
- mutationFn: (labelId) => __async$p(void 0, null, function* () {
1242
+ mutationFn: (labelId) => __async$s(void 0, null, function* () {
1243
1243
  const result = yield client.labels.void(labelId);
1244
1244
  return result.data;
1245
1245
  }),
@@ -1258,7 +1258,7 @@ const useListOrderSources = () => {
1258
1258
  });
1259
1259
  };
1260
1260
 
1261
- var __async$o = (__this, __arguments, generator) => {
1261
+ var __async$r = (__this, __arguments, generator) => {
1262
1262
  return new Promise((resolve, reject) => {
1263
1263
  var fulfilled = (value) => {
1264
1264
  try {
@@ -1281,7 +1281,7 @@ var __async$o = (__this, __arguments, generator) => {
1281
1281
  const useRefreshOrderSourceAsync = () => {
1282
1282
  const { client } = useShipEngine();
1283
1283
  return useMutation({
1284
- mutationFn: (orderSourceId) => __async$o(void 0, null, function* () {
1284
+ mutationFn: (orderSourceId) => __async$r(void 0, null, function* () {
1285
1285
  const result = yield client.orderSources.refresh(orderSourceId);
1286
1286
  return result.data;
1287
1287
  }),
@@ -1292,9 +1292,9 @@ const useRefreshOrderSource = () => {
1292
1292
  const { client } = useShipEngine();
1293
1293
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
1294
1294
  return useMutation({
1295
- mutationFn: (orderSourceId) => __async$o(void 0, null, function* () {
1295
+ mutationFn: (orderSourceId) => __async$r(void 0, null, function* () {
1296
1296
  yield refreshOrderSourceAsync(orderSourceId);
1297
- const waitResult = yield retryUntil(() => __async$o(void 0, null, function* () {
1297
+ const waitResult = yield retryUntil(() => __async$r(void 0, null, function* () {
1298
1298
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
1299
1299
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
1300
1300
  throw new SE.CodedError("Order source is still refreshing");
@@ -1308,7 +1308,7 @@ const useRefreshOrderSource = () => {
1308
1308
  });
1309
1309
  };
1310
1310
 
1311
- var __async$n = (__this, __arguments, generator) => {
1311
+ var __async$q = (__this, __arguments, generator) => {
1312
1312
  return new Promise((resolve, reject) => {
1313
1313
  var fulfilled = (value) => {
1314
1314
  try {
@@ -1331,7 +1331,7 @@ var __async$n = (__this, __arguments, generator) => {
1331
1331
  const useDeactivateOrderSource = () => {
1332
1332
  const { client } = useShipEngine();
1333
1333
  return useMutation({
1334
- mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1334
+ mutationFn: (orderSourceId) => __async$q(void 0, null, function* () {
1335
1335
  const result = yield client.orderSources.deactivate(orderSourceId);
1336
1336
  return result.data;
1337
1337
  }),
@@ -1350,7 +1350,7 @@ const useListOrderSourcesConnections = () => {
1350
1350
  });
1351
1351
  };
1352
1352
 
1353
- var __async$m = (__this, __arguments, generator) => {
1353
+ var __async$p = (__this, __arguments, generator) => {
1354
1354
  return new Promise((resolve, reject) => {
1355
1355
  var fulfilled = (value) => {
1356
1356
  try {
@@ -1373,7 +1373,7 @@ var __async$m = (__this, __arguments, generator) => {
1373
1373
  const useCreateRateCard = () => {
1374
1374
  const { client } = useShipEngine();
1375
1375
  return useMutation({
1376
- mutationFn: (rateCard) => __async$m(void 0, null, function* () {
1376
+ mutationFn: (rateCard) => __async$p(void 0, null, function* () {
1377
1377
  const result = yield client.rateCards.create(rateCard);
1378
1378
  return result.data;
1379
1379
  }),
@@ -1420,7 +1420,7 @@ const useListRateCards = (carrierIds) => {
1420
1420
  });
1421
1421
  };
1422
1422
 
1423
- var __async$l = (__this, __arguments, generator) => {
1423
+ var __async$o = (__this, __arguments, generator) => {
1424
1424
  return new Promise((resolve, reject) => {
1425
1425
  var fulfilled = (value) => {
1426
1426
  try {
@@ -1443,7 +1443,7 @@ var __async$l = (__this, __arguments, generator) => {
1443
1443
  const usePublishRateCard = () => {
1444
1444
  const { client } = useShipEngine();
1445
1445
  return useMutation({
1446
- mutationFn: (rateCardId) => __async$l(void 0, null, function* () {
1446
+ mutationFn: (rateCardId) => __async$o(void 0, null, function* () {
1447
1447
  return yield client.rateCards.publish(rateCardId);
1448
1448
  }),
1449
1449
  mutationKey: ["usePublishRateCard"],
@@ -1451,7 +1451,7 @@ const usePublishRateCard = () => {
1451
1451
  });
1452
1452
  };
1453
1453
 
1454
- var __async$k = (__this, __arguments, generator) => {
1454
+ var __async$n = (__this, __arguments, generator) => {
1455
1455
  return new Promise((resolve, reject) => {
1456
1456
  var fulfilled = (value) => {
1457
1457
  try {
@@ -1474,7 +1474,7 @@ var __async$k = (__this, __arguments, generator) => {
1474
1474
  const useUpdateRateCard = () => {
1475
1475
  const { client } = useShipEngine();
1476
1476
  return useMutation({
1477
- mutationFn: (rateCard) => __async$k(void 0, null, function* () {
1477
+ mutationFn: (rateCard) => __async$n(void 0, null, function* () {
1478
1478
  const result = yield client.rateCards.update(rateCard);
1479
1479
  return result.data;
1480
1480
  }),
@@ -1483,7 +1483,7 @@ const useUpdateRateCard = () => {
1483
1483
  });
1484
1484
  };
1485
1485
 
1486
- var __async$j = (__this, __arguments, generator) => {
1486
+ var __async$m = (__this, __arguments, generator) => {
1487
1487
  return new Promise((resolve, reject) => {
1488
1488
  var fulfilled = (value) => {
1489
1489
  try {
@@ -1506,7 +1506,7 @@ var __async$j = (__this, __arguments, generator) => {
1506
1506
  const useUploadRateCard = () => {
1507
1507
  const { client } = useShipEngine();
1508
1508
  return useMutation({
1509
- mutationFn: (_0) => __async$j(void 0, [_0], function* ({ rateCardId, file }) {
1509
+ mutationFn: (_0) => __async$m(void 0, [_0], function* ({ rateCardId, file }) {
1510
1510
  const result = yield client.rateCards.upload(rateCardId, file);
1511
1511
  return result.data;
1512
1512
  }),
@@ -1515,7 +1515,7 @@ const useUploadRateCard = () => {
1515
1515
  });
1516
1516
  };
1517
1517
 
1518
- var __async$i = (__this, __arguments, generator) => {
1518
+ var __async$l = (__this, __arguments, generator) => {
1519
1519
  return new Promise((resolve, reject) => {
1520
1520
  var fulfilled = (value) => {
1521
1521
  try {
@@ -1538,7 +1538,7 @@ var __async$i = (__this, __arguments, generator) => {
1538
1538
  const useDeleteRateCard = () => {
1539
1539
  const { client } = useShipEngine();
1540
1540
  return useMutation({
1541
- mutationFn: (rateCardId) => __async$i(void 0, null, function* () {
1541
+ mutationFn: (rateCardId) => __async$l(void 0, null, function* () {
1542
1542
  const result = yield client.rateCards.delete(rateCardId);
1543
1543
  return result.data;
1544
1544
  }),
@@ -1547,7 +1547,7 @@ const useDeleteRateCard = () => {
1547
1547
  });
1548
1548
  };
1549
1549
 
1550
- var __async$h = (__this, __arguments, generator) => {
1550
+ var __async$k = (__this, __arguments, generator) => {
1551
1551
  return new Promise((resolve, reject) => {
1552
1552
  var fulfilled = (value) => {
1553
1553
  try {
@@ -1570,7 +1570,7 @@ var __async$h = (__this, __arguments, generator) => {
1570
1570
  const useCalculateRates = () => {
1571
1571
  const { client } = useShipEngine();
1572
1572
  return useMutation({
1573
- mutationFn: (_0) => __async$h(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1573
+ mutationFn: (_0) => __async$k(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1574
1574
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1575
1575
  return result.data;
1576
1576
  }),
@@ -1579,7 +1579,7 @@ const useCalculateRates = () => {
1579
1579
  });
1580
1580
  };
1581
1581
 
1582
- var __async$g = (__this, __arguments, generator) => {
1582
+ var __async$j = (__this, __arguments, generator) => {
1583
1583
  return new Promise((resolve, reject) => {
1584
1584
  var fulfilled = (value) => {
1585
1585
  try {
@@ -1602,7 +1602,7 @@ var __async$g = (__this, __arguments, generator) => {
1602
1602
  const useRatesEstimate = () => {
1603
1603
  const { client } = useShipEngine();
1604
1604
  return useMutation({
1605
- mutationFn: (_0) => __async$g(void 0, [_0], function* ({ rateParams }) {
1605
+ mutationFn: (_0) => __async$j(void 0, [_0], function* ({ rateParams }) {
1606
1606
  const result = yield client.rates.estimate(rateParams);
1607
1607
  return result.data;
1608
1608
  }),
@@ -1637,22 +1637,22 @@ const useListSalesOrders = (params = {}) => {
1637
1637
  });
1638
1638
  };
1639
1639
 
1640
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1641
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1642
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1640
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1641
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1642
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1643
1643
  var __objRest$b = (source, exclude) => {
1644
1644
  var target = {};
1645
1645
  for (var prop in source)
1646
- if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1646
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
1647
1647
  target[prop] = source[prop];
1648
- if (source != null && __getOwnPropSymbols$g)
1649
- for (var prop of __getOwnPropSymbols$g(source)) {
1650
- if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1648
+ if (source != null && __getOwnPropSymbols$h)
1649
+ for (var prop of __getOwnPropSymbols$h(source)) {
1650
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
1651
1651
  target[prop] = source[prop];
1652
1652
  }
1653
1653
  return target;
1654
1654
  };
1655
- var __async$f = (__this, __arguments, generator) => {
1655
+ var __async$i = (__this, __arguments, generator) => {
1656
1656
  return new Promise((resolve, reject) => {
1657
1657
  var fulfilled = (value) => {
1658
1658
  try {
@@ -1675,7 +1675,7 @@ var __async$f = (__this, __arguments, generator) => {
1675
1675
  const useNotifySalesOrderShipped = () => {
1676
1676
  const { client } = useShipEngine();
1677
1677
  return useMutation({
1678
- mutationFn: (_a) => __async$f(void 0, null, function* () {
1678
+ mutationFn: (_a) => __async$i(void 0, null, function* () {
1679
1679
  var _b = _a, { salesOrderId } = _b, tracking = __objRest$b(_b, ["salesOrderId"]);
1680
1680
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1681
1681
  return result.data;
@@ -1685,22 +1685,22 @@ const useNotifySalesOrderShipped = () => {
1685
1685
  });
1686
1686
  };
1687
1687
 
1688
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1689
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1690
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1688
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1689
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1690
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1691
1691
  var __objRest$a = (source, exclude) => {
1692
1692
  var target = {};
1693
1693
  for (var prop in source)
1694
- if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1694
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
1695
1695
  target[prop] = source[prop];
1696
- if (source != null && __getOwnPropSymbols$f)
1697
- for (var prop of __getOwnPropSymbols$f(source)) {
1698
- if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1696
+ if (source != null && __getOwnPropSymbols$g)
1697
+ for (var prop of __getOwnPropSymbols$g(source)) {
1698
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
1699
1699
  target[prop] = source[prop];
1700
1700
  }
1701
1701
  return target;
1702
1702
  };
1703
- var __async$e = (__this, __arguments, generator) => {
1703
+ var __async$h = (__this, __arguments, generator) => {
1704
1704
  return new Promise((resolve, reject) => {
1705
1705
  var fulfilled = (value) => {
1706
1706
  try {
@@ -1723,7 +1723,7 @@ var __async$e = (__this, __arguments, generator) => {
1723
1723
  const useCreateSalesOrderShipment = () => {
1724
1724
  const { client } = useShipEngine();
1725
1725
  return useMutation({
1726
- mutationFn: (_a) => __async$e(void 0, null, function* () {
1726
+ mutationFn: (_a) => __async$h(void 0, null, function* () {
1727
1727
  var _b = _a, { salesOrderId } = _b, shipment = __objRest$a(_b, ["salesOrderId"]);
1728
1728
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1729
1729
  return result.data;
@@ -1759,22 +1759,22 @@ const useListSalesOrderShipments = (params) => {
1759
1759
  });
1760
1760
  };
1761
1761
 
1762
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1763
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1764
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1762
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1763
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1764
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1765
1765
  var __objRest$9 = (source, exclude) => {
1766
1766
  var target = {};
1767
1767
  for (var prop in source)
1768
- if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
1768
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
1769
1769
  target[prop] = source[prop];
1770
- if (source != null && __getOwnPropSymbols$e)
1771
- for (var prop of __getOwnPropSymbols$e(source)) {
1772
- if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
1770
+ if (source != null && __getOwnPropSymbols$f)
1771
+ for (var prop of __getOwnPropSymbols$f(source)) {
1772
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
1773
1773
  target[prop] = source[prop];
1774
1774
  }
1775
1775
  return target;
1776
1776
  };
1777
- var __async$d = (__this, __arguments, generator) => {
1777
+ var __async$g = (__this, __arguments, generator) => {
1778
1778
  return new Promise((resolve, reject) => {
1779
1779
  var fulfilled = (value) => {
1780
1780
  try {
@@ -1797,7 +1797,7 @@ var __async$d = (__this, __arguments, generator) => {
1797
1797
  const useUpdateSalesOrderShipment = () => {
1798
1798
  const { client } = useShipEngine();
1799
1799
  return useMutation({
1800
- mutationFn: (_a) => __async$d(void 0, null, function* () {
1800
+ mutationFn: (_a) => __async$g(void 0, null, function* () {
1801
1801
  var _b = _a, { shipmentId } = _b, shipment = __objRest$9(_b, ["shipmentId"]);
1802
1802
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1803
1803
  return result.data;
@@ -1807,26 +1807,26 @@ const useUpdateSalesOrderShipment = () => {
1807
1807
  });
1808
1808
  };
1809
1809
 
1810
- var __defProp$b = Object.defineProperty;
1810
+ var __defProp$c = Object.defineProperty;
1811
1811
  var __defProps$b = Object.defineProperties;
1812
1812
  var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
1813
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1814
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1815
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1816
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1817
- var __spreadValues$b = (a, b) => {
1813
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1814
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1815
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1816
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1817
+ var __spreadValues$c = (a, b) => {
1818
1818
  for (var prop in b || (b = {}))
1819
- if (__hasOwnProp$d.call(b, prop))
1820
- __defNormalProp$b(a, prop, b[prop]);
1821
- if (__getOwnPropSymbols$d)
1822
- for (var prop of __getOwnPropSymbols$d(b)) {
1823
- if (__propIsEnum$d.call(b, prop))
1824
- __defNormalProp$b(a, prop, b[prop]);
1819
+ if (__hasOwnProp$e.call(b, prop))
1820
+ __defNormalProp$c(a, prop, b[prop]);
1821
+ if (__getOwnPropSymbols$e)
1822
+ for (var prop of __getOwnPropSymbols$e(b)) {
1823
+ if (__propIsEnum$e.call(b, prop))
1824
+ __defNormalProp$c(a, prop, b[prop]);
1825
1825
  }
1826
1826
  return a;
1827
1827
  };
1828
1828
  var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
1829
- var __async$c = (__this, __arguments, generator) => {
1829
+ var __async$f = (__this, __arguments, generator) => {
1830
1830
  return new Promise((resolve, reject) => {
1831
1831
  var fulfilled = (value) => {
1832
1832
  try {
@@ -1849,7 +1849,7 @@ var __async$c = (__this, __arguments, generator) => {
1849
1849
  const useCreateShipment = () => {
1850
1850
  const { client } = useShipEngine();
1851
1851
  return useMutation({
1852
- mutationFn: (shipment) => __async$c(void 0, null, function* () {
1852
+ mutationFn: (shipment) => __async$f(void 0, null, function* () {
1853
1853
  var _a;
1854
1854
  if (shipment.warehouseId === void 0) {
1855
1855
  throw new SE.CodedError("errorMessages.noWarehouses", {
@@ -1867,7 +1867,7 @@ const useCreateShipment = () => {
1867
1867
  postalCode: "",
1868
1868
  stateProvince: ""
1869
1869
  };
1870
- return (yield client.shipments.create(__spreadProps$b(__spreadValues$b({}, shipment), {
1870
+ return (yield client.shipments.create(__spreadProps$b(__spreadValues$c({}, shipment), {
1871
1871
  shipTo
1872
1872
  }))).data;
1873
1873
  }),
@@ -1892,21 +1892,21 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
1892
1892
  });
1893
1893
  };
1894
1894
 
1895
- var __defProp$a = Object.defineProperty;
1895
+ var __defProp$b = Object.defineProperty;
1896
1896
  var __defProps$a = Object.defineProperties;
1897
1897
  var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1898
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1899
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1900
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1901
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1902
- var __spreadValues$a = (a, b) => {
1898
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1899
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1900
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1901
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1902
+ var __spreadValues$b = (a, b) => {
1903
1903
  for (var prop in b || (b = {}))
1904
- if (__hasOwnProp$c.call(b, prop))
1905
- __defNormalProp$a(a, prop, b[prop]);
1906
- if (__getOwnPropSymbols$c)
1907
- for (var prop of __getOwnPropSymbols$c(b)) {
1908
- if (__propIsEnum$c.call(b, prop))
1909
- __defNormalProp$a(a, prop, b[prop]);
1904
+ if (__hasOwnProp$d.call(b, prop))
1905
+ __defNormalProp$b(a, prop, b[prop]);
1906
+ if (__getOwnPropSymbols$d)
1907
+ for (var prop of __getOwnPropSymbols$d(b)) {
1908
+ if (__propIsEnum$d.call(b, prop))
1909
+ __defNormalProp$b(a, prop, b[prop]);
1910
1910
  }
1911
1911
  return a;
1912
1912
  };
@@ -1914,11 +1914,11 @@ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1914
1914
  var __objRest$8 = (source, exclude) => {
1915
1915
  var target = {};
1916
1916
  for (var prop in source)
1917
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1917
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
1918
1918
  target[prop] = source[prop];
1919
- if (source != null && __getOwnPropSymbols$c)
1920
- for (var prop of __getOwnPropSymbols$c(source)) {
1921
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1919
+ if (source != null && __getOwnPropSymbols$d)
1920
+ for (var prop of __getOwnPropSymbols$d(source)) {
1921
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
1922
1922
  target[prop] = source[prop];
1923
1923
  }
1924
1924
  return target;
@@ -1934,7 +1934,7 @@ const useGetShipment = (params) => {
1934
1934
  }
1935
1935
  return {};
1936
1936
  };
1937
- return useQuery(__spreadProps$a(__spreadValues$a({}, getQueryProps()), {
1937
+ return useQuery(__spreadProps$a(__spreadValues$b({}, getQueryProps()), {
1938
1938
  enabled: shipmentId !== void 0,
1939
1939
  onError,
1940
1940
  queryFn: () => {
@@ -1948,17 +1948,17 @@ const useGetShipment = (params) => {
1948
1948
  }));
1949
1949
  };
1950
1950
 
1951
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1952
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1953
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1951
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1952
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1953
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1954
1954
  var __objRest$7 = (source, exclude) => {
1955
1955
  var target = {};
1956
1956
  for (var prop in source)
1957
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1957
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
1958
1958
  target[prop] = source[prop];
1959
- if (source != null && __getOwnPropSymbols$b)
1960
- for (var prop of __getOwnPropSymbols$b(source)) {
1961
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1959
+ if (source != null && __getOwnPropSymbols$c)
1960
+ for (var prop of __getOwnPropSymbols$c(source)) {
1961
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
1962
1962
  target[prop] = source[prop];
1963
1963
  }
1964
1964
  return target;
@@ -1975,21 +1975,21 @@ const useListShipments = (_params) => {
1975
1975
  });
1976
1976
  };
1977
1977
 
1978
- var __defProp$9 = Object.defineProperty;
1978
+ var __defProp$a = Object.defineProperty;
1979
1979
  var __defProps$9 = Object.defineProperties;
1980
1980
  var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1981
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1982
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1983
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1984
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1985
- var __spreadValues$9 = (a, b) => {
1981
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1982
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1983
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1984
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1985
+ var __spreadValues$a = (a, b) => {
1986
1986
  for (var prop in b || (b = {}))
1987
- if (__hasOwnProp$a.call(b, prop))
1988
- __defNormalProp$9(a, prop, b[prop]);
1989
- if (__getOwnPropSymbols$a)
1990
- for (var prop of __getOwnPropSymbols$a(b)) {
1991
- if (__propIsEnum$a.call(b, prop))
1992
- __defNormalProp$9(a, prop, b[prop]);
1987
+ if (__hasOwnProp$b.call(b, prop))
1988
+ __defNormalProp$a(a, prop, b[prop]);
1989
+ if (__getOwnPropSymbols$b)
1990
+ for (var prop of __getOwnPropSymbols$b(b)) {
1991
+ if (__propIsEnum$b.call(b, prop))
1992
+ __defNormalProp$a(a, prop, b[prop]);
1993
1993
  }
1994
1994
  return a;
1995
1995
  };
@@ -1997,11 +1997,11 @@ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
1997
1997
  var __objRest$6 = (source, exclude) => {
1998
1998
  var target = {};
1999
1999
  for (var prop in source)
2000
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2000
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
2001
2001
  target[prop] = source[prop];
2002
- if (source != null && __getOwnPropSymbols$a)
2003
- for (var prop of __getOwnPropSymbols$a(source)) {
2004
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2002
+ if (source != null && __getOwnPropSymbols$b)
2003
+ for (var prop of __getOwnPropSymbols$b(source)) {
2004
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
2005
2005
  target[prop] = source[prop];
2006
2006
  }
2007
2007
  return target;
@@ -2009,7 +2009,7 @@ var __objRest$6 = (source, exclude) => {
2009
2009
  const useGetShipmentByExternalId = (params) => {
2010
2010
  const { client } = useShipEngine();
2011
2011
  const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
2012
- return useQuery(__spreadProps$9(__spreadValues$9({}, rest), {
2012
+ return useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
2013
2013
  onError,
2014
2014
  queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
2015
2015
  queryKey: ["useGetShipmentByExternalId", queryFnParams],
@@ -2017,21 +2017,21 @@ const useGetShipmentByExternalId = (params) => {
2017
2017
  }));
2018
2018
  };
2019
2019
 
2020
- var __defProp$8 = Object.defineProperty;
2020
+ var __defProp$9 = Object.defineProperty;
2021
2021
  var __defProps$8 = Object.defineProperties;
2022
2022
  var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2023
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2024
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2025
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2026
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2027
- var __spreadValues$8 = (a, b) => {
2023
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
2024
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
2025
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
2026
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2027
+ var __spreadValues$9 = (a, b) => {
2028
2028
  for (var prop in b || (b = {}))
2029
- if (__hasOwnProp$9.call(b, prop))
2030
- __defNormalProp$8(a, prop, b[prop]);
2031
- if (__getOwnPropSymbols$9)
2032
- for (var prop of __getOwnPropSymbols$9(b)) {
2033
- if (__propIsEnum$9.call(b, prop))
2034
- __defNormalProp$8(a, prop, b[prop]);
2029
+ if (__hasOwnProp$a.call(b, prop))
2030
+ __defNormalProp$9(a, prop, b[prop]);
2031
+ if (__getOwnPropSymbols$a)
2032
+ for (var prop of __getOwnPropSymbols$a(b)) {
2033
+ if (__propIsEnum$a.call(b, prop))
2034
+ __defNormalProp$9(a, prop, b[prop]);
2035
2035
  }
2036
2036
  return a;
2037
2037
  };
@@ -2039,19 +2039,19 @@ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2039
2039
  var __objRest$5 = (source, exclude) => {
2040
2040
  var target = {};
2041
2041
  for (var prop in source)
2042
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2042
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
2043
2043
  target[prop] = source[prop];
2044
- if (source != null && __getOwnPropSymbols$9)
2045
- for (var prop of __getOwnPropSymbols$9(source)) {
2046
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2044
+ if (source != null && __getOwnPropSymbols$a)
2045
+ for (var prop of __getOwnPropSymbols$a(source)) {
2046
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
2047
2047
  target[prop] = source[prop];
2048
2048
  }
2049
2049
  return target;
2050
2050
  };
2051
2051
  const useListShippingRules = (params) => {
2052
2052
  const { client } = useShipEngine();
2053
- const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2054
- return useQuery(__spreadProps$8(__spreadValues$8({}, rest), {
2053
+ const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
2054
+ return useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
2055
2055
  onError,
2056
2056
  queryFn: () => {
2057
2057
  return client.shippingRules.list(queryFnParams);
@@ -2061,7 +2061,7 @@ const useListShippingRules = (params) => {
2061
2061
  }));
2062
2062
  };
2063
2063
 
2064
- var __async$b = (__this, __arguments, generator) => {
2064
+ var __async$e = (__this, __arguments, generator) => {
2065
2065
  return new Promise((resolve, reject) => {
2066
2066
  var fulfilled = (value) => {
2067
2067
  try {
@@ -2084,7 +2084,7 @@ var __async$b = (__this, __arguments, generator) => {
2084
2084
  const useCreateShippingRule = () => {
2085
2085
  const { client } = useShipEngine();
2086
2086
  return useMutation({
2087
- mutationFn: (props) => __async$b(void 0, null, function* () {
2087
+ mutationFn: (props) => __async$e(void 0, null, function* () {
2088
2088
  const result = yield client.shippingRules.create(props);
2089
2089
  return result.data;
2090
2090
  }),
@@ -2093,7 +2093,7 @@ const useCreateShippingRule = () => {
2093
2093
  });
2094
2094
  };
2095
2095
 
2096
- var __async$a = (__this, __arguments, generator) => {
2096
+ var __async$d = (__this, __arguments, generator) => {
2097
2097
  return new Promise((resolve, reject) => {
2098
2098
  var fulfilled = (value) => {
2099
2099
  try {
@@ -2116,7 +2116,7 @@ var __async$a = (__this, __arguments, generator) => {
2116
2116
  const useDeleteShippingRule = () => {
2117
2117
  const { client } = useShipEngine();
2118
2118
  return useMutation({
2119
- mutationFn: (props) => __async$a(void 0, null, function* () {
2119
+ mutationFn: (props) => __async$d(void 0, null, function* () {
2120
2120
  const result = yield client.shippingRules.delete(props);
2121
2121
  return result.data;
2122
2122
  }),
@@ -2125,7 +2125,7 @@ const useDeleteShippingRule = () => {
2125
2125
  });
2126
2126
  };
2127
2127
 
2128
- var __async$9 = (__this, __arguments, generator) => {
2128
+ var __async$c = (__this, __arguments, generator) => {
2129
2129
  return new Promise((resolve, reject) => {
2130
2130
  var fulfilled = (value) => {
2131
2131
  try {
@@ -2148,7 +2148,7 @@ var __async$9 = (__this, __arguments, generator) => {
2148
2148
  const useEditShippingRule = () => {
2149
2149
  const { client } = useShipEngine();
2150
2150
  return useMutation({
2151
- mutationFn: (props) => __async$9(void 0, null, function* () {
2151
+ mutationFn: (props) => __async$c(void 0, null, function* () {
2152
2152
  const result = yield client.shippingRules.edit(props);
2153
2153
  return result.data;
2154
2154
  }),
@@ -2157,21 +2157,21 @@ const useEditShippingRule = () => {
2157
2157
  });
2158
2158
  };
2159
2159
 
2160
- var __defProp$7 = Object.defineProperty;
2160
+ var __defProp$8 = Object.defineProperty;
2161
2161
  var __defProps$7 = Object.defineProperties;
2162
2162
  var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2163
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2164
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2165
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2166
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2167
- var __spreadValues$7 = (a, b) => {
2163
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2164
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2165
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2166
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2167
+ var __spreadValues$8 = (a, b) => {
2168
2168
  for (var prop in b || (b = {}))
2169
- if (__hasOwnProp$8.call(b, prop))
2170
- __defNormalProp$7(a, prop, b[prop]);
2171
- if (__getOwnPropSymbols$8)
2172
- for (var prop of __getOwnPropSymbols$8(b)) {
2173
- if (__propIsEnum$8.call(b, prop))
2174
- __defNormalProp$7(a, prop, b[prop]);
2169
+ if (__hasOwnProp$9.call(b, prop))
2170
+ __defNormalProp$8(a, prop, b[prop]);
2171
+ if (__getOwnPropSymbols$9)
2172
+ for (var prop of __getOwnPropSymbols$9(b)) {
2173
+ if (__propIsEnum$9.call(b, prop))
2174
+ __defNormalProp$8(a, prop, b[prop]);
2175
2175
  }
2176
2176
  return a;
2177
2177
  };
@@ -2179,19 +2179,19 @@ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2179
2179
  var __objRest$4 = (source, exclude) => {
2180
2180
  var target = {};
2181
2181
  for (var prop in source)
2182
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2182
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
2183
2183
  target[prop] = source[prop];
2184
- if (source != null && __getOwnPropSymbols$8)
2185
- for (var prop of __getOwnPropSymbols$8(source)) {
2186
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2184
+ if (source != null && __getOwnPropSymbols$9)
2185
+ for (var prop of __getOwnPropSymbols$9(source)) {
2186
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
2187
2187
  target[prop] = source[prop];
2188
2188
  }
2189
2189
  return target;
2190
2190
  };
2191
2191
  const useGetShippingRuleConditionsOptions = (params) => {
2192
2192
  const { client } = useShipEngine();
2193
- const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2194
- return useQuery(__spreadProps$7(__spreadValues$7({}, rest), {
2193
+ const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
2194
+ return useQuery(__spreadProps$7(__spreadValues$8({}, rest), {
2195
2195
  onError,
2196
2196
  queryFn: () => {
2197
2197
  return client.shippingRules.getConditionOptions(queryFnParams);
@@ -2201,21 +2201,21 @@ const useGetShippingRuleConditionsOptions = (params) => {
2201
2201
  }));
2202
2202
  };
2203
2203
 
2204
- var __defProp$6 = Object.defineProperty;
2204
+ var __defProp$7 = Object.defineProperty;
2205
2205
  var __defProps$6 = Object.defineProperties;
2206
2206
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2207
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2208
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2209
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2210
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2211
- var __spreadValues$6 = (a, b) => {
2207
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2208
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2209
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2210
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2211
+ var __spreadValues$7 = (a, b) => {
2212
2212
  for (var prop in b || (b = {}))
2213
- if (__hasOwnProp$7.call(b, prop))
2214
- __defNormalProp$6(a, prop, b[prop]);
2215
- if (__getOwnPropSymbols$7)
2216
- for (var prop of __getOwnPropSymbols$7(b)) {
2217
- if (__propIsEnum$7.call(b, prop))
2218
- __defNormalProp$6(a, prop, b[prop]);
2213
+ if (__hasOwnProp$8.call(b, prop))
2214
+ __defNormalProp$7(a, prop, b[prop]);
2215
+ if (__getOwnPropSymbols$8)
2216
+ for (var prop of __getOwnPropSymbols$8(b)) {
2217
+ if (__propIsEnum$8.call(b, prop))
2218
+ __defNormalProp$7(a, prop, b[prop]);
2219
2219
  }
2220
2220
  return a;
2221
2221
  };
@@ -2223,19 +2223,19 @@ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2223
2223
  var __objRest$3 = (source, exclude) => {
2224
2224
  var target = {};
2225
2225
  for (var prop in source)
2226
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2226
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
2227
2227
  target[prop] = source[prop];
2228
- if (source != null && __getOwnPropSymbols$7)
2229
- for (var prop of __getOwnPropSymbols$7(source)) {
2230
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2228
+ if (source != null && __getOwnPropSymbols$8)
2229
+ for (var prop of __getOwnPropSymbols$8(source)) {
2230
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
2231
2231
  target[prop] = source[prop];
2232
2232
  }
2233
2233
  return target;
2234
2234
  };
2235
2235
  const useGetShippingRuleById = (params) => {
2236
2236
  const { client } = useShipEngine();
2237
- const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2238
- return useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
2237
+ const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
2238
+ return useQuery(__spreadProps$6(__spreadValues$7({}, rest), {
2239
2239
  onError,
2240
2240
  queryFn: () => {
2241
2241
  return client.shippingRules.get(queryFnParams);
@@ -2260,7 +2260,7 @@ const useGetThemeById = (themeId) => {
2260
2260
  });
2261
2261
  };
2262
2262
 
2263
- var __async$8 = (__this, __arguments, generator) => {
2263
+ var __async$b = (__this, __arguments, generator) => {
2264
2264
  return new Promise((resolve, reject) => {
2265
2265
  var fulfilled = (value) => {
2266
2266
  try {
@@ -2283,7 +2283,7 @@ var __async$8 = (__this, __arguments, generator) => {
2283
2283
  const useCreateWarehouse = () => {
2284
2284
  const { client } = useShipEngine();
2285
2285
  return useMutation({
2286
- mutationFn: (data) => __async$8(void 0, null, function* () {
2286
+ mutationFn: (data) => __async$b(void 0, null, function* () {
2287
2287
  const result = yield client.warehouses.create(data);
2288
2288
  return result.data;
2289
2289
  }),
@@ -2292,7 +2292,7 @@ const useCreateWarehouse = () => {
2292
2292
  });
2293
2293
  };
2294
2294
 
2295
- var __async$7 = (__this, __arguments, generator) => {
2295
+ var __async$a = (__this, __arguments, generator) => {
2296
2296
  return new Promise((resolve, reject) => {
2297
2297
  var fulfilled = (value) => {
2298
2298
  try {
@@ -2315,7 +2315,7 @@ var __async$7 = (__this, __arguments, generator) => {
2315
2315
  const useDeleteWarehouse = () => {
2316
2316
  const { client } = useShipEngine();
2317
2317
  return useMutation({
2318
- mutationFn: (_0) => __async$7(void 0, [_0], function* ({ warehouseId }) {
2318
+ mutationFn: (_0) => __async$a(void 0, [_0], function* ({ warehouseId }) {
2319
2319
  const result = yield client.warehouses.delete(warehouseId);
2320
2320
  return result.data;
2321
2321
  }),
@@ -2324,21 +2324,21 @@ const useDeleteWarehouse = () => {
2324
2324
  });
2325
2325
  };
2326
2326
 
2327
- var __defProp$5 = Object.defineProperty;
2327
+ var __defProp$6 = Object.defineProperty;
2328
2328
  var __defProps$5 = Object.defineProperties;
2329
2329
  var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2330
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2331
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2332
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2333
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2334
- var __spreadValues$5 = (a, b) => {
2330
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2331
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2332
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2333
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2334
+ var __spreadValues$6 = (a, b) => {
2335
2335
  for (var prop in b || (b = {}))
2336
- if (__hasOwnProp$6.call(b, prop))
2337
- __defNormalProp$5(a, prop, b[prop]);
2338
- if (__getOwnPropSymbols$6)
2339
- for (var prop of __getOwnPropSymbols$6(b)) {
2340
- if (__propIsEnum$6.call(b, prop))
2341
- __defNormalProp$5(a, prop, b[prop]);
2336
+ if (__hasOwnProp$7.call(b, prop))
2337
+ __defNormalProp$6(a, prop, b[prop]);
2338
+ if (__getOwnPropSymbols$7)
2339
+ for (var prop of __getOwnPropSymbols$7(b)) {
2340
+ if (__propIsEnum$7.call(b, prop))
2341
+ __defNormalProp$6(a, prop, b[prop]);
2342
2342
  }
2343
2343
  return a;
2344
2344
  };
@@ -2346,19 +2346,19 @@ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2346
2346
  var __objRest$2 = (source, exclude) => {
2347
2347
  var target = {};
2348
2348
  for (var prop in source)
2349
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2349
+ if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
2350
2350
  target[prop] = source[prop];
2351
- if (source != null && __getOwnPropSymbols$6)
2352
- for (var prop of __getOwnPropSymbols$6(source)) {
2353
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2351
+ if (source != null && __getOwnPropSymbols$7)
2352
+ for (var prop of __getOwnPropSymbols$7(source)) {
2353
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
2354
2354
  target[prop] = source[prop];
2355
2355
  }
2356
2356
  return target;
2357
2357
  };
2358
2358
  const useListWarehouses = (params) => {
2359
2359
  const { client } = useShipEngine();
2360
- const _a = __spreadValues$5({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2361
- return useQuery(__spreadProps$5(__spreadValues$5({}, rest), {
2360
+ const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
2361
+ return useQuery(__spreadProps$5(__spreadValues$6({}, rest), {
2362
2362
  onError,
2363
2363
  queryFn: () => client.warehouses.list(queryFnParams),
2364
2364
  queryKey: ["useListWarehouses", queryFnParams],
@@ -2366,22 +2366,22 @@ const useListWarehouses = (params) => {
2366
2366
  }));
2367
2367
  };
2368
2368
 
2369
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2370
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2371
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2369
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2370
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2371
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2372
2372
  var __objRest$1 = (source, exclude) => {
2373
2373
  var target = {};
2374
2374
  for (var prop in source)
2375
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
2375
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
2376
2376
  target[prop] = source[prop];
2377
- if (source != null && __getOwnPropSymbols$5)
2378
- for (var prop of __getOwnPropSymbols$5(source)) {
2379
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
2377
+ if (source != null && __getOwnPropSymbols$6)
2378
+ for (var prop of __getOwnPropSymbols$6(source)) {
2379
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
2380
2380
  target[prop] = source[prop];
2381
2381
  }
2382
2382
  return target;
2383
2383
  };
2384
- var __async$6 = (__this, __arguments, generator) => {
2384
+ var __async$9 = (__this, __arguments, generator) => {
2385
2385
  return new Promise((resolve, reject) => {
2386
2386
  var fulfilled = (value) => {
2387
2387
  try {
@@ -2404,7 +2404,7 @@ var __async$6 = (__this, __arguments, generator) => {
2404
2404
  const useUpdateWarehouse = () => {
2405
2405
  const { client } = useShipEngine();
2406
2406
  return useMutation({
2407
- mutationFn: (_a) => __async$6(void 0, null, function* () {
2407
+ mutationFn: (_a) => __async$9(void 0, null, function* () {
2408
2408
  var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
2409
2409
  const result = yield client.warehouses.update(warehouseId, warehouse);
2410
2410
  return result.data;
@@ -2424,7 +2424,7 @@ const useGetAccountBillingPlan = () => {
2424
2424
  });
2425
2425
  };
2426
2426
 
2427
- var __async$5 = (__this, __arguments, generator) => {
2427
+ var __async$8 = (__this, __arguments, generator) => {
2428
2428
  return new Promise((resolve, reject) => {
2429
2429
  var fulfilled = (value) => {
2430
2430
  try {
@@ -2447,7 +2447,7 @@ var __async$5 = (__this, __arguments, generator) => {
2447
2447
  const useUpdateAccountBillingPlan = () => {
2448
2448
  const { client } = useShipEngine();
2449
2449
  return useMutation({
2450
- mutationFn: (code) => __async$5(void 0, null, function* () {
2450
+ mutationFn: (code) => __async$8(void 0, null, function* () {
2451
2451
  const result = yield client.accountBillingPlan.update({ code });
2452
2452
  return result.data;
2453
2453
  }),
@@ -2456,28 +2456,28 @@ const useUpdateAccountBillingPlan = () => {
2456
2456
  });
2457
2457
  };
2458
2458
 
2459
- var __defProp$4 = Object.defineProperty;
2459
+ var __defProp$5 = Object.defineProperty;
2460
2460
  var __defProps$4 = Object.defineProperties;
2461
2461
  var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2462
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2463
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2464
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2465
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2466
- var __spreadValues$4 = (a, b) => {
2462
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2463
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2464
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2465
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2466
+ var __spreadValues$5 = (a, b) => {
2467
2467
  for (var prop in b || (b = {}))
2468
- if (__hasOwnProp$4.call(b, prop))
2469
- __defNormalProp$4(a, prop, b[prop]);
2470
- if (__getOwnPropSymbols$4)
2471
- for (var prop of __getOwnPropSymbols$4(b)) {
2472
- if (__propIsEnum$4.call(b, prop))
2473
- __defNormalProp$4(a, prop, b[prop]);
2468
+ if (__hasOwnProp$5.call(b, prop))
2469
+ __defNormalProp$5(a, prop, b[prop]);
2470
+ if (__getOwnPropSymbols$5)
2471
+ for (var prop of __getOwnPropSymbols$5(b)) {
2472
+ if (__propIsEnum$5.call(b, prop))
2473
+ __defNormalProp$5(a, prop, b[prop]);
2474
2474
  }
2475
2475
  return a;
2476
2476
  };
2477
2477
  var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2478
2478
  const useGetHereToken = (params) => {
2479
2479
  const { client } = useShipEngine();
2480
- return useQuery(__spreadProps$4(__spreadValues$4({}, params), {
2480
+ return useQuery(__spreadProps$4(__spreadValues$5({}, params), {
2481
2481
  onError,
2482
2482
  queryFn: () => client.servicePoints.getHereToken(),
2483
2483
  queryKey: ["useGetHereToken"],
@@ -2520,7 +2520,7 @@ const useListServicePoints = (options) => {
2520
2520
  });
2521
2521
  };
2522
2522
 
2523
- var __async$4 = (__this, __arguments, generator) => {
2523
+ var __async$7 = (__this, __arguments, generator) => {
2524
2524
  return new Promise((resolve, reject) => {
2525
2525
  var fulfilled = (value) => {
2526
2526
  try {
@@ -2543,7 +2543,7 @@ var __async$4 = (__this, __arguments, generator) => {
2543
2543
  const useAddSandboxCarriers = () => {
2544
2544
  const { client } = useShipEngine();
2545
2545
  return useMutation({
2546
- mutationFn: (props) => __async$4(void 0, null, function* () {
2546
+ mutationFn: (props) => __async$7(void 0, null, function* () {
2547
2547
  const result = yield client.sellers.addSandboxCarriers(props);
2548
2548
  return result.data;
2549
2549
  }),
@@ -2552,7 +2552,7 @@ const useAddSandboxCarriers = () => {
2552
2552
  });
2553
2553
  };
2554
2554
 
2555
- var __async$3 = (__this, __arguments, generator) => {
2555
+ var __async$6 = (__this, __arguments, generator) => {
2556
2556
  return new Promise((resolve, reject) => {
2557
2557
  var fulfilled = (value) => {
2558
2558
  try {
@@ -2575,7 +2575,7 @@ var __async$3 = (__this, __arguments, generator) => {
2575
2575
  const useCreateSandboxSeller = () => {
2576
2576
  const { client } = useShipEngine();
2577
2577
  return useMutation({
2578
- mutationFn: (_0) => __async$3(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2578
+ mutationFn: (_0) => __async$6(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2579
2579
  const result = yield client.sellers.createSandboxSeller({
2580
2580
  sellerId,
2581
2581
  tryReuseCarrierConnection
@@ -2597,6 +2597,141 @@ const useListSandboxSellerIds = (sellerId) => {
2597
2597
  });
2598
2598
  };
2599
2599
 
2600
+ var __defProp$4 = Object.defineProperty;
2601
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2602
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2603
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2604
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2605
+ var __spreadValues$4 = (a, b) => {
2606
+ for (var prop in b || (b = {}))
2607
+ if (__hasOwnProp$4.call(b, prop))
2608
+ __defNormalProp$4(a, prop, b[prop]);
2609
+ if (__getOwnPropSymbols$4)
2610
+ for (var prop of __getOwnPropSymbols$4(b)) {
2611
+ if (__propIsEnum$4.call(b, prop))
2612
+ __defNormalProp$4(a, prop, b[prop]);
2613
+ }
2614
+ return a;
2615
+ };
2616
+ var __async$5 = (__this, __arguments, generator) => {
2617
+ return new Promise((resolve, reject) => {
2618
+ var fulfilled = (value) => {
2619
+ try {
2620
+ step(generator.next(value));
2621
+ } catch (e) {
2622
+ reject(e);
2623
+ }
2624
+ };
2625
+ var rejected = (value) => {
2626
+ try {
2627
+ step(generator.throw(value));
2628
+ } catch (e) {
2629
+ reject(e);
2630
+ }
2631
+ };
2632
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2633
+ step((generator = generator.apply(__this, __arguments)).next());
2634
+ });
2635
+ };
2636
+ const useListSellerApiKeys = (params) => {
2637
+ const { client } = useShipEngine();
2638
+ return useQuery({
2639
+ onError,
2640
+ queryFn: () => __async$5(void 0, null, function* () {
2641
+ var _a;
2642
+ const sellerId = yield client.getTenant((_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.isSandbox);
2643
+ if (sellerId) {
2644
+ return client.sellers.listSellerApiKeys(__spreadValues$4({ sellerId }, params));
2645
+ }
2646
+ return Promise.reject([new CodedError("Missing Seller ID from Token")]);
2647
+ }),
2648
+ queryKey: ["useListSellerApiKeys", client, params],
2649
+ select: (result) => result.data
2650
+ });
2651
+ };
2652
+
2653
+ var __async$4 = (__this, __arguments, generator) => {
2654
+ return new Promise((resolve, reject) => {
2655
+ var fulfilled = (value) => {
2656
+ try {
2657
+ step(generator.next(value));
2658
+ } catch (e) {
2659
+ reject(e);
2660
+ }
2661
+ };
2662
+ var rejected = (value) => {
2663
+ try {
2664
+ step(generator.throw(value));
2665
+ } catch (e) {
2666
+ reject(e);
2667
+ }
2668
+ };
2669
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2670
+ step((generator = generator.apply(__this, __arguments)).next());
2671
+ });
2672
+ };
2673
+ const useCreateSellerApiKey = () => {
2674
+ const { client } = useShipEngine();
2675
+ return useMutation({
2676
+ mutationFn: (props) => __async$4(void 0, null, function* () {
2677
+ const sellerId = yield client.getTenant(props.isSandbox);
2678
+ if (sellerId) {
2679
+ const result = yield client.sellers.createSellerApiKey({
2680
+ description: props.description,
2681
+ sellerId
2682
+ });
2683
+ return result.data;
2684
+ }
2685
+ return Promise.reject([new CodedError("Missing Seller ID from Token")]);
2686
+ }),
2687
+ mutationKey: ["useCreateSellerApiKey"],
2688
+ onError
2689
+ });
2690
+ };
2691
+
2692
+ var __async$3 = (__this, __arguments, generator) => {
2693
+ return new Promise((resolve, reject) => {
2694
+ var fulfilled = (value) => {
2695
+ try {
2696
+ step(generator.next(value));
2697
+ } catch (e) {
2698
+ reject(e);
2699
+ }
2700
+ };
2701
+ var rejected = (value) => {
2702
+ try {
2703
+ step(generator.throw(value));
2704
+ } catch (e) {
2705
+ reject(e);
2706
+ }
2707
+ };
2708
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2709
+ step((generator = generator.apply(__this, __arguments)).next());
2710
+ });
2711
+ };
2712
+ const useDeleteSellerApiKey = () => {
2713
+ const { client } = useShipEngine();
2714
+ return useMutation({
2715
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({
2716
+ encryptedApiKey,
2717
+ isSandbox
2718
+ }) {
2719
+ const sellerId = yield client.getTenant(isSandbox);
2720
+ if (sellerId) {
2721
+ const result = yield client.sellers.deleteSellerApiKey({
2722
+ encryptedApiKey,
2723
+ isSandbox,
2724
+ sellerId
2725
+ });
2726
+ return result.data;
2727
+ }
2728
+ return Promise.reject([new CodedError("Missing Seller ID from Token")]);
2729
+ }),
2730
+ mutationKey: ["useDeleteSellerApiKey"],
2731
+ onError
2732
+ });
2733
+ };
2734
+
2600
2735
  var __defProp$3 = Object.defineProperty;
2601
2736
  var __defProps$3 = Object.defineProperties;
2602
2737
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
@@ -2792,4 +2927,4 @@ const useUpdateWebhook = (params) => {
2792
2927
  }));
2793
2928
  };
2794
2929
 
2795
- export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
2930
+ export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };