@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.mjs CHANGED
@@ -78,25 +78,25 @@ const onError = (_errors) => _default();
78
78
 
79
79
  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}();
80
80
 
81
- var __defProp$K = Object.defineProperty;
82
- var __defProps$J = Object.defineProperties;
83
- var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
84
- var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
85
- var __hasOwnProp$T = Object.prototype.hasOwnProperty;
86
- var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
87
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
88
- var __spreadValues$K = (a, b) => {
81
+ var __defProp$O = Object.defineProperty;
82
+ var __defProps$N = Object.defineProperties;
83
+ var __getOwnPropDescs$N = Object.getOwnPropertyDescriptors;
84
+ var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
85
+ var __hasOwnProp$X = Object.prototype.hasOwnProperty;
86
+ var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
87
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
88
+ var __spreadValues$O = (a, b) => {
89
89
  for (var prop in b || (b = {}))
90
- if (__hasOwnProp$T.call(b, prop))
91
- __defNormalProp$K(a, prop, b[prop]);
92
- if (__getOwnPropSymbols$T)
93
- for (var prop of __getOwnPropSymbols$T(b)) {
94
- if (__propIsEnum$T.call(b, prop))
95
- __defNormalProp$K(a, prop, b[prop]);
90
+ if (__hasOwnProp$X.call(b, prop))
91
+ __defNormalProp$O(a, prop, b[prop]);
92
+ if (__getOwnPropSymbols$X)
93
+ for (var prop of __getOwnPropSymbols$X(b)) {
94
+ if (__propIsEnum$X.call(b, prop))
95
+ __defNormalProp$O(a, prop, b[prop]);
96
96
  }
97
97
  return a;
98
98
  };
99
- var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
99
+ var __spreadProps$N = (a, b) => __defProps$N(a, __getOwnPropDescs$N(b));
100
100
  const streams = [];
101
101
  if (process.env.NODE_ENV === "production") {
102
102
  streams.push({
@@ -105,7 +105,7 @@ if (process.env.NODE_ENV === "production") {
105
105
  }
106
106
  const logger = E({
107
107
  name: "shipengine",
108
- serializers: __spreadProps$J(__spreadValues$K({}, k), {
108
+ serializers: __spreadProps$N(__spreadValues$O({}, k), {
109
109
  req: (req) => ({
110
110
  headers: req.headers,
111
111
  method: req.method,
@@ -130,7 +130,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
130
130
  throw error;
131
131
  });
132
132
 
133
- var __async$$ = (__this, __arguments, generator) => {
133
+ var __async$13 = (__this, __arguments, generator) => {
134
134
  return new Promise((resolve, reject) => {
135
135
  var fulfilled = (value) => {
136
136
  try {
@@ -153,7 +153,7 @@ var __async$$ = (__this, __arguments, generator) => {
153
153
  const useCreateAccountImage = () => {
154
154
  const { client } = useShipEngine();
155
155
  return useMutation({
156
- mutationFn: (data) => __async$$(void 0, null, function* () {
156
+ mutationFn: (data) => __async$13(void 0, null, function* () {
157
157
  const result = yield client.accountSettings.createImage(data);
158
158
  return result.data;
159
159
  }),
@@ -162,7 +162,7 @@ const useCreateAccountImage = () => {
162
162
  });
163
163
  };
164
164
 
165
- var __async$_ = (__this, __arguments, generator) => {
165
+ var __async$12 = (__this, __arguments, generator) => {
166
166
  return new Promise((resolve, reject) => {
167
167
  var fulfilled = (value) => {
168
168
  try {
@@ -185,7 +185,7 @@ var __async$_ = (__this, __arguments, generator) => {
185
185
  const useDeleteAccountImage = () => {
186
186
  const { client } = useShipEngine();
187
187
  return useMutation({
188
- mutationFn: (labelImageId) => __async$_(void 0, null, function* () {
188
+ mutationFn: (labelImageId) => __async$12(void 0, null, function* () {
189
189
  const result = yield client.accountSettings.deleteImage(labelImageId);
190
190
  return result.data;
191
191
  }),
@@ -214,7 +214,7 @@ const useGetAccountSettings = () => {
214
214
  });
215
215
  };
216
216
 
217
- var __async$Z = (__this, __arguments, generator) => {
217
+ var __async$11 = (__this, __arguments, generator) => {
218
218
  return new Promise((resolve, reject) => {
219
219
  var fulfilled = (value) => {
220
220
  try {
@@ -237,7 +237,7 @@ var __async$Z = (__this, __arguments, generator) => {
237
237
  const useUpdateAccountImage = () => {
238
238
  const { client } = useShipEngine();
239
239
  return useMutation({
240
- mutationFn: (data) => __async$Z(void 0, null, function* () {
240
+ mutationFn: (data) => __async$11(void 0, null, function* () {
241
241
  const result = yield client.accountSettings.updateImage(data);
242
242
  return result.data;
243
243
  }),
@@ -246,7 +246,7 @@ const useUpdateAccountImage = () => {
246
246
  });
247
247
  };
248
248
 
249
- var __async$Y = (__this, __arguments, generator) => {
249
+ var __async$10 = (__this, __arguments, generator) => {
250
250
  return new Promise((resolve, reject) => {
251
251
  var fulfilled = (value) => {
252
252
  try {
@@ -269,7 +269,7 @@ var __async$Y = (__this, __arguments, generator) => {
269
269
  const useUpdateAccountSettings = () => {
270
270
  const { client } = useShipEngine();
271
271
  return useMutation({
272
- mutationFn: (settings) => __async$Y(void 0, null, function* () {
272
+ mutationFn: (settings) => __async$10(void 0, null, function* () {
273
273
  const result = yield client.accountSettings.update(settings);
274
274
  return result.data;
275
275
  }),
@@ -278,28 +278,28 @@ const useUpdateAccountSettings = () => {
278
278
  });
279
279
  };
280
280
 
281
- var __defProp$J = Object.defineProperty;
282
- var __defProps$I = Object.defineProperties;
283
- var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
284
- var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
285
- var __hasOwnProp$S = Object.prototype.hasOwnProperty;
286
- var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
287
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
288
- var __spreadValues$J = (a, b) => {
281
+ var __defProp$N = Object.defineProperty;
282
+ var __defProps$M = Object.defineProperties;
283
+ var __getOwnPropDescs$M = Object.getOwnPropertyDescriptors;
284
+ var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
285
+ var __hasOwnProp$W = Object.prototype.hasOwnProperty;
286
+ var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
287
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
288
+ var __spreadValues$N = (a, b) => {
289
289
  for (var prop in b || (b = {}))
290
- if (__hasOwnProp$S.call(b, prop))
291
- __defNormalProp$J(a, prop, b[prop]);
292
- if (__getOwnPropSymbols$S)
293
- for (var prop of __getOwnPropSymbols$S(b)) {
294
- if (__propIsEnum$S.call(b, prop))
295
- __defNormalProp$J(a, prop, b[prop]);
290
+ if (__hasOwnProp$W.call(b, prop))
291
+ __defNormalProp$N(a, prop, b[prop]);
292
+ if (__getOwnPropSymbols$W)
293
+ for (var prop of __getOwnPropSymbols$W(b)) {
294
+ if (__propIsEnum$W.call(b, prop))
295
+ __defNormalProp$N(a, prop, b[prop]);
296
296
  }
297
297
  return a;
298
298
  };
299
- var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
299
+ var __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b));
300
300
  const useListAccountAddons = (params) => {
301
301
  const { client } = useShipEngine();
302
- return useQuery(__spreadProps$I(__spreadValues$J({}, params), {
302
+ return useQuery(__spreadProps$M(__spreadValues$N({}, params), {
303
303
  onError,
304
304
  queryFn: () => client.accountAddons.list(),
305
305
  queryKey: ["useListAccountAddons"],
@@ -307,26 +307,26 @@ const useListAccountAddons = (params) => {
307
307
  }));
308
308
  };
309
309
 
310
- var __defProp$I = Object.defineProperty;
311
- var __defProps$H = Object.defineProperties;
312
- var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
313
- var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
314
- var __hasOwnProp$R = Object.prototype.hasOwnProperty;
315
- var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
316
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
317
- var __spreadValues$I = (a, b) => {
310
+ var __defProp$M = Object.defineProperty;
311
+ var __defProps$L = Object.defineProperties;
312
+ var __getOwnPropDescs$L = Object.getOwnPropertyDescriptors;
313
+ var __getOwnPropSymbols$V = Object.getOwnPropertySymbols;
314
+ var __hasOwnProp$V = Object.prototype.hasOwnProperty;
315
+ var __propIsEnum$V = Object.prototype.propertyIsEnumerable;
316
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
317
+ var __spreadValues$M = (a, b) => {
318
318
  for (var prop in b || (b = {}))
319
- if (__hasOwnProp$R.call(b, prop))
320
- __defNormalProp$I(a, prop, b[prop]);
321
- if (__getOwnPropSymbols$R)
322
- for (var prop of __getOwnPropSymbols$R(b)) {
323
- if (__propIsEnum$R.call(b, prop))
324
- __defNormalProp$I(a, prop, b[prop]);
319
+ if (__hasOwnProp$V.call(b, prop))
320
+ __defNormalProp$M(a, prop, b[prop]);
321
+ if (__getOwnPropSymbols$V)
322
+ for (var prop of __getOwnPropSymbols$V(b)) {
323
+ if (__propIsEnum$V.call(b, prop))
324
+ __defNormalProp$M(a, prop, b[prop]);
325
325
  }
326
326
  return a;
327
327
  };
328
- var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
329
- var __async$X = (__this, __arguments, generator) => {
328
+ var __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b));
329
+ var __async$$ = (__this, __arguments, generator) => {
330
330
  return new Promise((resolve, reject) => {
331
331
  var fulfilled = (value) => {
332
332
  try {
@@ -348,8 +348,8 @@ var __async$X = (__this, __arguments, generator) => {
348
348
  };
349
349
  const useEnableAccountAddon = (params) => {
350
350
  const { client } = useShipEngine();
351
- return useMutation(__spreadProps$H(__spreadValues$I({}, params), {
352
- mutationFn: (addonType) => __async$X(void 0, null, function* () {
351
+ return useMutation(__spreadProps$L(__spreadValues$M({}, params), {
352
+ mutationFn: (addonType) => __async$$(void 0, null, function* () {
353
353
  const result = yield client.accountAddons.enable(addonType);
354
354
  return result.data;
355
355
  }),
@@ -358,26 +358,26 @@ const useEnableAccountAddon = (params) => {
358
358
  }));
359
359
  };
360
360
 
361
- var __defProp$H = Object.defineProperty;
362
- var __defProps$G = Object.defineProperties;
363
- var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
364
- var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
365
- var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
366
- var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
367
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
368
- var __spreadValues$H = (a, b) => {
361
+ var __defProp$L = Object.defineProperty;
362
+ var __defProps$K = Object.defineProperties;
363
+ var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
364
+ var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
365
+ var __hasOwnProp$U = Object.prototype.hasOwnProperty;
366
+ var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
367
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
368
+ var __spreadValues$L = (a, b) => {
369
369
  for (var prop in b || (b = {}))
370
- if (__hasOwnProp$Q.call(b, prop))
371
- __defNormalProp$H(a, prop, b[prop]);
372
- if (__getOwnPropSymbols$Q)
373
- for (var prop of __getOwnPropSymbols$Q(b)) {
374
- if (__propIsEnum$Q.call(b, prop))
375
- __defNormalProp$H(a, prop, b[prop]);
370
+ if (__hasOwnProp$U.call(b, prop))
371
+ __defNormalProp$L(a, prop, b[prop]);
372
+ if (__getOwnPropSymbols$U)
373
+ for (var prop of __getOwnPropSymbols$U(b)) {
374
+ if (__propIsEnum$U.call(b, prop))
375
+ __defNormalProp$L(a, prop, b[prop]);
376
376
  }
377
377
  return a;
378
378
  };
379
- var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
380
- var __async$W = (__this, __arguments, generator) => {
379
+ var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
380
+ var __async$_ = (__this, __arguments, generator) => {
381
381
  return new Promise((resolve, reject) => {
382
382
  var fulfilled = (value) => {
383
383
  try {
@@ -399,8 +399,8 @@ var __async$W = (__this, __arguments, generator) => {
399
399
  };
400
400
  const useDisableAccountAddon = (params) => {
401
401
  const { client } = useShipEngine();
402
- return useMutation(__spreadProps$G(__spreadValues$H({}, params), {
403
- mutationFn: (addonType) => __async$W(void 0, null, function* () {
402
+ return useMutation(__spreadProps$K(__spreadValues$L({}, params), {
403
+ mutationFn: (addonType) => __async$_(void 0, null, function* () {
404
404
  const result = yield client.accountAddons.disable(addonType);
405
405
  return result.data;
406
406
  }),
@@ -409,28 +409,28 @@ const useDisableAccountAddon = (params) => {
409
409
  }));
410
410
  };
411
411
 
412
- var __defProp$G = Object.defineProperty;
413
- var __defProps$F = Object.defineProperties;
414
- var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
415
- var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
416
- var __hasOwnProp$P = Object.prototype.hasOwnProperty;
417
- var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
418
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
419
- var __spreadValues$G = (a, b) => {
412
+ var __defProp$K = Object.defineProperty;
413
+ var __defProps$J = Object.defineProperties;
414
+ var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
415
+ var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
416
+ var __hasOwnProp$T = Object.prototype.hasOwnProperty;
417
+ var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
418
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
419
+ var __spreadValues$K = (a, b) => {
420
420
  for (var prop in b || (b = {}))
421
- if (__hasOwnProp$P.call(b, prop))
422
- __defNormalProp$G(a, prop, b[prop]);
423
- if (__getOwnPropSymbols$P)
424
- for (var prop of __getOwnPropSymbols$P(b)) {
425
- if (__propIsEnum$P.call(b, prop))
426
- __defNormalProp$G(a, prop, b[prop]);
421
+ if (__hasOwnProp$T.call(b, prop))
422
+ __defNormalProp$K(a, prop, b[prop]);
423
+ if (__getOwnPropSymbols$T)
424
+ for (var prop of __getOwnPropSymbols$T(b)) {
425
+ if (__propIsEnum$T.call(b, prop))
426
+ __defNormalProp$K(a, prop, b[prop]);
427
427
  }
428
428
  return a;
429
429
  };
430
- var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
430
+ var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
431
431
  const useListAccountFeatures = (params) => {
432
432
  const { client } = useShipEngine();
433
- return useQuery(__spreadProps$F(__spreadValues$G({}, params), {
433
+ return useQuery(__spreadProps$J(__spreadValues$K({}, params), {
434
434
  onError,
435
435
  queryFn: () => client.accountFeatures.list(),
436
436
  queryKey: ["useListAccountFeatures"],
@@ -438,7 +438,7 @@ const useListAccountFeatures = (params) => {
438
438
  }));
439
439
  };
440
440
 
441
- var __async$V = (__this, __arguments, generator) => {
441
+ var __async$Z = (__this, __arguments, generator) => {
442
442
  return new Promise((resolve, reject) => {
443
443
  var fulfilled = (value) => {
444
444
  try {
@@ -461,7 +461,7 @@ var __async$V = (__this, __arguments, generator) => {
461
461
  const useRequestAccountFeature = () => {
462
462
  const { client } = useShipEngine();
463
463
  return useMutation({
464
- mutationFn: (request) => __async$V(void 0, null, function* () {
464
+ mutationFn: (request) => __async$Z(void 0, null, function* () {
465
465
  const result = yield client.accountFeatures.request(request);
466
466
  return result.data;
467
467
  }),
@@ -470,7 +470,136 @@ const useRequestAccountFeature = () => {
470
470
  });
471
471
  };
472
472
 
473
- var __async$U = (__this, __arguments, generator) => {
473
+ var __defProp$J = Object.defineProperty;
474
+ var __defProps$I = Object.defineProperties;
475
+ var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
476
+ var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
477
+ var __hasOwnProp$S = Object.prototype.hasOwnProperty;
478
+ var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
479
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
480
+ var __spreadValues$J = (a, b) => {
481
+ for (var prop in b || (b = {}))
482
+ if (__hasOwnProp$S.call(b, prop))
483
+ __defNormalProp$J(a, prop, b[prop]);
484
+ if (__getOwnPropSymbols$S)
485
+ for (var prop of __getOwnPropSymbols$S(b)) {
486
+ if (__propIsEnum$S.call(b, prop))
487
+ __defNormalProp$J(a, prop, b[prop]);
488
+ }
489
+ return a;
490
+ };
491
+ var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
492
+ var __async$Y = (__this, __arguments, generator) => {
493
+ return new Promise((resolve, reject) => {
494
+ var fulfilled = (value) => {
495
+ try {
496
+ step(generator.next(value));
497
+ } catch (e) {
498
+ reject(e);
499
+ }
500
+ };
501
+ var rejected = (value) => {
502
+ try {
503
+ step(generator.throw(value));
504
+ } catch (e) {
505
+ reject(e);
506
+ }
507
+ };
508
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
509
+ step((generator = generator.apply(__this, __arguments)).next());
510
+ });
511
+ };
512
+ const useDisableRefundAssist = (params) => {
513
+ const { client } = useShipEngine();
514
+ return useMutation(__spreadProps$I(__spreadValues$J({}, params), {
515
+ mutationFn: () => __async$Y(void 0, null, function* () {
516
+ yield client.accountRefundAssist.disable();
517
+ }),
518
+ mutationKey: ["useDisableRefundAssist"],
519
+ onError
520
+ }));
521
+ };
522
+
523
+ var __defProp$I = Object.defineProperty;
524
+ var __defProps$H = Object.defineProperties;
525
+ var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
526
+ var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
527
+ var __hasOwnProp$R = Object.prototype.hasOwnProperty;
528
+ var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
529
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
530
+ var __spreadValues$I = (a, b) => {
531
+ for (var prop in b || (b = {}))
532
+ if (__hasOwnProp$R.call(b, prop))
533
+ __defNormalProp$I(a, prop, b[prop]);
534
+ if (__getOwnPropSymbols$R)
535
+ for (var prop of __getOwnPropSymbols$R(b)) {
536
+ if (__propIsEnum$R.call(b, prop))
537
+ __defNormalProp$I(a, prop, b[prop]);
538
+ }
539
+ return a;
540
+ };
541
+ var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
542
+ var __async$X = (__this, __arguments, generator) => {
543
+ return new Promise((resolve, reject) => {
544
+ var fulfilled = (value) => {
545
+ try {
546
+ step(generator.next(value));
547
+ } catch (e) {
548
+ reject(e);
549
+ }
550
+ };
551
+ var rejected = (value) => {
552
+ try {
553
+ step(generator.throw(value));
554
+ } catch (e) {
555
+ reject(e);
556
+ }
557
+ };
558
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
559
+ step((generator = generator.apply(__this, __arguments)).next());
560
+ });
561
+ };
562
+ const useEnableRefundAssist = (params) => {
563
+ const { client } = useShipEngine();
564
+ return useMutation(__spreadProps$H(__spreadValues$I({}, params), {
565
+ mutationFn: () => __async$X(void 0, null, function* () {
566
+ yield client.accountRefundAssist.enable();
567
+ }),
568
+ mutationKey: ["useEnableRefundAssist"],
569
+ onError
570
+ }));
571
+ };
572
+
573
+ var __defProp$H = Object.defineProperty;
574
+ var __defProps$G = Object.defineProperties;
575
+ var __getOwnPropDescs$G = Object.getOwnPropertyDescriptors;
576
+ var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
577
+ var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
578
+ var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
579
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
580
+ var __spreadValues$H = (a, b) => {
581
+ for (var prop in b || (b = {}))
582
+ if (__hasOwnProp$Q.call(b, prop))
583
+ __defNormalProp$H(a, prop, b[prop]);
584
+ if (__getOwnPropSymbols$Q)
585
+ for (var prop of __getOwnPropSymbols$Q(b)) {
586
+ if (__propIsEnum$Q.call(b, prop))
587
+ __defNormalProp$H(a, prop, b[prop]);
588
+ }
589
+ return a;
590
+ };
591
+ var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
592
+ const useGetRefundAssist = (params) => {
593
+ const { client } = useShipEngine();
594
+ return useQuery(__spreadProps$G(__spreadValues$H({}, params), {
595
+ onError,
596
+ queryFn: () => client.accountRefundAssist.get(),
597
+ queryKey: ["useGetRefundAssist"],
598
+ select: (result) => result.data.refundAssistCarriers
599
+ }));
600
+ };
601
+
602
+ var __async$W = (__this, __arguments, generator) => {
474
603
  return new Promise((resolve, reject) => {
475
604
  var fulfilled = (value) => {
476
605
  try {
@@ -493,7 +622,7 @@ var __async$U = (__this, __arguments, generator) => {
493
622
  const useParseAddress = () => {
494
623
  const { client } = useShipEngine();
495
624
  return useMutation({
496
- mutationFn: (_0) => __async$U(void 0, [_0], function* ({ address, text }) {
625
+ mutationFn: (_0) => __async$W(void 0, [_0], function* ({ address, text }) {
497
626
  const result = yield client.addresses.parse(text, address);
498
627
  return result.data;
499
628
  }),
@@ -502,7 +631,7 @@ const useParseAddress = () => {
502
631
  });
503
632
  };
504
633
 
505
- var __async$T = (__this, __arguments, generator) => {
634
+ var __async$V = (__this, __arguments, generator) => {
506
635
  return new Promise((resolve, reject) => {
507
636
  var fulfilled = (value) => {
508
637
  try {
@@ -525,7 +654,7 @@ var __async$T = (__this, __arguments, generator) => {
525
654
  const useValidateAddresses = () => {
526
655
  const { client } = useShipEngine();
527
656
  return useMutation({
528
- mutationFn: (addresses) => __async$T(void 0, null, function* () {
657
+ mutationFn: (addresses) => __async$V(void 0, null, function* () {
529
658
  const result = yield client.addresses.validate(addresses);
530
659
  return result.data;
531
660
  }),
@@ -534,26 +663,26 @@ const useValidateAddresses = () => {
534
663
  });
535
664
  };
536
665
 
537
- var __defProp$F = Object.defineProperty;
538
- var __defProps$E = Object.defineProperties;
539
- var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
540
- var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
541
- var __hasOwnProp$O = Object.prototype.hasOwnProperty;
542
- var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
543
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
544
- var __spreadValues$F = (a, b) => {
666
+ var __defProp$G = Object.defineProperty;
667
+ var __defProps$F = Object.defineProperties;
668
+ var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
669
+ var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
670
+ var __hasOwnProp$P = Object.prototype.hasOwnProperty;
671
+ var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
672
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
673
+ var __spreadValues$G = (a, b) => {
545
674
  for (var prop in b || (b = {}))
546
- if (__hasOwnProp$O.call(b, prop))
547
- __defNormalProp$F(a, prop, b[prop]);
548
- if (__getOwnPropSymbols$O)
549
- for (var prop of __getOwnPropSymbols$O(b)) {
550
- if (__propIsEnum$O.call(b, prop))
551
- __defNormalProp$F(a, prop, b[prop]);
675
+ if (__hasOwnProp$P.call(b, prop))
676
+ __defNormalProp$G(a, prop, b[prop]);
677
+ if (__getOwnPropSymbols$P)
678
+ for (var prop of __getOwnPropSymbols$P(b)) {
679
+ if (__propIsEnum$P.call(b, prop))
680
+ __defNormalProp$G(a, prop, b[prop]);
552
681
  }
553
682
  return a;
554
683
  };
555
- var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
556
- var __async$S = (__this, __arguments, generator) => {
684
+ var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
685
+ var __async$U = (__this, __arguments, generator) => {
557
686
  return new Promise((resolve, reject) => {
558
687
  var fulfilled = (value) => {
559
688
  try {
@@ -575,8 +704,8 @@ var __async$S = (__this, __arguments, generator) => {
575
704
  };
576
705
  const useCreateAuctanePaySession = (params) => {
577
706
  const { client } = useShipEngine();
578
- return useMutation(__spreadProps$E(__spreadValues$F({}, params), {
579
- mutationFn: (request) => __async$S(void 0, null, function* () {
707
+ return useMutation(__spreadProps$F(__spreadValues$G({}, params), {
708
+ mutationFn: (request) => __async$U(void 0, null, function* () {
580
709
  const result = yield client.auctanePay.createSession(request);
581
710
  return result.data;
582
711
  }),
@@ -585,6 +714,36 @@ const useCreateAuctanePaySession = (params) => {
585
714
  }));
586
715
  };
587
716
 
717
+ var __defProp$F = Object.defineProperty;
718
+ var __defProps$E = Object.defineProperties;
719
+ var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
720
+ var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
721
+ var __hasOwnProp$O = Object.prototype.hasOwnProperty;
722
+ var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
723
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
724
+ var __spreadValues$F = (a, b) => {
725
+ for (var prop in b || (b = {}))
726
+ if (__hasOwnProp$O.call(b, prop))
727
+ __defNormalProp$F(a, prop, b[prop]);
728
+ if (__getOwnPropSymbols$O)
729
+ for (var prop of __getOwnPropSymbols$O(b)) {
730
+ if (__propIsEnum$O.call(b, prop))
731
+ __defNormalProp$F(a, prop, b[prop]);
732
+ }
733
+ return a;
734
+ };
735
+ var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
736
+ const useGetAuctanePayConfig = (params) => {
737
+ const { client } = useShipEngine();
738
+ const queryParams = __spreadValues$F({}, params);
739
+ return useQuery(__spreadProps$E(__spreadValues$F({}, queryParams), {
740
+ onError,
741
+ queryFn: () => client.auctanePay.getConfig(),
742
+ queryKey: ["useGetAuctanePayConfig"],
743
+ select: (result) => result.data
744
+ }));
745
+ };
746
+
588
747
  var __defProp$E = Object.defineProperty;
589
748
  var __defProps$D = Object.defineProperties;
590
749
  var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
@@ -604,37 +763,7 @@ var __spreadValues$E = (a, b) => {
604
763
  return a;
605
764
  };
606
765
  var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
607
- const useGetAuctanePayConfig = (params) => {
608
- const { client } = useShipEngine();
609
- const queryParams = __spreadValues$E({}, params);
610
- return useQuery(__spreadProps$D(__spreadValues$E({}, queryParams), {
611
- onError,
612
- queryFn: () => client.auctanePay.getConfig(),
613
- queryKey: ["useGetAuctanePayConfig"],
614
- select: (result) => result.data
615
- }));
616
- };
617
-
618
- var __defProp$D = Object.defineProperty;
619
- var __defProps$C = Object.defineProperties;
620
- var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
621
- var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
622
- var __hasOwnProp$M = Object.prototype.hasOwnProperty;
623
- var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
624
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
625
- var __spreadValues$D = (a, b) => {
626
- for (var prop in b || (b = {}))
627
- if (__hasOwnProp$M.call(b, prop))
628
- __defNormalProp$D(a, prop, b[prop]);
629
- if (__getOwnPropSymbols$M)
630
- for (var prop of __getOwnPropSymbols$M(b)) {
631
- if (__propIsEnum$M.call(b, prop))
632
- __defNormalProp$D(a, prop, b[prop]);
633
- }
634
- return a;
635
- };
636
- var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
637
- var __async$R = (__this, __arguments, generator) => {
766
+ var __async$T = (__this, __arguments, generator) => {
638
767
  return new Promise((resolve, reject) => {
639
768
  var fulfilled = (value) => {
640
769
  try {
@@ -656,8 +785,8 @@ var __async$R = (__this, __arguments, generator) => {
656
785
  };
657
786
  const usePreviewTransaction = (params) => {
658
787
  const { client } = useShipEngine();
659
- return useMutation(__spreadProps$C(__spreadValues$D({}, params), {
660
- mutationFn: (_0) => __async$R(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
788
+ return useMutation(__spreadProps$D(__spreadValues$E({}, params), {
789
+ mutationFn: (_0) => __async$T(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
661
790
  const request = {
662
791
  amount,
663
792
  transactionCategory
@@ -670,6 +799,36 @@ const usePreviewTransaction = (params) => {
670
799
  }));
671
800
  };
672
801
 
802
+ var __defProp$D = Object.defineProperty;
803
+ var __defProps$C = Object.defineProperties;
804
+ var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
805
+ var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
806
+ var __hasOwnProp$M = Object.prototype.hasOwnProperty;
807
+ var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
808
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
809
+ var __spreadValues$D = (a, b) => {
810
+ for (var prop in b || (b = {}))
811
+ if (__hasOwnProp$M.call(b, prop))
812
+ __defNormalProp$D(a, prop, b[prop]);
813
+ if (__getOwnPropSymbols$M)
814
+ for (var prop of __getOwnPropSymbols$M(b)) {
815
+ if (__propIsEnum$M.call(b, prop))
816
+ __defNormalProp$D(a, prop, b[prop]);
817
+ }
818
+ return a;
819
+ };
820
+ var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
821
+ const useGetPaymentMethods = (params) => {
822
+ const { client } = useShipEngine();
823
+ const queryParams = __spreadValues$D({}, params);
824
+ return useQuery(__spreadProps$C(__spreadValues$D({}, queryParams), {
825
+ onError,
826
+ queryFn: () => client.auctanePay.getPaymentMethods(),
827
+ queryKey: ["useGetPaymentMethods"],
828
+ select: (result) => result.data
829
+ }));
830
+ };
831
+
673
832
  var __defProp$C = Object.defineProperty;
674
833
  var __defProps$B = Object.defineProperties;
675
834
  var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
@@ -689,14 +848,35 @@ var __spreadValues$C = (a, b) => {
689
848
  return a;
690
849
  };
691
850
  var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
692
- const useGetPaymentMethods = (params) => {
851
+ var __async$S = (__this, __arguments, generator) => {
852
+ return new Promise((resolve, reject) => {
853
+ var fulfilled = (value) => {
854
+ try {
855
+ step(generator.next(value));
856
+ } catch (e) {
857
+ reject(e);
858
+ }
859
+ };
860
+ var rejected = (value) => {
861
+ try {
862
+ step(generator.throw(value));
863
+ } catch (e) {
864
+ reject(e);
865
+ }
866
+ };
867
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
868
+ step((generator = generator.apply(__this, __arguments)).next());
869
+ });
870
+ };
871
+ const useDeletePaymentMethod = (params) => {
693
872
  const { client } = useShipEngine();
694
- const queryParams = __spreadValues$C({}, params);
695
- return useQuery(__spreadProps$B(__spreadValues$C({}, queryParams), {
696
- onError,
697
- queryFn: () => client.auctanePay.getPaymentMethods(),
698
- queryKey: ["useGetPaymentMethods"],
699
- select: (result) => result.data
873
+ return useMutation(__spreadProps$B(__spreadValues$C({}, params), {
874
+ mutationFn: (paymentMethodId) => __async$S(void 0, null, function* () {
875
+ const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
876
+ return result.data;
877
+ }),
878
+ mutationKey: ["useDeletePaymentMethod"],
879
+ onError
700
880
  }));
701
881
  };
702
882
 
@@ -719,7 +899,7 @@ var __spreadValues$B = (a, b) => {
719
899
  return a;
720
900
  };
721
901
  var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
722
- var __async$Q = (__this, __arguments, generator) => {
902
+ var __async$R = (__this, __arguments, generator) => {
723
903
  return new Promise((resolve, reject) => {
724
904
  var fulfilled = (value) => {
725
905
  try {
@@ -739,14 +919,14 @@ var __async$Q = (__this, __arguments, generator) => {
739
919
  step((generator = generator.apply(__this, __arguments)).next());
740
920
  });
741
921
  };
742
- const useDeletePaymentMethod = (params) => {
922
+ const useUpdatePaymentMethod = (params) => {
743
923
  const { client } = useShipEngine();
744
924
  return useMutation(__spreadProps$A(__spreadValues$B({}, params), {
745
- mutationFn: (paymentMethodId) => __async$Q(void 0, null, function* () {
746
- const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
925
+ mutationFn: (_0) => __async$R(void 0, [_0], function* ({ paymentMethodId, payload }) {
926
+ const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
747
927
  return result.data;
748
928
  }),
749
- mutationKey: ["useDeletePaymentMethod"],
929
+ mutationKey: ["useUpdatePaymentMethod"],
750
930
  onError
751
931
  }));
752
932
  };
@@ -770,7 +950,7 @@ var __spreadValues$A = (a, b) => {
770
950
  return a;
771
951
  };
772
952
  var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
773
- var __async$P = (__this, __arguments, generator) => {
953
+ var __async$Q = (__this, __arguments, generator) => {
774
954
  return new Promise((resolve, reject) => {
775
955
  var fulfilled = (value) => {
776
956
  try {
@@ -790,14 +970,14 @@ var __async$P = (__this, __arguments, generator) => {
790
970
  step((generator = generator.apply(__this, __arguments)).next());
791
971
  });
792
972
  };
793
- const useUpdatePaymentMethod = (params) => {
973
+ const useIdentityVerification = (params) => {
794
974
  const { client } = useShipEngine();
795
975
  return useMutation(__spreadProps$z(__spreadValues$A({}, params), {
796
- mutationFn: (_0) => __async$P(void 0, [_0], function* ({ paymentMethodId, payload }) {
797
- const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
976
+ mutationFn: () => __async$Q(void 0, null, function* () {
977
+ const result = yield client.auctanePay.identityVerification();
798
978
  return result.data;
799
979
  }),
800
- mutationKey: ["useUpdatePaymentMethod"],
980
+ mutationKey: ["useIdentityVerification"],
801
981
  onError
802
982
  }));
803
983
  };
@@ -821,7 +1001,18 @@ var __spreadValues$z = (a, b) => {
821
1001
  return a;
822
1002
  };
823
1003
  var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
824
- var __async$O = (__this, __arguments, generator) => {
1004
+ const useGetPaymentAccount = (params) => {
1005
+ const { client } = useShipEngine();
1006
+ const queryParams = __spreadValues$z({}, params);
1007
+ return useQuery(__spreadProps$y(__spreadValues$z({}, queryParams), {
1008
+ onError,
1009
+ queryFn: () => client.auctanePay.getPaymentAccount(),
1010
+ queryKey: ["useGetPaymentAccount"],
1011
+ select: (result) => result.data
1012
+ }));
1013
+ };
1014
+
1015
+ var __async$P = (__this, __arguments, generator) => {
825
1016
  return new Promise((resolve, reject) => {
826
1017
  var fulfilled = (value) => {
827
1018
  try {
@@ -841,49 +1032,19 @@ var __async$O = (__this, __arguments, generator) => {
841
1032
  step((generator = generator.apply(__this, __arguments)).next());
842
1033
  });
843
1034
  };
844
- const useIdentityVerification = (params) => {
845
- const { client } = useShipEngine();
846
- return useMutation(__spreadProps$y(__spreadValues$z({}, params), {
847
- mutationFn: () => __async$O(void 0, null, function* () {
848
- const result = yield client.auctanePay.identityVerification();
849
- return result.data;
850
- }),
851
- mutationKey: ["useIdentityVerification"],
852
- onError
853
- }));
854
- };
855
-
856
- var __defProp$y = Object.defineProperty;
857
- var __defProps$x = Object.defineProperties;
858
- var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
859
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
860
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
861
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
862
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
863
- var __spreadValues$y = (a, b) => {
864
- for (var prop in b || (b = {}))
865
- if (__hasOwnProp$H.call(b, prop))
866
- __defNormalProp$y(a, prop, b[prop]);
867
- if (__getOwnPropSymbols$H)
868
- for (var prop of __getOwnPropSymbols$H(b)) {
869
- if (__propIsEnum$H.call(b, prop))
870
- __defNormalProp$y(a, prop, b[prop]);
871
- }
872
- return a;
873
- };
874
- var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
875
- const useGetPaymentAccount = (params) => {
1035
+ const useAcceptCarrierTerms = (carrierId) => {
876
1036
  const { client } = useShipEngine();
877
- const queryParams = __spreadValues$y({}, params);
878
- return useQuery(__spreadProps$x(__spreadValues$y({}, queryParams), {
879
- onError,
880
- queryFn: () => client.auctanePay.getPaymentAccount(),
881
- queryKey: ["useGetPaymentAccount"],
882
- select: (result) => result.data
883
- }));
1037
+ return useMutation({
1038
+ mutationFn: (request) => __async$P(void 0, null, function* () {
1039
+ const result = yield client.carriers.acceptTerms(carrierId, request);
1040
+ return result.data.acceptedTerms;
1041
+ }),
1042
+ mutationKey: ["useAcceptCarrierTerms", carrierId],
1043
+ onError
1044
+ });
884
1045
  };
885
1046
 
886
- var __async$N = (__this, __arguments, generator) => {
1047
+ var __async$O = (__this, __arguments, generator) => {
887
1048
  return new Promise((resolve, reject) => {
888
1049
  var fulfilled = (value) => {
889
1050
  try {
@@ -906,7 +1067,7 @@ var __async$N = (__this, __arguments, generator) => {
906
1067
  const useAddFunds = () => {
907
1068
  const { client } = useShipEngine();
908
1069
  return useMutation({
909
- mutationFn: (_0) => __async$N(void 0, [_0], function* ({ carrierId, funds }) {
1070
+ mutationFn: (_0) => __async$O(void 0, [_0], function* ({ carrierId, funds }) {
910
1071
  const result = yield client.carriers.addFunds(carrierId, funds);
911
1072
  return result.data;
912
1073
  }),
@@ -915,7 +1076,7 @@ const useAddFunds = () => {
915
1076
  });
916
1077
  };
917
1078
 
918
- var __async$M = (__this, __arguments, generator) => {
1079
+ var __async$N = (__this, __arguments, generator) => {
919
1080
  return new Promise((resolve, reject) => {
920
1081
  var fulfilled = (value) => {
921
1082
  try {
@@ -938,7 +1099,7 @@ var __async$M = (__this, __arguments, generator) => {
938
1099
  const useConnectCarrier = () => {
939
1100
  const { client } = useShipEngine();
940
1101
  return useMutation({
941
- mutationFn: (params) => __async$M(void 0, null, function* () {
1102
+ mutationFn: (params) => __async$N(void 0, null, function* () {
942
1103
  const result = yield client.carriers.connect(params);
943
1104
  return result.data;
944
1105
  }),
@@ -1047,41 +1208,41 @@ const useGetServicesByCarrier = (carrierId) => {
1047
1208
  });
1048
1209
  };
1049
1210
 
1050
- var __defProp$x = Object.defineProperty;
1051
- var __defProps$w = Object.defineProperties;
1052
- var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
1053
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
1054
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
1055
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
1056
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1057
- var __spreadValues$x = (a, b) => {
1211
+ var __defProp$y = Object.defineProperty;
1212
+ var __defProps$x = Object.defineProperties;
1213
+ var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
1214
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
1215
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
1216
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
1217
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1218
+ var __spreadValues$y = (a, b) => {
1058
1219
  for (var prop in b || (b = {}))
1059
- if (__hasOwnProp$G.call(b, prop))
1060
- __defNormalProp$x(a, prop, b[prop]);
1061
- if (__getOwnPropSymbols$G)
1062
- for (var prop of __getOwnPropSymbols$G(b)) {
1063
- if (__propIsEnum$G.call(b, prop))
1064
- __defNormalProp$x(a, prop, b[prop]);
1220
+ if (__hasOwnProp$H.call(b, prop))
1221
+ __defNormalProp$y(a, prop, b[prop]);
1222
+ if (__getOwnPropSymbols$H)
1223
+ for (var prop of __getOwnPropSymbols$H(b)) {
1224
+ if (__propIsEnum$H.call(b, prop))
1225
+ __defNormalProp$y(a, prop, b[prop]);
1065
1226
  }
1066
1227
  return a;
1067
1228
  };
1068
- var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
1229
+ var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
1069
1230
  var __objRest$q = (source, exclude) => {
1070
1231
  var target = {};
1071
1232
  for (var prop in source)
1072
- if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
1233
+ if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
1073
1234
  target[prop] = source[prop];
1074
- if (source != null && __getOwnPropSymbols$G)
1075
- for (var prop of __getOwnPropSymbols$G(source)) {
1076
- if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
1235
+ if (source != null && __getOwnPropSymbols$H)
1236
+ for (var prop of __getOwnPropSymbols$H(source)) {
1237
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
1077
1238
  target[prop] = source[prop];
1078
1239
  }
1079
1240
  return target;
1080
1241
  };
1081
1242
  const useListCarriers = (params) => {
1082
1243
  const { client } = useShipEngine();
1083
- const _a = __spreadValues$x({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
1084
- return useQuery(__spreadProps$w(__spreadValues$x({}, rest), {
1244
+ const _a = __spreadValues$y({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
1245
+ return useQuery(__spreadProps$x(__spreadValues$y({}, rest), {
1085
1246
  onError,
1086
1247
  queryFn: () => client.carriers.list(queryFnParams),
1087
1248
  queryKey: ["useListCarriers", queryFnParams],
@@ -1089,22 +1250,22 @@ const useListCarriers = (params) => {
1089
1250
  }));
1090
1251
  };
1091
1252
 
1092
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
1093
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
1094
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
1253
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
1254
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
1255
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
1095
1256
  var __objRest$p = (source, exclude) => {
1096
1257
  var target = {};
1097
1258
  for (var prop in source)
1098
- if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
1259
+ if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
1099
1260
  target[prop] = source[prop];
1100
- if (source != null && __getOwnPropSymbols$F)
1101
- for (var prop of __getOwnPropSymbols$F(source)) {
1102
- if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
1261
+ if (source != null && __getOwnPropSymbols$G)
1262
+ for (var prop of __getOwnPropSymbols$G(source)) {
1263
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
1103
1264
  target[prop] = source[prop];
1104
1265
  }
1105
1266
  return target;
1106
1267
  };
1107
- var __async$L = (__this, __arguments, generator) => {
1268
+ var __async$M = (__this, __arguments, generator) => {
1108
1269
  return new Promise((resolve, reject) => {
1109
1270
  var fulfilled = (value) => {
1110
1271
  try {
@@ -1128,7 +1289,7 @@ const useUpdateAutoFunding = () => {
1128
1289
  const { client } = useShipEngine();
1129
1290
  const queryClient = useQueryClient();
1130
1291
  return useMutation({
1131
- mutationFn: (_a) => __async$L(void 0, null, function* () {
1292
+ mutationFn: (_a) => __async$M(void 0, null, function* () {
1132
1293
  var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
1133
1294
  const result = yield client.carriers.updateAutoFunding(carrierId, options);
1134
1295
  return result.data;
@@ -1158,7 +1319,7 @@ const useGetZonesByCarrier = (carrierId) => {
1158
1319
  });
1159
1320
  };
1160
1321
 
1161
- var __async$K = (__this, __arguments, generator) => {
1322
+ var __async$L = (__this, __arguments, generator) => {
1162
1323
  return new Promise((resolve, reject) => {
1163
1324
  var fulfilled = (value) => {
1164
1325
  try {
@@ -1181,7 +1342,7 @@ var __async$K = (__this, __arguments, generator) => {
1181
1342
  const useDeleteCarrier = () => {
1182
1343
  const { client } = useShipEngine();
1183
1344
  return useMutation({
1184
- mutationFn: (carrierId) => __async$K(void 0, null, function* () {
1345
+ mutationFn: (carrierId) => __async$L(void 0, null, function* () {
1185
1346
  const result = yield client.carriers.delete(carrierId);
1186
1347
  return result.data;
1187
1348
  }),
@@ -1190,17 +1351,17 @@ const useDeleteCarrier = () => {
1190
1351
  });
1191
1352
  };
1192
1353
 
1193
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
1194
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
1195
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
1354
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
1355
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
1356
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
1196
1357
  var __objRest$o = (source, exclude) => {
1197
1358
  var target = {};
1198
1359
  for (var prop in source)
1199
- if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
1360
+ if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
1200
1361
  target[prop] = source[prop];
1201
- if (source != null && __getOwnPropSymbols$E)
1202
- for (var prop of __getOwnPropSymbols$E(source)) {
1203
- if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
1362
+ if (source != null && __getOwnPropSymbols$F)
1363
+ for (var prop of __getOwnPropSymbols$F(source)) {
1364
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
1204
1365
  target[prop] = source[prop];
1205
1366
  }
1206
1367
  return target;
@@ -1217,17 +1378,17 @@ const useGetCarrierConnectionForm = (_params) => {
1217
1378
  });
1218
1379
  };
1219
1380
 
1220
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1221
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1222
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1381
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
1382
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
1383
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
1223
1384
  var __objRest$n = (source, exclude) => {
1224
1385
  var target = {};
1225
1386
  for (var prop in source)
1226
- if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
1387
+ if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
1227
1388
  target[prop] = source[prop];
1228
- if (source != null && __getOwnPropSymbols$D)
1229
- for (var prop of __getOwnPropSymbols$D(source)) {
1230
- if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
1389
+ if (source != null && __getOwnPropSymbols$E)
1390
+ for (var prop of __getOwnPropSymbols$E(source)) {
1391
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
1231
1392
  target[prop] = source[prop];
1232
1393
  }
1233
1394
  return target;
@@ -1244,26 +1405,26 @@ const useListCarrierConnections = (_params) => {
1244
1405
  });
1245
1406
  };
1246
1407
 
1247
- var __defProp$w = Object.defineProperty;
1248
- var __defProps$v = Object.defineProperties;
1249
- var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
1250
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
1251
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
1252
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
1253
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1254
- var __spreadValues$w = (a, b) => {
1408
+ var __defProp$x = Object.defineProperty;
1409
+ var __defProps$w = Object.defineProperties;
1410
+ var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
1411
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1412
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1413
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1414
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1415
+ var __spreadValues$x = (a, b) => {
1255
1416
  for (var prop in b || (b = {}))
1256
- if (__hasOwnProp$C.call(b, prop))
1257
- __defNormalProp$w(a, prop, b[prop]);
1258
- if (__getOwnPropSymbols$C)
1259
- for (var prop of __getOwnPropSymbols$C(b)) {
1260
- if (__propIsEnum$C.call(b, prop))
1261
- __defNormalProp$w(a, prop, b[prop]);
1417
+ if (__hasOwnProp$D.call(b, prop))
1418
+ __defNormalProp$x(a, prop, b[prop]);
1419
+ if (__getOwnPropSymbols$D)
1420
+ for (var prop of __getOwnPropSymbols$D(b)) {
1421
+ if (__propIsEnum$D.call(b, prop))
1422
+ __defNormalProp$x(a, prop, b[prop]);
1262
1423
  }
1263
1424
  return a;
1264
1425
  };
1265
- var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
1266
- var __async$J = (__this, __arguments, generator) => {
1426
+ var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
1427
+ var __async$K = (__this, __arguments, generator) => {
1267
1428
  return new Promise((resolve, reject) => {
1268
1429
  var fulfilled = (value) => {
1269
1430
  try {
@@ -1286,8 +1447,8 @@ var __async$J = (__this, __arguments, generator) => {
1286
1447
  const useConnectCarrierAccount = () => {
1287
1448
  const { client } = useShipEngine();
1288
1449
  return useMutation({
1289
- mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierName, formData }) {
1290
- const formDataWithFlag = __spreadProps$v(__spreadValues$w({}, formData), { __skipDecamelize: true });
1450
+ mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierName, formData }) {
1451
+ const formDataWithFlag = __spreadProps$w(__spreadValues$x({}, formData), { __skipDecamelize: true });
1291
1452
  const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
1292
1453
  return result.data;
1293
1454
  }),
@@ -1307,33 +1468,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
1307
1468
  });
1308
1469
  };
1309
1470
 
1310
- var __defProp$v = Object.defineProperty;
1311
- var __defProps$u = Object.defineProperties;
1312
- var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
1313
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
1314
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
1315
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
1316
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1317
- var __spreadValues$v = (a, b) => {
1471
+ var __defProp$w = Object.defineProperty;
1472
+ var __defProps$v = Object.defineProperties;
1473
+ var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
1474
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
1475
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
1476
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
1477
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1478
+ var __spreadValues$w = (a, b) => {
1318
1479
  for (var prop in b || (b = {}))
1319
- if (__hasOwnProp$B.call(b, prop))
1320
- __defNormalProp$v(a, prop, b[prop]);
1321
- if (__getOwnPropSymbols$B)
1322
- for (var prop of __getOwnPropSymbols$B(b)) {
1323
- if (__propIsEnum$B.call(b, prop))
1324
- __defNormalProp$v(a, prop, b[prop]);
1480
+ if (__hasOwnProp$C.call(b, prop))
1481
+ __defNormalProp$w(a, prop, b[prop]);
1482
+ if (__getOwnPropSymbols$C)
1483
+ for (var prop of __getOwnPropSymbols$C(b)) {
1484
+ if (__propIsEnum$C.call(b, prop))
1485
+ __defNormalProp$w(a, prop, b[prop]);
1325
1486
  }
1326
1487
  return a;
1327
1488
  };
1328
- var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1489
+ var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
1329
1490
  var __objRest$m = (source, exclude) => {
1330
1491
  var target = {};
1331
1492
  for (var prop in source)
1332
- if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
1493
+ if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
1333
1494
  target[prop] = source[prop];
1334
- if (source != null && __getOwnPropSymbols$B)
1335
- for (var prop of __getOwnPropSymbols$B(source)) {
1336
- if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
1495
+ if (source != null && __getOwnPropSymbols$C)
1496
+ for (var prop of __getOwnPropSymbols$C(source)) {
1497
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
1337
1498
  target[prop] = source[prop];
1338
1499
  }
1339
1500
  return target;
@@ -1346,7 +1507,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
1346
1507
  ]);
1347
1508
  const { client } = useShipEngine();
1348
1509
  const { carrierName, carrierId } = queryFnParams;
1349
- return useQuery(__spreadProps$u(__spreadValues$v({}, params), {
1510
+ return useQuery(__spreadProps$v(__spreadValues$w({}, params), {
1350
1511
  onError,
1351
1512
  queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
1352
1513
  queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
@@ -1354,26 +1515,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
1354
1515
  }));
1355
1516
  };
1356
1517
 
1357
- var __defProp$u = Object.defineProperty;
1358
- var __defProps$t = Object.defineProperties;
1359
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1360
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1361
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1362
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1363
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1364
- var __spreadValues$u = (a, b) => {
1518
+ var __defProp$v = Object.defineProperty;
1519
+ var __defProps$u = Object.defineProperties;
1520
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
1521
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
1522
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
1523
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
1524
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1525
+ var __spreadValues$v = (a, b) => {
1365
1526
  for (var prop in b || (b = {}))
1366
- if (__hasOwnProp$A.call(b, prop))
1367
- __defNormalProp$u(a, prop, b[prop]);
1368
- if (__getOwnPropSymbols$A)
1369
- for (var prop of __getOwnPropSymbols$A(b)) {
1370
- if (__propIsEnum$A.call(b, prop))
1371
- __defNormalProp$u(a, prop, b[prop]);
1527
+ if (__hasOwnProp$B.call(b, prop))
1528
+ __defNormalProp$v(a, prop, b[prop]);
1529
+ if (__getOwnPropSymbols$B)
1530
+ for (var prop of __getOwnPropSymbols$B(b)) {
1531
+ if (__propIsEnum$B.call(b, prop))
1532
+ __defNormalProp$v(a, prop, b[prop]);
1372
1533
  }
1373
1534
  return a;
1374
1535
  };
1375
- var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
1376
- var __async$I = (__this, __arguments, generator) => {
1536
+ var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1537
+ var __async$J = (__this, __arguments, generator) => {
1377
1538
  return new Promise((resolve, reject) => {
1378
1539
  var fulfilled = (value) => {
1379
1540
  try {
@@ -1395,8 +1556,8 @@ var __async$I = (__this, __arguments, generator) => {
1395
1556
  };
1396
1557
  const useUpdateConnectionsCarrierSettings = (params) => {
1397
1558
  const { client } = useShipEngine();
1398
- return useMutation(__spreadProps$t(__spreadValues$u({}, params), {
1399
- mutationFn: (_0) => __async$I(void 0, [_0], function* ({
1559
+ return useMutation(__spreadProps$u(__spreadValues$v({}, params), {
1560
+ mutationFn: (_0) => __async$J(void 0, [_0], function* ({
1400
1561
  carrierName,
1401
1562
  carrierId,
1402
1563
  formData
@@ -1413,26 +1574,26 @@ const useUpdateConnectionsCarrierSettings = (params) => {
1413
1574
  }));
1414
1575
  };
1415
1576
 
1416
- var __defProp$t = Object.defineProperty;
1417
- var __defProps$s = Object.defineProperties;
1418
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
1419
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1420
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1421
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1422
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1423
- var __spreadValues$t = (a, b) => {
1577
+ var __defProp$u = Object.defineProperty;
1578
+ var __defProps$t = Object.defineProperties;
1579
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1580
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1581
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1582
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1583
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1584
+ var __spreadValues$u = (a, b) => {
1424
1585
  for (var prop in b || (b = {}))
1425
- if (__hasOwnProp$z.call(b, prop))
1426
- __defNormalProp$t(a, prop, b[prop]);
1427
- if (__getOwnPropSymbols$z)
1428
- for (var prop of __getOwnPropSymbols$z(b)) {
1429
- if (__propIsEnum$z.call(b, prop))
1430
- __defNormalProp$t(a, prop, b[prop]);
1586
+ if (__hasOwnProp$A.call(b, prop))
1587
+ __defNormalProp$u(a, prop, b[prop]);
1588
+ if (__getOwnPropSymbols$A)
1589
+ for (var prop of __getOwnPropSymbols$A(b)) {
1590
+ if (__propIsEnum$A.call(b, prop))
1591
+ __defNormalProp$u(a, prop, b[prop]);
1431
1592
  }
1432
1593
  return a;
1433
1594
  };
1434
- var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
1435
- var __async$H = (__this, __arguments, generator) => {
1595
+ var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
1596
+ var __async$I = (__this, __arguments, generator) => {
1436
1597
  return new Promise((resolve, reject) => {
1437
1598
  var fulfilled = (value) => {
1438
1599
  try {
@@ -1454,8 +1615,8 @@ var __async$H = (__this, __arguments, generator) => {
1454
1615
  };
1455
1616
  const useRequestStampsAccountUrls = (params) => {
1456
1617
  const { client } = useShipEngine();
1457
- return useMutation(__spreadProps$s(__spreadValues$t({}, params), {
1458
- mutationFn: (request) => __async$H(void 0, null, function* () {
1618
+ return useMutation(__spreadProps$t(__spreadValues$u({}, params), {
1619
+ mutationFn: (request) => __async$I(void 0, null, function* () {
1459
1620
  const result = yield client.connections.requestStampsAccountUrls(request);
1460
1621
  return result.data;
1461
1622
  }),
@@ -1474,6 +1635,38 @@ const useListCustomPackageTypes = () => {
1474
1635
  });
1475
1636
  };
1476
1637
 
1638
+ var __async$H = (__this, __arguments, generator) => {
1639
+ return new Promise((resolve, reject) => {
1640
+ var fulfilled = (value) => {
1641
+ try {
1642
+ step(generator.next(value));
1643
+ } catch (e) {
1644
+ reject(e);
1645
+ }
1646
+ };
1647
+ var rejected = (value) => {
1648
+ try {
1649
+ step(generator.throw(value));
1650
+ } catch (e) {
1651
+ reject(e);
1652
+ }
1653
+ };
1654
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
1655
+ step((generator = generator.apply(__this, __arguments)).next());
1656
+ });
1657
+ };
1658
+ const useAcceptFundingSourceTerms = (fundingSourceId) => {
1659
+ const { client } = useShipEngine();
1660
+ return useMutation({
1661
+ mutationFn: (request) => __async$H(void 0, null, function* () {
1662
+ const result = yield client.fundingSources.acceptTerms(fundingSourceId, request);
1663
+ return result.data.acceptedTerms;
1664
+ }),
1665
+ mutationKey: ["useAcceptFundingSourceTerms", fundingSourceId],
1666
+ onError
1667
+ });
1668
+ };
1669
+
1477
1670
  var __async$G = (__this, __arguments, generator) => {
1478
1671
  return new Promise((resolve, reject) => {
1479
1672
  var fulfilled = (value) => {
@@ -1538,6 +1731,36 @@ const useFundingSourcesAddFunds = () => {
1538
1731
  });
1539
1732
  };
1540
1733
 
1734
+ var __defProp$t = Object.defineProperty;
1735
+ var __defProps$s = Object.defineProperties;
1736
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
1737
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1738
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1739
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1740
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1741
+ var __spreadValues$t = (a, b) => {
1742
+ for (var prop in b || (b = {}))
1743
+ if (__hasOwnProp$z.call(b, prop))
1744
+ __defNormalProp$t(a, prop, b[prop]);
1745
+ if (__getOwnPropSymbols$z)
1746
+ for (var prop of __getOwnPropSymbols$z(b)) {
1747
+ if (__propIsEnum$z.call(b, prop))
1748
+ __defNormalProp$t(a, prop, b[prop]);
1749
+ }
1750
+ return a;
1751
+ };
1752
+ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
1753
+ const useGetFundingSourceAcceptedTerms = (fundingSourceId, params) => {
1754
+ const { client } = useShipEngine();
1755
+ const queryParams = __spreadValues$t({}, params);
1756
+ return useQuery(__spreadProps$s(__spreadValues$t({}, queryParams), {
1757
+ onError,
1758
+ queryFn: () => client.fundingSources.acceptedTerms(fundingSourceId),
1759
+ queryKey: ["useGetFundingSourceAcceptedTerms", fundingSourceId],
1760
+ select: (result) => result.data.acceptedTerms
1761
+ }));
1762
+ };
1763
+
1541
1764
  const useGetFundingSourceById = (fundingSourceId) => {
1542
1765
  const { client } = useShipEngine();
1543
1766
  return useQuery({
@@ -4268,4 +4491,4 @@ const useListUsers = (params) => {
4268
4491
  }));
4269
4492
  };
4270
4493
 
4271
- export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDisableAccountAddon, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestAccountFeature, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
4494
+ export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAcceptCarrierTerms, useAcceptFundingSourceTerms, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDisableAccountAddon, useDisableRefundAssist, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useEnableRefundAssist, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceAcceptedTerms, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetRefundAssist, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestAccountFeature, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };