@shipengine/react-api 2.6.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.js CHANGED
@@ -72,25 +72,25 @@ const onError = (_errors) => _default();
72
72
 
73
73
  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}();
74
74
 
75
- var __defProp$1 = Object.defineProperty;
76
- var __defProps$1 = Object.defineProperties;
77
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
78
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
79
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
80
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
81
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
82
- var __spreadValues$1 = (a, b) => {
75
+ var __defProp$6 = Object.defineProperty;
76
+ var __defProps$6 = Object.defineProperties;
77
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
78
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
79
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
80
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
81
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
82
+ var __spreadValues$6 = (a, b) => {
83
83
  for (var prop in b || (b = {}))
84
- if (__hasOwnProp$c.call(b, prop))
85
- __defNormalProp$1(a, prop, b[prop]);
86
- if (__getOwnPropSymbols$c)
87
- for (var prop of __getOwnPropSymbols$c(b)) {
88
- if (__propIsEnum$c.call(b, prop))
89
- __defNormalProp$1(a, prop, b[prop]);
84
+ if (__hasOwnProp$h.call(b, prop))
85
+ __defNormalProp$6(a, prop, b[prop]);
86
+ if (__getOwnPropSymbols$h)
87
+ for (var prop of __getOwnPropSymbols$h(b)) {
88
+ if (__propIsEnum$h.call(b, prop))
89
+ __defNormalProp$6(a, prop, b[prop]);
90
90
  }
91
91
  return a;
92
92
  };
93
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
93
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
94
94
  const streams = [];
95
95
  if (process.env.NODE_ENV === "production") {
96
96
  streams.push({
@@ -99,7 +99,7 @@ if (process.env.NODE_ENV === "production") {
99
99
  }
100
100
  const logger = E({
101
101
  name: "shipengine",
102
- serializers: __spreadProps$1(__spreadValues$1({}, k), {
102
+ serializers: __spreadProps$6(__spreadValues$6({}, k), {
103
103
  req: (req) => ({
104
104
  headers: req.headers,
105
105
  method: req.method,
@@ -124,7 +124,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
124
124
  throw error;
125
125
  });
126
126
 
127
- var __async$C = (__this, __arguments, generator) => {
127
+ var __async$F = (__this, __arguments, generator) => {
128
128
  return new Promise((resolve, reject) => {
129
129
  var fulfilled = (value) => {
130
130
  try {
@@ -147,7 +147,7 @@ var __async$C = (__this, __arguments, generator) => {
147
147
  const useCreateAccountImage = () => {
148
148
  const { client } = useShipEngine();
149
149
  return reactQuery.useMutation({
150
- mutationFn: (data) => __async$C(void 0, null, function* () {
150
+ mutationFn: (data) => __async$F(void 0, null, function* () {
151
151
  const result = yield client.accountSettings.createImage(data);
152
152
  return result.data;
153
153
  }),
@@ -156,7 +156,7 @@ const useCreateAccountImage = () => {
156
156
  });
157
157
  };
158
158
 
159
- var __async$B = (__this, __arguments, generator) => {
159
+ var __async$E = (__this, __arguments, generator) => {
160
160
  return new Promise((resolve, reject) => {
161
161
  var fulfilled = (value) => {
162
162
  try {
@@ -179,7 +179,7 @@ var __async$B = (__this, __arguments, generator) => {
179
179
  const useDeleteAccountImage = () => {
180
180
  const { client } = useShipEngine();
181
181
  return reactQuery.useMutation({
182
- mutationFn: (labelImageId) => __async$B(void 0, null, function* () {
182
+ mutationFn: (labelImageId) => __async$E(void 0, null, function* () {
183
183
  const result = yield client.accountSettings.deleteImage(labelImageId);
184
184
  return result.data;
185
185
  }),
@@ -208,7 +208,7 @@ const useGetAccountSettings = () => {
208
208
  });
209
209
  };
210
210
 
211
- var __async$A = (__this, __arguments, generator) => {
211
+ var __async$D = (__this, __arguments, generator) => {
212
212
  return new Promise((resolve, reject) => {
213
213
  var fulfilled = (value) => {
214
214
  try {
@@ -231,7 +231,7 @@ var __async$A = (__this, __arguments, generator) => {
231
231
  const useUpdateAccountImage = () => {
232
232
  const { client } = useShipEngine();
233
233
  return reactQuery.useMutation({
234
- mutationFn: (data) => __async$A(void 0, null, function* () {
234
+ mutationFn: (data) => __async$D(void 0, null, function* () {
235
235
  const result = yield client.accountSettings.updateImage(data);
236
236
  return result.data;
237
237
  }),
@@ -240,7 +240,7 @@ const useUpdateAccountImage = () => {
240
240
  });
241
241
  };
242
242
 
243
- var __async$z = (__this, __arguments, generator) => {
243
+ var __async$C = (__this, __arguments, generator) => {
244
244
  return new Promise((resolve, reject) => {
245
245
  var fulfilled = (value) => {
246
246
  try {
@@ -263,7 +263,7 @@ var __async$z = (__this, __arguments, generator) => {
263
263
  const useUpdateAccountSettings = () => {
264
264
  const { client } = useShipEngine();
265
265
  return reactQuery.useMutation({
266
- mutationFn: (settings) => __async$z(void 0, null, function* () {
266
+ mutationFn: (settings) => __async$C(void 0, null, function* () {
267
267
  const result = yield client.accountSettings.update(settings);
268
268
  return result.data;
269
269
  }),
@@ -272,7 +272,7 @@ const useUpdateAccountSettings = () => {
272
272
  });
273
273
  };
274
274
 
275
- var __async$y = (__this, __arguments, generator) => {
275
+ var __async$B = (__this, __arguments, generator) => {
276
276
  return new Promise((resolve, reject) => {
277
277
  var fulfilled = (value) => {
278
278
  try {
@@ -295,7 +295,7 @@ var __async$y = (__this, __arguments, generator) => {
295
295
  const useParseAddress = () => {
296
296
  const { client } = useShipEngine();
297
297
  return reactQuery.useMutation({
298
- mutationFn: (_0) => __async$y(void 0, [_0], function* ({ address, text }) {
298
+ mutationFn: (_0) => __async$B(void 0, [_0], function* ({ address, text }) {
299
299
  const result = yield client.addresses.parse(text, address);
300
300
  return result.data;
301
301
  }),
@@ -304,7 +304,7 @@ const useParseAddress = () => {
304
304
  });
305
305
  };
306
306
 
307
- var __async$x = (__this, __arguments, generator) => {
307
+ var __async$A = (__this, __arguments, generator) => {
308
308
  return new Promise((resolve, reject) => {
309
309
  var fulfilled = (value) => {
310
310
  try {
@@ -327,7 +327,7 @@ var __async$x = (__this, __arguments, generator) => {
327
327
  const useValidateAddresses = () => {
328
328
  const { client } = useShipEngine();
329
329
  return reactQuery.useMutation({
330
- mutationFn: (addresses) => __async$x(void 0, null, function* () {
330
+ mutationFn: (addresses) => __async$A(void 0, null, function* () {
331
331
  const result = yield client.addresses.validate(addresses);
332
332
  return result.data;
333
333
  }),
@@ -336,7 +336,7 @@ const useValidateAddresses = () => {
336
336
  });
337
337
  };
338
338
 
339
- var __async$w = (__this, __arguments, generator) => {
339
+ var __async$z = (__this, __arguments, generator) => {
340
340
  return new Promise((resolve, reject) => {
341
341
  var fulfilled = (value) => {
342
342
  try {
@@ -359,7 +359,7 @@ var __async$w = (__this, __arguments, generator) => {
359
359
  const useAddFunds = () => {
360
360
  const { client } = useShipEngine();
361
361
  return reactQuery.useMutation({
362
- mutationFn: (_0) => __async$w(void 0, [_0], function* ({ carrierId, funds }) {
362
+ mutationFn: (_0) => __async$z(void 0, [_0], function* ({ carrierId, funds }) {
363
363
  const result = yield client.carriers.addFunds(carrierId, funds);
364
364
  return result.data;
365
365
  }),
@@ -368,7 +368,7 @@ const useAddFunds = () => {
368
368
  });
369
369
  };
370
370
 
371
- var __async$v = (__this, __arguments, generator) => {
371
+ var __async$y = (__this, __arguments, generator) => {
372
372
  return new Promise((resolve, reject) => {
373
373
  var fulfilled = (value) => {
374
374
  try {
@@ -391,7 +391,7 @@ var __async$v = (__this, __arguments, generator) => {
391
391
  const useConnectCarrier = () => {
392
392
  const { client } = useShipEngine();
393
393
  return reactQuery.useMutation({
394
- mutationFn: (params) => __async$v(void 0, null, function* () {
394
+ mutationFn: (params) => __async$y(void 0, null, function* () {
395
395
  const result = yield client.carriers.connect(params);
396
396
  return result.data;
397
397
  }),
@@ -510,22 +510,22 @@ const useListCarriers = () => {
510
510
  });
511
511
  };
512
512
 
513
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
514
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
515
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
516
- var __objRest$a = (source, exclude) => {
513
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
514
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
515
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
516
+ var __objRest$b = (source, exclude) => {
517
517
  var target = {};
518
518
  for (var prop in source)
519
- if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
519
+ if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
520
520
  target[prop] = source[prop];
521
- if (source != null && __getOwnPropSymbols$b)
522
- for (var prop of __getOwnPropSymbols$b(source)) {
523
- if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
521
+ if (source != null && __getOwnPropSymbols$g)
522
+ for (var prop of __getOwnPropSymbols$g(source)) {
523
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
524
524
  target[prop] = source[prop];
525
525
  }
526
526
  return target;
527
527
  };
528
- var __async$u = (__this, __arguments, generator) => {
528
+ var __async$x = (__this, __arguments, generator) => {
529
529
  return new Promise((resolve, reject) => {
530
530
  var fulfilled = (value) => {
531
531
  try {
@@ -549,8 +549,8 @@ const useUpdateAutoFunding = () => {
549
549
  const { client } = useShipEngine();
550
550
  const queryClient = reactQuery.useQueryClient();
551
551
  return reactQuery.useMutation({
552
- mutationFn: (_a) => __async$u(void 0, null, function* () {
553
- var _b = _a, { carrierId } = _b, options = __objRest$a(_b, ["carrierId"]);
552
+ mutationFn: (_a) => __async$x(void 0, null, function* () {
553
+ var _b = _a, { carrierId } = _b, options = __objRest$b(_b, ["carrierId"]);
554
554
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
555
555
  return result.data;
556
556
  }),
@@ -579,7 +579,7 @@ const useGetZonesByCarrier = (carrierId) => {
579
579
  });
580
580
  };
581
581
 
582
- var __async$t = (__this, __arguments, generator) => {
582
+ var __async$w = (__this, __arguments, generator) => {
583
583
  return new Promise((resolve, reject) => {
584
584
  var fulfilled = (value) => {
585
585
  try {
@@ -602,7 +602,7 @@ var __async$t = (__this, __arguments, generator) => {
602
602
  const useDeleteCarrier = () => {
603
603
  const { client } = useShipEngine();
604
604
  return reactQuery.useMutation({
605
- mutationFn: (carrierId) => __async$t(void 0, null, function* () {
605
+ mutationFn: (carrierId) => __async$w(void 0, null, function* () {
606
606
  const result = yield client.carriers.delete(carrierId);
607
607
  return result.data;
608
608
  }),
@@ -611,24 +611,24 @@ const useDeleteCarrier = () => {
611
611
  });
612
612
  };
613
613
 
614
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
615
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
616
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
617
- var __objRest$9 = (source, exclude) => {
614
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
615
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
616
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
617
+ var __objRest$a = (source, exclude) => {
618
618
  var target = {};
619
619
  for (var prop in source)
620
- if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
620
+ if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
621
621
  target[prop] = source[prop];
622
- if (source != null && __getOwnPropSymbols$a)
623
- for (var prop of __getOwnPropSymbols$a(source)) {
624
- if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
622
+ if (source != null && __getOwnPropSymbols$f)
623
+ for (var prop of __getOwnPropSymbols$f(source)) {
624
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
625
625
  target[prop] = source[prop];
626
626
  }
627
627
  return target;
628
628
  };
629
629
  const useGetCarrierConnectionForm = (_params) => {
630
630
  const { client } = useShipEngine();
631
- const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$9(_a, ["carrierName", "enabled"]);
631
+ const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$a(_a, ["carrierName", "enabled"]);
632
632
  return reactQuery.useQuery({
633
633
  enabled,
634
634
  onError,
@@ -638,24 +638,24 @@ const useGetCarrierConnectionForm = (_params) => {
638
638
  });
639
639
  };
640
640
 
641
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
642
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
643
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
644
- var __objRest$8 = (source, exclude) => {
641
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
642
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
643
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
644
+ var __objRest$9 = (source, exclude) => {
645
645
  var target = {};
646
646
  for (var prop in source)
647
- if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
647
+ if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
648
648
  target[prop] = source[prop];
649
- if (source != null && __getOwnPropSymbols$9)
650
- for (var prop of __getOwnPropSymbols$9(source)) {
651
- if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
649
+ if (source != null && __getOwnPropSymbols$e)
650
+ for (var prop of __getOwnPropSymbols$e(source)) {
651
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
652
652
  target[prop] = source[prop];
653
653
  }
654
654
  return target;
655
655
  };
656
656
  const useListCarrierConnections = (_params) => {
657
657
  const { client } = useShipEngine();
658
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
658
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
659
659
  return reactQuery.useQuery({
660
660
  enabled,
661
661
  onError,
@@ -665,7 +665,7 @@ const useListCarrierConnections = (_params) => {
665
665
  });
666
666
  };
667
667
 
668
- var __async$s = (__this, __arguments, generator) => {
668
+ var __async$v = (__this, __arguments, generator) => {
669
669
  return new Promise((resolve, reject) => {
670
670
  var fulfilled = (value) => {
671
671
  try {
@@ -688,7 +688,7 @@ var __async$s = (__this, __arguments, generator) => {
688
688
  const useConnectCarrierAccount = () => {
689
689
  const { client } = useShipEngine();
690
690
  return reactQuery.useMutation({
691
- mutationFn: (_0) => __async$s(void 0, [_0], function* ({ carrierName, formData }) {
691
+ mutationFn: (_0) => __async$v(void 0, [_0], function* ({ carrierName, formData }) {
692
692
  const result = yield client.connections.connectCarrier(carrierName, formData);
693
693
  if (result.status > 300 && result.status < 309) {
694
694
  result.data.redirectUrl = result.request.res.responseUrl;
@@ -710,7 +710,7 @@ const useListCustomPackageTypes = () => {
710
710
  });
711
711
  };
712
712
 
713
- var __async$r = (__this, __arguments, generator) => {
713
+ var __async$u = (__this, __arguments, generator) => {
714
714
  return new Promise((resolve, reject) => {
715
715
  var fulfilled = (value) => {
716
716
  try {
@@ -733,7 +733,7 @@ var __async$r = (__this, __arguments, generator) => {
733
733
  const useCreateFundingSource = () => {
734
734
  const { client } = useShipEngine();
735
735
  return reactQuery.useMutation({
736
- mutationFn: (fundingSource) => __async$r(void 0, null, function* () {
736
+ mutationFn: (fundingSource) => __async$u(void 0, null, function* () {
737
737
  const result = yield client.fundingSources.create(fundingSource);
738
738
  return result.data;
739
739
  }),
@@ -742,7 +742,7 @@ const useCreateFundingSource = () => {
742
742
  });
743
743
  };
744
744
 
745
- var __async$q = (__this, __arguments, generator) => {
745
+ var __async$t = (__this, __arguments, generator) => {
746
746
  return new Promise((resolve, reject) => {
747
747
  var fulfilled = (value) => {
748
748
  try {
@@ -765,7 +765,7 @@ var __async$q = (__this, __arguments, generator) => {
765
765
  const useFundingSourcesAddFunds = () => {
766
766
  const { client } = useShipEngine();
767
767
  return reactQuery.useMutation({
768
- mutationFn: (_0) => __async$q(void 0, [_0], function* ({ funds, fundingSourceId }) {
768
+ mutationFn: (_0) => __async$t(void 0, [_0], function* ({ funds, fundingSourceId }) {
769
769
  const result = yield client.fundingSources.addFunds(funds, fundingSourceId);
770
770
  return result.data;
771
771
  }),
@@ -794,7 +794,7 @@ const useListFundingSources = () => {
794
794
  });
795
795
  };
796
796
 
797
- var __async$p = (__this, __arguments, generator) => {
797
+ var __async$s = (__this, __arguments, generator) => {
798
798
  return new Promise((resolve, reject) => {
799
799
  var fulfilled = (value) => {
800
800
  try {
@@ -817,7 +817,7 @@ var __async$p = (__this, __arguments, generator) => {
817
817
  const useRegisterCarrier = () => {
818
818
  const { client } = useShipEngine();
819
819
  return reactQuery.useMutation({
820
- mutationFn: (carrier) => __async$p(void 0, null, function* () {
820
+ mutationFn: (carrier) => __async$s(void 0, null, function* () {
821
821
  const result = yield client.fundingSources.registerCarrier(carrier);
822
822
  return result.data;
823
823
  }),
@@ -826,7 +826,7 @@ const useRegisterCarrier = () => {
826
826
  });
827
827
  };
828
828
 
829
- var __async$o = (__this, __arguments, generator) => {
829
+ var __async$r = (__this, __arguments, generator) => {
830
830
  return new Promise((resolve, reject) => {
831
831
  var fulfilled = (value) => {
832
832
  try {
@@ -849,7 +849,7 @@ var __async$o = (__this, __arguments, generator) => {
849
849
  const useUpdateFundingSource = () => {
850
850
  const { client } = useShipEngine();
851
851
  return reactQuery.useMutation({
852
- mutationFn: (_0) => __async$o(void 0, [_0], function* ({
852
+ mutationFn: (_0) => __async$r(void 0, [_0], function* ({
853
853
  billingInfo,
854
854
  creditCardInfo,
855
855
  fundingSourceId
@@ -903,22 +903,22 @@ const useGetInsuranceAccount = (insuranceProvider) => {
903
903
  });
904
904
  };
905
905
 
906
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
907
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
908
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
909
- var __objRest$7 = (source, exclude) => {
906
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
907
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
908
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
909
+ var __objRest$8 = (source, exclude) => {
910
910
  var target = {};
911
911
  for (var prop in source)
912
- if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
912
+ if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
913
913
  target[prop] = source[prop];
914
- if (source != null && __getOwnPropSymbols$8)
915
- for (var prop of __getOwnPropSymbols$8(source)) {
916
- if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
914
+ if (source != null && __getOwnPropSymbols$d)
915
+ for (var prop of __getOwnPropSymbols$d(source)) {
916
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
917
917
  target[prop] = source[prop];
918
918
  }
919
919
  return target;
920
920
  };
921
- var __async$n = (__this, __arguments, generator) => {
921
+ var __async$q = (__this, __arguments, generator) => {
922
922
  return new Promise((resolve, reject) => {
923
923
  var fulfilled = (value) => {
924
924
  try {
@@ -941,8 +941,8 @@ var __async$n = (__this, __arguments, generator) => {
941
941
  const useAddInsuranceFunds = () => {
942
942
  const { client } = useShipEngine();
943
943
  return reactQuery.useMutation({
944
- mutationFn: (_a) => __async$n(void 0, null, function* () {
945
- var _b = _a, { insuranceProvider } = _b, rest = __objRest$7(_b, ["insuranceProvider"]);
944
+ mutationFn: (_a) => __async$q(void 0, null, function* () {
945
+ var _b = _a, { insuranceProvider } = _b, rest = __objRest$8(_b, ["insuranceProvider"]);
946
946
  const result = yield client.insurance.addFunds(insuranceProvider, rest);
947
947
  return result.data;
948
948
  }),
@@ -951,22 +951,22 @@ const useAddInsuranceFunds = () => {
951
951
  });
952
952
  };
953
953
 
954
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
955
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
956
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
957
- var __objRest$6 = (source, exclude) => {
954
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
955
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
956
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
957
+ var __objRest$7 = (source, exclude) => {
958
958
  var target = {};
959
959
  for (var prop in source)
960
- if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
960
+ if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
961
961
  target[prop] = source[prop];
962
- if (source != null && __getOwnPropSymbols$7)
963
- for (var prop of __getOwnPropSymbols$7(source)) {
964
- if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
962
+ if (source != null && __getOwnPropSymbols$c)
963
+ for (var prop of __getOwnPropSymbols$c(source)) {
964
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
965
965
  target[prop] = source[prop];
966
966
  }
967
967
  return target;
968
968
  };
969
- var __async$m = (__this, __arguments, generator) => {
969
+ var __async$p = (__this, __arguments, generator) => {
970
970
  return new Promise((resolve, reject) => {
971
971
  var fulfilled = (value) => {
972
972
  try {
@@ -989,8 +989,8 @@ var __async$m = (__this, __arguments, generator) => {
989
989
  const useCreateLabel = () => {
990
990
  const { client } = useShipEngine();
991
991
  return reactQuery.useMutation({
992
- mutationFn: (_a) => __async$m(void 0, null, function* () {
993
- var _b = _a, { rateId } = _b, options = __objRest$6(_b, ["rateId"]);
992
+ mutationFn: (_a) => __async$p(void 0, null, function* () {
993
+ var _b = _a, { rateId } = _b, options = __objRest$7(_b, ["rateId"]);
994
994
  const result = yield client.labels.createByRateId(rateId, options);
995
995
  return result.data;
996
996
  }),
@@ -1014,24 +1014,24 @@ const useGetLabel = (labelId) => {
1014
1014
  });
1015
1015
  };
1016
1016
 
1017
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1018
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1019
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1020
- var __objRest$5 = (source, exclude) => {
1017
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1018
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1019
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1020
+ var __objRest$6 = (source, exclude) => {
1021
1021
  var target = {};
1022
1022
  for (var prop in source)
1023
- if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1023
+ if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
1024
1024
  target[prop] = source[prop];
1025
- if (source != null && __getOwnPropSymbols$6)
1026
- for (var prop of __getOwnPropSymbols$6(source)) {
1027
- if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1025
+ if (source != null && __getOwnPropSymbols$b)
1026
+ for (var prop of __getOwnPropSymbols$b(source)) {
1027
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
1028
1028
  target[prop] = source[prop];
1029
1029
  }
1030
1030
  return target;
1031
1031
  };
1032
1032
  const useListLabels = (_params) => {
1033
1033
  const { client } = useShipEngine();
1034
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$5(_a, ["enabled"]);
1034
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$6(_a, ["enabled"]);
1035
1035
  return reactQuery.useQuery({
1036
1036
  enabled,
1037
1037
  onError,
@@ -1041,7 +1041,7 @@ const useListLabels = (_params) => {
1041
1041
  });
1042
1042
  };
1043
1043
 
1044
- var __async$l = (__this, __arguments, generator) => {
1044
+ var __async$o = (__this, __arguments, generator) => {
1045
1045
  return new Promise((resolve, reject) => {
1046
1046
  var fulfilled = (value) => {
1047
1047
  try {
@@ -1064,7 +1064,7 @@ var __async$l = (__this, __arguments, generator) => {
1064
1064
  const useVoidLabel = () => {
1065
1065
  const { client } = useShipEngine();
1066
1066
  return reactQuery.useMutation({
1067
- mutationFn: (labelId) => __async$l(void 0, null, function* () {
1067
+ mutationFn: (labelId) => __async$o(void 0, null, function* () {
1068
1068
  const result = yield client.labels.void(labelId);
1069
1069
  return result.data;
1070
1070
  }),
@@ -1083,7 +1083,7 @@ const useListOrderSources = () => {
1083
1083
  });
1084
1084
  };
1085
1085
 
1086
- var __async$k = (__this, __arguments, generator) => {
1086
+ var __async$n = (__this, __arguments, generator) => {
1087
1087
  return new Promise((resolve, reject) => {
1088
1088
  var fulfilled = (value) => {
1089
1089
  try {
@@ -1106,7 +1106,7 @@ var __async$k = (__this, __arguments, generator) => {
1106
1106
  const useRefreshOrderSourceAsync = () => {
1107
1107
  const { client } = useShipEngine();
1108
1108
  return reactQuery.useMutation({
1109
- mutationFn: (orderSourceId) => __async$k(void 0, null, function* () {
1109
+ mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1110
1110
  const result = yield client.orderSources.refresh(orderSourceId);
1111
1111
  return result.data;
1112
1112
  }),
@@ -1117,9 +1117,9 @@ const useRefreshOrderSource = () => {
1117
1117
  const { client } = useShipEngine();
1118
1118
  const { mutateAsync: refreshOrderSourceAsync } = useRefreshOrderSourceAsync();
1119
1119
  return reactQuery.useMutation({
1120
- mutationFn: (orderSourceId) => __async$k(void 0, null, function* () {
1120
+ mutationFn: (orderSourceId) => __async$n(void 0, null, function* () {
1121
1121
  yield refreshOrderSourceAsync(orderSourceId);
1122
- const waitResult = yield retryUntil(() => __async$k(void 0, null, function* () {
1122
+ const waitResult = yield retryUntil(() => __async$n(void 0, null, function* () {
1123
1123
  const { data: checkResult } = yield client.orderSources.get(orderSourceId);
1124
1124
  if (["preparing_update", "updating"].includes(checkResult.refreshInfo.status)) {
1125
1125
  throw new jsApi.SE.CodedError("Order source is still refreshing");
@@ -1133,7 +1133,7 @@ const useRefreshOrderSource = () => {
1133
1133
  });
1134
1134
  };
1135
1135
 
1136
- var __async$j = (__this, __arguments, generator) => {
1136
+ var __async$m = (__this, __arguments, generator) => {
1137
1137
  return new Promise((resolve, reject) => {
1138
1138
  var fulfilled = (value) => {
1139
1139
  try {
@@ -1156,7 +1156,7 @@ var __async$j = (__this, __arguments, generator) => {
1156
1156
  const useDeactivateOrderSource = () => {
1157
1157
  const { client } = useShipEngine();
1158
1158
  return reactQuery.useMutation({
1159
- mutationFn: (orderSourceId) => __async$j(void 0, null, function* () {
1159
+ mutationFn: (orderSourceId) => __async$m(void 0, null, function* () {
1160
1160
  const result = yield client.orderSources.deactivate(orderSourceId);
1161
1161
  return result.data;
1162
1162
  }),
@@ -1165,7 +1165,7 @@ const useDeactivateOrderSource = () => {
1165
1165
  });
1166
1166
  };
1167
1167
 
1168
- var __async$i = (__this, __arguments, generator) => {
1168
+ var __async$l = (__this, __arguments, generator) => {
1169
1169
  return new Promise((resolve, reject) => {
1170
1170
  var fulfilled = (value) => {
1171
1171
  try {
@@ -1188,7 +1188,7 @@ var __async$i = (__this, __arguments, generator) => {
1188
1188
  const useCreateRateCard = () => {
1189
1189
  const { client } = useShipEngine();
1190
1190
  return reactQuery.useMutation({
1191
- mutationFn: (rateCard) => __async$i(void 0, null, function* () {
1191
+ mutationFn: (rateCard) => __async$l(void 0, null, function* () {
1192
1192
  const result = yield client.rateCards.create(rateCard);
1193
1193
  return result.data;
1194
1194
  }),
@@ -1235,7 +1235,7 @@ const useListRateCards = (carrierIds) => {
1235
1235
  });
1236
1236
  };
1237
1237
 
1238
- var __async$h = (__this, __arguments, generator) => {
1238
+ var __async$k = (__this, __arguments, generator) => {
1239
1239
  return new Promise((resolve, reject) => {
1240
1240
  var fulfilled = (value) => {
1241
1241
  try {
@@ -1258,7 +1258,7 @@ var __async$h = (__this, __arguments, generator) => {
1258
1258
  const usePublishRateCard = () => {
1259
1259
  const { client } = useShipEngine();
1260
1260
  return reactQuery.useMutation({
1261
- mutationFn: (rateCardId) => __async$h(void 0, null, function* () {
1261
+ mutationFn: (rateCardId) => __async$k(void 0, null, function* () {
1262
1262
  return yield client.rateCards.publish(rateCardId);
1263
1263
  }),
1264
1264
  mutationKey: ["usePublishRateCard"],
@@ -1266,7 +1266,7 @@ const usePublishRateCard = () => {
1266
1266
  });
1267
1267
  };
1268
1268
 
1269
- var __async$g = (__this, __arguments, generator) => {
1269
+ var __async$j = (__this, __arguments, generator) => {
1270
1270
  return new Promise((resolve, reject) => {
1271
1271
  var fulfilled = (value) => {
1272
1272
  try {
@@ -1289,7 +1289,7 @@ var __async$g = (__this, __arguments, generator) => {
1289
1289
  const useUpdateRateCard = () => {
1290
1290
  const { client } = useShipEngine();
1291
1291
  return reactQuery.useMutation({
1292
- mutationFn: (rateCard) => __async$g(void 0, null, function* () {
1292
+ mutationFn: (rateCard) => __async$j(void 0, null, function* () {
1293
1293
  const result = yield client.rateCards.update(rateCard);
1294
1294
  return result.data;
1295
1295
  }),
@@ -1298,7 +1298,7 @@ const useUpdateRateCard = () => {
1298
1298
  });
1299
1299
  };
1300
1300
 
1301
- var __async$f = (__this, __arguments, generator) => {
1301
+ var __async$i = (__this, __arguments, generator) => {
1302
1302
  return new Promise((resolve, reject) => {
1303
1303
  var fulfilled = (value) => {
1304
1304
  try {
@@ -1321,7 +1321,7 @@ var __async$f = (__this, __arguments, generator) => {
1321
1321
  const useUploadRateCard = () => {
1322
1322
  const { client } = useShipEngine();
1323
1323
  return reactQuery.useMutation({
1324
- mutationFn: (_0) => __async$f(void 0, [_0], function* ({ rateCardId, file }) {
1324
+ mutationFn: (_0) => __async$i(void 0, [_0], function* ({ rateCardId, file }) {
1325
1325
  const result = yield client.rateCards.upload(rateCardId, file);
1326
1326
  return result.data;
1327
1327
  }),
@@ -1330,7 +1330,7 @@ const useUploadRateCard = () => {
1330
1330
  });
1331
1331
  };
1332
1332
 
1333
- var __async$e = (__this, __arguments, generator) => {
1333
+ var __async$h = (__this, __arguments, generator) => {
1334
1334
  return new Promise((resolve, reject) => {
1335
1335
  var fulfilled = (value) => {
1336
1336
  try {
@@ -1353,7 +1353,7 @@ var __async$e = (__this, __arguments, generator) => {
1353
1353
  const useDeleteRateCard = () => {
1354
1354
  const { client } = useShipEngine();
1355
1355
  return reactQuery.useMutation({
1356
- mutationFn: (rateCardId) => __async$e(void 0, null, function* () {
1356
+ mutationFn: (rateCardId) => __async$h(void 0, null, function* () {
1357
1357
  const result = yield client.rateCards.delete(rateCardId);
1358
1358
  return result.data;
1359
1359
  }),
@@ -1362,7 +1362,7 @@ const useDeleteRateCard = () => {
1362
1362
  });
1363
1363
  };
1364
1364
 
1365
- var __async$d = (__this, __arguments, generator) => {
1365
+ var __async$g = (__this, __arguments, generator) => {
1366
1366
  return new Promise((resolve, reject) => {
1367
1367
  var fulfilled = (value) => {
1368
1368
  try {
@@ -1385,7 +1385,7 @@ var __async$d = (__this, __arguments, generator) => {
1385
1385
  const useCalculateRates = () => {
1386
1386
  const { client } = useShipEngine();
1387
1387
  return reactQuery.useMutation({
1388
- mutationFn: (_0) => __async$d(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1388
+ mutationFn: (_0) => __async$g(void 0, [_0], function* ({ rateOptions, shipmentId }) {
1389
1389
  const result = yield client.rates.calculateByShipmentId(shipmentId, rateOptions);
1390
1390
  return result.data;
1391
1391
  }),
@@ -1420,22 +1420,22 @@ const useListSalesOrders = (params = {}) => {
1420
1420
  });
1421
1421
  };
1422
1422
 
1423
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1424
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1425
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1426
- var __objRest$4 = (source, exclude) => {
1423
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1424
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1425
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1426
+ var __objRest$5 = (source, exclude) => {
1427
1427
  var target = {};
1428
1428
  for (var prop in source)
1429
- if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
1429
+ if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
1430
1430
  target[prop] = source[prop];
1431
- if (source != null && __getOwnPropSymbols$5)
1432
- for (var prop of __getOwnPropSymbols$5(source)) {
1433
- if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
1431
+ if (source != null && __getOwnPropSymbols$a)
1432
+ for (var prop of __getOwnPropSymbols$a(source)) {
1433
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
1434
1434
  target[prop] = source[prop];
1435
1435
  }
1436
1436
  return target;
1437
1437
  };
1438
- var __async$c = (__this, __arguments, generator) => {
1438
+ var __async$f = (__this, __arguments, generator) => {
1439
1439
  return new Promise((resolve, reject) => {
1440
1440
  var fulfilled = (value) => {
1441
1441
  try {
@@ -1458,8 +1458,8 @@ var __async$c = (__this, __arguments, generator) => {
1458
1458
  const useNotifySalesOrderShipped = () => {
1459
1459
  const { client } = useShipEngine();
1460
1460
  return reactQuery.useMutation({
1461
- mutationFn: (_a) => __async$c(void 0, null, function* () {
1462
- var _b = _a, { salesOrderId } = _b, tracking = __objRest$4(_b, ["salesOrderId"]);
1461
+ mutationFn: (_a) => __async$f(void 0, null, function* () {
1462
+ var _b = _a, { salesOrderId } = _b, tracking = __objRest$5(_b, ["salesOrderId"]);
1463
1463
  const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
1464
1464
  return result.data;
1465
1465
  }),
@@ -1468,22 +1468,22 @@ const useNotifySalesOrderShipped = () => {
1468
1468
  });
1469
1469
  };
1470
1470
 
1471
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1472
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1473
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1474
- var __objRest$3 = (source, exclude) => {
1471
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1472
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1473
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1474
+ var __objRest$4 = (source, exclude) => {
1475
1475
  var target = {};
1476
1476
  for (var prop in source)
1477
- if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1477
+ if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
1478
1478
  target[prop] = source[prop];
1479
- if (source != null && __getOwnPropSymbols$4)
1480
- for (var prop of __getOwnPropSymbols$4(source)) {
1481
- if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1479
+ if (source != null && __getOwnPropSymbols$9)
1480
+ for (var prop of __getOwnPropSymbols$9(source)) {
1481
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
1482
1482
  target[prop] = source[prop];
1483
1483
  }
1484
1484
  return target;
1485
1485
  };
1486
- var __async$b = (__this, __arguments, generator) => {
1486
+ var __async$e = (__this, __arguments, generator) => {
1487
1487
  return new Promise((resolve, reject) => {
1488
1488
  var fulfilled = (value) => {
1489
1489
  try {
@@ -1506,8 +1506,8 @@ var __async$b = (__this, __arguments, generator) => {
1506
1506
  const useCreateSalesOrderShipment = () => {
1507
1507
  const { client } = useShipEngine();
1508
1508
  return reactQuery.useMutation({
1509
- mutationFn: (_a) => __async$b(void 0, null, function* () {
1510
- var _b = _a, { salesOrderId } = _b, shipment = __objRest$3(_b, ["salesOrderId"]);
1509
+ mutationFn: (_a) => __async$e(void 0, null, function* () {
1510
+ var _b = _a, { salesOrderId } = _b, shipment = __objRest$4(_b, ["salesOrderId"]);
1511
1511
  const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
1512
1512
  return result.data;
1513
1513
  }),
@@ -1542,22 +1542,22 @@ const useListSalesOrderShipments = (params) => {
1542
1542
  });
1543
1543
  };
1544
1544
 
1545
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
1546
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
1547
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
1548
- var __objRest$2 = (source, exclude) => {
1545
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1546
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1547
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1548
+ var __objRest$3 = (source, exclude) => {
1549
1549
  var target = {};
1550
1550
  for (var prop in source)
1551
- if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
1551
+ if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
1552
1552
  target[prop] = source[prop];
1553
- if (source != null && __getOwnPropSymbols$3)
1554
- for (var prop of __getOwnPropSymbols$3(source)) {
1555
- if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
1553
+ if (source != null && __getOwnPropSymbols$8)
1554
+ for (var prop of __getOwnPropSymbols$8(source)) {
1555
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
1556
1556
  target[prop] = source[prop];
1557
1557
  }
1558
1558
  return target;
1559
1559
  };
1560
- var __async$a = (__this, __arguments, generator) => {
1560
+ var __async$d = (__this, __arguments, generator) => {
1561
1561
  return new Promise((resolve, reject) => {
1562
1562
  var fulfilled = (value) => {
1563
1563
  try {
@@ -1580,8 +1580,8 @@ var __async$a = (__this, __arguments, generator) => {
1580
1580
  const useUpdateSalesOrderShipment = () => {
1581
1581
  const { client } = useShipEngine();
1582
1582
  return reactQuery.useMutation({
1583
- mutationFn: (_a) => __async$a(void 0, null, function* () {
1584
- var _b = _a, { shipmentId } = _b, shipment = __objRest$2(_b, ["shipmentId"]);
1583
+ mutationFn: (_a) => __async$d(void 0, null, function* () {
1584
+ var _b = _a, { shipmentId } = _b, shipment = __objRest$3(_b, ["shipmentId"]);
1585
1585
  const result = yield client.salesOrderShipments.update(shipmentId, shipment);
1586
1586
  return result.data;
1587
1587
  }),
@@ -1590,26 +1590,26 @@ const useUpdateSalesOrderShipment = () => {
1590
1590
  });
1591
1591
  };
1592
1592
 
1593
- var __defProp = Object.defineProperty;
1594
- var __defProps = Object.defineProperties;
1595
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1596
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
1597
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
1598
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
1599
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1600
- var __spreadValues = (a, b) => {
1593
+ var __defProp$5 = Object.defineProperty;
1594
+ var __defProps$5 = Object.defineProperties;
1595
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1596
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1597
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1598
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1599
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1600
+ var __spreadValues$5 = (a, b) => {
1601
1601
  for (var prop in b || (b = {}))
1602
- if (__hasOwnProp$2.call(b, prop))
1603
- __defNormalProp(a, prop, b[prop]);
1604
- if (__getOwnPropSymbols$2)
1605
- for (var prop of __getOwnPropSymbols$2(b)) {
1606
- if (__propIsEnum$2.call(b, prop))
1607
- __defNormalProp(a, prop, b[prop]);
1602
+ if (__hasOwnProp$7.call(b, prop))
1603
+ __defNormalProp$5(a, prop, b[prop]);
1604
+ if (__getOwnPropSymbols$7)
1605
+ for (var prop of __getOwnPropSymbols$7(b)) {
1606
+ if (__propIsEnum$7.call(b, prop))
1607
+ __defNormalProp$5(a, prop, b[prop]);
1608
1608
  }
1609
1609
  return a;
1610
1610
  };
1611
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
1612
- var __async$9 = (__this, __arguments, generator) => {
1611
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1612
+ var __async$c = (__this, __arguments, generator) => {
1613
1613
  return new Promise((resolve, reject) => {
1614
1614
  var fulfilled = (value) => {
1615
1615
  try {
@@ -1632,7 +1632,7 @@ var __async$9 = (__this, __arguments, generator) => {
1632
1632
  const useCreateShipment = () => {
1633
1633
  const { client } = useShipEngine();
1634
1634
  return reactQuery.useMutation({
1635
- mutationFn: (shipment) => __async$9(void 0, null, function* () {
1635
+ mutationFn: (shipment) => __async$c(void 0, null, function* () {
1636
1636
  var _a;
1637
1637
  if (shipment.warehouseId === void 0) {
1638
1638
  throw new jsApi.SE.CodedError("errorMessages.noWarehouses", {
@@ -1650,7 +1650,7 @@ const useCreateShipment = () => {
1650
1650
  postalCode: "",
1651
1651
  stateProvince: ""
1652
1652
  };
1653
- return (yield client.shipments.create(__spreadProps(__spreadValues({}, shipment), {
1653
+ return (yield client.shipments.create(__spreadProps$5(__spreadValues$5({}, shipment), {
1654
1654
  shipTo
1655
1655
  }))).data;
1656
1656
  }),
@@ -1691,23 +1691,23 @@ const useGetShipment = (shipmentId) => {
1691
1691
  });
1692
1692
  };
1693
1693
 
1694
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
1695
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
1696
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
1697
- var __objRest$1 = (source, exclude) => {
1694
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
1695
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
1696
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
1697
+ var __objRest$2 = (source, exclude) => {
1698
1698
  var target = {};
1699
1699
  for (var prop in source)
1700
- if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
1700
+ if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
1701
1701
  target[prop] = source[prop];
1702
- if (source != null && __getOwnPropSymbols$1)
1703
- for (var prop of __getOwnPropSymbols$1(source)) {
1704
- if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
1702
+ if (source != null && __getOwnPropSymbols$6)
1703
+ for (var prop of __getOwnPropSymbols$6(source)) {
1704
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
1705
1705
  target[prop] = source[prop];
1706
1706
  }
1707
1707
  return target;
1708
1708
  };
1709
1709
  const useListShipments = (_params) => {
1710
- const _a = _params || {}, { enabled = true } = _a, params = __objRest$1(_a, ["enabled"]);
1710
+ const _a = _params || {}, { enabled = true } = _a, params = __objRest$2(_a, ["enabled"]);
1711
1711
  const { client } = useShipEngine();
1712
1712
  return reactQuery.useQuery({
1713
1713
  enabled,
@@ -1718,19 +1718,38 @@ const useListShipments = (_params) => {
1718
1718
  });
1719
1719
  };
1720
1720
 
1721
- const useListShippingRules = () => {
1721
+ var __defProp$4 = Object.defineProperty;
1722
+ var __defProps$4 = Object.defineProperties;
1723
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1724
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
1725
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
1726
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
1727
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1728
+ var __spreadValues$4 = (a, b) => {
1729
+ for (var prop in b || (b = {}))
1730
+ if (__hasOwnProp$5.call(b, prop))
1731
+ __defNormalProp$4(a, prop, b[prop]);
1732
+ if (__getOwnPropSymbols$5)
1733
+ for (var prop of __getOwnPropSymbols$5(b)) {
1734
+ if (__propIsEnum$5.call(b, prop))
1735
+ __defNormalProp$4(a, prop, b[prop]);
1736
+ }
1737
+ return a;
1738
+ };
1739
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1740
+ const useListShippingRules = (params) => {
1722
1741
  const { client } = useShipEngine();
1723
- return reactQuery.useQuery({
1742
+ return reactQuery.useQuery(__spreadProps$4(__spreadValues$4({}, params), {
1724
1743
  onError,
1725
1744
  queryFn: () => {
1726
1745
  return client.shippingRules.list();
1727
1746
  },
1728
1747
  queryKey: ["useListShippingRules"],
1729
1748
  select: (result) => result.data.shippingRules
1730
- });
1749
+ }));
1731
1750
  };
1732
1751
 
1733
- var __async$8 = (__this, __arguments, generator) => {
1752
+ var __async$b = (__this, __arguments, generator) => {
1734
1753
  return new Promise((resolve, reject) => {
1735
1754
  var fulfilled = (value) => {
1736
1755
  try {
@@ -1753,7 +1772,7 @@ var __async$8 = (__this, __arguments, generator) => {
1753
1772
  const useCreateShippingRule = () => {
1754
1773
  const { client } = useShipEngine();
1755
1774
  return reactQuery.useMutation({
1756
- mutationFn: (shippingRule) => __async$8(void 0, null, function* () {
1775
+ mutationFn: (shippingRule) => __async$b(void 0, null, function* () {
1757
1776
  const result = yield client.shippingRules.create(shippingRule);
1758
1777
  return result.data;
1759
1778
  }),
@@ -1762,7 +1781,7 @@ const useCreateShippingRule = () => {
1762
1781
  });
1763
1782
  };
1764
1783
 
1765
- var __async$7 = (__this, __arguments, generator) => {
1784
+ var __async$a = (__this, __arguments, generator) => {
1766
1785
  return new Promise((resolve, reject) => {
1767
1786
  var fulfilled = (value) => {
1768
1787
  try {
@@ -1785,7 +1804,7 @@ var __async$7 = (__this, __arguments, generator) => {
1785
1804
  const useDeleteShippingRule = () => {
1786
1805
  const { client } = useShipEngine();
1787
1806
  return reactQuery.useMutation({
1788
- mutationFn: (shippingRuleId) => __async$7(void 0, null, function* () {
1807
+ mutationFn: (shippingRuleId) => __async$a(void 0, null, function* () {
1789
1808
  const result = yield client.shippingRules.delete(shippingRuleId);
1790
1809
  return result.data;
1791
1810
  }),
@@ -1794,7 +1813,7 @@ const useDeleteShippingRule = () => {
1794
1813
  });
1795
1814
  };
1796
1815
 
1797
- var __async$6 = (__this, __arguments, generator) => {
1816
+ var __async$9 = (__this, __arguments, generator) => {
1798
1817
  return new Promise((resolve, reject) => {
1799
1818
  var fulfilled = (value) => {
1800
1819
  try {
@@ -1817,7 +1836,7 @@ var __async$6 = (__this, __arguments, generator) => {
1817
1836
  const useEditShippingRule = () => {
1818
1837
  const { client } = useShipEngine();
1819
1838
  return reactQuery.useMutation({
1820
- mutationFn: (shippingRule) => __async$6(void 0, null, function* () {
1839
+ mutationFn: (shippingRule) => __async$9(void 0, null, function* () {
1821
1840
  const result = yield client.shippingRules.edit(shippingRule);
1822
1841
  return result.data;
1823
1842
  }),
@@ -1866,7 +1885,7 @@ const useGetThemeById = (themeId) => {
1866
1885
  });
1867
1886
  };
1868
1887
 
1869
- var __async$5 = (__this, __arguments, generator) => {
1888
+ var __async$8 = (__this, __arguments, generator) => {
1870
1889
  return new Promise((resolve, reject) => {
1871
1890
  var fulfilled = (value) => {
1872
1891
  try {
@@ -1889,7 +1908,7 @@ var __async$5 = (__this, __arguments, generator) => {
1889
1908
  const useCreateWarehouse = () => {
1890
1909
  const { client } = useShipEngine();
1891
1910
  return reactQuery.useMutation({
1892
- mutationFn: (data) => __async$5(void 0, null, function* () {
1911
+ mutationFn: (data) => __async$8(void 0, null, function* () {
1893
1912
  const result = yield client.warehouses.create(data);
1894
1913
  return result.data;
1895
1914
  }),
@@ -1898,7 +1917,7 @@ const useCreateWarehouse = () => {
1898
1917
  });
1899
1918
  };
1900
1919
 
1901
- var __async$4 = (__this, __arguments, generator) => {
1920
+ var __async$7 = (__this, __arguments, generator) => {
1902
1921
  return new Promise((resolve, reject) => {
1903
1922
  var fulfilled = (value) => {
1904
1923
  try {
@@ -1921,7 +1940,7 @@ var __async$4 = (__this, __arguments, generator) => {
1921
1940
  const useDeleteWarehouse = () => {
1922
1941
  const { client } = useShipEngine();
1923
1942
  return reactQuery.useMutation({
1924
- mutationFn: (_0) => __async$4(void 0, [_0], function* ({ warehouseId }) {
1943
+ mutationFn: (_0) => __async$7(void 0, [_0], function* ({ warehouseId }) {
1925
1944
  const result = yield client.warehouses.delete(warehouseId);
1926
1945
  return result.data;
1927
1946
  }),
@@ -1942,22 +1961,22 @@ const useListWarehouses = (options) => {
1942
1961
  });
1943
1962
  };
1944
1963
 
1945
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1946
- var __hasOwnProp = Object.prototype.hasOwnProperty;
1947
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
1948
- var __objRest = (source, exclude) => {
1964
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
1965
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
1966
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
1967
+ var __objRest$1 = (source, exclude) => {
1949
1968
  var target = {};
1950
1969
  for (var prop in source)
1951
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
1970
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
1952
1971
  target[prop] = source[prop];
1953
- if (source != null && __getOwnPropSymbols)
1954
- for (var prop of __getOwnPropSymbols(source)) {
1955
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
1972
+ if (source != null && __getOwnPropSymbols$4)
1973
+ for (var prop of __getOwnPropSymbols$4(source)) {
1974
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
1956
1975
  target[prop] = source[prop];
1957
1976
  }
1958
1977
  return target;
1959
1978
  };
1960
- var __async$3 = (__this, __arguments, generator) => {
1979
+ var __async$6 = (__this, __arguments, generator) => {
1961
1980
  return new Promise((resolve, reject) => {
1962
1981
  var fulfilled = (value) => {
1963
1982
  try {
@@ -1980,8 +1999,8 @@ var __async$3 = (__this, __arguments, generator) => {
1980
1999
  const useUpdateWarehouse = () => {
1981
2000
  const { client } = useShipEngine();
1982
2001
  return reactQuery.useMutation({
1983
- mutationFn: (_a) => __async$3(void 0, null, function* () {
1984
- var _b = _a, { warehouseId } = _b, warehouse = __objRest(_b, ["warehouseId"]);
2002
+ mutationFn: (_a) => __async$6(void 0, null, function* () {
2003
+ var _b = _a, { warehouseId } = _b, warehouse = __objRest$1(_b, ["warehouseId"]);
1985
2004
  const result = yield client.warehouses.update(warehouseId, warehouse);
1986
2005
  return result.data;
1987
2006
  }),
@@ -2000,7 +2019,7 @@ const useGetAccountBillingPlan = () => {
2000
2019
  });
2001
2020
  };
2002
2021
 
2003
- var __async$2 = (__this, __arguments, generator) => {
2022
+ var __async$5 = (__this, __arguments, generator) => {
2004
2023
  return new Promise((resolve, reject) => {
2005
2024
  var fulfilled = (value) => {
2006
2025
  try {
@@ -2023,7 +2042,7 @@ var __async$2 = (__this, __arguments, generator) => {
2023
2042
  const useUpdateAccountBillingPlan = () => {
2024
2043
  const { client } = useShipEngine();
2025
2044
  return reactQuery.useMutation({
2026
- mutationFn: (code) => __async$2(void 0, null, function* () {
2045
+ mutationFn: (code) => __async$5(void 0, null, function* () {
2027
2046
  const result = yield client.accountBillingPlan.update({ code });
2028
2047
  return result.data;
2029
2048
  }),
@@ -2067,7 +2086,7 @@ const useGetServicePoint = ({
2067
2086
  });
2068
2087
  };
2069
2088
 
2070
- var __async$1 = (__this, __arguments, generator) => {
2089
+ var __async$4 = (__this, __arguments, generator) => {
2071
2090
  return new Promise((resolve, reject) => {
2072
2091
  var fulfilled = (value) => {
2073
2092
  try {
@@ -2090,7 +2109,7 @@ var __async$1 = (__this, __arguments, generator) => {
2090
2109
  const useAddSandboxCarriers = () => {
2091
2110
  const { client } = useShipEngine();
2092
2111
  return reactQuery.useMutation({
2093
- mutationFn: (_0) => __async$1(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2112
+ mutationFn: (_0) => __async$4(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2094
2113
  const result = yield client.sellers.addSandboxCarriers({
2095
2114
  sellerId,
2096
2115
  tryReuseCarrierConnection
@@ -2102,7 +2121,7 @@ const useAddSandboxCarriers = () => {
2102
2121
  });
2103
2122
  };
2104
2123
 
2105
- var __async = (__this, __arguments, generator) => {
2124
+ var __async$3 = (__this, __arguments, generator) => {
2106
2125
  return new Promise((resolve, reject) => {
2107
2126
  var fulfilled = (value) => {
2108
2127
  try {
@@ -2125,7 +2144,7 @@ var __async = (__this, __arguments, generator) => {
2125
2144
  const useCreateSandboxSeller = () => {
2126
2145
  const { client } = useShipEngine();
2127
2146
  return reactQuery.useMutation({
2128
- mutationFn: (_0) => __async(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2147
+ mutationFn: (_0) => __async$3(void 0, [_0], function* ({ sellerId, tryReuseCarrierConnection }) {
2129
2148
  const result = yield client.sellers.createSandboxSeller({
2130
2149
  sellerId,
2131
2150
  tryReuseCarrierConnection
@@ -2147,6 +2166,201 @@ const useListSandboxSellerIds = (sellerId) => {
2147
2166
  });
2148
2167
  };
2149
2168
 
2169
+ var __defProp$3 = Object.defineProperty;
2170
+ var __defProps$3 = Object.defineProperties;
2171
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2172
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2173
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2174
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2175
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2176
+ var __spreadValues$3 = (a, b) => {
2177
+ for (var prop in b || (b = {}))
2178
+ if (__hasOwnProp$3.call(b, prop))
2179
+ __defNormalProp$3(a, prop, b[prop]);
2180
+ if (__getOwnPropSymbols$3)
2181
+ for (var prop of __getOwnPropSymbols$3(b)) {
2182
+ if (__propIsEnum$3.call(b, prop))
2183
+ __defNormalProp$3(a, prop, b[prop]);
2184
+ }
2185
+ return a;
2186
+ };
2187
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
2188
+ var __async$2 = (__this, __arguments, generator) => {
2189
+ return new Promise((resolve, reject) => {
2190
+ var fulfilled = (value) => {
2191
+ try {
2192
+ step(generator.next(value));
2193
+ } catch (e) {
2194
+ reject(e);
2195
+ }
2196
+ };
2197
+ var rejected = (value) => {
2198
+ try {
2199
+ step(generator.throw(value));
2200
+ } catch (e) {
2201
+ reject(e);
2202
+ }
2203
+ };
2204
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2205
+ step((generator = generator.apply(__this, __arguments)).next());
2206
+ });
2207
+ };
2208
+ const useCreateWebhook = (params) => {
2209
+ const { client } = useShipEngine();
2210
+ return reactQuery.useMutation(__spreadProps$3(__spreadValues$3({}, params), {
2211
+ mutationFn: (data) => __async$2(void 0, null, function* () {
2212
+ const result = yield client.webhooks.create(data);
2213
+ return result.data;
2214
+ }),
2215
+ mutationKey: ["useCreateWebhook"],
2216
+ onError
2217
+ }));
2218
+ };
2219
+
2220
+ var __defProp$2 = Object.defineProperty;
2221
+ var __defProps$2 = Object.defineProperties;
2222
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2223
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
2224
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
2225
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
2226
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2227
+ var __spreadValues$2 = (a, b) => {
2228
+ for (var prop in b || (b = {}))
2229
+ if (__hasOwnProp$2.call(b, prop))
2230
+ __defNormalProp$2(a, prop, b[prop]);
2231
+ if (__getOwnPropSymbols$2)
2232
+ for (var prop of __getOwnPropSymbols$2(b)) {
2233
+ if (__propIsEnum$2.call(b, prop))
2234
+ __defNormalProp$2(a, prop, b[prop]);
2235
+ }
2236
+ return a;
2237
+ };
2238
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2239
+ var __async$1 = (__this, __arguments, generator) => {
2240
+ return new Promise((resolve, reject) => {
2241
+ var fulfilled = (value) => {
2242
+ try {
2243
+ step(generator.next(value));
2244
+ } catch (e) {
2245
+ reject(e);
2246
+ }
2247
+ };
2248
+ var rejected = (value) => {
2249
+ try {
2250
+ step(generator.throw(value));
2251
+ } catch (e) {
2252
+ reject(e);
2253
+ }
2254
+ };
2255
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2256
+ step((generator = generator.apply(__this, __arguments)).next());
2257
+ });
2258
+ };
2259
+ const useDeleteWebhook = (params) => {
2260
+ const { client } = useShipEngine();
2261
+ return reactQuery.useMutation(__spreadProps$2(__spreadValues$2({}, params), {
2262
+ mutationFn: (webhookId) => __async$1(void 0, null, function* () {
2263
+ const result = yield client.webhooks.delete(webhookId);
2264
+ return result.data;
2265
+ }),
2266
+ mutationKey: ["useDeleteWebhook"],
2267
+ onError
2268
+ }));
2269
+ };
2270
+
2271
+ var __defProp$1 = Object.defineProperty;
2272
+ var __defProps$1 = Object.defineProperties;
2273
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2274
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
2275
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
2276
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
2277
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2278
+ var __spreadValues$1 = (a, b) => {
2279
+ for (var prop in b || (b = {}))
2280
+ if (__hasOwnProp$1.call(b, prop))
2281
+ __defNormalProp$1(a, prop, b[prop]);
2282
+ if (__getOwnPropSymbols$1)
2283
+ for (var prop of __getOwnPropSymbols$1(b)) {
2284
+ if (__propIsEnum$1.call(b, prop))
2285
+ __defNormalProp$1(a, prop, b[prop]);
2286
+ }
2287
+ return a;
2288
+ };
2289
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2290
+ var __objRest = (source, exclude) => {
2291
+ var target = {};
2292
+ for (var prop in source)
2293
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
2294
+ target[prop] = source[prop];
2295
+ if (source != null && __getOwnPropSymbols$1)
2296
+ for (var prop of __getOwnPropSymbols$1(source)) {
2297
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
2298
+ target[prop] = source[prop];
2299
+ }
2300
+ return target;
2301
+ };
2302
+ const useListWebhooks = (params) => {
2303
+ const { client } = useShipEngine();
2304
+ const _a = __spreadValues$1({}, params), { queryFnParams } = _a, rest = __objRest(_a, ["queryFnParams"]);
2305
+ return reactQuery.useQuery(__spreadProps$1(__spreadValues$1({}, rest), {
2306
+ onError,
2307
+ queryFn: () => client.webhooks.list(queryFnParams),
2308
+ queryKey: ["useListWebhooks", queryFnParams],
2309
+ select: (result) => result.data
2310
+ }));
2311
+ };
2312
+
2313
+ var __defProp = Object.defineProperty;
2314
+ var __defProps = Object.defineProperties;
2315
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2316
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2317
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
2318
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2319
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2320
+ var __spreadValues = (a, b) => {
2321
+ for (var prop in b || (b = {}))
2322
+ if (__hasOwnProp.call(b, prop))
2323
+ __defNormalProp(a, prop, b[prop]);
2324
+ if (__getOwnPropSymbols)
2325
+ for (var prop of __getOwnPropSymbols(b)) {
2326
+ if (__propIsEnum.call(b, prop))
2327
+ __defNormalProp(a, prop, b[prop]);
2328
+ }
2329
+ return a;
2330
+ };
2331
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
2332
+ var __async = (__this, __arguments, generator) => {
2333
+ return new Promise((resolve, reject) => {
2334
+ var fulfilled = (value) => {
2335
+ try {
2336
+ step(generator.next(value));
2337
+ } catch (e) {
2338
+ reject(e);
2339
+ }
2340
+ };
2341
+ var rejected = (value) => {
2342
+ try {
2343
+ step(generator.throw(value));
2344
+ } catch (e) {
2345
+ reject(e);
2346
+ }
2347
+ };
2348
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
2349
+ step((generator = generator.apply(__this, __arguments)).next());
2350
+ });
2351
+ };
2352
+ const useUpdateWebhook = (params) => {
2353
+ const { client } = useShipEngine();
2354
+ return reactQuery.useMutation(__spreadProps(__spreadValues({}, params), {
2355
+ mutationFn: (newWebhook) => __async(void 0, null, function* () {
2356
+ const result = yield client.webhooks.update(newWebhook);
2357
+ return result.data;
2358
+ }),
2359
+ mutationKey: ["useUpdateWebhook"],
2360
+ onError
2361
+ }));
2362
+ };
2363
+
2150
2364
  exports.ShipEngine = ShipEngine;
2151
2365
  exports.ShipEngineContext = ShipEngineContext;
2152
2366
  exports.delay = delay;
@@ -2168,12 +2382,14 @@ exports.useCreateSandboxSeller = useCreateSandboxSeller;
2168
2382
  exports.useCreateShipment = useCreateShipment;
2169
2383
  exports.useCreateShippingRule = useCreateShippingRule;
2170
2384
  exports.useCreateWarehouse = useCreateWarehouse;
2385
+ exports.useCreateWebhook = useCreateWebhook;
2171
2386
  exports.useDeactivateOrderSource = useDeactivateOrderSource;
2172
2387
  exports.useDeleteAccountImage = useDeleteAccountImage;
2173
2388
  exports.useDeleteCarrier = useDeleteCarrier;
2174
2389
  exports.useDeleteRateCard = useDeleteRateCard;
2175
2390
  exports.useDeleteShippingRule = useDeleteShippingRule;
2176
2391
  exports.useDeleteWarehouse = useDeleteWarehouse;
2392
+ exports.useDeleteWebhook = useDeleteWebhook;
2177
2393
  exports.useDownloadRateCard = useDownloadRateCard;
2178
2394
  exports.useEditShippingRule = useEditShippingRule;
2179
2395
  exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
@@ -2216,6 +2432,7 @@ exports.useListServicePoints = useListServicePoints;
2216
2432
  exports.useListShipments = useListShipments;
2217
2433
  exports.useListShippingRules = useListShippingRules;
2218
2434
  exports.useListWarehouses = useListWarehouses;
2435
+ exports.useListWebhooks = useListWebhooks;
2219
2436
  exports.useNotifySalesOrderShipped = useNotifySalesOrderShipped;
2220
2437
  exports.useParseAddress = useParseAddress;
2221
2438
  exports.usePublishRateCard = usePublishRateCard;
@@ -2231,6 +2448,7 @@ exports.useUpdateFundingSource = useUpdateFundingSource;
2231
2448
  exports.useUpdateRateCard = useUpdateRateCard;
2232
2449
  exports.useUpdateSalesOrderShipment = useUpdateSalesOrderShipment;
2233
2450
  exports.useUpdateWarehouse = useUpdateWarehouse;
2451
+ exports.useUpdateWebhook = useUpdateWebhook;
2234
2452
  exports.useUploadRateCard = useUploadRateCard;
2235
2453
  exports.useValidateAddresses = useValidateAddresses;
2236
2454
  exports.useVoidLabel = useVoidLabel;