@shipengine/react-api 4.15.0 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -81,25 +81,25 @@ const onError = (_errors) => _default();
81
81
 
82
82
  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}();
83
83
 
84
- var __defProp$K = Object.defineProperty;
85
- var __defProps$J = Object.defineProperties;
86
- var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
87
- var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
88
- var __hasOwnProp$T = Object.prototype.hasOwnProperty;
89
- var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
90
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
91
- var __spreadValues$K = (a, b) => {
84
+ var __defProp$O = Object.defineProperty;
85
+ var __defProps$N = Object.defineProperties;
86
+ var __getOwnPropDescs$N = Object.getOwnPropertyDescriptors;
87
+ var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
88
+ var __hasOwnProp$X = Object.prototype.hasOwnProperty;
89
+ var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
90
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
91
+ var __spreadValues$O = (a, b) => {
92
92
  for (var prop in b || (b = {}))
93
- if (__hasOwnProp$T.call(b, prop))
94
- __defNormalProp$K(a, prop, b[prop]);
95
- if (__getOwnPropSymbols$T)
96
- for (var prop of __getOwnPropSymbols$T(b)) {
97
- if (__propIsEnum$T.call(b, prop))
98
- __defNormalProp$K(a, prop, b[prop]);
93
+ if (__hasOwnProp$X.call(b, prop))
94
+ __defNormalProp$O(a, prop, b[prop]);
95
+ if (__getOwnPropSymbols$X)
96
+ for (var prop of __getOwnPropSymbols$X(b)) {
97
+ if (__propIsEnum$X.call(b, prop))
98
+ __defNormalProp$O(a, prop, b[prop]);
99
99
  }
100
100
  return a;
101
101
  };
102
- var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
102
+ var __spreadProps$N = (a, b) => __defProps$N(a, __getOwnPropDescs$N(b));
103
103
  const streams = [];
104
104
  if (process.env.NODE_ENV === "production") {
105
105
  streams.push({
@@ -108,7 +108,7 @@ if (process.env.NODE_ENV === "production") {
108
108
  }
109
109
  const logger = E({
110
110
  name: "shipengine",
111
- serializers: __spreadProps$J(__spreadValues$K({}, k), {
111
+ serializers: __spreadProps$N(__spreadValues$O({}, k), {
112
112
  req: (req) => ({
113
113
  headers: req.headers,
114
114
  method: req.method,
@@ -133,7 +133,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
133
133
  throw error;
134
134
  });
135
135
 
136
- var __async$$ = (__this, __arguments, generator) => {
136
+ var __async$13 = (__this, __arguments, generator) => {
137
137
  return new Promise((resolve, reject) => {
138
138
  var fulfilled = (value) => {
139
139
  try {
@@ -156,7 +156,7 @@ var __async$$ = (__this, __arguments, generator) => {
156
156
  const useCreateAccountImage = () => {
157
157
  const { client } = useShipEngine();
158
158
  return reactQuery.useMutation({
159
- mutationFn: (data) => __async$$(void 0, null, function* () {
159
+ mutationFn: (data) => __async$13(void 0, null, function* () {
160
160
  const result = yield client.accountSettings.createImage(data);
161
161
  return result.data;
162
162
  }),
@@ -165,7 +165,7 @@ const useCreateAccountImage = () => {
165
165
  });
166
166
  };
167
167
 
168
- var __async$_ = (__this, __arguments, generator) => {
168
+ var __async$12 = (__this, __arguments, generator) => {
169
169
  return new Promise((resolve, reject) => {
170
170
  var fulfilled = (value) => {
171
171
  try {
@@ -188,7 +188,7 @@ var __async$_ = (__this, __arguments, generator) => {
188
188
  const useDeleteAccountImage = () => {
189
189
  const { client } = useShipEngine();
190
190
  return reactQuery.useMutation({
191
- mutationFn: (labelImageId) => __async$_(void 0, null, function* () {
191
+ mutationFn: (labelImageId) => __async$12(void 0, null, function* () {
192
192
  const result = yield client.accountSettings.deleteImage(labelImageId);
193
193
  return result.data;
194
194
  }),
@@ -217,7 +217,7 @@ const useGetAccountSettings = () => {
217
217
  });
218
218
  };
219
219
 
220
- var __async$Z = (__this, __arguments, generator) => {
220
+ var __async$11 = (__this, __arguments, generator) => {
221
221
  return new Promise((resolve, reject) => {
222
222
  var fulfilled = (value) => {
223
223
  try {
@@ -240,7 +240,7 @@ var __async$Z = (__this, __arguments, generator) => {
240
240
  const useUpdateAccountImage = () => {
241
241
  const { client } = useShipEngine();
242
242
  return reactQuery.useMutation({
243
- mutationFn: (data) => __async$Z(void 0, null, function* () {
243
+ mutationFn: (data) => __async$11(void 0, null, function* () {
244
244
  const result = yield client.accountSettings.updateImage(data);
245
245
  return result.data;
246
246
  }),
@@ -249,7 +249,7 @@ const useUpdateAccountImage = () => {
249
249
  });
250
250
  };
251
251
 
252
- var __async$Y = (__this, __arguments, generator) => {
252
+ var __async$10 = (__this, __arguments, generator) => {
253
253
  return new Promise((resolve, reject) => {
254
254
  var fulfilled = (value) => {
255
255
  try {
@@ -272,7 +272,7 @@ var __async$Y = (__this, __arguments, generator) => {
272
272
  const useUpdateAccountSettings = () => {
273
273
  const { client } = useShipEngine();
274
274
  return reactQuery.useMutation({
275
- mutationFn: (settings) => __async$Y(void 0, null, function* () {
275
+ mutationFn: (settings) => __async$10(void 0, null, function* () {
276
276
  const result = yield client.accountSettings.update(settings);
277
277
  return result.data;
278
278
  }),
@@ -281,28 +281,28 @@ const useUpdateAccountSettings = () => {
281
281
  });
282
282
  };
283
283
 
284
- var __defProp$J = Object.defineProperty;
285
- var __defProps$I = Object.defineProperties;
286
- var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
287
- var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
288
- var __hasOwnProp$S = Object.prototype.hasOwnProperty;
289
- var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
290
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
291
- var __spreadValues$J = (a, b) => {
284
+ var __defProp$N = Object.defineProperty;
285
+ var __defProps$M = Object.defineProperties;
286
+ var __getOwnPropDescs$M = Object.getOwnPropertyDescriptors;
287
+ var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
288
+ var __hasOwnProp$W = Object.prototype.hasOwnProperty;
289
+ var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
290
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
291
+ var __spreadValues$N = (a, b) => {
292
292
  for (var prop in b || (b = {}))
293
- if (__hasOwnProp$S.call(b, prop))
294
- __defNormalProp$J(a, prop, b[prop]);
295
- if (__getOwnPropSymbols$S)
296
- for (var prop of __getOwnPropSymbols$S(b)) {
297
- if (__propIsEnum$S.call(b, prop))
298
- __defNormalProp$J(a, prop, b[prop]);
293
+ if (__hasOwnProp$W.call(b, prop))
294
+ __defNormalProp$N(a, prop, b[prop]);
295
+ if (__getOwnPropSymbols$W)
296
+ for (var prop of __getOwnPropSymbols$W(b)) {
297
+ if (__propIsEnum$W.call(b, prop))
298
+ __defNormalProp$N(a, prop, b[prop]);
299
299
  }
300
300
  return a;
301
301
  };
302
- var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
302
+ var __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b));
303
303
  const useListAccountAddons = (params) => {
304
304
  const { client } = useShipEngine();
305
- return reactQuery.useQuery(__spreadProps$I(__spreadValues$J({}, params), {
305
+ return reactQuery.useQuery(__spreadProps$M(__spreadValues$N({}, params), {
306
306
  onError,
307
307
  queryFn: () => client.accountAddons.list(),
308
308
  queryKey: ["useListAccountAddons"],
@@ -310,26 +310,26 @@ const useListAccountAddons = (params) => {
310
310
  }));
311
311
  };
312
312
 
313
- var __defProp$I = Object.defineProperty;
314
- var __defProps$H = Object.defineProperties;
315
- var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
316
- var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
317
- var __hasOwnProp$R = Object.prototype.hasOwnProperty;
318
- var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
319
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
320
- var __spreadValues$I = (a, b) => {
313
+ var __defProp$M = Object.defineProperty;
314
+ var __defProps$L = Object.defineProperties;
315
+ var __getOwnPropDescs$L = Object.getOwnPropertyDescriptors;
316
+ var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
317
+ var __hasOwnProp$V = Object.prototype.hasOwnProperty;
318
+ var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
319
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
320
+ var __spreadValues$M = (a, b) => {
321
321
  for (var prop in b || (b = {}))
322
- if (__hasOwnProp$R.call(b, prop))
323
- __defNormalProp$I(a, prop, b[prop]);
324
- if (__getOwnPropSymbols$R)
325
- for (var prop of __getOwnPropSymbols$R(b)) {
326
- if (__propIsEnum$R.call(b, prop))
327
- __defNormalProp$I(a, prop, b[prop]);
322
+ if (__hasOwnProp$V.call(b, prop))
323
+ __defNormalProp$M(a, prop, b[prop]);
324
+ if (__getOwnPropSymbols$V)
325
+ for (var prop of __getOwnPropSymbols$V(b)) {
326
+ if (__propIsEnum$V.call(b, prop))
327
+ __defNormalProp$M(a, prop, b[prop]);
328
328
  }
329
329
  return a;
330
330
  };
331
- var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
332
- var __async$X = (__this, __arguments, generator) => {
331
+ var __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b));
332
+ var __async$$ = (__this, __arguments, generator) => {
333
333
  return new Promise((resolve, reject) => {
334
334
  var fulfilled = (value) => {
335
335
  try {
@@ -351,8 +351,8 @@ var __async$X = (__this, __arguments, generator) => {
351
351
  };
352
352
  const useEnableAccountAddon = (params) => {
353
353
  const { client } = useShipEngine();
354
- return reactQuery.useMutation(__spreadProps$H(__spreadValues$I({}, params), {
355
- mutationFn: (addonType) => __async$X(void 0, null, function* () {
354
+ return reactQuery.useMutation(__spreadProps$L(__spreadValues$M({}, params), {
355
+ mutationFn: (addonType) => __async$$(void 0, null, function* () {
356
356
  const result = yield client.accountAddons.enable(addonType);
357
357
  return result.data;
358
358
  }),
@@ -361,26 +361,26 @@ const useEnableAccountAddon = (params) => {
361
361
  }));
362
362
  };
363
363
 
364
- var __defProp$H = Object.defineProperty;
365
- var __defProps$G = Object.defineProperties;
366
- var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
367
- var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
368
- var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
369
- var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
370
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
371
- var __spreadValues$H = (a, b) => {
364
+ var __defProp$L = Object.defineProperty;
365
+ var __defProps$K = Object.defineProperties;
366
+ var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
367
+ var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
368
+ var __hasOwnProp$U = Object.prototype.hasOwnProperty;
369
+ var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
370
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
371
+ var __spreadValues$L = (a, b) => {
372
372
  for (var prop in b || (b = {}))
373
- if (__hasOwnProp$Q.call(b, prop))
374
- __defNormalProp$H(a, prop, b[prop]);
375
- if (__getOwnPropSymbols$Q)
376
- for (var prop of __getOwnPropSymbols$Q(b)) {
377
- if (__propIsEnum$Q.call(b, prop))
378
- __defNormalProp$H(a, prop, b[prop]);
373
+ if (__hasOwnProp$U.call(b, prop))
374
+ __defNormalProp$L(a, prop, b[prop]);
375
+ if (__getOwnPropSymbols$U)
376
+ for (var prop of __getOwnPropSymbols$U(b)) {
377
+ if (__propIsEnum$U.call(b, prop))
378
+ __defNormalProp$L(a, prop, b[prop]);
379
379
  }
380
380
  return a;
381
381
  };
382
- var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
383
- var __async$W = (__this, __arguments, generator) => {
382
+ var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
383
+ var __async$_ = (__this, __arguments, generator) => {
384
384
  return new Promise((resolve, reject) => {
385
385
  var fulfilled = (value) => {
386
386
  try {
@@ -402,8 +402,8 @@ var __async$W = (__this, __arguments, generator) => {
402
402
  };
403
403
  const useDisableAccountAddon = (params) => {
404
404
  const { client } = useShipEngine();
405
- return reactQuery.useMutation(__spreadProps$G(__spreadValues$H({}, params), {
406
- mutationFn: (addonType) => __async$W(void 0, null, function* () {
405
+ return reactQuery.useMutation(__spreadProps$K(__spreadValues$L({}, params), {
406
+ mutationFn: (addonType) => __async$_(void 0, null, function* () {
407
407
  const result = yield client.accountAddons.disable(addonType);
408
408
  return result.data;
409
409
  }),
@@ -412,28 +412,28 @@ const useDisableAccountAddon = (params) => {
412
412
  }));
413
413
  };
414
414
 
415
- var __defProp$G = Object.defineProperty;
416
- var __defProps$F = Object.defineProperties;
417
- var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
418
- var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
419
- var __hasOwnProp$P = Object.prototype.hasOwnProperty;
420
- var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
421
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
422
- var __spreadValues$G = (a, b) => {
415
+ var __defProp$K = Object.defineProperty;
416
+ var __defProps$J = Object.defineProperties;
417
+ var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
418
+ var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
419
+ var __hasOwnProp$T = Object.prototype.hasOwnProperty;
420
+ var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
421
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
422
+ var __spreadValues$K = (a, b) => {
423
423
  for (var prop in b || (b = {}))
424
- if (__hasOwnProp$P.call(b, prop))
425
- __defNormalProp$G(a, prop, b[prop]);
426
- if (__getOwnPropSymbols$P)
427
- for (var prop of __getOwnPropSymbols$P(b)) {
428
- if (__propIsEnum$P.call(b, prop))
429
- __defNormalProp$G(a, prop, b[prop]);
424
+ if (__hasOwnProp$T.call(b, prop))
425
+ __defNormalProp$K(a, prop, b[prop]);
426
+ if (__getOwnPropSymbols$T)
427
+ for (var prop of __getOwnPropSymbols$T(b)) {
428
+ if (__propIsEnum$T.call(b, prop))
429
+ __defNormalProp$K(a, prop, b[prop]);
430
430
  }
431
431
  return a;
432
432
  };
433
- var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
433
+ var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
434
434
  const useListAccountFeatures = (params) => {
435
435
  const { client } = useShipEngine();
436
- return reactQuery.useQuery(__spreadProps$F(__spreadValues$G({}, params), {
436
+ return reactQuery.useQuery(__spreadProps$J(__spreadValues$K({}, params), {
437
437
  onError,
438
438
  queryFn: () => client.accountFeatures.list(),
439
439
  queryKey: ["useListAccountFeatures"],
@@ -441,7 +441,7 @@ const useListAccountFeatures = (params) => {
441
441
  }));
442
442
  };
443
443
 
444
- var __async$V = (__this, __arguments, generator) => {
444
+ var __async$Z = (__this, __arguments, generator) => {
445
445
  return new Promise((resolve, reject) => {
446
446
  var fulfilled = (value) => {
447
447
  try {
@@ -464,7 +464,7 @@ var __async$V = (__this, __arguments, generator) => {
464
464
  const useRequestAccountFeature = () => {
465
465
  const { client } = useShipEngine();
466
466
  return reactQuery.useMutation({
467
- mutationFn: (request) => __async$V(void 0, null, function* () {
467
+ mutationFn: (request) => __async$Z(void 0, null, function* () {
468
468
  const result = yield client.accountFeatures.request(request);
469
469
  return result.data;
470
470
  }),
@@ -473,7 +473,136 @@ const useRequestAccountFeature = () => {
473
473
  });
474
474
  };
475
475
 
476
- var __async$U = (__this, __arguments, generator) => {
476
+ var __defProp$J = Object.defineProperty;
477
+ var __defProps$I = Object.defineProperties;
478
+ var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
479
+ var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
480
+ var __hasOwnProp$S = Object.prototype.hasOwnProperty;
481
+ var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
482
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
483
+ var __spreadValues$J = (a, b) => {
484
+ for (var prop in b || (b = {}))
485
+ if (__hasOwnProp$S.call(b, prop))
486
+ __defNormalProp$J(a, prop, b[prop]);
487
+ if (__getOwnPropSymbols$S)
488
+ for (var prop of __getOwnPropSymbols$S(b)) {
489
+ if (__propIsEnum$S.call(b, prop))
490
+ __defNormalProp$J(a, prop, b[prop]);
491
+ }
492
+ return a;
493
+ };
494
+ var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
495
+ var __async$Y = (__this, __arguments, generator) => {
496
+ return new Promise((resolve, reject) => {
497
+ var fulfilled = (value) => {
498
+ try {
499
+ step(generator.next(value));
500
+ } catch (e) {
501
+ reject(e);
502
+ }
503
+ };
504
+ var rejected = (value) => {
505
+ try {
506
+ step(generator.throw(value));
507
+ } catch (e) {
508
+ reject(e);
509
+ }
510
+ };
511
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
512
+ step((generator = generator.apply(__this, __arguments)).next());
513
+ });
514
+ };
515
+ const useDisableRefundAssist = (params) => {
516
+ const { client } = useShipEngine();
517
+ return reactQuery.useMutation(__spreadProps$I(__spreadValues$J({}, params), {
518
+ mutationFn: () => __async$Y(void 0, null, function* () {
519
+ yield client.accountRefundAssist.disable();
520
+ }),
521
+ mutationKey: ["useDisableRefundAssist"],
522
+ onError
523
+ }));
524
+ };
525
+
526
+ var __defProp$I = Object.defineProperty;
527
+ var __defProps$H = Object.defineProperties;
528
+ var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
529
+ var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
530
+ var __hasOwnProp$R = Object.prototype.hasOwnProperty;
531
+ var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
532
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
533
+ var __spreadValues$I = (a, b) => {
534
+ for (var prop in b || (b = {}))
535
+ if (__hasOwnProp$R.call(b, prop))
536
+ __defNormalProp$I(a, prop, b[prop]);
537
+ if (__getOwnPropSymbols$R)
538
+ for (var prop of __getOwnPropSymbols$R(b)) {
539
+ if (__propIsEnum$R.call(b, prop))
540
+ __defNormalProp$I(a, prop, b[prop]);
541
+ }
542
+ return a;
543
+ };
544
+ var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
545
+ var __async$X = (__this, __arguments, generator) => {
546
+ return new Promise((resolve, reject) => {
547
+ var fulfilled = (value) => {
548
+ try {
549
+ step(generator.next(value));
550
+ } catch (e) {
551
+ reject(e);
552
+ }
553
+ };
554
+ var rejected = (value) => {
555
+ try {
556
+ step(generator.throw(value));
557
+ } catch (e) {
558
+ reject(e);
559
+ }
560
+ };
561
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
562
+ step((generator = generator.apply(__this, __arguments)).next());
563
+ });
564
+ };
565
+ const useEnableRefundAssist = (params) => {
566
+ const { client } = useShipEngine();
567
+ return reactQuery.useMutation(__spreadProps$H(__spreadValues$I({}, params), {
568
+ mutationFn: () => __async$X(void 0, null, function* () {
569
+ yield client.accountRefundAssist.enable();
570
+ }),
571
+ mutationKey: ["useEnableRefundAssist"],
572
+ onError
573
+ }));
574
+ };
575
+
576
+ var __defProp$H = Object.defineProperty;
577
+ var __defProps$G = Object.defineProperties;
578
+ var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
579
+ var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
580
+ var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
581
+ var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
582
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
583
+ var __spreadValues$H = (a, b) => {
584
+ for (var prop in b || (b = {}))
585
+ if (__hasOwnProp$Q.call(b, prop))
586
+ __defNormalProp$H(a, prop, b[prop]);
587
+ if (__getOwnPropSymbols$Q)
588
+ for (var prop of __getOwnPropSymbols$Q(b)) {
589
+ if (__propIsEnum$Q.call(b, prop))
590
+ __defNormalProp$H(a, prop, b[prop]);
591
+ }
592
+ return a;
593
+ };
594
+ var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
595
+ const useGetRefundAssist = (params) => {
596
+ const { client } = useShipEngine();
597
+ return reactQuery.useQuery(__spreadProps$G(__spreadValues$H({}, params), {
598
+ onError,
599
+ queryFn: () => client.accountRefundAssist.get(),
600
+ queryKey: ["useGetRefundAssist"],
601
+ select: (result) => result.data.refundAssistCarriers
602
+ }));
603
+ };
604
+
605
+ var __async$W = (__this, __arguments, generator) => {
477
606
  return new Promise((resolve, reject) => {
478
607
  var fulfilled = (value) => {
479
608
  try {
@@ -496,7 +625,7 @@ var __async$U = (__this, __arguments, generator) => {
496
625
  const useParseAddress = () => {
497
626
  const { client } = useShipEngine();
498
627
  return reactQuery.useMutation({
499
- mutationFn: (_0) => __async$U(void 0, [_0], function* ({ address, text }) {
628
+ mutationFn: (_0) => __async$W(void 0, [_0], function* ({ address, text }) {
500
629
  const result = yield client.addresses.parse(text, address);
501
630
  return result.data;
502
631
  }),
@@ -505,7 +634,7 @@ const useParseAddress = () => {
505
634
  });
506
635
  };
507
636
 
508
- var __async$T = (__this, __arguments, generator) => {
637
+ var __async$V = (__this, __arguments, generator) => {
509
638
  return new Promise((resolve, reject) => {
510
639
  var fulfilled = (value) => {
511
640
  try {
@@ -528,7 +657,7 @@ var __async$T = (__this, __arguments, generator) => {
528
657
  const useValidateAddresses = () => {
529
658
  const { client } = useShipEngine();
530
659
  return reactQuery.useMutation({
531
- mutationFn: (addresses) => __async$T(void 0, null, function* () {
660
+ mutationFn: (addresses) => __async$V(void 0, null, function* () {
532
661
  const result = yield client.addresses.validate(addresses);
533
662
  return result.data;
534
663
  }),
@@ -537,26 +666,26 @@ const useValidateAddresses = () => {
537
666
  });
538
667
  };
539
668
 
540
- var __defProp$F = Object.defineProperty;
541
- var __defProps$E = Object.defineProperties;
542
- var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
543
- var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
544
- var __hasOwnProp$O = Object.prototype.hasOwnProperty;
545
- var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
546
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
547
- var __spreadValues$F = (a, b) => {
669
+ var __defProp$G = Object.defineProperty;
670
+ var __defProps$F = Object.defineProperties;
671
+ var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
672
+ var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
673
+ var __hasOwnProp$P = Object.prototype.hasOwnProperty;
674
+ var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
675
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
676
+ var __spreadValues$G = (a, b) => {
548
677
  for (var prop in b || (b = {}))
549
- if (__hasOwnProp$O.call(b, prop))
550
- __defNormalProp$F(a, prop, b[prop]);
551
- if (__getOwnPropSymbols$O)
552
- for (var prop of __getOwnPropSymbols$O(b)) {
553
- if (__propIsEnum$O.call(b, prop))
554
- __defNormalProp$F(a, prop, b[prop]);
678
+ if (__hasOwnProp$P.call(b, prop))
679
+ __defNormalProp$G(a, prop, b[prop]);
680
+ if (__getOwnPropSymbols$P)
681
+ for (var prop of __getOwnPropSymbols$P(b)) {
682
+ if (__propIsEnum$P.call(b, prop))
683
+ __defNormalProp$G(a, prop, b[prop]);
555
684
  }
556
685
  return a;
557
686
  };
558
- var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
559
- var __async$S = (__this, __arguments, generator) => {
687
+ var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
688
+ var __async$U = (__this, __arguments, generator) => {
560
689
  return new Promise((resolve, reject) => {
561
690
  var fulfilled = (value) => {
562
691
  try {
@@ -578,8 +707,8 @@ var __async$S = (__this, __arguments, generator) => {
578
707
  };
579
708
  const useCreateAuctanePaySession = (params) => {
580
709
  const { client } = useShipEngine();
581
- return reactQuery.useMutation(__spreadProps$E(__spreadValues$F({}, params), {
582
- mutationFn: (request) => __async$S(void 0, null, function* () {
710
+ return reactQuery.useMutation(__spreadProps$F(__spreadValues$G({}, params), {
711
+ mutationFn: (request) => __async$U(void 0, null, function* () {
583
712
  const result = yield client.auctanePay.createSession(request);
584
713
  return result.data;
585
714
  }),
@@ -588,6 +717,36 @@ const useCreateAuctanePaySession = (params) => {
588
717
  }));
589
718
  };
590
719
 
720
+ var __defProp$F = Object.defineProperty;
721
+ var __defProps$E = Object.defineProperties;
722
+ var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
723
+ var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
724
+ var __hasOwnProp$O = Object.prototype.hasOwnProperty;
725
+ var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
726
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
727
+ var __spreadValues$F = (a, b) => {
728
+ for (var prop in b || (b = {}))
729
+ if (__hasOwnProp$O.call(b, prop))
730
+ __defNormalProp$F(a, prop, b[prop]);
731
+ if (__getOwnPropSymbols$O)
732
+ for (var prop of __getOwnPropSymbols$O(b)) {
733
+ if (__propIsEnum$O.call(b, prop))
734
+ __defNormalProp$F(a, prop, b[prop]);
735
+ }
736
+ return a;
737
+ };
738
+ var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
739
+ const useGetAuctanePayConfig = (params) => {
740
+ const { client } = useShipEngine();
741
+ const queryParams = __spreadValues$F({}, params);
742
+ return reactQuery.useQuery(__spreadProps$E(__spreadValues$F({}, queryParams), {
743
+ onError,
744
+ queryFn: () => client.auctanePay.getConfig(),
745
+ queryKey: ["useGetAuctanePayConfig"],
746
+ select: (result) => result.data
747
+ }));
748
+ };
749
+
591
750
  var __defProp$E = Object.defineProperty;
592
751
  var __defProps$D = Object.defineProperties;
593
752
  var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
@@ -607,37 +766,7 @@ var __spreadValues$E = (a, b) => {
607
766
  return a;
608
767
  };
609
768
  var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
610
- const useGetAuctanePayConfig = (params) => {
611
- const { client } = useShipEngine();
612
- const queryParams = __spreadValues$E({}, params);
613
- return reactQuery.useQuery(__spreadProps$D(__spreadValues$E({}, queryParams), {
614
- onError,
615
- queryFn: () => client.auctanePay.getConfig(),
616
- queryKey: ["useGetAuctanePayConfig"],
617
- select: (result) => result.data
618
- }));
619
- };
620
-
621
- var __defProp$D = Object.defineProperty;
622
- var __defProps$C = Object.defineProperties;
623
- var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
624
- var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
625
- var __hasOwnProp$M = Object.prototype.hasOwnProperty;
626
- var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
627
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
628
- var __spreadValues$D = (a, b) => {
629
- for (var prop in b || (b = {}))
630
- if (__hasOwnProp$M.call(b, prop))
631
- __defNormalProp$D(a, prop, b[prop]);
632
- if (__getOwnPropSymbols$M)
633
- for (var prop of __getOwnPropSymbols$M(b)) {
634
- if (__propIsEnum$M.call(b, prop))
635
- __defNormalProp$D(a, prop, b[prop]);
636
- }
637
- return a;
638
- };
639
- var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
640
- var __async$R = (__this, __arguments, generator) => {
769
+ var __async$T = (__this, __arguments, generator) => {
641
770
  return new Promise((resolve, reject) => {
642
771
  var fulfilled = (value) => {
643
772
  try {
@@ -659,8 +788,8 @@ var __async$R = (__this, __arguments, generator) => {
659
788
  };
660
789
  const usePreviewTransaction = (params) => {
661
790
  const { client } = useShipEngine();
662
- return reactQuery.useMutation(__spreadProps$C(__spreadValues$D({}, params), {
663
- mutationFn: (_0) => __async$R(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
791
+ return reactQuery.useMutation(__spreadProps$D(__spreadValues$E({}, params), {
792
+ mutationFn: (_0) => __async$T(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
664
793
  const request = {
665
794
  amount,
666
795
  transactionCategory
@@ -673,6 +802,36 @@ const usePreviewTransaction = (params) => {
673
802
  }));
674
803
  };
675
804
 
805
+ var __defProp$D = Object.defineProperty;
806
+ var __defProps$C = Object.defineProperties;
807
+ var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
808
+ var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
809
+ var __hasOwnProp$M = Object.prototype.hasOwnProperty;
810
+ var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
811
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
812
+ var __spreadValues$D = (a, b) => {
813
+ for (var prop in b || (b = {}))
814
+ if (__hasOwnProp$M.call(b, prop))
815
+ __defNormalProp$D(a, prop, b[prop]);
816
+ if (__getOwnPropSymbols$M)
817
+ for (var prop of __getOwnPropSymbols$M(b)) {
818
+ if (__propIsEnum$M.call(b, prop))
819
+ __defNormalProp$D(a, prop, b[prop]);
820
+ }
821
+ return a;
822
+ };
823
+ var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
824
+ const useGetPaymentMethods = (params) => {
825
+ const { client } = useShipEngine();
826
+ const queryParams = __spreadValues$D({}, params);
827
+ return reactQuery.useQuery(__spreadProps$C(__spreadValues$D({}, queryParams), {
828
+ onError,
829
+ queryFn: () => client.auctanePay.getPaymentMethods(),
830
+ queryKey: ["useGetPaymentMethods"],
831
+ select: (result) => result.data
832
+ }));
833
+ };
834
+
676
835
  var __defProp$C = Object.defineProperty;
677
836
  var __defProps$B = Object.defineProperties;
678
837
  var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
@@ -692,14 +851,35 @@ var __spreadValues$C = (a, b) => {
692
851
  return a;
693
852
  };
694
853
  var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
695
- const useGetPaymentMethods = (params) => {
854
+ var __async$S = (__this, __arguments, generator) => {
855
+ return new Promise((resolve, reject) => {
856
+ var fulfilled = (value) => {
857
+ try {
858
+ step(generator.next(value));
859
+ } catch (e) {
860
+ reject(e);
861
+ }
862
+ };
863
+ var rejected = (value) => {
864
+ try {
865
+ step(generator.throw(value));
866
+ } catch (e) {
867
+ reject(e);
868
+ }
869
+ };
870
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
871
+ step((generator = generator.apply(__this, __arguments)).next());
872
+ });
873
+ };
874
+ const useDeletePaymentMethod = (params) => {
696
875
  const { client } = useShipEngine();
697
- const queryParams = __spreadValues$C({}, params);
698
- return reactQuery.useQuery(__spreadProps$B(__spreadValues$C({}, queryParams), {
699
- onError,
700
- queryFn: () => client.auctanePay.getPaymentMethods(),
701
- queryKey: ["useGetPaymentMethods"],
702
- select: (result) => result.data
876
+ return reactQuery.useMutation(__spreadProps$B(__spreadValues$C({}, params), {
877
+ mutationFn: (paymentMethodId) => __async$S(void 0, null, function* () {
878
+ const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
879
+ return result.data;
880
+ }),
881
+ mutationKey: ["useDeletePaymentMethod"],
882
+ onError
703
883
  }));
704
884
  };
705
885
 
@@ -722,7 +902,7 @@ var __spreadValues$B = (a, b) => {
722
902
  return a;
723
903
  };
724
904
  var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
725
- var __async$Q = (__this, __arguments, generator) => {
905
+ var __async$R = (__this, __arguments, generator) => {
726
906
  return new Promise((resolve, reject) => {
727
907
  var fulfilled = (value) => {
728
908
  try {
@@ -742,14 +922,14 @@ var __async$Q = (__this, __arguments, generator) => {
742
922
  step((generator = generator.apply(__this, __arguments)).next());
743
923
  });
744
924
  };
745
- const useDeletePaymentMethod = (params) => {
925
+ const useUpdatePaymentMethod = (params) => {
746
926
  const { client } = useShipEngine();
747
927
  return reactQuery.useMutation(__spreadProps$A(__spreadValues$B({}, params), {
748
- mutationFn: (paymentMethodId) => __async$Q(void 0, null, function* () {
749
- const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
928
+ mutationFn: (_0) => __async$R(void 0, [_0], function* ({ paymentMethodId, payload }) {
929
+ const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
750
930
  return result.data;
751
931
  }),
752
- mutationKey: ["useDeletePaymentMethod"],
932
+ mutationKey: ["useUpdatePaymentMethod"],
753
933
  onError
754
934
  }));
755
935
  };
@@ -773,7 +953,7 @@ var __spreadValues$A = (a, b) => {
773
953
  return a;
774
954
  };
775
955
  var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
776
- var __async$P = (__this, __arguments, generator) => {
956
+ var __async$Q = (__this, __arguments, generator) => {
777
957
  return new Promise((resolve, reject) => {
778
958
  var fulfilled = (value) => {
779
959
  try {
@@ -793,14 +973,14 @@ var __async$P = (__this, __arguments, generator) => {
793
973
  step((generator = generator.apply(__this, __arguments)).next());
794
974
  });
795
975
  };
796
- const useUpdatePaymentMethod = (params) => {
976
+ const useIdentityVerification = (params) => {
797
977
  const { client } = useShipEngine();
798
978
  return reactQuery.useMutation(__spreadProps$z(__spreadValues$A({}, params), {
799
- mutationFn: (_0) => __async$P(void 0, [_0], function* ({ paymentMethodId, payload }) {
800
- const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
979
+ mutationFn: () => __async$Q(void 0, null, function* () {
980
+ const result = yield client.auctanePay.identityVerification();
801
981
  return result.data;
802
982
  }),
803
- mutationKey: ["useUpdatePaymentMethod"],
983
+ mutationKey: ["useIdentityVerification"],
804
984
  onError
805
985
  }));
806
986
  };
@@ -824,7 +1004,18 @@ var __spreadValues$z = (a, b) => {
824
1004
  return a;
825
1005
  };
826
1006
  var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
827
- var __async$O = (__this, __arguments, generator) => {
1007
+ const useGetPaymentAccount = (params) => {
1008
+ const { client } = useShipEngine();
1009
+ const queryParams = __spreadValues$z({}, params);
1010
+ return reactQuery.useQuery(__spreadProps$y(__spreadValues$z({}, queryParams), {
1011
+ onError,
1012
+ queryFn: () => client.auctanePay.getPaymentAccount(),
1013
+ queryKey: ["useGetPaymentAccount"],
1014
+ select: (result) => result.data
1015
+ }));
1016
+ };
1017
+
1018
+ var __async$P = (__this, __arguments, generator) => {
828
1019
  return new Promise((resolve, reject) => {
829
1020
  var fulfilled = (value) => {
830
1021
  try {
@@ -844,49 +1035,19 @@ var __async$O = (__this, __arguments, generator) => {
844
1035
  step((generator = generator.apply(__this, __arguments)).next());
845
1036
  });
846
1037
  };
847
- const useIdentityVerification = (params) => {
848
- const { client } = useShipEngine();
849
- return reactQuery.useMutation(__spreadProps$y(__spreadValues$z({}, params), {
850
- mutationFn: () => __async$O(void 0, null, function* () {
851
- const result = yield client.auctanePay.identityVerification();
852
- return result.data;
853
- }),
854
- mutationKey: ["useIdentityVerification"],
855
- onError
856
- }));
857
- };
858
-
859
- var __defProp$y = Object.defineProperty;
860
- var __defProps$x = Object.defineProperties;
861
- var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
862
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
863
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
864
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
865
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
866
- var __spreadValues$y = (a, b) => {
867
- for (var prop in b || (b = {}))
868
- if (__hasOwnProp$H.call(b, prop))
869
- __defNormalProp$y(a, prop, b[prop]);
870
- if (__getOwnPropSymbols$H)
871
- for (var prop of __getOwnPropSymbols$H(b)) {
872
- if (__propIsEnum$H.call(b, prop))
873
- __defNormalProp$y(a, prop, b[prop]);
874
- }
875
- return a;
876
- };
877
- var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
878
- const useGetPaymentAccount = (params) => {
1038
+ const useAcceptCarrierTerms = (carrierId) => {
879
1039
  const { client } = useShipEngine();
880
- const queryParams = __spreadValues$y({}, params);
881
- return reactQuery.useQuery(__spreadProps$x(__spreadValues$y({}, queryParams), {
882
- onError,
883
- queryFn: () => client.auctanePay.getPaymentAccount(),
884
- queryKey: ["useGetPaymentAccount"],
885
- select: (result) => result.data
886
- }));
1040
+ return reactQuery.useMutation({
1041
+ mutationFn: (request) => __async$P(void 0, null, function* () {
1042
+ const result = yield client.carriers.acceptTerms(carrierId, request);
1043
+ return result.data.acceptedTerms;
1044
+ }),
1045
+ mutationKey: ["useAcceptCarrierTerms", carrierId],
1046
+ onError
1047
+ });
887
1048
  };
888
1049
 
889
- var __async$N = (__this, __arguments, generator) => {
1050
+ var __async$O = (__this, __arguments, generator) => {
890
1051
  return new Promise((resolve, reject) => {
891
1052
  var fulfilled = (value) => {
892
1053
  try {
@@ -909,7 +1070,7 @@ var __async$N = (__this, __arguments, generator) => {
909
1070
  const useAddFunds = () => {
910
1071
  const { client } = useShipEngine();
911
1072
  return reactQuery.useMutation({
912
- mutationFn: (_0) => __async$N(void 0, [_0], function* ({ carrierId, funds }) {
1073
+ mutationFn: (_0) => __async$O(void 0, [_0], function* ({ carrierId, funds }) {
913
1074
  const result = yield client.carriers.addFunds(carrierId, funds);
914
1075
  return result.data;
915
1076
  }),
@@ -918,7 +1079,7 @@ const useAddFunds = () => {
918
1079
  });
919
1080
  };
920
1081
 
921
- var __async$M = (__this, __arguments, generator) => {
1082
+ var __async$N = (__this, __arguments, generator) => {
922
1083
  return new Promise((resolve, reject) => {
923
1084
  var fulfilled = (value) => {
924
1085
  try {
@@ -941,7 +1102,7 @@ var __async$M = (__this, __arguments, generator) => {
941
1102
  const useConnectCarrier = () => {
942
1103
  const { client } = useShipEngine();
943
1104
  return reactQuery.useMutation({
944
- mutationFn: (params) => __async$M(void 0, null, function* () {
1105
+ mutationFn: (params) => __async$N(void 0, null, function* () {
945
1106
  const result = yield client.carriers.connect(params);
946
1107
  return result.data;
947
1108
  }),
@@ -1050,41 +1211,41 @@ const useGetServicesByCarrier = (carrierId) => {
1050
1211
  });
1051
1212
  };
1052
1213
 
1053
- var __defProp$x = Object.defineProperty;
1054
- var __defProps$w = Object.defineProperties;
1055
- var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
1056
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
1057
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
1058
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
1059
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1060
- var __spreadValues$x = (a, b) => {
1214
+ var __defProp$y = Object.defineProperty;
1215
+ var __defProps$x = Object.defineProperties;
1216
+ var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
1217
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
1218
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
1219
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
1220
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1221
+ var __spreadValues$y = (a, b) => {
1061
1222
  for (var prop in b || (b = {}))
1062
- if (__hasOwnProp$G.call(b, prop))
1063
- __defNormalProp$x(a, prop, b[prop]);
1064
- if (__getOwnPropSymbols$G)
1065
- for (var prop of __getOwnPropSymbols$G(b)) {
1066
- if (__propIsEnum$G.call(b, prop))
1067
- __defNormalProp$x(a, prop, b[prop]);
1223
+ if (__hasOwnProp$H.call(b, prop))
1224
+ __defNormalProp$y(a, prop, b[prop]);
1225
+ if (__getOwnPropSymbols$H)
1226
+ for (var prop of __getOwnPropSymbols$H(b)) {
1227
+ if (__propIsEnum$H.call(b, prop))
1228
+ __defNormalProp$y(a, prop, b[prop]);
1068
1229
  }
1069
1230
  return a;
1070
1231
  };
1071
- var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
1232
+ var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
1072
1233
  var __objRest$q = (source, exclude) => {
1073
1234
  var target = {};
1074
1235
  for (var prop in source)
1075
- if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
1236
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
1076
1237
  target[prop] = source[prop];
1077
- if (source != null && __getOwnPropSymbols$G)
1078
- for (var prop of __getOwnPropSymbols$G(source)) {
1079
- if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
1238
+ if (source != null && __getOwnPropSymbols$H)
1239
+ for (var prop of __getOwnPropSymbols$H(source)) {
1240
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
1080
1241
  target[prop] = source[prop];
1081
1242
  }
1082
1243
  return target;
1083
1244
  };
1084
1245
  const useListCarriers = (params) => {
1085
1246
  const { client } = useShipEngine();
1086
- const _a = __spreadValues$x({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
1087
- return reactQuery.useQuery(__spreadProps$w(__spreadValues$x({}, rest), {
1247
+ const _a = __spreadValues$y({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
1248
+ return reactQuery.useQuery(__spreadProps$x(__spreadValues$y({}, rest), {
1088
1249
  onError,
1089
1250
  queryFn: () => client.carriers.list(queryFnParams),
1090
1251
  queryKey: ["useListCarriers", queryFnParams],
@@ -1092,22 +1253,22 @@ const useListCarriers = (params) => {
1092
1253
  }));
1093
1254
  };
1094
1255
 
1095
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
1096
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
1097
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
1256
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
1257
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
1258
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
1098
1259
  var __objRest$p = (source, exclude) => {
1099
1260
  var target = {};
1100
1261
  for (var prop in source)
1101
- if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
1262
+ if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
1102
1263
  target[prop] = source[prop];
1103
- if (source != null && __getOwnPropSymbols$F)
1104
- for (var prop of __getOwnPropSymbols$F(source)) {
1105
- if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
1264
+ if (source != null && __getOwnPropSymbols$G)
1265
+ for (var prop of __getOwnPropSymbols$G(source)) {
1266
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
1106
1267
  target[prop] = source[prop];
1107
1268
  }
1108
1269
  return target;
1109
1270
  };
1110
- var __async$L = (__this, __arguments, generator) => {
1271
+ var __async$M = (__this, __arguments, generator) => {
1111
1272
  return new Promise((resolve, reject) => {
1112
1273
  var fulfilled = (value) => {
1113
1274
  try {
@@ -1131,7 +1292,7 @@ const useUpdateAutoFunding = () => {
1131
1292
  const { client } = useShipEngine();
1132
1293
  const queryClient = reactQuery.useQueryClient();
1133
1294
  return reactQuery.useMutation({
1134
- mutationFn: (_a) => __async$L(void 0, null, function* () {
1295
+ mutationFn: (_a) => __async$M(void 0, null, function* () {
1135
1296
  var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
1136
1297
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
1137
1298
  return result.data;
@@ -1161,7 +1322,7 @@ const useGetZonesByCarrier = (carrierId) => {
1161
1322
  });
1162
1323
  };
1163
1324
 
1164
- var __async$K = (__this, __arguments, generator) => {
1325
+ var __async$L = (__this, __arguments, generator) => {
1165
1326
  return new Promise((resolve, reject) => {
1166
1327
  var fulfilled = (value) => {
1167
1328
  try {
@@ -1184,7 +1345,7 @@ var __async$K = (__this, __arguments, generator) => {
1184
1345
  const useDeleteCarrier = () => {
1185
1346
  const { client } = useShipEngine();
1186
1347
  return reactQuery.useMutation({
1187
- mutationFn: (carrierId) => __async$K(void 0, null, function* () {
1348
+ mutationFn: (carrierId) => __async$L(void 0, null, function* () {
1188
1349
  const result = yield client.carriers.delete(carrierId);
1189
1350
  return result.data;
1190
1351
  }),
@@ -1193,17 +1354,17 @@ const useDeleteCarrier = () => {
1193
1354
  });
1194
1355
  };
1195
1356
 
1196
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
1197
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
1198
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
1357
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
1358
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
1359
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
1199
1360
  var __objRest$o = (source, exclude) => {
1200
1361
  var target = {};
1201
1362
  for (var prop in source)
1202
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
1363
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
1203
1364
  target[prop] = source[prop];
1204
- if (source != null && __getOwnPropSymbols$E)
1205
- for (var prop of __getOwnPropSymbols$E(source)) {
1206
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
1365
+ if (source != null && __getOwnPropSymbols$F)
1366
+ for (var prop of __getOwnPropSymbols$F(source)) {
1367
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
1207
1368
  target[prop] = source[prop];
1208
1369
  }
1209
1370
  return target;
@@ -1220,17 +1381,17 @@ const useGetCarrierConnectionForm = (_params) => {
1220
1381
  });
1221
1382
  };
1222
1383
 
1223
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1224
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1225
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1384
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
1385
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
1386
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
1226
1387
  var __objRest$n = (source, exclude) => {
1227
1388
  var target = {};
1228
1389
  for (var prop in source)
1229
- if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
1390
+ if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
1230
1391
  target[prop] = source[prop];
1231
- if (source != null && __getOwnPropSymbols$D)
1232
- for (var prop of __getOwnPropSymbols$D(source)) {
1233
- if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
1392
+ if (source != null && __getOwnPropSymbols$E)
1393
+ for (var prop of __getOwnPropSymbols$E(source)) {
1394
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
1234
1395
  target[prop] = source[prop];
1235
1396
  }
1236
1397
  return target;
@@ -1247,26 +1408,26 @@ const useListCarrierConnections = (_params) => {
1247
1408
  });
1248
1409
  };
1249
1410
 
1250
- var __defProp$w = Object.defineProperty;
1251
- var __defProps$v = Object.defineProperties;
1252
- var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
1253
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
1254
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
1255
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
1256
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1257
- var __spreadValues$w = (a, b) => {
1411
+ var __defProp$x = Object.defineProperty;
1412
+ var __defProps$w = Object.defineProperties;
1413
+ var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
1414
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1415
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1416
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1417
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1418
+ var __spreadValues$x = (a, b) => {
1258
1419
  for (var prop in b || (b = {}))
1259
- if (__hasOwnProp$C.call(b, prop))
1260
- __defNormalProp$w(a, prop, b[prop]);
1261
- if (__getOwnPropSymbols$C)
1262
- for (var prop of __getOwnPropSymbols$C(b)) {
1263
- if (__propIsEnum$C.call(b, prop))
1264
- __defNormalProp$w(a, prop, b[prop]);
1420
+ if (__hasOwnProp$D.call(b, prop))
1421
+ __defNormalProp$x(a, prop, b[prop]);
1422
+ if (__getOwnPropSymbols$D)
1423
+ for (var prop of __getOwnPropSymbols$D(b)) {
1424
+ if (__propIsEnum$D.call(b, prop))
1425
+ __defNormalProp$x(a, prop, b[prop]);
1265
1426
  }
1266
1427
  return a;
1267
1428
  };
1268
- var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
1269
- var __async$J = (__this, __arguments, generator) => {
1429
+ var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
1430
+ var __async$K = (__this, __arguments, generator) => {
1270
1431
  return new Promise((resolve, reject) => {
1271
1432
  var fulfilled = (value) => {
1272
1433
  try {
@@ -1289,8 +1450,8 @@ var __async$J = (__this, __arguments, generator) => {
1289
1450
  const useConnectCarrierAccount = () => {
1290
1451
  const { client } = useShipEngine();
1291
1452
  return reactQuery.useMutation({
1292
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierName, formData }) {
1293
- const formDataWithFlag = __spreadProps$v(__spreadValues$w({}, formData), { __skipDecamelize: true });
1453
+ mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierName, formData }) {
1454
+ const formDataWithFlag = __spreadProps$w(__spreadValues$x({}, formData), { __skipDecamelize: true });
1294
1455
  const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
1295
1456
  return result.data;
1296
1457
  }),
@@ -1310,33 +1471,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
1310
1471
  });
1311
1472
  };
1312
1473
 
1313
- var __defProp$v = Object.defineProperty;
1314
- var __defProps$u = Object.defineProperties;
1315
- var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
1316
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
1317
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
1318
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
1319
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1320
- var __spreadValues$v = (a, b) => {
1474
+ var __defProp$w = Object.defineProperty;
1475
+ var __defProps$v = Object.defineProperties;
1476
+ var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
1477
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
1478
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
1479
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
1480
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1481
+ var __spreadValues$w = (a, b) => {
1321
1482
  for (var prop in b || (b = {}))
1322
- if (__hasOwnProp$B.call(b, prop))
1323
- __defNormalProp$v(a, prop, b[prop]);
1324
- if (__getOwnPropSymbols$B)
1325
- for (var prop of __getOwnPropSymbols$B(b)) {
1326
- if (__propIsEnum$B.call(b, prop))
1327
- __defNormalProp$v(a, prop, b[prop]);
1483
+ if (__hasOwnProp$C.call(b, prop))
1484
+ __defNormalProp$w(a, prop, b[prop]);
1485
+ if (__getOwnPropSymbols$C)
1486
+ for (var prop of __getOwnPropSymbols$C(b)) {
1487
+ if (__propIsEnum$C.call(b, prop))
1488
+ __defNormalProp$w(a, prop, b[prop]);
1328
1489
  }
1329
1490
  return a;
1330
1491
  };
1331
- var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1492
+ var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
1332
1493
  var __objRest$m = (source, exclude) => {
1333
1494
  var target = {};
1334
1495
  for (var prop in source)
1335
- if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
1496
+ if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
1336
1497
  target[prop] = source[prop];
1337
- if (source != null && __getOwnPropSymbols$B)
1338
- for (var prop of __getOwnPropSymbols$B(source)) {
1339
- if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
1498
+ if (source != null && __getOwnPropSymbols$C)
1499
+ for (var prop of __getOwnPropSymbols$C(source)) {
1500
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
1340
1501
  target[prop] = source[prop];
1341
1502
  }
1342
1503
  return target;
@@ -1349,7 +1510,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
1349
1510
  ]);
1350
1511
  const { client } = useShipEngine();
1351
1512
  const { carrierName, carrierId } = queryFnParams;
1352
- return reactQuery.useQuery(__spreadProps$u(__spreadValues$v({}, params), {
1513
+ return reactQuery.useQuery(__spreadProps$v(__spreadValues$w({}, params), {
1353
1514
  onError,
1354
1515
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
1355
1516
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -1357,26 +1518,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
1357
1518
  }));
1358
1519
  };
1359
1520
 
1360
- var __defProp$u = Object.defineProperty;
1361
- var __defProps$t = Object.defineProperties;
1362
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1363
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1364
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1365
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1366
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1367
- var __spreadValues$u = (a, b) => {
1521
+ var __defProp$v = Object.defineProperty;
1522
+ var __defProps$u = Object.defineProperties;
1523
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
1524
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
1525
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
1526
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
1527
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1528
+ var __spreadValues$v = (a, b) => {
1368
1529
  for (var prop in b || (b = {}))
1369
- if (__hasOwnProp$A.call(b, prop))
1370
- __defNormalProp$u(a, prop, b[prop]);
1371
- if (__getOwnPropSymbols$A)
1372
- for (var prop of __getOwnPropSymbols$A(b)) {
1373
- if (__propIsEnum$A.call(b, prop))
1374
- __defNormalProp$u(a, prop, b[prop]);
1530
+ if (__hasOwnProp$B.call(b, prop))
1531
+ __defNormalProp$v(a, prop, b[prop]);
1532
+ if (__getOwnPropSymbols$B)
1533
+ for (var prop of __getOwnPropSymbols$B(b)) {
1534
+ if (__propIsEnum$B.call(b, prop))
1535
+ __defNormalProp$v(a, prop, b[prop]);
1375
1536
  }
1376
1537
  return a;
1377
1538
  };
1378
- var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
1379
- var __async$I = (__this, __arguments, generator) => {
1539
+ var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1540
+ var __async$J = (__this, __arguments, generator) => {
1380
1541
  return new Promise((resolve, reject) => {
1381
1542
  var fulfilled = (value) => {
1382
1543
  try {
@@ -1398,8 +1559,8 @@ var __async$I = (__this, __arguments, generator) => {
1398
1559
  };
1399
1560
  const useUpdateConnectionsCarrierSettings = (params) => {
1400
1561
  const { client } = useShipEngine();
1401
- return reactQuery.useMutation(__spreadProps$t(__spreadValues$u({}, params), {
1402
- mutationFn: (_0) => __async$I(void 0, [_0], function* ({
1562
+ return reactQuery.useMutation(__spreadProps$u(__spreadValues$v({}, params), {
1563
+ mutationFn: (_0) => __async$J(void 0, [_0], function* ({
1403
1564
  carrierName,
1404
1565
  carrierId,
1405
1566
  formData
@@ -1416,26 +1577,26 @@ const useUpdateConnectionsCarrierSettings = (params) => {
1416
1577
  }));
1417
1578
  };
1418
1579
 
1419
- var __defProp$t = Object.defineProperty;
1420
- var __defProps$s = Object.defineProperties;
1421
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
1422
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1423
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1424
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1425
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1426
- var __spreadValues$t = (a, b) => {
1580
+ var __defProp$u = Object.defineProperty;
1581
+ var __defProps$t = Object.defineProperties;
1582
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1583
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1584
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1585
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1586
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1587
+ var __spreadValues$u = (a, b) => {
1427
1588
  for (var prop in b || (b = {}))
1428
- if (__hasOwnProp$z.call(b, prop))
1429
- __defNormalProp$t(a, prop, b[prop]);
1430
- if (__getOwnPropSymbols$z)
1431
- for (var prop of __getOwnPropSymbols$z(b)) {
1432
- if (__propIsEnum$z.call(b, prop))
1433
- __defNormalProp$t(a, prop, b[prop]);
1589
+ if (__hasOwnProp$A.call(b, prop))
1590
+ __defNormalProp$u(a, prop, b[prop]);
1591
+ if (__getOwnPropSymbols$A)
1592
+ for (var prop of __getOwnPropSymbols$A(b)) {
1593
+ if (__propIsEnum$A.call(b, prop))
1594
+ __defNormalProp$u(a, prop, b[prop]);
1434
1595
  }
1435
1596
  return a;
1436
1597
  };
1437
- var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
1438
- var __async$H = (__this, __arguments, generator) => {
1598
+ var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
1599
+ var __async$I = (__this, __arguments, generator) => {
1439
1600
  return new Promise((resolve, reject) => {
1440
1601
  var fulfilled = (value) => {
1441
1602
  try {
@@ -1457,8 +1618,8 @@ var __async$H = (__this, __arguments, generator) => {
1457
1618
  };
1458
1619
  const useRequestStampsAccountUrls = (params) => {
1459
1620
  const { client } = useShipEngine();
1460
- return reactQuery.useMutation(__spreadProps$s(__spreadValues$t({}, params), {
1461
- mutationFn: (request) => __async$H(void 0, null, function* () {
1621
+ return reactQuery.useMutation(__spreadProps$t(__spreadValues$u({}, params), {
1622
+ mutationFn: (request) => __async$I(void 0, null, function* () {
1462
1623
  const result = yield client.connections.requestStampsAccountUrls(request);
1463
1624
  return result.data;
1464
1625
  }),
@@ -1477,6 +1638,38 @@ const useListCustomPackageTypes = () => {
1477
1638
  });
1478
1639
  };
1479
1640
 
1641
+ var __async$H = (__this, __arguments, generator) => {
1642
+ return new Promise((resolve, reject) => {
1643
+ var fulfilled = (value) => {
1644
+ try {
1645
+ step(generator.next(value));
1646
+ } catch (e) {
1647
+ reject(e);
1648
+ }
1649
+ };
1650
+ var rejected = (value) => {
1651
+ try {
1652
+ step(generator.throw(value));
1653
+ } catch (e) {
1654
+ reject(e);
1655
+ }
1656
+ };
1657
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1658
+ step((generator = generator.apply(__this, __arguments)).next());
1659
+ });
1660
+ };
1661
+ const useAcceptFundingSourceTerms = (fundingSourceId) => {
1662
+ const { client } = useShipEngine();
1663
+ return reactQuery.useMutation({
1664
+ mutationFn: (request) => __async$H(void 0, null, function* () {
1665
+ const result = yield client.fundingSources.acceptTerms(fundingSourceId, request);
1666
+ return result.data.acceptedTerms;
1667
+ }),
1668
+ mutationKey: ["useAcceptFundingSourceTerms", fundingSourceId],
1669
+ onError
1670
+ });
1671
+ };
1672
+
1480
1673
  var __async$G = (__this, __arguments, generator) => {
1481
1674
  return new Promise((resolve, reject) => {
1482
1675
  var fulfilled = (value) => {
@@ -1541,6 +1734,36 @@ const useFundingSourcesAddFunds = () => {
1541
1734
  });
1542
1735
  };
1543
1736
 
1737
+ var __defProp$t = Object.defineProperty;
1738
+ var __defProps$s = Object.defineProperties;
1739
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
1740
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1741
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1742
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1743
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1744
+ var __spreadValues$t = (a, b) => {
1745
+ for (var prop in b || (b = {}))
1746
+ if (__hasOwnProp$z.call(b, prop))
1747
+ __defNormalProp$t(a, prop, b[prop]);
1748
+ if (__getOwnPropSymbols$z)
1749
+ for (var prop of __getOwnPropSymbols$z(b)) {
1750
+ if (__propIsEnum$z.call(b, prop))
1751
+ __defNormalProp$t(a, prop, b[prop]);
1752
+ }
1753
+ return a;
1754
+ };
1755
+ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
1756
+ const useGetFundingSourceAcceptedTerms = (fundingSourceId, params) => {
1757
+ const { client } = useShipEngine();
1758
+ const queryParams = __spreadValues$t({}, params);
1759
+ return reactQuery.useQuery(__spreadProps$s(__spreadValues$t({}, queryParams), {
1760
+ onError,
1761
+ queryFn: () => client.fundingSources.acceptedTerms(fundingSourceId),
1762
+ queryKey: ["useGetFundingSourceAcceptedTerms", fundingSourceId],
1763
+ select: (result) => result.data.acceptedTerms
1764
+ }));
1765
+ };
1766
+
1544
1767
  const useGetFundingSourceById = (fundingSourceId) => {
1545
1768
  const { client } = useShipEngine();
1546
1769
  return reactQuery.useQuery({
@@ -4277,6 +4500,8 @@ exports.delay = delay;
4277
4500
  exports.logger = logger;
4278
4501
  exports.onError = onError;
4279
4502
  exports.retryUntil = retryUntil;
4503
+ exports.useAcceptCarrierTerms = useAcceptCarrierTerms;
4504
+ exports.useAcceptFundingSourceTerms = useAcceptFundingSourceTerms;
4280
4505
  exports.useAddFunds = useAddFunds;
4281
4506
  exports.useAddInsuranceFunds = useAddInsuranceFunds;
4282
4507
  exports.useAddSandboxCarriers = useAddSandboxCarriers;
@@ -4310,9 +4535,11 @@ exports.useDeleteShippingRule = useDeleteShippingRule;
4310
4535
  exports.useDeleteWarehouse = useDeleteWarehouse;
4311
4536
  exports.useDeleteWebhook = useDeleteWebhook;
4312
4537
  exports.useDisableAccountAddon = useDisableAccountAddon;
4538
+ exports.useDisableRefundAssist = useDisableRefundAssist;
4313
4539
  exports.useDownloadRateCard = useDownloadRateCard;
4314
4540
  exports.useEditShippingRule = useEditShippingRule;
4315
4541
  exports.useEnableAccountAddon = useEnableAccountAddon;
4542
+ exports.useEnableRefundAssist = useEnableRefundAssist;
4316
4543
  exports.useExportLabels = useExportLabels;
4317
4544
  exports.useExportShipments = useExportShipments;
4318
4545
  exports.useFundingSourcesAddFunds = useFundingSourcesAddFunds;
@@ -4327,6 +4554,7 @@ exports.useGetCarrierConnectionForm = useGetCarrierConnectionForm;
4327
4554
  exports.useGetConnectionsCarrierSettings = useGetConnectionsCarrierSettings;
4328
4555
  exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
4329
4556
  exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
4557
+ exports.useGetFundingSourceAcceptedTerms = useGetFundingSourceAcceptedTerms;
4330
4558
  exports.useGetFundingSourceById = useGetFundingSourceById;
4331
4559
  exports.useGetFundingSourceMetadata = useGetFundingSourceMetadata;
4332
4560
  exports.useGetFundingSourceTransactions = useGetFundingSourceTransactions;
@@ -4339,6 +4567,7 @@ exports.useGetPackageRatingGroupByCarrier = useGetPackageRatingGroupByCarrier;
4339
4567
  exports.useGetPaymentAccount = useGetPaymentAccount;
4340
4568
  exports.useGetPaymentMethods = useGetPaymentMethods;
4341
4569
  exports.useGetRateCardById = useGetRateCardById;
4570
+ exports.useGetRefundAssist = useGetRefundAssist;
4342
4571
  exports.useGetSalesOrder = useGetSalesOrder;
4343
4572
  exports.useGetSalesOrderByExternalOrderId = useGetSalesOrderByExternalOrderId;
4344
4573
  exports.useGetSalesOrderShipment = useGetSalesOrderShipment;