@shipengine/react-api 2.7.0 → 2.7.1

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
@@ -69,25 +69,25 @@ const onError = (_errors) => _default();
69
69
 
70
70
  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}();
71
71
 
72
- var __defProp$2 = Object.defineProperty;
73
- var __defProps$2 = Object.defineProperties;
74
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
75
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
76
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
77
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
78
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
79
- var __spreadValues$2 = (a, b) => {
72
+ var __defProp$6 = Object.defineProperty;
73
+ var __defProps$6 = Object.defineProperties;
74
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
75
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
76
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
77
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
78
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
79
+ var __spreadValues$6 = (a, b) => {
80
80
  for (var prop in b || (b = {}))
81
- if (__hasOwnProp$d.call(b, prop))
82
- __defNormalProp$2(a, prop, b[prop]);
83
- if (__getOwnPropSymbols$d)
84
- for (var prop of __getOwnPropSymbols$d(b)) {
85
- if (__propIsEnum$d.call(b, prop))
86
- __defNormalProp$2(a, prop, b[prop]);
81
+ if (__hasOwnProp$h.call(b, prop))
82
+ __defNormalProp$6(a, prop, b[prop]);
83
+ if (__getOwnPropSymbols$h)
84
+ for (var prop of __getOwnPropSymbols$h(b)) {
85
+ if (__propIsEnum$h.call(b, prop))
86
+ __defNormalProp$6(a, prop, b[prop]);
87
87
  }
88
88
  return a;
89
89
  };
90
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
90
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
91
91
  const streams = [];
92
92
  if (process.env.NODE_ENV === "production") {
93
93
  streams.push({
@@ -96,7 +96,7 @@ if (process.env.NODE_ENV === "production") {
96
96
  }
97
97
  const logger = E({
98
98
  name: "shipengine",
99
- serializers: __spreadProps$2(__spreadValues$2({}, k), {
99
+ serializers: __spreadProps$6(__spreadValues$6({}, k), {
100
100
  req: (req) => ({
101
101
  headers: req.headers,
102
102
  method: req.method,
@@ -121,7 +121,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
121
121
  throw error;
122
122
  });
123
123
 
124
- var __async$C = (__this, __arguments, generator) => {
124
+ var __async$F = (__this, __arguments, generator) => {
125
125
  return new Promise((resolve, reject) => {
126
126
  var fulfilled = (value) => {
127
127
  try {
@@ -144,7 +144,7 @@ var __async$C = (__this, __arguments, generator) => {
144
144
  const useCreateAccountImage = () => {
145
145
  const { client } = useShipEngine();
146
146
  return useMutation({
147
- mutationFn: (data) => __async$C(void 0, null, function* () {
147
+ mutationFn: (data) => __async$F(void 0, null, function* () {
148
148
  const result = yield client.accountSettings.createImage(data);
149
149
  return result.data;
150
150
  }),
@@ -153,7 +153,7 @@ const useCreateAccountImage = () => {
153
153
  });
154
154
  };
155
155
 
156
- var __async$B = (__this, __arguments, generator) => {
156
+ var __async$E = (__this, __arguments, generator) => {
157
157
  return new Promise((resolve, reject) => {
158
158
  var fulfilled = (value) => {
159
159
  try {
@@ -176,7 +176,7 @@ var __async$B = (__this, __arguments, generator) => {
176
176
  const useDeleteAccountImage = () => {
177
177
  const { client } = useShipEngine();
178
178
  return useMutation({
179
- mutationFn: (labelImageId) => __async$B(void 0, null, function* () {
179
+ mutationFn: (labelImageId) => __async$E(void 0, null, function* () {
180
180
  const result = yield client.accountSettings.deleteImage(labelImageId);
181
181
  return result.data;
182
182
  }),
@@ -205,7 +205,7 @@ const useGetAccountSettings = () => {
205
205
  });
206
206
  };
207
207
 
208
- var __async$A = (__this, __arguments, generator) => {
208
+ var __async$D = (__this, __arguments, generator) => {
209
209
  return new Promise((resolve, reject) => {
210
210
  var fulfilled = (value) => {
211
211
  try {
@@ -228,7 +228,7 @@ var __async$A = (__this, __arguments, generator) => {
228
228
  const useUpdateAccountImage = () => {
229
229
  const { client } = useShipEngine();
230
230
  return useMutation({
231
- mutationFn: (data) => __async$A(void 0, null, function* () {
231
+ mutationFn: (data) => __async$D(void 0, null, function* () {
232
232
  const result = yield client.accountSettings.updateImage(data);
233
233
  return result.data;
234
234
  }),
@@ -237,7 +237,7 @@ const useUpdateAccountImage = () => {
237
237
  });
238
238
  };
239
239
 
240
- var __async$z = (__this, __arguments, generator) => {
240
+ var __async$C = (__this, __arguments, generator) => {
241
241
  return new Promise((resolve, reject) => {
242
242
  var fulfilled = (value) => {
243
243
  try {
@@ -260,7 +260,7 @@ var __async$z = (__this, __arguments, generator) => {
260
260
  const useUpdateAccountSettings = () => {
261
261
  const { client } = useShipEngine();
262
262
  return useMutation({
263
- mutationFn: (settings) => __async$z(void 0, null, function* () {
263
+ mutationFn: (settings) => __async$C(void 0, null, function* () {
264
264
  const result = yield client.accountSettings.update(settings);
265
265
  return result.data;
266
266
  }),
@@ -269,7 +269,7 @@ const useUpdateAccountSettings = () => {
269
269
  });
270
270
  };
271
271
 
272
- var __async$y = (__this, __arguments, generator) => {
272
+ var __async$B = (__this, __arguments, generator) => {
273
273
  return new Promise((resolve, reject) => {
274
274
  var fulfilled = (value) => {
275
275
  try {
@@ -292,7 +292,7 @@ var __async$y = (__this, __arguments, generator) => {
292
292
  const useParseAddress = () => {
293
293
  const { client } = useShipEngine();
294
294
  return useMutation({
295
- mutationFn: (_0) => __async$y(void 0, [_0], function* ({ address, text }) {
295
+ mutationFn: (_0) => __async$B(void 0, [_0], function* ({ address, text }) {
296
296
  const result = yield client.addresses.parse(text, address);
297
297
  return result.data;
298
298
  }),
@@ -301,7 +301,7 @@ const useParseAddress = () => {
301
301
  });
302
302
  };
303
303
 
304
- var __async$x = (__this, __arguments, generator) => {
304
+ var __async$A = (__this, __arguments, generator) => {
305
305
  return new Promise((resolve, reject) => {
306
306
  var fulfilled = (value) => {
307
307
  try {
@@ -324,7 +324,7 @@ var __async$x = (__this, __arguments, generator) => {
324
324
  const useValidateAddresses = () => {
325
325
  const { client } = useShipEngine();
326
326
  return useMutation({
327
- mutationFn: (addresses) => __async$x(void 0, null, function* () {
327
+ mutationFn: (addresses) => __async$A(void 0, null, function* () {
328
328
  const result = yield client.addresses.validate(addresses);
329
329
  return result.data;
330
330
  }),
@@ -333,7 +333,7 @@ const useValidateAddresses = () => {
333
333
  });
334
334
  };
335
335
 
336
- var __async$w = (__this, __arguments, generator) => {
336
+ var __async$z = (__this, __arguments, generator) => {
337
337
  return new Promise((resolve, reject) => {
338
338
  var fulfilled = (value) => {
339
339
  try {
@@ -356,7 +356,7 @@ var __async$w = (__this, __arguments, generator) => {
356
356
  const useAddFunds = () => {
357
357
  const { client } = useShipEngine();
358
358
  return useMutation({
359
- mutationFn: (_0) => __async$w(void 0, [_0], function* ({ carrierId, funds }) {
359
+ mutationFn: (_0) => __async$z(void 0, [_0], function* ({ carrierId, funds }) {
360
360
  const result = yield client.carriers.addFunds(carrierId, funds);
361
361
  return result.data;
362
362
  }),
@@ -365,7 +365,7 @@ const useAddFunds = () => {
365
365
  });
366
366
  };
367
367
 
368
- var __async$v = (__this, __arguments, generator) => {
368
+ var __async$y = (__this, __arguments, generator) => {
369
369
  return new Promise((resolve, reject) => {
370
370
  var fulfilled = (value) => {
371
371
  try {
@@ -388,7 +388,7 @@ var __async$v = (__this, __arguments, generator) => {
388
388
  const useConnectCarrier = () => {
389
389
  const { client } = useShipEngine();
390
390
  return useMutation({
391
- mutationFn: (params) => __async$v(void 0, null, function* () {
391
+ mutationFn: (params) => __async$y(void 0, null, function* () {
392
392
  const result = yield client.carriers.connect(params);
393
393
  return result.data;
394
394
  }),
@@ -507,22 +507,22 @@ const useListCarriers = () => {
507
507
  });
508
508
  };
509
509
 
510
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
511
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
512
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
513
- var __objRest$a = (source, exclude) => {
510
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
511
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
512
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
513
+ var __objRest$b = (source, exclude) => {
514
514
  var target = {};
515
515
  for (var prop in source)
516
- if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
516
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
517
517
  target[prop] = source[prop];
518
- if (source != null && __getOwnPropSymbols$c)
519
- for (var prop of __getOwnPropSymbols$c(source)) {
520
- if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
518
+ if (source != null && __getOwnPropSymbols$g)
519
+ for (var prop of __getOwnPropSymbols$g(source)) {
520
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
521
521
  target[prop] = source[prop];
522
522
  }
523
523
  return target;
524
524
  };
525
- var __async$u = (__this, __arguments, generator) => {
525
+ var __async$x = (__this, __arguments, generator) => {
526
526
  return new Promise((resolve, reject) => {
527
527
  var fulfilled = (value) => {
528
528
  try {
@@ -546,8 +546,8 @@ const useUpdateAutoFunding = () => {
546
546
  const { client } = useShipEngine();
547
547
  const queryClient = useQueryClient();
548
548
  return useMutation({
549
- mutationFn: (_a) => __async$u(void 0, null, function* () {
550
- var _b = _a, { carrierId } = _b, options = __objRest$a(_b, ["carrierId"]);
549
+ mutationFn: (_a) => __async$x(void 0, null, function* () {
550
+ var _b = _a, { carrierId } = _b, options = __objRest$b(_b, ["carrierId"]);
551
551
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
552
552
  return result.data;
553
553
  }),
@@ -576,7 +576,7 @@ const useGetZonesByCarrier = (carrierId) => {
576
576
  });
577
577
  };
578
578
 
579
- var __async$t = (__this, __arguments, generator) => {
579
+ var __async$w = (__this, __arguments, generator) => {
580
580
  return new Promise((resolve, reject) => {
581
581
  var fulfilled = (value) => {
582
582
  try {
@@ -599,7 +599,7 @@ var __async$t = (__this, __arguments, generator) => {
599
599
  const useDeleteCarrier = () => {
600
600
  const { client } = useShipEngine();
601
601
  return useMutation({
602
- mutationFn: (carrierId) => __async$t(void 0, null, function* () {
602
+ mutationFn: (carrierId) => __async$w(void 0, null, function* () {
603
603
  const result = yield client.carriers.delete(carrierId);
604
604
  return result.data;
605
605
  }),
@@ -608,24 +608,24 @@ const useDeleteCarrier = () => {
608
608
  });
609
609
  };
610
610
 
611
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
612
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
613
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
614
- var __objRest$9 = (source, exclude) => {
611
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
612
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
613
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
614
+ var __objRest$a = (source, exclude) => {
615
615
  var target = {};
616
616
  for (var prop in source)
617
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
617
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
618
618
  target[prop] = source[prop];
619
- if (source != null && __getOwnPropSymbols$b)
620
- for (var prop of __getOwnPropSymbols$b(source)) {
621
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
619
+ if (source != null && __getOwnPropSymbols$f)
620
+ for (var prop of __getOwnPropSymbols$f(source)) {
621
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
622
622
  target[prop] = source[prop];
623
623
  }
624
624
  return target;
625
625
  };
626
626
  const useGetCarrierConnectionForm = (_params) => {
627
627
  const { client } = useShipEngine();
628
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$9(_a, ["carrierName", "enabled"]);
628
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$a(_a, ["carrierName", "enabled"]);
629
629
  return useQuery({
630
630
  enabled,
631
631
  onError,
@@ -635,24 +635,24 @@ const useGetCarrierConnectionForm = (_params) => {
635
635
  });
636
636
  };
637
637
 
638
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
639
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
640
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
641
- var __objRest$8 = (source, exclude) => {
638
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
639
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
640
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
641
+ var __objRest$9 = (source, exclude) => {
642
642
  var target = {};
643
643
  for (var prop in source)
644
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
644
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
645
645
  target[prop] = source[prop];
646
- if (source != null && __getOwnPropSymbols$a)
647
- for (var prop of __getOwnPropSymbols$a(source)) {
648
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
646
+ if (source != null && __getOwnPropSymbols$e)
647
+ for (var prop of __getOwnPropSymbols$e(source)) {
648
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
649
649
  target[prop] = source[prop];
650
650
  }
651
651
  return target;
652
652
  };
653
653
  const useListCarrierConnections = (_params) => {
654
654
  const { client } = useShipEngine();
655
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
655
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
656
656
  return useQuery({
657
657
  enabled,
658
658
  onError,
@@ -662,7 +662,7 @@ const useListCarrierConnections = (_params) => {
662
662
  });
663
663
  };
664
664
 
665
- var __async$s = (__this, __arguments, generator) => {
665
+ var __async$v = (__this, __arguments, generator) => {
666
666
  return new Promise((resolve, reject) => {
667
667
  var fulfilled = (value) => {
668
668
  try {
@@ -685,7 +685,7 @@ var __async$s = (__this, __arguments, generator) => {
685
685
  const useConnectCarrierAccount = () => {
686
686
  const { client } = useShipEngine();
687
687
  return useMutation({
688
- mutationFn: (_0) => __async$s(void 0, [_0], function* ({ carrierName, formData }) {
688
+ mutationFn: (_0) => __async$v(void 0, [_0], function* ({ carrierName, formData }) {
689
689
  const result = yield client.connections.connectCarrier(carrierName, formData);
690
690
  if (result.status > 300 && result.status < 309) {
691
691
  result.data.redirectUrl = result.request.res.responseUrl;
@@ -707,7 +707,7 @@ const useListCustomPackageTypes = () => {
707
707
  });
708
708
  };
709
709
 
710
- var __async$r = (__this, __arguments, generator) => {
710
+ var __async$u = (__this, __arguments, generator) => {
711
711
  return new Promise((resolve, reject) => {
712
712
  var fulfilled = (value) => {
713
713
  try {
@@ -730,7 +730,7 @@ var __async$r = (__this, __arguments, generator) => {
730
730
  const useCreateFundingSource = () => {
731
731
  const { client } = useShipEngine();
732
732
  return useMutation({
733
- mutationFn: (fundingSource) => __async$r(void 0, null, function* () {
733
+ mutationFn: (fundingSource) => __async$u(void 0, null, function* () {
734
734
  const result = yield client.fundingSources.create(fundingSource);
735
735
  return result.data;
736
736
  }),
@@ -739,7 +739,7 @@ const useCreateFundingSource = () => {
739
739
  });
740
740
  };
741
741
 
742
- var __async$q = (__this, __arguments, generator) => {
742
+ var __async$t = (__this, __arguments, generator) => {
743
743
  return new Promise((resolve, reject) => {
744
744
  var fulfilled = (value) => {
745
745
  try {
@@ -762,7 +762,7 @@ var __async$q = (__this, __arguments, generator) => {
762
762
  const useFundingSourcesAddFunds = () => {
763
763
  const { client } = useShipEngine();
764
764
  return useMutation({
765
- mutationFn: (_0) => __async$q(void 0, [_0], function* ({ funds, fundingSourceId }) {
765
+ mutationFn: (_0) => __async$t(void 0, [_0], function* ({ funds, fundingSourceId }) {
766
766
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
767
767
  return result.data;
768
768
  }),
@@ -791,7 +791,7 @@ const useListFundingSources = () => {
791
791
  });
792
792
  };
793
793
 
794
- var __async$p = (__this, __arguments, generator) => {
794
+ var __async$s = (__this, __arguments, generator) => {
795
795
  return new Promise((resolve, reject) => {
796
796
  var fulfilled = (value) => {
797
797
  try {
@@ -814,7 +814,7 @@ var __async$p = (__this, __arguments, generator) => {
814
814
  const useRegisterCarrier = () => {
815
815
  const { client } = useShipEngine();
816
816
  return useMutation({
817
- mutationFn: (carrier) => __async$p(void 0, null, function* () {
817
+ mutationFn: (carrier) => __async$s(void 0, null, function* () {
818
818
  const result = yield client.fundingSources.registerCarrier(carrier);
819
819
  return result.data;
820
820
  }),
@@ -823,7 +823,7 @@ const useRegisterCarrier = () => {
823
823
  });
824
824
  };
825
825
 
826
- var __async$o = (__this, __arguments, generator) => {
826
+ var __async$r = (__this, __arguments, generator) => {
827
827
  return new Promise((resolve, reject) => {
828
828
  var fulfilled = (value) => {
829
829
  try {
@@ -846,7 +846,7 @@ var __async$o = (__this, __arguments, generator) => {
846
846
  const useUpdateFundingSource = () => {
847
847
  const { client } = useShipEngine();
848
848
  return useMutation({
849
- mutationFn: (_0) => __async$o(void 0, [_0], function* ({
849
+ mutationFn: (_0) => __async$r(void 0, [_0], function* ({
850
850
  billingInfo,
851
851
  creditCardInfo,
852
852
  fundingSourceId
@@ -900,22 +900,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
900
900
  });
901
901
  };
902
902
 
903
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
904
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
905
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
906
- var __objRest$7 = (source, exclude) => {
903
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
904
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
905
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
906
+ var __objRest$8 = (source, exclude) => {
907
907
  var target = {};
908
908
  for (var prop in source)
909
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
909
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
910
910
  target[prop] = source[prop];
911
- if (source != null && __getOwnPropSymbols$9)
912
- for (var prop of __getOwnPropSymbols$9(source)) {
913
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
911
+ if (source != null && __getOwnPropSymbols$d)
912
+ for (var prop of __getOwnPropSymbols$d(source)) {
913
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
914
914
  target[prop] = source[prop];
915
915
  }
916
916
  return target;
917
917
  };
918
- var __async$n = (__this, __arguments, generator) => {
918
+ var __async$q = (__this, __arguments, generator) => {
919
919
  return new Promise((resolve, reject) => {
920
920
  var fulfilled = (value) => {
921
921
  try {
@@ -938,8 +938,8 @@ var __async$n = (__this, __arguments, generator) => {
938
938
  const useAddInsuranceFunds = () => {
939
939
  const { client } = useShipEngine();
940
940
  return useMutation({
941
- mutationFn: (_a) => __async$n(void 0, null, function* () {
942
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$7(_b, ["insuranceProvider"]);
941
+ mutationFn: (_a) => __async$q(void 0, null, function* () {
942
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$8(_b, ["insuranceProvider"]);
943
943
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
944
944
  return result.data;
945
945
  }),
@@ -948,22 +948,22 @@ const useAddInsuranceFunds = () => {
948
948
  });
949
949
  };
950
950
 
951
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
952
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
953
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
954
- var __objRest$6 = (source, exclude) => {
951
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
952
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
953
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
954
+ var __objRest$7 = (source, exclude) => {
955
955
  var target = {};
956
956
  for (var prop in source)
957
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
957
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
958
958
  target[prop] = source[prop];
959
- if (source != null && __getOwnPropSymbols$8)
960
- for (var prop of __getOwnPropSymbols$8(source)) {
961
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
959
+ if (source != null && __getOwnPropSymbols$c)
960
+ for (var prop of __getOwnPropSymbols$c(source)) {
961
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
962
962
  target[prop] = source[prop];
963
963
  }
964
964
  return target;
965
965
  };
966
- var __async$m = (__this, __arguments, generator) => {
966
+ var __async$p = (__this, __arguments, generator) => {
967
967
  return new Promise((resolve, reject) => {
968
968
  var fulfilled = (value) => {
969
969
  try {
@@ -986,8 +986,8 @@ var __async$m = (__this, __arguments, generator) => {
986
986
  const useCreateLabel = () => {
987
987
  const { client } = useShipEngine();
988
988
  return useMutation({
989
- mutationFn: (_a) => __async$m(void 0, null, function* () {
990
- var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
989
+ mutationFn: (_a) => __async$p(void 0, null, function* () {
990
+ var _b = _a, { rateId } = _b, options = __objRest$7(_b, ["rateId"]);
991
991
  const result = yield client.labels.createByRateId(rateId, options);
992
992
  return result.data;
993
993
  }),
@@ -1011,24 +1011,24 @@ const useGetLabel = (labelId) => {
1011
1011
  });
1012
1012
  };
1013
1013
 
1014
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1015
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1016
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1017
- var __objRest$5 = (source, exclude) => {
1014
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1015
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1016
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1017
+ var __objRest$6 = (source, exclude) => {
1018
1018
  var target = {};
1019
1019
  for (var prop in source)
1020
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
1020
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1021
1021
  target[prop] = source[prop];
1022
- if (source != null && __getOwnPropSymbols$7)
1023
- for (var prop of __getOwnPropSymbols$7(source)) {
1024
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
1022
+ if (source != null && __getOwnPropSymbols$b)
1023
+ for (var prop of __getOwnPropSymbols$b(source)) {
1024
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1025
1025
  target[prop] = source[prop];
1026
1026
  }
1027
1027
  return target;
1028
1028
  };
1029
1029
  const useListLabels = (_params) => {
1030
1030
  const { client } = useShipEngine();
1031
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$5(_a, ["enabled"]);
1031
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$6(_a, ["enabled"]);
1032
1032
  return useQuery({
1033
1033
  enabled,
1034
1034
  onError,
@@ -1038,7 +1038,7 @@ const useListLabels = (_params) => {
1038
1038
  });
1039
1039
  };
1040
1040
 
1041
- var __async$l = (__this, __arguments, generator) => {
1041
+ var __async$o = (__this, __arguments, generator) => {
1042
1042
  return new Promise((resolve, reject) => {
1043
1043
  var fulfilled = (value) => {
1044
1044
  try {
@@ -1061,7 +1061,7 @@ var __async$l = (__this, __arguments, generator) => {
1061
1061
  const useVoidLabel = () => {
1062
1062
  const { client } = useShipEngine();
1063
1063
  return useMutation({
1064
- mutationFn: (labelId) => __async$l(void 0, null, function* () {
1064
+ mutationFn: (labelId) => __async$o(void 0, null, function* () {
1065
1065
  const result = yield client.labels.void(labelId);
1066
1066
  return result.data;
1067
1067
  }),
@@ -1080,7 +1080,7 @@ const useListOrderSources = () => {
1080
1080
  });
1081
1081
  };
1082
1082
 
1083
- var __async$k = (__this, __arguments, generator) => {
1083
+ var __async$n = (__this, __arguments, generator) => {
1084
1084
  return new Promise((resolve, reject) => {
1085
1085
  var fulfilled = (value) => {
1086
1086
  try {
@@ -1103,7 +1103,7 @@ var __async$k = (__this, __arguments, generator) => {
1103
1103
  const useRefreshOrderSourceAsync = () => {
1104
1104
  const { client } = useShipEngine();
1105
1105
  return useMutation({
1106
- mutationFn: (orderSourceId) => __async$k(void 0, null, function* () {
1106
+ mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1107
1107
  const result = yield client.orderSources.refresh(orderSourceId);
1108
1108
  return result.data;
1109
1109
  }),
@@ -1114,9 +1114,9 @@ const useRefreshOrderSource = () => {
1114
1114
  const { client } = useShipEngine();
1115
1115
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
1116
1116
  return useMutation({
1117
- mutationFn: (orderSourceId) => __async$k(void 0, null, function* () {
1117
+ mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1118
1118
  yield refreshOrderSourceAsync(orderSourceId);
1119
- const waitResult = yield retryUntil(() => __async$k(void 0, null, function* () {
1119
+ const waitResult = yield retryUntil(() => __async$n(void 0, null, function* () {
1120
1120
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
1121
1121
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
1122
1122
  throw new SE.CodedError("Order source is still refreshing");
@@ -1130,7 +1130,7 @@ const useRefreshOrderSource = () => {
1130
1130
  });
1131
1131
  };
1132
1132
 
1133
- var __async$j = (__this, __arguments, generator) => {
1133
+ var __async$m = (__this, __arguments, generator) => {
1134
1134
  return new Promise((resolve, reject) => {
1135
1135
  var fulfilled = (value) => {
1136
1136
  try {
@@ -1153,7 +1153,7 @@ var __async$j = (__this, __arguments, generator) => {
1153
1153
  const useDeactivateOrderSource = () => {
1154
1154
  const { client } = useShipEngine();
1155
1155
  return useMutation({
1156
- mutationFn: (orderSourceId) => __async$j(void 0, null, function* () {
1156
+ mutationFn: (orderSourceId) => __async$m(void 0, null, function* () {
1157
1157
  const result = yield client.orderSources.deactivate(orderSourceId);
1158
1158
  return result.data;
1159
1159
  }),
@@ -1162,7 +1162,7 @@ const useDeactivateOrderSource = () => {
1162
1162
  });
1163
1163
  };
1164
1164
 
1165
- var __async$i = (__this, __arguments, generator) => {
1165
+ var __async$l = (__this, __arguments, generator) => {
1166
1166
  return new Promise((resolve, reject) => {
1167
1167
  var fulfilled = (value) => {
1168
1168
  try {
@@ -1185,7 +1185,7 @@ var __async$i = (__this, __arguments, generator) => {
1185
1185
  const useCreateRateCard = () => {
1186
1186
  const { client } = useShipEngine();
1187
1187
  return useMutation({
1188
- mutationFn: (rateCard) => __async$i(void 0, null, function* () {
1188
+ mutationFn: (rateCard) => __async$l(void 0, null, function* () {
1189
1189
  const result = yield client.rateCards.create(rateCard);
1190
1190
  return result.data;
1191
1191
  }),
@@ -1232,7 +1232,7 @@ const useListRateCards = (carrierIds) => {
1232
1232
  });
1233
1233
  };
1234
1234
 
1235
- var __async$h = (__this, __arguments, generator) => {
1235
+ var __async$k = (__this, __arguments, generator) => {
1236
1236
  return new Promise((resolve, reject) => {
1237
1237
  var fulfilled = (value) => {
1238
1238
  try {
@@ -1255,7 +1255,7 @@ var __async$h = (__this, __arguments, generator) => {
1255
1255
  const usePublishRateCard = () => {
1256
1256
  const { client } = useShipEngine();
1257
1257
  return useMutation({
1258
- mutationFn: (rateCardId) => __async$h(void 0, null, function* () {
1258
+ mutationFn: (rateCardId) => __async$k(void 0, null, function* () {
1259
1259
  return yield client.rateCards.publish(rateCardId);
1260
1260
  }),
1261
1261
  mutationKey: ["usePublishRateCard"],
@@ -1263,7 +1263,7 @@ const usePublishRateCard = () => {
1263
1263
  });
1264
1264
  };
1265
1265
 
1266
- var __async$g = (__this, __arguments, generator) => {
1266
+ var __async$j = (__this, __arguments, generator) => {
1267
1267
  return new Promise((resolve, reject) => {
1268
1268
  var fulfilled = (value) => {
1269
1269
  try {
@@ -1286,7 +1286,7 @@ var __async$g = (__this, __arguments, generator) => {
1286
1286
  const useUpdateRateCard = () => {
1287
1287
  const { client } = useShipEngine();
1288
1288
  return useMutation({
1289
- mutationFn: (rateCard) => __async$g(void 0, null, function* () {
1289
+ mutationFn: (rateCard) => __async$j(void 0, null, function* () {
1290
1290
  const result = yield client.rateCards.update(rateCard);
1291
1291
  return result.data;
1292
1292
  }),
@@ -1295,7 +1295,7 @@ const useUpdateRateCard = () => {
1295
1295
  });
1296
1296
  };
1297
1297
 
1298
- var __async$f = (__this, __arguments, generator) => {
1298
+ var __async$i = (__this, __arguments, generator) => {
1299
1299
  return new Promise((resolve, reject) => {
1300
1300
  var fulfilled = (value) => {
1301
1301
  try {
@@ -1318,7 +1318,7 @@ var __async$f = (__this, __arguments, generator) => {
1318
1318
  const useUploadRateCard = () => {
1319
1319
  const { client } = useShipEngine();
1320
1320
  return useMutation({
1321
- mutationFn: (_0) => __async$f(void 0, [_0], function* ({ rateCardId, file }) {
1321
+ mutationFn: (_0) => __async$i(void 0, [_0], function* ({ rateCardId, file }) {
1322
1322
  const result = yield client.rateCards.upload(rateCardId, file);
1323
1323
  return result.data;
1324
1324
  }),
@@ -1327,7 +1327,7 @@ const useUploadRateCard = () => {
1327
1327
  });
1328
1328
  };
1329
1329
 
1330
- var __async$e = (__this, __arguments, generator) => {
1330
+ var __async$h = (__this, __arguments, generator) => {
1331
1331
  return new Promise((resolve, reject) => {
1332
1332
  var fulfilled = (value) => {
1333
1333
  try {
@@ -1350,7 +1350,7 @@ var __async$e = (__this, __arguments, generator) => {
1350
1350
  const useDeleteRateCard = () => {
1351
1351
  const { client } = useShipEngine();
1352
1352
  return useMutation({
1353
- mutationFn: (rateCardId) => __async$e(void 0, null, function* () {
1353
+ mutationFn: (rateCardId) => __async$h(void 0, null, function* () {
1354
1354
  const result = yield client.rateCards.delete(rateCardId);
1355
1355
  return result.data;
1356
1356
  }),
@@ -1359,7 +1359,7 @@ const useDeleteRateCard = () => {
1359
1359
  });
1360
1360
  };
1361
1361
 
1362
- var __async$d = (__this, __arguments, generator) => {
1362
+ var __async$g = (__this, __arguments, generator) => {
1363
1363
  return new Promise((resolve, reject) => {
1364
1364
  var fulfilled = (value) => {
1365
1365
  try {
@@ -1382,7 +1382,7 @@ var __async$d = (__this, __arguments, generator) => {
1382
1382
  const useCalculateRates = () => {
1383
1383
  const { client } = useShipEngine();
1384
1384
  return useMutation({
1385
- mutationFn: (_0) => __async$d(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1385
+ mutationFn: (_0) => __async$g(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1386
1386
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1387
1387
  return result.data;
1388
1388
  }),
@@ -1417,22 +1417,22 @@ const useListSalesOrders = (params = {}) => {
1417
1417
  });
1418
1418
  };
1419
1419
 
1420
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1421
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1422
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1423
- var __objRest$4 = (source, exclude) => {
1420
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1421
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1422
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1423
+ var __objRest$5 = (source, exclude) => {
1424
1424
  var target = {};
1425
1425
  for (var prop in source)
1426
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1426
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
1427
1427
  target[prop] = source[prop];
1428
- if (source != null && __getOwnPropSymbols$6)
1429
- for (var prop of __getOwnPropSymbols$6(source)) {
1430
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1428
+ if (source != null && __getOwnPropSymbols$a)
1429
+ for (var prop of __getOwnPropSymbols$a(source)) {
1430
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
1431
1431
  target[prop] = source[prop];
1432
1432
  }
1433
1433
  return target;
1434
1434
  };
1435
- var __async$c = (__this, __arguments, generator) => {
1435
+ var __async$f = (__this, __arguments, generator) => {
1436
1436
  return new Promise((resolve, reject) => {
1437
1437
  var fulfilled = (value) => {
1438
1438
  try {
@@ -1455,8 +1455,8 @@ var __async$c = (__this, __arguments, generator) => {
1455
1455
  const useNotifySalesOrderShipped = () => {
1456
1456
  const { client } = useShipEngine();
1457
1457
  return useMutation({
1458
- mutationFn: (_a) => __async$c(void 0, null, function* () {
1459
- var _b = _a, { salesOrderId } = _b, tracking = __objRest$4(_b, ["salesOrderId"]);
1458
+ mutationFn: (_a) => __async$f(void 0, null, function* () {
1459
+ var _b = _a, { salesOrderId } = _b, tracking = __objRest$5(_b, ["salesOrderId"]);
1460
1460
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1461
1461
  return result.data;
1462
1462
  }),
@@ -1465,22 +1465,22 @@ const useNotifySalesOrderShipped = () => {
1465
1465
  });
1466
1466
  };
1467
1467
 
1468
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1469
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1470
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1471
- var __objRest$3 = (source, exclude) => {
1468
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1469
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1470
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1471
+ var __objRest$4 = (source, exclude) => {
1472
1472
  var target = {};
1473
1473
  for (var prop in source)
1474
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1474
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1475
1475
  target[prop] = source[prop];
1476
- if (source != null && __getOwnPropSymbols$5)
1477
- for (var prop of __getOwnPropSymbols$5(source)) {
1478
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1476
+ if (source != null && __getOwnPropSymbols$9)
1477
+ for (var prop of __getOwnPropSymbols$9(source)) {
1478
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
1479
1479
  target[prop] = source[prop];
1480
1480
  }
1481
1481
  return target;
1482
1482
  };
1483
- var __async$b = (__this, __arguments, generator) => {
1483
+ var __async$e = (__this, __arguments, generator) => {
1484
1484
  return new Promise((resolve, reject) => {
1485
1485
  var fulfilled = (value) => {
1486
1486
  try {
@@ -1503,8 +1503,8 @@ var __async$b = (__this, __arguments, generator) => {
1503
1503
  const useCreateSalesOrderShipment = () => {
1504
1504
  const { client } = useShipEngine();
1505
1505
  return useMutation({
1506
- mutationFn: (_a) => __async$b(void 0, null, function* () {
1507
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$3(_b, ["salesOrderId"]);
1506
+ mutationFn: (_a) => __async$e(void 0, null, function* () {
1507
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
1508
1508
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1509
1509
  return result.data;
1510
1510
  }),
@@ -1539,22 +1539,22 @@ const useListSalesOrderShipments = (params) => {
1539
1539
  });
1540
1540
  };
1541
1541
 
1542
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1543
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1544
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1545
- var __objRest$2 = (source, exclude) => {
1542
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1543
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1544
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1545
+ var __objRest$3 = (source, exclude) => {
1546
1546
  var target = {};
1547
1547
  for (var prop in source)
1548
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1548
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1549
1549
  target[prop] = source[prop];
1550
- if (source != null && __getOwnPropSymbols$4)
1551
- for (var prop of __getOwnPropSymbols$4(source)) {
1552
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1550
+ if (source != null && __getOwnPropSymbols$8)
1551
+ for (var prop of __getOwnPropSymbols$8(source)) {
1552
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
1553
1553
  target[prop] = source[prop];
1554
1554
  }
1555
1555
  return target;
1556
1556
  };
1557
- var __async$a = (__this, __arguments, generator) => {
1557
+ var __async$d = (__this, __arguments, generator) => {
1558
1558
  return new Promise((resolve, reject) => {
1559
1559
  var fulfilled = (value) => {
1560
1560
  try {
@@ -1577,8 +1577,8 @@ var __async$a = (__this, __arguments, generator) => {
1577
1577
  const useUpdateSalesOrderShipment = () => {
1578
1578
  const { client } = useShipEngine();
1579
1579
  return useMutation({
1580
- mutationFn: (_a) => __async$a(void 0, null, function* () {
1581
- var _b = _a, { shipmentId } = _b, shipment = __objRest$2(_b, ["shipmentId"]);
1580
+ mutationFn: (_a) => __async$d(void 0, null, function* () {
1581
+ var _b = _a, { shipmentId } = _b, shipment = __objRest$3(_b, ["shipmentId"]);
1582
1582
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1583
1583
  return result.data;
1584
1584
  }),
@@ -1587,26 +1587,26 @@ const useUpdateSalesOrderShipment = () => {
1587
1587
  });
1588
1588
  };
1589
1589
 
1590
- var __defProp$1 = Object.defineProperty;
1591
- var __defProps$1 = Object.defineProperties;
1592
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
1593
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1594
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1595
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1596
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1597
- var __spreadValues$1 = (a, b) => {
1590
+ var __defProp$5 = Object.defineProperty;
1591
+ var __defProps$5 = Object.defineProperties;
1592
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1593
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1594
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1595
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1596
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1597
+ var __spreadValues$5 = (a, b) => {
1598
1598
  for (var prop in b || (b = {}))
1599
- if (__hasOwnProp$3.call(b, prop))
1600
- __defNormalProp$1(a, prop, b[prop]);
1601
- if (__getOwnPropSymbols$3)
1602
- for (var prop of __getOwnPropSymbols$3(b)) {
1603
- if (__propIsEnum$3.call(b, prop))
1604
- __defNormalProp$1(a, prop, b[prop]);
1599
+ if (__hasOwnProp$7.call(b, prop))
1600
+ __defNormalProp$5(a, prop, b[prop]);
1601
+ if (__getOwnPropSymbols$7)
1602
+ for (var prop of __getOwnPropSymbols$7(b)) {
1603
+ if (__propIsEnum$7.call(b, prop))
1604
+ __defNormalProp$5(a, prop, b[prop]);
1605
1605
  }
1606
1606
  return a;
1607
1607
  };
1608
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
1609
- var __async$9 = (__this, __arguments, generator) => {
1608
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1609
+ var __async$c = (__this, __arguments, generator) => {
1610
1610
  return new Promise((resolve, reject) => {
1611
1611
  var fulfilled = (value) => {
1612
1612
  try {
@@ -1629,7 +1629,7 @@ var __async$9 = (__this, __arguments, generator) => {
1629
1629
  const useCreateShipment = () => {
1630
1630
  const { client } = useShipEngine();
1631
1631
  return useMutation({
1632
- mutationFn: (shipment) => __async$9(void 0, null, function* () {
1632
+ mutationFn: (shipment) => __async$c(void 0, null, function* () {
1633
1633
  var _a;
1634
1634
  if (shipment.warehouseId === void 0) {
1635
1635
  throw new SE.CodedError("errorMessages.noWarehouses", {
@@ -1647,7 +1647,7 @@ const useCreateShipment = () => {
1647
1647
  postalCode: "",
1648
1648
  stateProvince: ""
1649
1649
  };
1650
- return (yield client.shipments.create(__spreadProps$1(__spreadValues$1({}, shipment), {
1650
+ return (yield client.shipments.create(__spreadProps$5(__spreadValues$5({}, shipment), {
1651
1651
  shipTo
1652
1652
  }))).data;
1653
1653
  }),
@@ -1688,23 +1688,23 @@ const useGetShipment = (shipmentId) => {
1688
1688
  });
1689
1689
  };
1690
1690
 
1691
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1692
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1693
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1694
- var __objRest$1 = (source, exclude) => {
1691
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1692
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1693
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1694
+ var __objRest$2 = (source, exclude) => {
1695
1695
  var target = {};
1696
1696
  for (var prop in source)
1697
- if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
1697
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1698
1698
  target[prop] = source[prop];
1699
- if (source != null && __getOwnPropSymbols$2)
1700
- for (var prop of __getOwnPropSymbols$2(source)) {
1701
- if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
1699
+ if (source != null && __getOwnPropSymbols$6)
1700
+ for (var prop of __getOwnPropSymbols$6(source)) {
1701
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1702
1702
  target[prop] = source[prop];
1703
1703
  }
1704
1704
  return target;
1705
1705
  };
1706
1706
  const useListShipments = (_params) => {
1707
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$1(_a, ["enabled"]);
1707
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$2(_a, ["enabled"]);
1708
1708
  const { client } = useShipEngine();
1709
1709
  return useQuery({
1710
1710
  enabled,
@@ -1715,28 +1715,28 @@ const useListShipments = (_params) => {
1715
1715
  });
1716
1716
  };
1717
1717
 
1718
- var __defProp = Object.defineProperty;
1719
- var __defProps = Object.defineProperties;
1720
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1721
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1722
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1723
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1724
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1725
- var __spreadValues = (a, b) => {
1718
+ var __defProp$4 = Object.defineProperty;
1719
+ var __defProps$4 = Object.defineProperties;
1720
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1721
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1722
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1723
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1724
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1725
+ var __spreadValues$4 = (a, b) => {
1726
1726
  for (var prop in b || (b = {}))
1727
- if (__hasOwnProp$1.call(b, prop))
1728
- __defNormalProp(a, prop, b[prop]);
1729
- if (__getOwnPropSymbols$1)
1730
- for (var prop of __getOwnPropSymbols$1(b)) {
1731
- if (__propIsEnum$1.call(b, prop))
1732
- __defNormalProp(a, prop, b[prop]);
1727
+ if (__hasOwnProp$5.call(b, prop))
1728
+ __defNormalProp$4(a, prop, b[prop]);
1729
+ if (__getOwnPropSymbols$5)
1730
+ for (var prop of __getOwnPropSymbols$5(b)) {
1731
+ if (__propIsEnum$5.call(b, prop))
1732
+ __defNormalProp$4(a, prop, b[prop]);
1733
1733
  }
1734
1734
  return a;
1735
1735
  };
1736
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1736
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1737
1737
  const useListShippingRules = (params) => {
1738
1738
  const { client } = useShipEngine();
1739
- return useQuery(__spreadProps(__spreadValues({}, params), {
1739
+ return useQuery(__spreadProps$4(__spreadValues$4({}, params), {
1740
1740
  onError,
1741
1741
  queryFn: () => {
1742
1742
  return client.shippingRules.list();
@@ -1746,7 +1746,7 @@ const useListShippingRules = (params) => {
1746
1746
  }));
1747
1747
  };
1748
1748
 
1749
- var __async$8 = (__this, __arguments, generator) => {
1749
+ var __async$b = (__this, __arguments, generator) => {
1750
1750
  return new Promise((resolve, reject) => {
1751
1751
  var fulfilled = (value) => {
1752
1752
  try {
@@ -1769,7 +1769,7 @@ var __async$8 = (__this, __arguments, generator) => {
1769
1769
  const useCreateShippingRule = () => {
1770
1770
  const { client } = useShipEngine();
1771
1771
  return useMutation({
1772
- mutationFn: (shippingRule) => __async$8(void 0, null, function* () {
1772
+ mutationFn: (shippingRule) => __async$b(void 0, null, function* () {
1773
1773
  const result = yield client.shippingRules.create(shippingRule);
1774
1774
  return result.data;
1775
1775
  }),
@@ -1778,7 +1778,7 @@ const useCreateShippingRule = () => {
1778
1778
  });
1779
1779
  };
1780
1780
 
1781
- var __async$7 = (__this, __arguments, generator) => {
1781
+ var __async$a = (__this, __arguments, generator) => {
1782
1782
  return new Promise((resolve, reject) => {
1783
1783
  var fulfilled = (value) => {
1784
1784
  try {
@@ -1801,7 +1801,7 @@ var __async$7 = (__this, __arguments, generator) => {
1801
1801
  const useDeleteShippingRule = () => {
1802
1802
  const { client } = useShipEngine();
1803
1803
  return useMutation({
1804
- mutationFn: (shippingRuleId) => __async$7(void 0, null, function* () {
1804
+ mutationFn: (shippingRuleId) => __async$a(void 0, null, function* () {
1805
1805
  const result = yield client.shippingRules.delete(shippingRuleId);
1806
1806
  return result.data;
1807
1807
  }),
@@ -1810,7 +1810,7 @@ const useDeleteShippingRule = () => {
1810
1810
  });
1811
1811
  };
1812
1812
 
1813
- var __async$6 = (__this, __arguments, generator) => {
1813
+ var __async$9 = (__this, __arguments, generator) => {
1814
1814
  return new Promise((resolve, reject) => {
1815
1815
  var fulfilled = (value) => {
1816
1816
  try {
@@ -1833,7 +1833,7 @@ var __async$6 = (__this, __arguments, generator) => {
1833
1833
  const useEditShippingRule = () => {
1834
1834
  const { client } = useShipEngine();
1835
1835
  return useMutation({
1836
- mutationFn: (shippingRule) => __async$6(void 0, null, function* () {
1836
+ mutationFn: (shippingRule) => __async$9(void 0, null, function* () {
1837
1837
  const result = yield client.shippingRules.edit(shippingRule);
1838
1838
  return result.data;
1839
1839
  }),
@@ -1882,7 +1882,7 @@ const useGetThemeById = (themeId) => {
1882
1882
  });
1883
1883
  };
1884
1884
 
1885
- var __async$5 = (__this, __arguments, generator) => {
1885
+ var __async$8 = (__this, __arguments, generator) => {
1886
1886
  return new Promise((resolve, reject) => {
1887
1887
  var fulfilled = (value) => {
1888
1888
  try {
@@ -1905,7 +1905,7 @@ var __async$5 = (__this, __arguments, generator) => {
1905
1905
  const useCreateWarehouse = () => {
1906
1906
  const { client } = useShipEngine();
1907
1907
  return useMutation({
1908
- mutationFn: (data) => __async$5(void 0, null, function* () {
1908
+ mutationFn: (data) => __async$8(void 0, null, function* () {
1909
1909
  const result = yield client.warehouses.create(data);
1910
1910
  return result.data;
1911
1911
  }),
@@ -1914,7 +1914,7 @@ const useCreateWarehouse = () => {
1914
1914
  });
1915
1915
  };
1916
1916
 
1917
- var __async$4 = (__this, __arguments, generator) => {
1917
+ var __async$7 = (__this, __arguments, generator) => {
1918
1918
  return new Promise((resolve, reject) => {
1919
1919
  var fulfilled = (value) => {
1920
1920
  try {
@@ -1937,7 +1937,7 @@ var __async$4 = (__this, __arguments, generator) => {
1937
1937
  const useDeleteWarehouse = () => {
1938
1938
  const { client } = useShipEngine();
1939
1939
  return useMutation({
1940
- mutationFn: (_0) => __async$4(void 0, [_0], function* ({ warehouseId }) {
1940
+ mutationFn: (_0) => __async$7(void 0, [_0], function* ({ warehouseId }) {
1941
1941
  const result = yield client.warehouses.delete(warehouseId);
1942
1942
  return result.data;
1943
1943
  }),
@@ -1958,22 +1958,22 @@ const useListWarehouses = (options) => {
1958
1958
  });
1959
1959
  };
1960
1960
 
1961
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1962
- var __hasOwnProp = Object.prototype.hasOwnProperty;
1963
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
1964
- var __objRest = (source, exclude) => {
1961
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1962
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1963
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1964
+ var __objRest$1 = (source, exclude) => {
1965
1965
  var target = {};
1966
1966
  for (var prop in source)
1967
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
1967
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1968
1968
  target[prop] = source[prop];
1969
- if (source != null && __getOwnPropSymbols)
1970
- for (var prop of __getOwnPropSymbols(source)) {
1971
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
1969
+ if (source != null && __getOwnPropSymbols$4)
1970
+ for (var prop of __getOwnPropSymbols$4(source)) {
1971
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1972
1972
  target[prop] = source[prop];
1973
1973
  }
1974
1974
  return target;
1975
1975
  };
1976
- var __async$3 = (__this, __arguments, generator) => {
1976
+ var __async$6 = (__this, __arguments, generator) => {
1977
1977
  return new Promise((resolve, reject) => {
1978
1978
  var fulfilled = (value) => {
1979
1979
  try {
@@ -1996,8 +1996,8 @@ var __async$3 = (__this, __arguments, generator) => {
1996
1996
  const useUpdateWarehouse = () => {
1997
1997
  const { client } = useShipEngine();
1998
1998
  return useMutation({
1999
- mutationFn: (_a) => __async$3(void 0, null, function* () {
2000
- var _b = _a, { warehouseId } = _b, warehouse = __objRest(_b, ["warehouseId"]);
1999
+ mutationFn: (_a) => __async$6(void 0, null, function* () {
2000
+ var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
2001
2001
  const result = yield client.warehouses.update(warehouseId, warehouse);
2002
2002
  return result.data;
2003
2003
  }),
@@ -2016,7 +2016,7 @@ const useGetAccountBillingPlan = () => {
2016
2016
  });
2017
2017
  };
2018
2018
 
2019
- var __async$2 = (__this, __arguments, generator) => {
2019
+ var __async$5 = (__this, __arguments, generator) => {
2020
2020
  return new Promise((resolve, reject) => {
2021
2021
  var fulfilled = (value) => {
2022
2022
  try {
@@ -2039,7 +2039,7 @@ var __async$2 = (__this, __arguments, generator) => {
2039
2039
  const useUpdateAccountBillingPlan = () => {
2040
2040
  const { client } = useShipEngine();
2041
2041
  return useMutation({
2042
- mutationFn: (code) => __async$2(void 0, null, function* () {
2042
+ mutationFn: (code) => __async$5(void 0, null, function* () {
2043
2043
  const result = yield client.accountBillingPlan.update({ code });
2044
2044
  return result.data;
2045
2045
  }),
@@ -2083,7 +2083,7 @@ const useGetServicePoint = ({
2083
2083
  });
2084
2084
  };
2085
2085
 
2086
- var __async$1 = (__this, __arguments, generator) => {
2086
+ var __async$4 = (__this, __arguments, generator) => {
2087
2087
  return new Promise((resolve, reject) => {
2088
2088
  var fulfilled = (value) => {
2089
2089
  try {
@@ -2106,7 +2106,7 @@ var __async$1 = (__this, __arguments, generator) => {
2106
2106
  const useAddSandboxCarriers = () => {
2107
2107
  const { client } = useShipEngine();
2108
2108
  return useMutation({
2109
- mutationFn: (_0) => __async$1(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2109
+ mutationFn: (_0) => __async$4(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2110
2110
  const result = yield client.sellers.addSandboxCarriers({
2111
2111
  sellerId,
2112
2112
  tryReuseCarrierConnection
@@ -2118,7 +2118,7 @@ const useAddSandboxCarriers = () => {
2118
2118
  });
2119
2119
  };
2120
2120
 
2121
- var __async = (__this, __arguments, generator) => {
2121
+ var __async$3 = (__this, __arguments, generator) => {
2122
2122
  return new Promise((resolve, reject) => {
2123
2123
  var fulfilled = (value) => {
2124
2124
  try {
@@ -2141,7 +2141,7 @@ var __async = (__this, __arguments, generator) => {
2141
2141
  const useCreateSandboxSeller = () => {
2142
2142
  const { client } = useShipEngine();
2143
2143
  return useMutation({
2144
- mutationFn: (_0) => __async(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2144
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2145
2145
  const result = yield client.sellers.createSandboxSeller({
2146
2146
  sellerId,
2147
2147
  tryReuseCarrierConnection
@@ -2163,4 +2163,199 @@ const useListSandboxSellerIds = (sellerId) => {
2163
2163
  });
2164
2164
  };
2165
2165
 
2166
- export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUploadRateCard, useValidateAddresses, useVoidLabel };
2166
+ var __defProp$3 = Object.defineProperty;
2167
+ var __defProps$3 = Object.defineProperties;
2168
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2169
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2170
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2171
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2172
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2173
+ var __spreadValues$3 = (a, b) => {
2174
+ for (var prop in b || (b = {}))
2175
+ if (__hasOwnProp$3.call(b, prop))
2176
+ __defNormalProp$3(a, prop, b[prop]);
2177
+ if (__getOwnPropSymbols$3)
2178
+ for (var prop of __getOwnPropSymbols$3(b)) {
2179
+ if (__propIsEnum$3.call(b, prop))
2180
+ __defNormalProp$3(a, prop, b[prop]);
2181
+ }
2182
+ return a;
2183
+ };
2184
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
2185
+ var __async$2 = (__this, __arguments, generator) => {
2186
+ return new Promise((resolve, reject) => {
2187
+ var fulfilled = (value) => {
2188
+ try {
2189
+ step(generator.next(value));
2190
+ } catch (e) {
2191
+ reject(e);
2192
+ }
2193
+ };
2194
+ var rejected = (value) => {
2195
+ try {
2196
+ step(generator.throw(value));
2197
+ } catch (e) {
2198
+ reject(e);
2199
+ }
2200
+ };
2201
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2202
+ step((generator = generator.apply(__this, __arguments)).next());
2203
+ });
2204
+ };
2205
+ const useCreateWebhook = (params) => {
2206
+ const { client } = useShipEngine();
2207
+ return useMutation(__spreadProps$3(__spreadValues$3({}, params), {
2208
+ mutationFn: (data) => __async$2(void 0, null, function* () {
2209
+ const result = yield client.webhooks.create(data);
2210
+ return result.data;
2211
+ }),
2212
+ mutationKey: ["useCreateWebhook"],
2213
+ onError
2214
+ }));
2215
+ };
2216
+
2217
+ var __defProp$2 = Object.defineProperty;
2218
+ var __defProps$2 = Object.defineProperties;
2219
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2220
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
2221
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
2222
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
2223
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2224
+ var __spreadValues$2 = (a, b) => {
2225
+ for (var prop in b || (b = {}))
2226
+ if (__hasOwnProp$2.call(b, prop))
2227
+ __defNormalProp$2(a, prop, b[prop]);
2228
+ if (__getOwnPropSymbols$2)
2229
+ for (var prop of __getOwnPropSymbols$2(b)) {
2230
+ if (__propIsEnum$2.call(b, prop))
2231
+ __defNormalProp$2(a, prop, b[prop]);
2232
+ }
2233
+ return a;
2234
+ };
2235
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2236
+ var __async$1 = (__this, __arguments, generator) => {
2237
+ return new Promise((resolve, reject) => {
2238
+ var fulfilled = (value) => {
2239
+ try {
2240
+ step(generator.next(value));
2241
+ } catch (e) {
2242
+ reject(e);
2243
+ }
2244
+ };
2245
+ var rejected = (value) => {
2246
+ try {
2247
+ step(generator.throw(value));
2248
+ } catch (e) {
2249
+ reject(e);
2250
+ }
2251
+ };
2252
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2253
+ step((generator = generator.apply(__this, __arguments)).next());
2254
+ });
2255
+ };
2256
+ const useDeleteWebhook = (params) => {
2257
+ const { client } = useShipEngine();
2258
+ return useMutation(__spreadProps$2(__spreadValues$2({}, params), {
2259
+ mutationFn: (webhookId) => __async$1(void 0, null, function* () {
2260
+ const result = yield client.webhooks.delete(webhookId);
2261
+ return result.data;
2262
+ }),
2263
+ mutationKey: ["useDeleteWebhook"],
2264
+ onError
2265
+ }));
2266
+ };
2267
+
2268
+ var __defProp$1 = Object.defineProperty;
2269
+ var __defProps$1 = Object.defineProperties;
2270
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2271
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2272
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2273
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2274
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2275
+ var __spreadValues$1 = (a, b) => {
2276
+ for (var prop in b || (b = {}))
2277
+ if (__hasOwnProp$1.call(b, prop))
2278
+ __defNormalProp$1(a, prop, b[prop]);
2279
+ if (__getOwnPropSymbols$1)
2280
+ for (var prop of __getOwnPropSymbols$1(b)) {
2281
+ if (__propIsEnum$1.call(b, prop))
2282
+ __defNormalProp$1(a, prop, b[prop]);
2283
+ }
2284
+ return a;
2285
+ };
2286
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2287
+ var __objRest = (source, exclude) => {
2288
+ var target = {};
2289
+ for (var prop in source)
2290
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2291
+ target[prop] = source[prop];
2292
+ if (source != null && __getOwnPropSymbols$1)
2293
+ for (var prop of __getOwnPropSymbols$1(source)) {
2294
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2295
+ target[prop] = source[prop];
2296
+ }
2297
+ return target;
2298
+ };
2299
+ const useListWebhooks = (params) => {
2300
+ const { client } = useShipEngine();
2301
+ const _a = __spreadValues$1({}, params), { queryFnParams } = _a, rest = __objRest(_a, ["queryFnParams"]);
2302
+ return useQuery(__spreadProps$1(__spreadValues$1({}, rest), {
2303
+ onError,
2304
+ queryFn: () => client.webhooks.list(queryFnParams),
2305
+ queryKey: ["useListWebhooks", queryFnParams],
2306
+ select: (result) => result.data
2307
+ }));
2308
+ };
2309
+
2310
+ var __defProp = Object.defineProperty;
2311
+ var __defProps = Object.defineProperties;
2312
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2313
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2314
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2315
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2316
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2317
+ var __spreadValues = (a, b) => {
2318
+ for (var prop in b || (b = {}))
2319
+ if (__hasOwnProp.call(b, prop))
2320
+ __defNormalProp(a, prop, b[prop]);
2321
+ if (__getOwnPropSymbols)
2322
+ for (var prop of __getOwnPropSymbols(b)) {
2323
+ if (__propIsEnum.call(b, prop))
2324
+ __defNormalProp(a, prop, b[prop]);
2325
+ }
2326
+ return a;
2327
+ };
2328
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2329
+ var __async = (__this, __arguments, generator) => {
2330
+ return new Promise((resolve, reject) => {
2331
+ var fulfilled = (value) => {
2332
+ try {
2333
+ step(generator.next(value));
2334
+ } catch (e) {
2335
+ reject(e);
2336
+ }
2337
+ };
2338
+ var rejected = (value) => {
2339
+ try {
2340
+ step(generator.throw(value));
2341
+ } catch (e) {
2342
+ reject(e);
2343
+ }
2344
+ };
2345
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2346
+ step((generator = generator.apply(__this, __arguments)).next());
2347
+ });
2348
+ };
2349
+ const useUpdateWebhook = (params) => {
2350
+ const { client } = useShipEngine();
2351
+ return useMutation(__spreadProps(__spreadValues({}, params), {
2352
+ mutationFn: (newWebhook) => __async(void 0, null, function* () {
2353
+ const result = yield client.webhooks.update(newWebhook);
2354
+ return result.data;
2355
+ }),
2356
+ mutationKey: ["useUpdateWebhook"],
2357
+ onError
2358
+ }));
2359
+ };
2360
+
2361
+ export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, 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, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetInsuranceAccount, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };