@shipengine/react-api 4.3.5 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/index.d.ts +1 -0
- package/hooks/users/index.d.ts +1 -0
- package/hooks/users/use-list-users.d.ts +8 -0
- package/index.js +768 -725
- package/index.mjs +768 -726
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -76,25 +76,25 @@ const onError = (_errors) => _default();
|
|
|
76
76
|
|
|
77
77
|
var o={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},l={};function a(e){return "string"==typeof e?o[e.toLowerCase()]:e}function c(e,r){return c=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},c(e,r)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function f(e,r,t){return f=u()?Reflect.construct:function(e,r,t){var s=[null];s.push.apply(s,r);var i=new(Function.bind.apply(e,s));return t&&c(i,t.prototype),i},f.apply(null,arguments)}function h(e){if(null==e)return e;if(Array.isArray(e))return e.slice();if("object"==typeof e){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t];}),r}return e}function v(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"[ "+e.map(function(e){return v(e)}).join(", ")+" ]":"object"==typeof e?JSON.stringify(e):"function"==typeof e?"[Function: "+e.name+"]":"boolean"==typeof e||"number"==typeof e?e:"'"+e.toString()+"'"}function p(e){if("string"!=typeof e){for(var r=new Array(arguments.length),t=0;t<arguments.length;t++)r[t]=v(arguments[t]);return r.join(" ")}for(var s=/%[sdj%]/g,i=1,n=arguments,o=n.length,l=String(e).replace(s,function(e){if("%%"===e)return "%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return "[Circular]"}default:return e}}),a=n[i];i<o;a=n[++i])l+=null===a||"object"!=typeof a?" "+a:" "+v(a);return l}function m(e,r){var t=e.split("\n");t[0]&&t[0].indexOf("call-stack-error")>=0&&t.shift();var s=t[r],i=null;if(s){var n=/^\s*(at|.*@)\s*(.+)?$/.exec(s);i=Array.isArray(n)&&n[2]?n[2]:s;}return i}Object.keys(o).forEach(function(e){l[o[e]]=e;});var y={};function d(e,r){if(r){if(y[r])return;y[r]=!0;}console.error(e+"\n");}function g(e){return y[e]}function w(){var e=[];return function(r,t){return t&&"object"==typeof t?-1!==e.indexOf(t)?"[Circular]":(e.push(t),t):t}}var b=/*#__PURE__*/function(){function e(){}return e.prototype.write=function(e){e.level<30?console.log(e):e.level<40?console.info(e):e.level<50?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj);},e}(),j=/*#__PURE__*/function(){function e(r,t,s){var i,n,o,l,a=this;if(!(this instanceof e))return new e(r,t);if(void 0!==t&&(i=r,r=t,!(i instanceof e)))throw new TypeError("invalid Logger creation: do not pass a second arg");if(!r)throw new TypeError("options (object) is required");if(i){if(r.name)throw new TypeError("invalid options.name: child cannot set logger name")}else if(!r.name)throw new TypeError("options.name (string) is required");if(r.stream&&r.streams)throw new TypeError('cannot mix "streams" and "stream" options');if(r.streams&&!Array.isArray(r.streams))throw new TypeError("invalid options.streams: must be an array");if(r.serializers&&("object"!=typeof r.serializers||Array.isArray(r.serializers)))throw new TypeError("invalid options.serializers: must be an object");if(i&&s){this._level=i._level,this.streams=i.streams,this.serializers=i.serializers,this.src=i.src,n=this.fields={};var c=Object.keys(i.fields);for(l=0;l<c.length;l++)n[o=c[l]]=i.fields[o];var u=Object.keys(r);for(l=0;l<u.length;l++)n[o=u[l]]=r[o];}else {if(i){for(this._level=i._level,this.streams=[],l=0;l<i.streams.length;l++){var f=h(i.streams[l]);this.streams.push(f);}this.serializers=h(i.serializers),this.src=i.src,this.fields=h(i.fields),r.level&&this.level(r.level);}else this._level=Number.POSITIVE_INFINITY,this.streams=[],this.serializers=null,this.src=!1,this.fields={};r.stream?this.addStream({type:"stream",stream:r.stream,level:r.level}):r.streams?r.streams.forEach(function(e){a.addStream(e,r.level);}):i&&r.level?this.level(r.level):i||this.addStream({type:"raw",stream:new b,level:r.level}),r.serializers&&this.addSerializers(r.serializers),r.src&&(this.src=!0),delete(n=h(r)).stream,delete n.level,delete n.streams,delete n.serializers,delete n.src,this.serializers&&this._applySerializers(n),Object.keys(n).forEach(function(e){a.fields[e]=n[e];});}}var r=e.prototype;return r.addStream=function(e,r){void 0===r&&(r=30),(e=h(e)).type="raw",e.level=a(e.level||r),e.level<this._level&&(this._level=e.level),this.streams.push(e),delete this.haveNonRawStreams;},r.addSerializers=function(e){var r=this;this.serializers||(this.serializers={}),Object.keys(e).forEach(function(t){var s=e[t];if("function"!=typeof s)throw new TypeError(p('invalid serializer for "%s" field: must be a function',t));r.serializers[t]=s;});},r.child=function(e,r){return new this.constructor(this,e||{},r)},r.level=function(e){if(void 0===e)return this._level;for(var r=a(e),t=this.streams.length,s=0;s<t;s++)this.streams[s].level=r;this._level=r;},r.levels=function(e,r){if(void 0===e)return this.streams.map(function(e){return e.level});var t;if("number"==typeof e){if(void 0===(t=this.streams[e]))throw new Error("invalid stream index: "+e)}else {for(var s=this.streams.length,i=0;i<s;i++){var n=this.streams[i];if(n.name===e){t=n;break}}if(!t)throw new Error(p('no stream with name "%s"',e))}if(void 0===r)return t.level;var o=a(r);t.level=o,o<this._level&&(this._level=o);},r._applySerializers=function(e,r){var t=this;Object.keys(this.serializers).forEach(function(s){if(!(void 0===e[s]||r&&r[s]))try{e[s]=t.serializers[s](e[s]);}catch(r){d(p('bunyan: ERROR: Exception thrown from the "%s" Bunyan serializer. This should never happen. This is a bugin that serializer function.\n%s',s,r.stack||r)),e[s]=p('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)',s);}});},r._emit=function(e,r){var t,s;if(void 0===this.haveNonRawStreams)for(this.haveNonRawStreams=!1,t=0;t<this.streams.length;t++)if(!this.streams[t].raw){this.haveNonRawStreams=!0;break}if(r||this.haveNonRawStreams)try{s=JSON.stringify(e,w())+"\n";}catch(r){var i=r.stack.split(/\n/g,2).join("\n");d('bunyan: ERROR: Exception in `JSON.stringify(rec)`. You can install the "safe-json-stringify" module to have Bunyan fallback to safer stringification. Record:\n'+function(e,r){return r||(r=" "),r+e.split(/\r?\n/g).join("\n"+r)}(p("%s\n%s",e,r.stack)),i),s=p("(Exception in JSON.stringify(rec): %j. See stderr for details.)\n",r.message);}if(r)return s;var n=e.level;for(t=0;t<this.streams.length;t++){var o=this.streams[t];o.level<=n&&o.stream.write(e);}return s},e}();function z(e){return function(){var r=this;function t(t){var n;t[0]instanceof Error?(s={err:r.serializers&&r.serializers.err?r.serializers.err(t[0]):k.err(t[0])},n={err:!0},i=1===t.length?[s.err.message]:Array.prototype.slice.call(t,1)):"object"!=typeof t[0]&&null!==t[0]||Array.isArray(t[0])?(s=null,i=Array.prototype.slice.call(t)):(s=t[0],i=1===t.length&&s.err&&s.err instanceof Error?[s.err.message]:Array.prototype.slice.call(t,1));var o=h(r.fields);o.level=e;var a=s?h(s):null;if(a&&(r.serializers&&r._applySerializers(a,n),Object.keys(a).forEach(function(e){o[e]=a[e];})),o.levelName=l[e],o.msg=i.length?p.apply(r,i):"",o.time||(o.time=new Date),r.src&&!o.src)try{throw new Error("call-stack-error")}catch(e){var c=e.stack?m(e.stack,2):"";c||g("src")||d("Unable to determine src line info","src"),o.src=c||"";}return o.v=1,o}var s=null,i=arguments,n=null;if(0===arguments.length)return this._level<=e;this._level>e||(n=t(i),this._emit(n));}}function S(e){var r=e.stack||e.toString();if(e.cause&&"function"==typeof e.cause){var t=e.cause();t&&(r+="\nCaused by: "+S(t));}return r}j.prototype.trace=z(10),j.prototype.debug=z(20),j.prototype.info=z(30),j.prototype.warn=z(40),j.prototype.error=z(50),j.prototype.fatal=z(60);var k={err:function(e){return e&&e.stack?{message:e.message,name:e.name,stack:S(e),code:e.code,signal:e.signal}:e}};function E(){return f(j,[].slice.call(arguments))}var A={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},R=/*#__PURE__*/function(){function e(e){var r=void 0===e?{}:e,t=r.logByLevel,s=r.css,i=void 0===s?A:s;this.logByLevel=void 0!==t&&t,this.css=i;}return e.prototype.write=function(e){var r,t,s=this.css.def,i=this.css.msg,n=this.css.src,o=e.childName?e.name+"/"+e.childName:e.name,a=l[e.level],c=(Array(6-a.length).join(" ")+a).toUpperCase();this.logByLevel?(10===e.level?a="debug":60===e.level&&(a="error"),t="function"==typeof console[a]?console[a]:console.log):t=console.log,r=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var u=function(e,r){return Array(r+1-(e+"").length).join("0")+e},f=[];f.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),f.push(u(e.time.getHours(),2)),f.push(u(e.time.getMinutes(),2)),f.push(u(e.time.getSeconds(),2)),f.push(u(e.time.getMilliseconds(),4)),f.push(r),f.push(c),f.push(s),f.push(o),f.push(i),f.push(e.msg),e.src&&(f.push(n),f.push(e.src)),e.obj&&(f.push("\n"),f.push(e.obj)),e.err&&e.err.stack&&(f.push("\n"),f.push(e.err.stack)),t.apply(console,f);},e.getDefaultCss=function(){return A},e}();
|
|
78
78
|
|
|
79
|
-
var __defProp$
|
|
80
|
-
var __defProps$
|
|
81
|
-
var __getOwnPropDescs$
|
|
82
|
-
var __getOwnPropSymbols$
|
|
83
|
-
var __hasOwnProp$
|
|
84
|
-
var __propIsEnum$
|
|
85
|
-
var __defNormalProp$
|
|
86
|
-
var __spreadValues$
|
|
79
|
+
var __defProp$z = Object.defineProperty;
|
|
80
|
+
var __defProps$y = Object.defineProperties;
|
|
81
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
82
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
83
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
84
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
85
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
86
|
+
var __spreadValues$z = (a, b) => {
|
|
87
87
|
for (var prop in b || (b = {}))
|
|
88
|
-
if (__hasOwnProp$
|
|
89
|
-
__defNormalProp$
|
|
90
|
-
if (__getOwnPropSymbols$
|
|
91
|
-
for (var prop of __getOwnPropSymbols$
|
|
92
|
-
if (__propIsEnum$
|
|
93
|
-
__defNormalProp$
|
|
88
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
89
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
90
|
+
if (__getOwnPropSymbols$I)
|
|
91
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
92
|
+
if (__propIsEnum$I.call(b, prop))
|
|
93
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
94
94
|
}
|
|
95
95
|
return a;
|
|
96
96
|
};
|
|
97
|
-
var __spreadProps$
|
|
97
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
98
98
|
const streams = [];
|
|
99
99
|
if (process.env.NODE_ENV === "production") {
|
|
100
100
|
streams.push({
|
|
@@ -103,7 +103,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
103
103
|
}
|
|
104
104
|
const logger = E({
|
|
105
105
|
name: "shipengine",
|
|
106
|
-
serializers: __spreadProps$
|
|
106
|
+
serializers: __spreadProps$y(__spreadValues$z({}, k), {
|
|
107
107
|
req: (req) => ({
|
|
108
108
|
headers: req.headers,
|
|
109
109
|
method: req.method,
|
|
@@ -340,25 +340,25 @@ const useValidateAddresses = () => {
|
|
|
340
340
|
});
|
|
341
341
|
};
|
|
342
342
|
|
|
343
|
-
var __defProp$
|
|
344
|
-
var __defProps$
|
|
345
|
-
var __getOwnPropDescs$
|
|
346
|
-
var __getOwnPropSymbols$
|
|
347
|
-
var __hasOwnProp$
|
|
348
|
-
var __propIsEnum$
|
|
349
|
-
var __defNormalProp$
|
|
350
|
-
var __spreadValues$
|
|
343
|
+
var __defProp$y = Object.defineProperty;
|
|
344
|
+
var __defProps$x = Object.defineProperties;
|
|
345
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
346
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
347
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
348
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
349
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
350
|
+
var __spreadValues$y = (a, b) => {
|
|
351
351
|
for (var prop in b || (b = {}))
|
|
352
|
-
if (__hasOwnProp$
|
|
353
|
-
__defNormalProp$
|
|
354
|
-
if (__getOwnPropSymbols$
|
|
355
|
-
for (var prop of __getOwnPropSymbols$
|
|
356
|
-
if (__propIsEnum$
|
|
357
|
-
__defNormalProp$
|
|
352
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
353
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
354
|
+
if (__getOwnPropSymbols$H)
|
|
355
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
356
|
+
if (__propIsEnum$H.call(b, prop))
|
|
357
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
358
358
|
}
|
|
359
359
|
return a;
|
|
360
360
|
};
|
|
361
|
-
var __spreadProps$
|
|
361
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
362
362
|
var __async$N = (__this, __arguments, generator) => {
|
|
363
363
|
return new Promise((resolve, reject) => {
|
|
364
364
|
var fulfilled = (value) => {
|
|
@@ -381,7 +381,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
381
381
|
};
|
|
382
382
|
const useCreateAuctanePaySession = (params) => {
|
|
383
383
|
const { client } = useShipEngine();
|
|
384
|
-
return useMutation(__spreadProps$
|
|
384
|
+
return useMutation(__spreadProps$x(__spreadValues$y({}, params), {
|
|
385
385
|
mutationFn: (request) => __async$N(void 0, null, function* () {
|
|
386
386
|
const result = yield client.auctanePay.createSession(request);
|
|
387
387
|
return result.data;
|
|
@@ -391,29 +391,29 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
391
391
|
}));
|
|
392
392
|
};
|
|
393
393
|
|
|
394
|
-
var __defProp$
|
|
395
|
-
var __defProps$
|
|
396
|
-
var __getOwnPropDescs$
|
|
397
|
-
var __getOwnPropSymbols$
|
|
398
|
-
var __hasOwnProp$
|
|
399
|
-
var __propIsEnum$
|
|
400
|
-
var __defNormalProp$
|
|
401
|
-
var __spreadValues$
|
|
394
|
+
var __defProp$x = Object.defineProperty;
|
|
395
|
+
var __defProps$w = Object.defineProperties;
|
|
396
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
397
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
398
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
399
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
400
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
401
|
+
var __spreadValues$x = (a, b) => {
|
|
402
402
|
for (var prop in b || (b = {}))
|
|
403
|
-
if (__hasOwnProp$
|
|
404
|
-
__defNormalProp$
|
|
405
|
-
if (__getOwnPropSymbols$
|
|
406
|
-
for (var prop of __getOwnPropSymbols$
|
|
407
|
-
if (__propIsEnum$
|
|
408
|
-
__defNormalProp$
|
|
403
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
404
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
405
|
+
if (__getOwnPropSymbols$G)
|
|
406
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
407
|
+
if (__propIsEnum$G.call(b, prop))
|
|
408
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
409
409
|
}
|
|
410
410
|
return a;
|
|
411
411
|
};
|
|
412
|
-
var __spreadProps$
|
|
412
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
413
413
|
const useGetAuctanePayConfig = (params) => {
|
|
414
414
|
const { client } = useShipEngine();
|
|
415
|
-
const queryParams = __spreadValues$
|
|
416
|
-
return useQuery(__spreadProps$
|
|
415
|
+
const queryParams = __spreadValues$x({}, params);
|
|
416
|
+
return useQuery(__spreadProps$w(__spreadValues$x({}, queryParams), {
|
|
417
417
|
onError,
|
|
418
418
|
queryFn: () => client.auctanePay.getConfig(),
|
|
419
419
|
queryKey: ["useGetAuctanePayConfig"],
|
|
@@ -585,41 +585,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
585
585
|
});
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
var __defProp$
|
|
589
|
-
var __defProps$
|
|
590
|
-
var __getOwnPropDescs$
|
|
591
|
-
var __getOwnPropSymbols$
|
|
592
|
-
var __hasOwnProp$
|
|
593
|
-
var __propIsEnum$
|
|
594
|
-
var __defNormalProp$
|
|
595
|
-
var __spreadValues$
|
|
588
|
+
var __defProp$w = Object.defineProperty;
|
|
589
|
+
var __defProps$v = Object.defineProperties;
|
|
590
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
591
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
592
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
593
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
594
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
595
|
+
var __spreadValues$w = (a, b) => {
|
|
596
596
|
for (var prop in b || (b = {}))
|
|
597
|
-
if (__hasOwnProp$
|
|
598
|
-
__defNormalProp$
|
|
599
|
-
if (__getOwnPropSymbols$
|
|
600
|
-
for (var prop of __getOwnPropSymbols$
|
|
601
|
-
if (__propIsEnum$
|
|
602
|
-
__defNormalProp$
|
|
597
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
598
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
599
|
+
if (__getOwnPropSymbols$F)
|
|
600
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
601
|
+
if (__propIsEnum$F.call(b, prop))
|
|
602
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
603
603
|
}
|
|
604
604
|
return a;
|
|
605
605
|
};
|
|
606
|
-
var __spreadProps$
|
|
607
|
-
var __objRest$
|
|
606
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
607
|
+
var __objRest$q = (source, exclude) => {
|
|
608
608
|
var target = {};
|
|
609
609
|
for (var prop in source)
|
|
610
|
-
if (__hasOwnProp$
|
|
610
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
611
611
|
target[prop] = source[prop];
|
|
612
|
-
if (source != null && __getOwnPropSymbols$
|
|
613
|
-
for (var prop of __getOwnPropSymbols$
|
|
614
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
612
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
613
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
614
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
615
615
|
target[prop] = source[prop];
|
|
616
616
|
}
|
|
617
617
|
return target;
|
|
618
618
|
};
|
|
619
619
|
const useListCarriers = (params) => {
|
|
620
620
|
const { client } = useShipEngine();
|
|
621
|
-
const _a = __spreadValues$
|
|
622
|
-
return useQuery(__spreadProps$
|
|
621
|
+
const _a = __spreadValues$w({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
|
|
622
|
+
return useQuery(__spreadProps$v(__spreadValues$w({}, rest), {
|
|
623
623
|
onError,
|
|
624
624
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
625
625
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -627,17 +627,17 @@ const useListCarriers = (params) => {
|
|
|
627
627
|
}));
|
|
628
628
|
};
|
|
629
629
|
|
|
630
|
-
var __getOwnPropSymbols$
|
|
631
|
-
var __hasOwnProp$
|
|
632
|
-
var __propIsEnum$
|
|
633
|
-
var __objRest$
|
|
630
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
631
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
632
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
633
|
+
var __objRest$p = (source, exclude) => {
|
|
634
634
|
var target = {};
|
|
635
635
|
for (var prop in source)
|
|
636
|
-
if (__hasOwnProp$
|
|
636
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
637
637
|
target[prop] = source[prop];
|
|
638
|
-
if (source != null && __getOwnPropSymbols$
|
|
639
|
-
for (var prop of __getOwnPropSymbols$
|
|
640
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
638
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
639
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
640
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
641
641
|
target[prop] = source[prop];
|
|
642
642
|
}
|
|
643
643
|
return target;
|
|
@@ -667,7 +667,7 @@ const useUpdateAutoFunding = () => {
|
|
|
667
667
|
const queryClient = useQueryClient();
|
|
668
668
|
return useMutation({
|
|
669
669
|
mutationFn: (_a) => __async$K(void 0, null, function* () {
|
|
670
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
670
|
+
var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
|
|
671
671
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
672
672
|
return result.data;
|
|
673
673
|
}),
|
|
@@ -728,24 +728,24 @@ const useDeleteCarrier = () => {
|
|
|
728
728
|
});
|
|
729
729
|
};
|
|
730
730
|
|
|
731
|
-
var __getOwnPropSymbols$
|
|
732
|
-
var __hasOwnProp$
|
|
733
|
-
var __propIsEnum$
|
|
734
|
-
var __objRest$
|
|
731
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
732
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
733
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
734
|
+
var __objRest$o = (source, exclude) => {
|
|
735
735
|
var target = {};
|
|
736
736
|
for (var prop in source)
|
|
737
|
-
if (__hasOwnProp$
|
|
737
|
+
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
738
738
|
target[prop] = source[prop];
|
|
739
|
-
if (source != null && __getOwnPropSymbols$
|
|
740
|
-
for (var prop of __getOwnPropSymbols$
|
|
741
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
739
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
740
|
+
for (var prop of __getOwnPropSymbols$D(source)) {
|
|
741
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
|
|
742
742
|
target[prop] = source[prop];
|
|
743
743
|
}
|
|
744
744
|
return target;
|
|
745
745
|
};
|
|
746
746
|
const useGetCarrierConnectionForm = (_params) => {
|
|
747
747
|
const { client } = useShipEngine();
|
|
748
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
748
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$o(_a, ["carrierName", "enabled"]);
|
|
749
749
|
return useQuery({
|
|
750
750
|
enabled,
|
|
751
751
|
onError,
|
|
@@ -755,24 +755,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
755
755
|
});
|
|
756
756
|
};
|
|
757
757
|
|
|
758
|
-
var __getOwnPropSymbols$
|
|
759
|
-
var __hasOwnProp$
|
|
760
|
-
var __propIsEnum$
|
|
761
|
-
var __objRest$
|
|
758
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
759
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
760
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
761
|
+
var __objRest$n = (source, exclude) => {
|
|
762
762
|
var target = {};
|
|
763
763
|
for (var prop in source)
|
|
764
|
-
if (__hasOwnProp$
|
|
764
|
+
if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
765
765
|
target[prop] = source[prop];
|
|
766
|
-
if (source != null && __getOwnPropSymbols$
|
|
767
|
-
for (var prop of __getOwnPropSymbols$
|
|
768
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
766
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
767
|
+
for (var prop of __getOwnPropSymbols$C(source)) {
|
|
768
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
|
|
769
769
|
target[prop] = source[prop];
|
|
770
770
|
}
|
|
771
771
|
return target;
|
|
772
772
|
};
|
|
773
773
|
const useListCarrierConnections = (_params) => {
|
|
774
774
|
const { client } = useShipEngine();
|
|
775
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
775
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$n(_a, ["enabled"]);
|
|
776
776
|
return useQuery({
|
|
777
777
|
enabled,
|
|
778
778
|
onError,
|
|
@@ -782,25 +782,25 @@ const useListCarrierConnections = (_params) => {
|
|
|
782
782
|
});
|
|
783
783
|
};
|
|
784
784
|
|
|
785
|
-
var __defProp$
|
|
786
|
-
var __defProps$
|
|
787
|
-
var __getOwnPropDescs$
|
|
788
|
-
var __getOwnPropSymbols$
|
|
789
|
-
var __hasOwnProp$
|
|
790
|
-
var __propIsEnum$
|
|
791
|
-
var __defNormalProp$
|
|
792
|
-
var __spreadValues$
|
|
785
|
+
var __defProp$v = Object.defineProperty;
|
|
786
|
+
var __defProps$u = Object.defineProperties;
|
|
787
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
788
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
789
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
790
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
791
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
792
|
+
var __spreadValues$v = (a, b) => {
|
|
793
793
|
for (var prop in b || (b = {}))
|
|
794
|
-
if (__hasOwnProp$
|
|
795
|
-
__defNormalProp$
|
|
796
|
-
if (__getOwnPropSymbols$
|
|
797
|
-
for (var prop of __getOwnPropSymbols$
|
|
798
|
-
if (__propIsEnum$
|
|
799
|
-
__defNormalProp$
|
|
794
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
795
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
796
|
+
if (__getOwnPropSymbols$B)
|
|
797
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
798
|
+
if (__propIsEnum$B.call(b, prop))
|
|
799
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
800
800
|
}
|
|
801
801
|
return a;
|
|
802
802
|
};
|
|
803
|
-
var __spreadProps$
|
|
803
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
804
804
|
var __async$I = (__this, __arguments, generator) => {
|
|
805
805
|
return new Promise((resolve, reject) => {
|
|
806
806
|
var fulfilled = (value) => {
|
|
@@ -825,7 +825,7 @@ const useConnectCarrierAccount = () => {
|
|
|
825
825
|
const { client } = useShipEngine();
|
|
826
826
|
return useMutation({
|
|
827
827
|
mutationFn: (_0) => __async$I(void 0, [_0], function* ({ carrierName, formData }) {
|
|
828
|
-
const formDataWithFlag = __spreadProps$
|
|
828
|
+
const formDataWithFlag = __spreadProps$u(__spreadValues$v({}, formData), { __skipDecamelize: true });
|
|
829
829
|
const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
|
|
830
830
|
return result.data;
|
|
831
831
|
}),
|
|
@@ -845,33 +845,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
845
845
|
});
|
|
846
846
|
};
|
|
847
847
|
|
|
848
|
-
var __defProp$
|
|
849
|
-
var __defProps$
|
|
850
|
-
var __getOwnPropDescs$
|
|
851
|
-
var __getOwnPropSymbols$
|
|
852
|
-
var __hasOwnProp$
|
|
853
|
-
var __propIsEnum$
|
|
854
|
-
var __defNormalProp$
|
|
855
|
-
var __spreadValues$
|
|
848
|
+
var __defProp$u = Object.defineProperty;
|
|
849
|
+
var __defProps$t = Object.defineProperties;
|
|
850
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
851
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
852
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
853
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
854
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
855
|
+
var __spreadValues$u = (a, b) => {
|
|
856
856
|
for (var prop in b || (b = {}))
|
|
857
|
-
if (__hasOwnProp$
|
|
858
|
-
__defNormalProp$
|
|
859
|
-
if (__getOwnPropSymbols$
|
|
860
|
-
for (var prop of __getOwnPropSymbols$
|
|
861
|
-
if (__propIsEnum$
|
|
862
|
-
__defNormalProp$
|
|
857
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
858
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
859
|
+
if (__getOwnPropSymbols$A)
|
|
860
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
861
|
+
if (__propIsEnum$A.call(b, prop))
|
|
862
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
863
863
|
}
|
|
864
864
|
return a;
|
|
865
865
|
};
|
|
866
|
-
var __spreadProps$
|
|
867
|
-
var __objRest$
|
|
866
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
867
|
+
var __objRest$m = (source, exclude) => {
|
|
868
868
|
var target = {};
|
|
869
869
|
for (var prop in source)
|
|
870
|
-
if (__hasOwnProp$
|
|
870
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
871
871
|
target[prop] = source[prop];
|
|
872
|
-
if (source != null && __getOwnPropSymbols$
|
|
873
|
-
for (var prop of __getOwnPropSymbols$
|
|
874
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
872
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
873
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
874
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
875
875
|
target[prop] = source[prop];
|
|
876
876
|
}
|
|
877
877
|
return target;
|
|
@@ -879,12 +879,12 @@ var __objRest$l = (source, exclude) => {
|
|
|
879
879
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
880
880
|
var _b = _a, {
|
|
881
881
|
queryFnParams
|
|
882
|
-
} = _b, params = __objRest$
|
|
882
|
+
} = _b, params = __objRest$m(_b, [
|
|
883
883
|
"queryFnParams"
|
|
884
884
|
]);
|
|
885
885
|
const { client } = useShipEngine();
|
|
886
886
|
const { carrierName, carrierId } = queryFnParams;
|
|
887
|
-
return useQuery(__spreadProps$
|
|
887
|
+
return useQuery(__spreadProps$t(__spreadValues$u({}, params), {
|
|
888
888
|
onError,
|
|
889
889
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
890
890
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -892,25 +892,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
892
892
|
}));
|
|
893
893
|
};
|
|
894
894
|
|
|
895
|
-
var __defProp$
|
|
896
|
-
var __defProps$
|
|
897
|
-
var __getOwnPropDescs$
|
|
898
|
-
var __getOwnPropSymbols$
|
|
899
|
-
var __hasOwnProp$
|
|
900
|
-
var __propIsEnum$
|
|
901
|
-
var __defNormalProp$
|
|
902
|
-
var __spreadValues$
|
|
895
|
+
var __defProp$t = Object.defineProperty;
|
|
896
|
+
var __defProps$s = Object.defineProperties;
|
|
897
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
898
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
899
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
900
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
901
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
902
|
+
var __spreadValues$t = (a, b) => {
|
|
903
903
|
for (var prop in b || (b = {}))
|
|
904
|
-
if (__hasOwnProp$
|
|
905
|
-
__defNormalProp$
|
|
906
|
-
if (__getOwnPropSymbols$
|
|
907
|
-
for (var prop of __getOwnPropSymbols$
|
|
908
|
-
if (__propIsEnum$
|
|
909
|
-
__defNormalProp$
|
|
904
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
905
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
906
|
+
if (__getOwnPropSymbols$z)
|
|
907
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
908
|
+
if (__propIsEnum$z.call(b, prop))
|
|
909
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
910
910
|
}
|
|
911
911
|
return a;
|
|
912
912
|
};
|
|
913
|
-
var __spreadProps$
|
|
913
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
914
914
|
var __async$H = (__this, __arguments, generator) => {
|
|
915
915
|
return new Promise((resolve, reject) => {
|
|
916
916
|
var fulfilled = (value) => {
|
|
@@ -933,7 +933,7 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
933
933
|
};
|
|
934
934
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
935
935
|
const { client } = useShipEngine();
|
|
936
|
-
return useMutation(__spreadProps$
|
|
936
|
+
return useMutation(__spreadProps$s(__spreadValues$t({}, params), {
|
|
937
937
|
mutationFn: (_0) => __async$H(void 0, [_0], function* ({
|
|
938
938
|
carrierName,
|
|
939
939
|
carrierId,
|
|
@@ -1141,29 +1141,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
|
|
|
1141
1141
|
});
|
|
1142
1142
|
};
|
|
1143
1143
|
|
|
1144
|
-
var __defProp$
|
|
1145
|
-
var __defProps$
|
|
1146
|
-
var __getOwnPropDescs$
|
|
1147
|
-
var __getOwnPropSymbols$
|
|
1148
|
-
var __hasOwnProp$
|
|
1149
|
-
var __propIsEnum$
|
|
1150
|
-
var __defNormalProp$
|
|
1151
|
-
var __spreadValues$
|
|
1144
|
+
var __defProp$s = Object.defineProperty;
|
|
1145
|
+
var __defProps$r = Object.defineProperties;
|
|
1146
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
1147
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
1148
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
1149
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
1150
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1151
|
+
var __spreadValues$s = (a, b) => {
|
|
1152
1152
|
for (var prop in b || (b = {}))
|
|
1153
|
-
if (__hasOwnProp$
|
|
1154
|
-
__defNormalProp$
|
|
1155
|
-
if (__getOwnPropSymbols$
|
|
1156
|
-
for (var prop of __getOwnPropSymbols$
|
|
1157
|
-
if (__propIsEnum$
|
|
1158
|
-
__defNormalProp$
|
|
1153
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
1154
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
1155
|
+
if (__getOwnPropSymbols$y)
|
|
1156
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
1157
|
+
if (__propIsEnum$y.call(b, prop))
|
|
1158
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
1159
1159
|
}
|
|
1160
1160
|
return a;
|
|
1161
1161
|
};
|
|
1162
|
-
var __spreadProps$
|
|
1162
|
+
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
1163
1163
|
const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
|
|
1164
1164
|
const { client } = useShipEngine();
|
|
1165
|
-
const queryParams = __spreadValues$
|
|
1166
|
-
return useQuery(__spreadProps$
|
|
1165
|
+
const queryParams = __spreadValues$s({}, params);
|
|
1166
|
+
return useQuery(__spreadProps$r(__spreadValues$s({}, queryParams), {
|
|
1167
1167
|
onError,
|
|
1168
1168
|
queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
|
|
1169
1169
|
queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
|
|
@@ -1186,17 +1186,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1186
1186
|
});
|
|
1187
1187
|
};
|
|
1188
1188
|
|
|
1189
|
-
var __getOwnPropSymbols$
|
|
1190
|
-
var __hasOwnProp$
|
|
1191
|
-
var __propIsEnum$
|
|
1192
|
-
var __objRest$
|
|
1189
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
1190
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
1191
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
1192
|
+
var __objRest$l = (source, exclude) => {
|
|
1193
1193
|
var target = {};
|
|
1194
1194
|
for (var prop in source)
|
|
1195
|
-
if (__hasOwnProp$
|
|
1195
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1196
1196
|
target[prop] = source[prop];
|
|
1197
|
-
if (source != null && __getOwnPropSymbols$
|
|
1198
|
-
for (var prop of __getOwnPropSymbols$
|
|
1199
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1197
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
1198
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
1199
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
1200
1200
|
target[prop] = source[prop];
|
|
1201
1201
|
}
|
|
1202
1202
|
return target;
|
|
@@ -1225,7 +1225,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1225
1225
|
const { client } = useShipEngine();
|
|
1226
1226
|
return useMutation({
|
|
1227
1227
|
mutationFn: (_a) => __async$C(void 0, null, function* () {
|
|
1228
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1228
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$l(_b, ["insuranceProvider"]);
|
|
1229
1229
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1230
1230
|
return result.data;
|
|
1231
1231
|
}),
|
|
@@ -1234,25 +1234,25 @@ const useAddInsuranceFunds = () => {
|
|
|
1234
1234
|
});
|
|
1235
1235
|
};
|
|
1236
1236
|
|
|
1237
|
-
var __defProp$
|
|
1238
|
-
var __defProps$
|
|
1239
|
-
var __getOwnPropDescs$
|
|
1240
|
-
var __getOwnPropSymbols$
|
|
1241
|
-
var __hasOwnProp$
|
|
1242
|
-
var __propIsEnum$
|
|
1243
|
-
var __defNormalProp$
|
|
1244
|
-
var __spreadValues$
|
|
1237
|
+
var __defProp$r = Object.defineProperty;
|
|
1238
|
+
var __defProps$q = Object.defineProperties;
|
|
1239
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
1240
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
1241
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
1242
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
1243
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1244
|
+
var __spreadValues$r = (a, b) => {
|
|
1245
1245
|
for (var prop in b || (b = {}))
|
|
1246
|
-
if (__hasOwnProp$
|
|
1247
|
-
__defNormalProp$
|
|
1248
|
-
if (__getOwnPropSymbols$
|
|
1249
|
-
for (var prop of __getOwnPropSymbols$
|
|
1250
|
-
if (__propIsEnum$
|
|
1251
|
-
__defNormalProp$
|
|
1246
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
1247
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
1248
|
+
if (__getOwnPropSymbols$w)
|
|
1249
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
1250
|
+
if (__propIsEnum$w.call(b, prop))
|
|
1251
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
1252
1252
|
}
|
|
1253
1253
|
return a;
|
|
1254
1254
|
};
|
|
1255
|
-
var __spreadProps$
|
|
1255
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
1256
1256
|
var __async$B = (__this, __arguments, generator) => {
|
|
1257
1257
|
return new Promise((resolve, reject) => {
|
|
1258
1258
|
var fulfilled = (value) => {
|
|
@@ -1275,7 +1275,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
1275
1275
|
};
|
|
1276
1276
|
const useCreateInvoiceAddress = (params) => {
|
|
1277
1277
|
const { client } = useShipEngine();
|
|
1278
|
-
return useMutation(__spreadProps$
|
|
1278
|
+
return useMutation(__spreadProps$q(__spreadValues$r({}, params), {
|
|
1279
1279
|
mutationFn: (invoiceAddress) => __async$B(void 0, null, function* () {
|
|
1280
1280
|
const result = yield client.invoiceAddress.create(invoiceAddress);
|
|
1281
1281
|
return result.data;
|
|
@@ -1285,25 +1285,25 @@ const useCreateInvoiceAddress = (params) => {
|
|
|
1285
1285
|
}));
|
|
1286
1286
|
};
|
|
1287
1287
|
|
|
1288
|
-
var __defProp$
|
|
1289
|
-
var __defProps$
|
|
1290
|
-
var __getOwnPropDescs$
|
|
1291
|
-
var __getOwnPropSymbols$
|
|
1292
|
-
var __hasOwnProp$
|
|
1293
|
-
var __propIsEnum$
|
|
1294
|
-
var __defNormalProp$
|
|
1295
|
-
var __spreadValues$
|
|
1288
|
+
var __defProp$q = Object.defineProperty;
|
|
1289
|
+
var __defProps$p = Object.defineProperties;
|
|
1290
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
1291
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
1292
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
1293
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
1294
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1295
|
+
var __spreadValues$q = (a, b) => {
|
|
1296
1296
|
for (var prop in b || (b = {}))
|
|
1297
|
-
if (__hasOwnProp$
|
|
1298
|
-
__defNormalProp$
|
|
1299
|
-
if (__getOwnPropSymbols$
|
|
1300
|
-
for (var prop of __getOwnPropSymbols$
|
|
1301
|
-
if (__propIsEnum$
|
|
1302
|
-
__defNormalProp$
|
|
1297
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
1298
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
1299
|
+
if (__getOwnPropSymbols$v)
|
|
1300
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
1301
|
+
if (__propIsEnum$v.call(b, prop))
|
|
1302
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
1303
1303
|
}
|
|
1304
1304
|
return a;
|
|
1305
1305
|
};
|
|
1306
|
-
var __spreadProps$
|
|
1306
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
1307
1307
|
var __async$A = (__this, __arguments, generator) => {
|
|
1308
1308
|
return new Promise((resolve, reject) => {
|
|
1309
1309
|
var fulfilled = (value) => {
|
|
@@ -1326,7 +1326,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
1326
1326
|
};
|
|
1327
1327
|
const useUpdateInvoiceAddress = (params) => {
|
|
1328
1328
|
const { client } = useShipEngine();
|
|
1329
|
-
return useMutation(__spreadProps$
|
|
1329
|
+
return useMutation(__spreadProps$p(__spreadValues$q({}, params), {
|
|
1330
1330
|
mutationFn: (invoiceAddress) => __async$A(void 0, null, function* () {
|
|
1331
1331
|
const result = yield client.invoiceAddress.update(invoiceAddress);
|
|
1332
1332
|
return result.data;
|
|
@@ -1336,6 +1336,35 @@ const useUpdateInvoiceAddress = (params) => {
|
|
|
1336
1336
|
}));
|
|
1337
1337
|
};
|
|
1338
1338
|
|
|
1339
|
+
var __defProp$p = Object.defineProperty;
|
|
1340
|
+
var __defProps$o = Object.defineProperties;
|
|
1341
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
1342
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
1343
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
1344
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
1345
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1346
|
+
var __spreadValues$p = (a, b) => {
|
|
1347
|
+
for (var prop in b || (b = {}))
|
|
1348
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
1349
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
1350
|
+
if (__getOwnPropSymbols$u)
|
|
1351
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
1352
|
+
if (__propIsEnum$u.call(b, prop))
|
|
1353
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
1354
|
+
}
|
|
1355
|
+
return a;
|
|
1356
|
+
};
|
|
1357
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
1358
|
+
const useGetInvoiceAddress = (params) => {
|
|
1359
|
+
const { client } = useShipEngine();
|
|
1360
|
+
return useQuery(__spreadProps$o(__spreadValues$p({}, params), {
|
|
1361
|
+
onError,
|
|
1362
|
+
queryFn: () => client.invoiceAddress.get(),
|
|
1363
|
+
queryKey: ["useGetInvoiceAddress"],
|
|
1364
|
+
select: (result) => result.data
|
|
1365
|
+
}));
|
|
1366
|
+
};
|
|
1367
|
+
|
|
1339
1368
|
var __defProp$o = Object.defineProperty;
|
|
1340
1369
|
var __defProps$n = Object.defineProperties;
|
|
1341
1370
|
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
@@ -1355,13 +1384,48 @@ var __spreadValues$o = (a, b) => {
|
|
|
1355
1384
|
return a;
|
|
1356
1385
|
};
|
|
1357
1386
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
1358
|
-
|
|
1387
|
+
var __objRest$k = (source, exclude) => {
|
|
1388
|
+
var target = {};
|
|
1389
|
+
for (var prop in source)
|
|
1390
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1391
|
+
target[prop] = source[prop];
|
|
1392
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
1393
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
1394
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
1395
|
+
target[prop] = source[prop];
|
|
1396
|
+
}
|
|
1397
|
+
return target;
|
|
1398
|
+
};
|
|
1399
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
1400
|
+
return new Promise((resolve, reject) => {
|
|
1401
|
+
var fulfilled = (value) => {
|
|
1402
|
+
try {
|
|
1403
|
+
step(generator.next(value));
|
|
1404
|
+
} catch (e) {
|
|
1405
|
+
reject(e);
|
|
1406
|
+
}
|
|
1407
|
+
};
|
|
1408
|
+
var rejected = (value) => {
|
|
1409
|
+
try {
|
|
1410
|
+
step(generator.throw(value));
|
|
1411
|
+
} catch (e) {
|
|
1412
|
+
reject(e);
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1416
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
1417
|
+
});
|
|
1418
|
+
};
|
|
1419
|
+
const useCreateLabelByRateId = (params) => {
|
|
1359
1420
|
const { client } = useShipEngine();
|
|
1360
|
-
return
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1421
|
+
return useMutation(__spreadProps$n(__spreadValues$o({}, params), {
|
|
1422
|
+
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
1423
|
+
var _b = _a, { rateId } = _b, options = __objRest$k(_b, ["rateId"]);
|
|
1424
|
+
const result = yield client.labels.createByRateId(rateId, options);
|
|
1425
|
+
return result.data;
|
|
1426
|
+
}),
|
|
1427
|
+
mutationKey: ["useCreateLabelByRateId"],
|
|
1428
|
+
onError
|
|
1365
1429
|
}));
|
|
1366
1430
|
};
|
|
1367
1431
|
|
|
@@ -1396,7 +1460,7 @@ var __objRest$j = (source, exclude) => {
|
|
|
1396
1460
|
}
|
|
1397
1461
|
return target;
|
|
1398
1462
|
};
|
|
1399
|
-
var __async$
|
|
1463
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
1400
1464
|
return new Promise((resolve, reject) => {
|
|
1401
1465
|
var fulfilled = (value) => {
|
|
1402
1466
|
try {
|
|
@@ -1416,15 +1480,15 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
1416
1480
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1417
1481
|
});
|
|
1418
1482
|
};
|
|
1419
|
-
const
|
|
1483
|
+
const useCreateLabelByShipmentId = (params) => {
|
|
1420
1484
|
const { client } = useShipEngine();
|
|
1421
1485
|
return useMutation(__spreadProps$m(__spreadValues$n({}, params), {
|
|
1422
|
-
mutationFn: (_a) => __async$
|
|
1423
|
-
var _b = _a, {
|
|
1424
|
-
const result = yield client.labels.
|
|
1486
|
+
mutationFn: (_a) => __async$y(void 0, null, function* () {
|
|
1487
|
+
var _b = _a, { shipmentId } = _b, options = __objRest$j(_b, ["shipmentId"]);
|
|
1488
|
+
const result = yield client.labels.createByShipmentId(shipmentId, options);
|
|
1425
1489
|
return result.data;
|
|
1426
1490
|
}),
|
|
1427
|
-
mutationKey: ["
|
|
1491
|
+
mutationKey: ["useCreateLabelByShipmentId"],
|
|
1428
1492
|
onError
|
|
1429
1493
|
}));
|
|
1430
1494
|
};
|
|
@@ -1460,7 +1524,7 @@ var __objRest$i = (source, exclude) => {
|
|
|
1460
1524
|
}
|
|
1461
1525
|
return target;
|
|
1462
1526
|
};
|
|
1463
|
-
var __async$
|
|
1527
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
1464
1528
|
return new Promise((resolve, reject) => {
|
|
1465
1529
|
var fulfilled = (value) => {
|
|
1466
1530
|
try {
|
|
@@ -1480,19 +1544,34 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
1480
1544
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1481
1545
|
});
|
|
1482
1546
|
};
|
|
1483
|
-
const
|
|
1547
|
+
const useCreateLabel = (params) => {
|
|
1484
1548
|
const { client } = useShipEngine();
|
|
1485
1549
|
return useMutation(__spreadProps$l(__spreadValues$m({}, params), {
|
|
1486
|
-
mutationFn: (_a) => __async$
|
|
1487
|
-
var _b = _a, {
|
|
1488
|
-
const result = yield client.labels.
|
|
1550
|
+
mutationFn: (_a) => __async$x(void 0, null, function* () {
|
|
1551
|
+
var _b = _a, { rateId } = _b, options = __objRest$i(_b, ["rateId"]);
|
|
1552
|
+
const result = yield client.labels.createByRateId(rateId, options);
|
|
1489
1553
|
return result.data;
|
|
1490
1554
|
}),
|
|
1491
|
-
mutationKey: ["
|
|
1555
|
+
mutationKey: ["useCreateLabel"],
|
|
1492
1556
|
onError
|
|
1493
1557
|
}));
|
|
1494
1558
|
};
|
|
1495
1559
|
|
|
1560
|
+
const useGetLabel = (labelId) => {
|
|
1561
|
+
const { client } = useShipEngine();
|
|
1562
|
+
return useQuery({
|
|
1563
|
+
enabled: labelId !== void 0,
|
|
1564
|
+
onError,
|
|
1565
|
+
queryFn: () => {
|
|
1566
|
+
if (labelId)
|
|
1567
|
+
return client.labels.get(labelId);
|
|
1568
|
+
return Promise.reject(new Error("labelId is require"));
|
|
1569
|
+
},
|
|
1570
|
+
queryKey: ["useGetLabel", labelId],
|
|
1571
|
+
select: (result) => result.data
|
|
1572
|
+
});
|
|
1573
|
+
};
|
|
1574
|
+
|
|
1496
1575
|
var __defProp$l = Object.defineProperty;
|
|
1497
1576
|
var __defProps$k = Object.defineProperties;
|
|
1498
1577
|
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
@@ -1524,7 +1603,18 @@ var __objRest$h = (source, exclude) => {
|
|
|
1524
1603
|
}
|
|
1525
1604
|
return target;
|
|
1526
1605
|
};
|
|
1527
|
-
|
|
1606
|
+
const useListLabels = (params) => {
|
|
1607
|
+
const { client } = useShipEngine();
|
|
1608
|
+
const _a = __spreadValues$l({}, params), { queryFnParams } = _a, rest = __objRest$h(_a, ["queryFnParams"]);
|
|
1609
|
+
return useQuery(__spreadProps$k(__spreadValues$l({}, rest), {
|
|
1610
|
+
onError,
|
|
1611
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
1612
|
+
queryKey: ["useListLabels", params],
|
|
1613
|
+
select: (result) => result.data
|
|
1614
|
+
}));
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
1528
1618
|
return new Promise((resolve, reject) => {
|
|
1529
1619
|
var fulfilled = (value) => {
|
|
1530
1620
|
try {
|
|
@@ -1544,31 +1634,15 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
1544
1634
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1545
1635
|
});
|
|
1546
1636
|
};
|
|
1547
|
-
const
|
|
1637
|
+
const useVoidLabel = () => {
|
|
1548
1638
|
const { client } = useShipEngine();
|
|
1549
|
-
return useMutation(
|
|
1550
|
-
mutationFn: (
|
|
1551
|
-
|
|
1552
|
-
const result = yield client.labels.createByRateId(rateId, options);
|
|
1639
|
+
return useMutation({
|
|
1640
|
+
mutationFn: (labelId) => __async$w(void 0, null, function* () {
|
|
1641
|
+
const result = yield client.labels.void(labelId);
|
|
1553
1642
|
return result.data;
|
|
1554
1643
|
}),
|
|
1555
|
-
mutationKey: ["
|
|
1644
|
+
mutationKey: ["useVoidLabel"],
|
|
1556
1645
|
onError
|
|
1557
|
-
}));
|
|
1558
|
-
};
|
|
1559
|
-
|
|
1560
|
-
const useGetLabel = (labelId) => {
|
|
1561
|
-
const { client } = useShipEngine();
|
|
1562
|
-
return useQuery({
|
|
1563
|
-
enabled: labelId !== void 0,
|
|
1564
|
-
onError,
|
|
1565
|
-
queryFn: () => {
|
|
1566
|
-
if (labelId)
|
|
1567
|
-
return client.labels.get(labelId);
|
|
1568
|
-
return Promise.reject(new Error("labelId is require"));
|
|
1569
|
-
},
|
|
1570
|
-
queryKey: ["useGetLabel", labelId],
|
|
1571
|
-
select: (result) => result.data
|
|
1572
1646
|
});
|
|
1573
1647
|
};
|
|
1574
1648
|
|
|
@@ -1603,18 +1677,7 @@ var __objRest$g = (source, exclude) => {
|
|
|
1603
1677
|
}
|
|
1604
1678
|
return target;
|
|
1605
1679
|
};
|
|
1606
|
-
|
|
1607
|
-
const { client } = useShipEngine();
|
|
1608
|
-
const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$g(_a, ["queryFnParams"]);
|
|
1609
|
-
return useQuery(__spreadProps$j(__spreadValues$k({}, rest), {
|
|
1610
|
-
onError,
|
|
1611
|
-
queryFn: () => client.labels.list(queryFnParams),
|
|
1612
|
-
queryKey: ["useListLabels", params],
|
|
1613
|
-
select: (result) => result.data
|
|
1614
|
-
}));
|
|
1615
|
-
};
|
|
1616
|
-
|
|
1617
|
-
var __async$w = (__this, __arguments, generator) => {
|
|
1680
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
1618
1681
|
return new Promise((resolve, reject) => {
|
|
1619
1682
|
var fulfilled = (value) => {
|
|
1620
1683
|
try {
|
|
@@ -1634,16 +1697,30 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
1634
1697
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1635
1698
|
});
|
|
1636
1699
|
};
|
|
1637
|
-
const
|
|
1700
|
+
const useListLabelsInfinite = (params) => {
|
|
1638
1701
|
const { client } = useShipEngine();
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1702
|
+
const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$g(_a, ["queryFnParams"]);
|
|
1703
|
+
return useInfiniteQuery(__spreadProps$j(__spreadValues$k({}, rest), {
|
|
1704
|
+
getNextPageParam: (lastPage) => {
|
|
1705
|
+
if (lastPage.page < lastPage.pages) {
|
|
1706
|
+
return lastPage.page + 1;
|
|
1707
|
+
}
|
|
1708
|
+
return void 0;
|
|
1709
|
+
},
|
|
1710
|
+
onError,
|
|
1711
|
+
queryFn: (_0) => __async$v(void 0, [_0], function* ({ pageParam = 1 }) {
|
|
1712
|
+
const response = yield client.labels.list(__spreadProps$j(__spreadValues$k({}, queryFnParams), { page: pageParam }));
|
|
1713
|
+
return response.data;
|
|
1643
1714
|
}),
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1715
|
+
queryKey: ["useListLabelsInfinite", params],
|
|
1716
|
+
select: (data) => {
|
|
1717
|
+
return {
|
|
1718
|
+
labels: data.pages.flatMap((page) => page.labels),
|
|
1719
|
+
pageParams: data.pageParams,
|
|
1720
|
+
pages: data.pages
|
|
1721
|
+
};
|
|
1722
|
+
}
|
|
1723
|
+
}));
|
|
1647
1724
|
};
|
|
1648
1725
|
|
|
1649
1726
|
var __defProp$j = Object.defineProperty;
|
|
@@ -1677,49 +1754,13 @@ var __objRest$f = (source, exclude) => {
|
|
|
1677
1754
|
}
|
|
1678
1755
|
return target;
|
|
1679
1756
|
};
|
|
1680
|
-
|
|
1681
|
-
return new Promise((resolve, reject) => {
|
|
1682
|
-
var fulfilled = (value) => {
|
|
1683
|
-
try {
|
|
1684
|
-
step(generator.next(value));
|
|
1685
|
-
} catch (e) {
|
|
1686
|
-
reject(e);
|
|
1687
|
-
}
|
|
1688
|
-
};
|
|
1689
|
-
var rejected = (value) => {
|
|
1690
|
-
try {
|
|
1691
|
-
step(generator.throw(value));
|
|
1692
|
-
} catch (e) {
|
|
1693
|
-
reject(e);
|
|
1694
|
-
}
|
|
1695
|
-
};
|
|
1696
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1697
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
1698
|
-
});
|
|
1699
|
-
};
|
|
1700
|
-
const useListLabelsInfinite = (params) => {
|
|
1757
|
+
const useExportLabels = (params) => {
|
|
1701
1758
|
const { client } = useShipEngine();
|
|
1702
1759
|
const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
|
|
1703
|
-
return
|
|
1704
|
-
getNextPageParam: (lastPage) => {
|
|
1705
|
-
if (lastPage.page < lastPage.pages) {
|
|
1706
|
-
return lastPage.page + 1;
|
|
1707
|
-
}
|
|
1708
|
-
return void 0;
|
|
1709
|
-
},
|
|
1760
|
+
return useQuery(__spreadProps$i(__spreadValues$j({}, rest), {
|
|
1710
1761
|
onError,
|
|
1711
|
-
queryFn: (
|
|
1712
|
-
|
|
1713
|
-
return response.data;
|
|
1714
|
-
}),
|
|
1715
|
-
queryKey: ["useListLabelsInfinite", params],
|
|
1716
|
-
select: (data) => {
|
|
1717
|
-
return {
|
|
1718
|
-
labels: data.pages.flatMap((page) => page.labels),
|
|
1719
|
-
pageParams: data.pageParams,
|
|
1720
|
-
pages: data.pages
|
|
1721
|
-
};
|
|
1722
|
-
}
|
|
1762
|
+
queryFn: () => client.labels.export(queryFnParams),
|
|
1763
|
+
queryKey: ["useExportLabels", params]
|
|
1723
1764
|
}));
|
|
1724
1765
|
};
|
|
1725
1766
|
|
|
@@ -1742,50 +1783,9 @@ var __spreadValues$i = (a, b) => {
|
|
|
1742
1783
|
return a;
|
|
1743
1784
|
};
|
|
1744
1785
|
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
1745
|
-
var __objRest$e = (source, exclude) => {
|
|
1746
|
-
var target = {};
|
|
1747
|
-
for (var prop in source)
|
|
1748
|
-
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1749
|
-
target[prop] = source[prop];
|
|
1750
|
-
if (source != null && __getOwnPropSymbols$n)
|
|
1751
|
-
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
1752
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
1753
|
-
target[prop] = source[prop];
|
|
1754
|
-
}
|
|
1755
|
-
return target;
|
|
1756
|
-
};
|
|
1757
|
-
const useExportLabels = (params) => {
|
|
1758
|
-
const { client } = useShipEngine();
|
|
1759
|
-
const _a = __spreadValues$i({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
|
|
1760
|
-
return useQuery(__spreadProps$h(__spreadValues$i({}, rest), {
|
|
1761
|
-
onError,
|
|
1762
|
-
queryFn: () => client.labels.export(queryFnParams),
|
|
1763
|
-
queryKey: ["useExportLabels", params]
|
|
1764
|
-
}));
|
|
1765
|
-
};
|
|
1766
|
-
|
|
1767
|
-
var __defProp$h = Object.defineProperty;
|
|
1768
|
-
var __defProps$g = Object.defineProperties;
|
|
1769
|
-
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
1770
|
-
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
1771
|
-
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
1772
|
-
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
1773
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1774
|
-
var __spreadValues$h = (a, b) => {
|
|
1775
|
-
for (var prop in b || (b = {}))
|
|
1776
|
-
if (__hasOwnProp$m.call(b, prop))
|
|
1777
|
-
__defNormalProp$h(a, prop, b[prop]);
|
|
1778
|
-
if (__getOwnPropSymbols$m)
|
|
1779
|
-
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
1780
|
-
if (__propIsEnum$m.call(b, prop))
|
|
1781
|
-
__defNormalProp$h(a, prop, b[prop]);
|
|
1782
|
-
}
|
|
1783
|
-
return a;
|
|
1784
|
-
};
|
|
1785
|
-
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
1786
1786
|
const useListOrderSources = (params) => {
|
|
1787
1787
|
const { client } = useShipEngine();
|
|
1788
|
-
return useQuery(__spreadProps$
|
|
1788
|
+
return useQuery(__spreadProps$h(__spreadValues$i({}, params), {
|
|
1789
1789
|
onError,
|
|
1790
1790
|
queryFn: () => client.orderSources.list(),
|
|
1791
1791
|
queryKey: ["useListOrderSources"],
|
|
@@ -2223,17 +2223,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
2223
2223
|
});
|
|
2224
2224
|
};
|
|
2225
2225
|
|
|
2226
|
-
var __getOwnPropSymbols$
|
|
2227
|
-
var __hasOwnProp$
|
|
2228
|
-
var __propIsEnum$
|
|
2229
|
-
var __objRest$
|
|
2226
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
2227
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
2228
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
2229
|
+
var __objRest$e = (source, exclude) => {
|
|
2230
2230
|
var target = {};
|
|
2231
2231
|
for (var prop in source)
|
|
2232
|
-
if (__hasOwnProp$
|
|
2232
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2233
2233
|
target[prop] = source[prop];
|
|
2234
|
-
if (source != null && __getOwnPropSymbols$
|
|
2235
|
-
for (var prop of __getOwnPropSymbols$
|
|
2236
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2234
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
2235
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
2236
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
2237
2237
|
target[prop] = source[prop];
|
|
2238
2238
|
}
|
|
2239
2239
|
return target;
|
|
@@ -2262,7 +2262,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
2262
2262
|
const { client } = useShipEngine();
|
|
2263
2263
|
return useMutation({
|
|
2264
2264
|
mutationFn: (_a) => __async$k(void 0, null, function* () {
|
|
2265
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
2265
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$e(_b, ["salesOrderId"]);
|
|
2266
2266
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
2267
2267
|
return result.data;
|
|
2268
2268
|
}),
|
|
@@ -2271,17 +2271,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
2271
2271
|
});
|
|
2272
2272
|
};
|
|
2273
2273
|
|
|
2274
|
-
var __getOwnPropSymbols$
|
|
2275
|
-
var __hasOwnProp$
|
|
2276
|
-
var __propIsEnum$
|
|
2277
|
-
var __objRest$
|
|
2274
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
2275
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
2276
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
2277
|
+
var __objRest$d = (source, exclude) => {
|
|
2278
2278
|
var target = {};
|
|
2279
2279
|
for (var prop in source)
|
|
2280
|
-
if (__hasOwnProp$
|
|
2280
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2281
2281
|
target[prop] = source[prop];
|
|
2282
|
-
if (source != null && __getOwnPropSymbols$
|
|
2283
|
-
for (var prop of __getOwnPropSymbols$
|
|
2284
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2282
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
2283
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
2284
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
2285
2285
|
target[prop] = source[prop];
|
|
2286
2286
|
}
|
|
2287
2287
|
return target;
|
|
@@ -2310,7 +2310,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
2310
2310
|
const { client } = useShipEngine();
|
|
2311
2311
|
return useMutation({
|
|
2312
2312
|
mutationFn: (_a) => __async$j(void 0, null, function* () {
|
|
2313
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
2313
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$d(_b, ["salesOrderId"]);
|
|
2314
2314
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
2315
2315
|
return result.data;
|
|
2316
2316
|
}),
|
|
@@ -2346,17 +2346,17 @@ const useListSalesOrderShipments = (body) => {
|
|
|
2346
2346
|
});
|
|
2347
2347
|
};
|
|
2348
2348
|
|
|
2349
|
-
var __getOwnPropSymbols$
|
|
2350
|
-
var __hasOwnProp$
|
|
2351
|
-
var __propIsEnum$
|
|
2352
|
-
var __objRest$
|
|
2349
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
2350
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
2351
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
2352
|
+
var __objRest$c = (source, exclude) => {
|
|
2353
2353
|
var target = {};
|
|
2354
2354
|
for (var prop in source)
|
|
2355
|
-
if (__hasOwnProp$
|
|
2355
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2356
2356
|
target[prop] = source[prop];
|
|
2357
|
-
if (source != null && __getOwnPropSymbols$
|
|
2358
|
-
for (var prop of __getOwnPropSymbols$
|
|
2359
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2357
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
2358
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
2359
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
2360
2360
|
target[prop] = source[prop];
|
|
2361
2361
|
}
|
|
2362
2362
|
return target;
|
|
@@ -2385,7 +2385,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
2385
2385
|
const { client } = useShipEngine();
|
|
2386
2386
|
return useMutation({
|
|
2387
2387
|
mutationFn: (_a) => __async$i(void 0, null, function* () {
|
|
2388
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
2388
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$c(_b, ["shipmentId"]);
|
|
2389
2389
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
2390
2390
|
return result.data;
|
|
2391
2391
|
}),
|
|
@@ -2405,25 +2405,25 @@ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
|
|
|
2405
2405
|
});
|
|
2406
2406
|
};
|
|
2407
2407
|
|
|
2408
|
-
var __defProp$
|
|
2409
|
-
var __defProps$
|
|
2410
|
-
var __getOwnPropDescs$
|
|
2411
|
-
var __getOwnPropSymbols$
|
|
2412
|
-
var __hasOwnProp$
|
|
2413
|
-
var __propIsEnum$
|
|
2414
|
-
var __defNormalProp$
|
|
2415
|
-
var __spreadValues$
|
|
2408
|
+
var __defProp$h = Object.defineProperty;
|
|
2409
|
+
var __defProps$g = Object.defineProperties;
|
|
2410
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
2411
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
2412
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
2413
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
2414
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2415
|
+
var __spreadValues$h = (a, b) => {
|
|
2416
2416
|
for (var prop in b || (b = {}))
|
|
2417
|
-
if (__hasOwnProp$
|
|
2418
|
-
__defNormalProp$
|
|
2419
|
-
if (__getOwnPropSymbols$
|
|
2420
|
-
for (var prop of __getOwnPropSymbols$
|
|
2421
|
-
if (__propIsEnum$
|
|
2422
|
-
__defNormalProp$
|
|
2417
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
2418
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2419
|
+
if (__getOwnPropSymbols$j)
|
|
2420
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
2421
|
+
if (__propIsEnum$j.call(b, prop))
|
|
2422
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2423
2423
|
}
|
|
2424
2424
|
return a;
|
|
2425
2425
|
};
|
|
2426
|
-
var __spreadProps$
|
|
2426
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
2427
2427
|
var __async$h = (__this, __arguments, generator) => {
|
|
2428
2428
|
return new Promise((resolve, reject) => {
|
|
2429
2429
|
var fulfilled = (value) => {
|
|
@@ -2465,7 +2465,7 @@ const useCreateShipment = () => {
|
|
|
2465
2465
|
postalCode: "",
|
|
2466
2466
|
stateProvince: ""
|
|
2467
2467
|
};
|
|
2468
|
-
return (yield client.shipments.create(__spreadProps$
|
|
2468
|
+
return (yield client.shipments.create(__spreadProps$g(__spreadValues$h({}, shipment), {
|
|
2469
2469
|
shipTo
|
|
2470
2470
|
}))).data;
|
|
2471
2471
|
}),
|
|
@@ -2474,43 +2474,43 @@ const useCreateShipment = () => {
|
|
|
2474
2474
|
});
|
|
2475
2475
|
};
|
|
2476
2476
|
|
|
2477
|
-
var __defProp$
|
|
2478
|
-
var __defProps$
|
|
2479
|
-
var __getOwnPropDescs$
|
|
2480
|
-
var __getOwnPropSymbols$
|
|
2481
|
-
var __hasOwnProp$
|
|
2482
|
-
var __propIsEnum$
|
|
2483
|
-
var __defNormalProp$
|
|
2484
|
-
var __spreadValues$
|
|
2477
|
+
var __defProp$g = Object.defineProperty;
|
|
2478
|
+
var __defProps$f = Object.defineProperties;
|
|
2479
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
2480
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
2481
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
2482
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
2483
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2484
|
+
var __spreadValues$g = (a, b) => {
|
|
2485
2485
|
for (var prop in b || (b = {}))
|
|
2486
|
-
if (__hasOwnProp$
|
|
2487
|
-
__defNormalProp$
|
|
2488
|
-
if (__getOwnPropSymbols$
|
|
2489
|
-
for (var prop of __getOwnPropSymbols$
|
|
2490
|
-
if (__propIsEnum$
|
|
2491
|
-
__defNormalProp$
|
|
2486
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
2487
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2488
|
+
if (__getOwnPropSymbols$i)
|
|
2489
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
2490
|
+
if (__propIsEnum$i.call(b, prop))
|
|
2491
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2492
2492
|
}
|
|
2493
2493
|
return a;
|
|
2494
2494
|
};
|
|
2495
|
-
var __spreadProps$
|
|
2496
|
-
var __objRest$
|
|
2495
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
2496
|
+
var __objRest$b = (source, exclude) => {
|
|
2497
2497
|
var target = {};
|
|
2498
2498
|
for (var prop in source)
|
|
2499
|
-
if (__hasOwnProp$
|
|
2499
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2500
2500
|
target[prop] = source[prop];
|
|
2501
|
-
if (source != null && __getOwnPropSymbols$
|
|
2502
|
-
for (var prop of __getOwnPropSymbols$
|
|
2503
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2501
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
2502
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
2503
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
2504
2504
|
target[prop] = source[prop];
|
|
2505
2505
|
}
|
|
2506
2506
|
return target;
|
|
2507
2507
|
};
|
|
2508
2508
|
const useGetShipmentRates = (params) => {
|
|
2509
2509
|
const { client } = useShipEngine();
|
|
2510
|
-
const _a = params, { queryFnParams } = _a, rest = __objRest$
|
|
2510
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$b(_a, ["queryFnParams"]);
|
|
2511
2511
|
const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
|
|
2512
2512
|
const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
|
|
2513
|
-
return useQuery(__spreadProps$
|
|
2513
|
+
return useQuery(__spreadProps$f(__spreadValues$g({
|
|
2514
2514
|
enabled: shipmentId !== void 0
|
|
2515
2515
|
}, rest), {
|
|
2516
2516
|
onError,
|
|
@@ -2525,33 +2525,33 @@ const useGetShipmentRates = (params) => {
|
|
|
2525
2525
|
}));
|
|
2526
2526
|
};
|
|
2527
2527
|
|
|
2528
|
-
var __defProp$
|
|
2529
|
-
var __defProps$
|
|
2530
|
-
var __getOwnPropDescs$
|
|
2531
|
-
var __getOwnPropSymbols$
|
|
2532
|
-
var __hasOwnProp$
|
|
2533
|
-
var __propIsEnum$
|
|
2534
|
-
var __defNormalProp$
|
|
2535
|
-
var __spreadValues$
|
|
2528
|
+
var __defProp$f = Object.defineProperty;
|
|
2529
|
+
var __defProps$e = Object.defineProperties;
|
|
2530
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
2531
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
2532
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
2533
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
2534
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2535
|
+
var __spreadValues$f = (a, b) => {
|
|
2536
2536
|
for (var prop in b || (b = {}))
|
|
2537
|
-
if (__hasOwnProp$
|
|
2538
|
-
__defNormalProp$
|
|
2539
|
-
if (__getOwnPropSymbols$
|
|
2540
|
-
for (var prop of __getOwnPropSymbols$
|
|
2541
|
-
if (__propIsEnum$
|
|
2542
|
-
__defNormalProp$
|
|
2537
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
2538
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2539
|
+
if (__getOwnPropSymbols$h)
|
|
2540
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
2541
|
+
if (__propIsEnum$h.call(b, prop))
|
|
2542
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2543
2543
|
}
|
|
2544
2544
|
return a;
|
|
2545
2545
|
};
|
|
2546
|
-
var __spreadProps$
|
|
2547
|
-
var __objRest$
|
|
2546
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
2547
|
+
var __objRest$a = (source, exclude) => {
|
|
2548
2548
|
var target = {};
|
|
2549
2549
|
for (var prop in source)
|
|
2550
|
-
if (__hasOwnProp$
|
|
2550
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2551
2551
|
target[prop] = source[prop];
|
|
2552
|
-
if (source != null && __getOwnPropSymbols$
|
|
2553
|
-
for (var prop of __getOwnPropSymbols$
|
|
2554
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2552
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
2553
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
2554
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
2555
2555
|
target[prop] = source[prop];
|
|
2556
2556
|
}
|
|
2557
2557
|
return target;
|
|
@@ -2562,12 +2562,12 @@ const useGetShipment = (params) => {
|
|
|
2562
2562
|
const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
|
|
2563
2563
|
const getQueryProps = () => {
|
|
2564
2564
|
if (typeof params !== "string") {
|
|
2565
|
-
const _a2 = params, rest = __objRest$
|
|
2565
|
+
const _a2 = params, rest = __objRest$a(_a2, ["queryFnParams"]);
|
|
2566
2566
|
return rest;
|
|
2567
2567
|
}
|
|
2568
2568
|
return {};
|
|
2569
2569
|
};
|
|
2570
|
-
return useQuery(__spreadProps$
|
|
2570
|
+
return useQuery(__spreadProps$e(__spreadValues$f({}, getQueryProps()), {
|
|
2571
2571
|
enabled: shipmentId !== void 0,
|
|
2572
2572
|
onError,
|
|
2573
2573
|
queryFn: () => {
|
|
@@ -2581,23 +2581,23 @@ const useGetShipment = (params) => {
|
|
|
2581
2581
|
}));
|
|
2582
2582
|
};
|
|
2583
2583
|
|
|
2584
|
-
var __getOwnPropSymbols$
|
|
2585
|
-
var __hasOwnProp$
|
|
2586
|
-
var __propIsEnum$
|
|
2587
|
-
var __objRest$
|
|
2584
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
2585
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
2586
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
2587
|
+
var __objRest$9 = (source, exclude) => {
|
|
2588
2588
|
var target = {};
|
|
2589
2589
|
for (var prop in source)
|
|
2590
|
-
if (__hasOwnProp$
|
|
2590
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2591
2591
|
target[prop] = source[prop];
|
|
2592
|
-
if (source != null && __getOwnPropSymbols$
|
|
2593
|
-
for (var prop of __getOwnPropSymbols$
|
|
2594
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2592
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
2593
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
2594
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
2595
2595
|
target[prop] = source[prop];
|
|
2596
2596
|
}
|
|
2597
2597
|
return target;
|
|
2598
2598
|
};
|
|
2599
2599
|
const useListShipments = (_params) => {
|
|
2600
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
2600
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
|
|
2601
2601
|
const { client } = useShipEngine();
|
|
2602
2602
|
return useQuery({
|
|
2603
2603
|
enabled,
|
|
@@ -2608,41 +2608,41 @@ const useListShipments = (_params) => {
|
|
|
2608
2608
|
});
|
|
2609
2609
|
};
|
|
2610
2610
|
|
|
2611
|
-
var __defProp$
|
|
2612
|
-
var __defProps$
|
|
2613
|
-
var __getOwnPropDescs$
|
|
2614
|
-
var __getOwnPropSymbols$
|
|
2615
|
-
var __hasOwnProp$
|
|
2616
|
-
var __propIsEnum$
|
|
2617
|
-
var __defNormalProp$
|
|
2618
|
-
var __spreadValues$
|
|
2611
|
+
var __defProp$e = Object.defineProperty;
|
|
2612
|
+
var __defProps$d = Object.defineProperties;
|
|
2613
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
2614
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
2615
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
2616
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
2617
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2618
|
+
var __spreadValues$e = (a, b) => {
|
|
2619
2619
|
for (var prop in b || (b = {}))
|
|
2620
|
-
if (__hasOwnProp$
|
|
2621
|
-
__defNormalProp$
|
|
2622
|
-
if (__getOwnPropSymbols$
|
|
2623
|
-
for (var prop of __getOwnPropSymbols$
|
|
2624
|
-
if (__propIsEnum$
|
|
2625
|
-
__defNormalProp$
|
|
2620
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
2621
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2622
|
+
if (__getOwnPropSymbols$f)
|
|
2623
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
2624
|
+
if (__propIsEnum$f.call(b, prop))
|
|
2625
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2626
2626
|
}
|
|
2627
2627
|
return a;
|
|
2628
2628
|
};
|
|
2629
|
-
var __spreadProps$
|
|
2630
|
-
var __objRest$
|
|
2629
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
2630
|
+
var __objRest$8 = (source, exclude) => {
|
|
2631
2631
|
var target = {};
|
|
2632
2632
|
for (var prop in source)
|
|
2633
|
-
if (__hasOwnProp$
|
|
2633
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2634
2634
|
target[prop] = source[prop];
|
|
2635
|
-
if (source != null && __getOwnPropSymbols$
|
|
2636
|
-
for (var prop of __getOwnPropSymbols$
|
|
2637
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2635
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
2636
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
2637
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
2638
2638
|
target[prop] = source[prop];
|
|
2639
2639
|
}
|
|
2640
2640
|
return target;
|
|
2641
2641
|
};
|
|
2642
2642
|
const useGetShipmentByExternalId = (params) => {
|
|
2643
2643
|
const { client } = useShipEngine();
|
|
2644
|
-
const _a = params, { queryFnParams } = _a, rest = __objRest$
|
|
2645
|
-
return useQuery(__spreadProps$
|
|
2644
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$8(_a, ["queryFnParams"]);
|
|
2645
|
+
return useQuery(__spreadProps$d(__spreadValues$e({}, rest), {
|
|
2646
2646
|
onError,
|
|
2647
2647
|
queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
|
|
2648
2648
|
queryKey: ["useGetShipmentByExternalId", queryFnParams],
|
|
@@ -2682,6 +2682,47 @@ const useCancelShipment = () => {
|
|
|
2682
2682
|
});
|
|
2683
2683
|
};
|
|
2684
2684
|
|
|
2685
|
+
var __defProp$d = Object.defineProperty;
|
|
2686
|
+
var __defProps$c = Object.defineProperties;
|
|
2687
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
2688
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2689
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2690
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
2691
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2692
|
+
var __spreadValues$d = (a, b) => {
|
|
2693
|
+
for (var prop in b || (b = {}))
|
|
2694
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
2695
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2696
|
+
if (__getOwnPropSymbols$e)
|
|
2697
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
2698
|
+
if (__propIsEnum$e.call(b, prop))
|
|
2699
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2700
|
+
}
|
|
2701
|
+
return a;
|
|
2702
|
+
};
|
|
2703
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
2704
|
+
var __objRest$7 = (source, exclude) => {
|
|
2705
|
+
var target = {};
|
|
2706
|
+
for (var prop in source)
|
|
2707
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2708
|
+
target[prop] = source[prop];
|
|
2709
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
2710
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
2711
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
2712
|
+
target[prop] = source[prop];
|
|
2713
|
+
}
|
|
2714
|
+
return target;
|
|
2715
|
+
};
|
|
2716
|
+
const useExportShipments = (params) => {
|
|
2717
|
+
const { client } = useShipEngine();
|
|
2718
|
+
const _a = __spreadValues$d({}, params), { queryFnParams } = _a, rest = __objRest$7(_a, ["queryFnParams"]);
|
|
2719
|
+
return useQuery(__spreadProps$c(__spreadValues$d({}, rest), {
|
|
2720
|
+
onError,
|
|
2721
|
+
queryFn: () => client.shipments.export(queryFnParams),
|
|
2722
|
+
queryKey: ["useExportShipments", params]
|
|
2723
|
+
}));
|
|
2724
|
+
};
|
|
2725
|
+
|
|
2685
2726
|
var __defProp$c = Object.defineProperty;
|
|
2686
2727
|
var __defProps$b = Object.defineProperties;
|
|
2687
2728
|
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
@@ -2713,51 +2754,10 @@ var __objRest$6 = (source, exclude) => {
|
|
|
2713
2754
|
}
|
|
2714
2755
|
return target;
|
|
2715
2756
|
};
|
|
2716
|
-
const
|
|
2757
|
+
const useListShippingRules = (params) => {
|
|
2717
2758
|
const { client } = useShipEngine();
|
|
2718
2759
|
const _a = __spreadValues$c({}, params), { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
|
|
2719
2760
|
return useQuery(__spreadProps$b(__spreadValues$c({}, rest), {
|
|
2720
|
-
onError,
|
|
2721
|
-
queryFn: () => client.shipments.export(queryFnParams),
|
|
2722
|
-
queryKey: ["useExportShipments", params]
|
|
2723
|
-
}));
|
|
2724
|
-
};
|
|
2725
|
-
|
|
2726
|
-
var __defProp$b = Object.defineProperty;
|
|
2727
|
-
var __defProps$a = Object.defineProperties;
|
|
2728
|
-
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2729
|
-
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2730
|
-
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2731
|
-
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2732
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2733
|
-
var __spreadValues$b = (a, b) => {
|
|
2734
|
-
for (var prop in b || (b = {}))
|
|
2735
|
-
if (__hasOwnProp$c.call(b, prop))
|
|
2736
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
2737
|
-
if (__getOwnPropSymbols$c)
|
|
2738
|
-
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2739
|
-
if (__propIsEnum$c.call(b, prop))
|
|
2740
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
2741
|
-
}
|
|
2742
|
-
return a;
|
|
2743
|
-
};
|
|
2744
|
-
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2745
|
-
var __objRest$5 = (source, exclude) => {
|
|
2746
|
-
var target = {};
|
|
2747
|
-
for (var prop in source)
|
|
2748
|
-
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2749
|
-
target[prop] = source[prop];
|
|
2750
|
-
if (source != null && __getOwnPropSymbols$c)
|
|
2751
|
-
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
2752
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
2753
|
-
target[prop] = source[prop];
|
|
2754
|
-
}
|
|
2755
|
-
return target;
|
|
2756
|
-
};
|
|
2757
|
-
const useListShippingRules = (params) => {
|
|
2758
|
-
const { client } = useShipEngine();
|
|
2759
|
-
const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
2760
|
-
return useQuery(__spreadProps$a(__spreadValues$b({}, rest), {
|
|
2761
2761
|
onError,
|
|
2762
2762
|
queryFn: () => {
|
|
2763
2763
|
return client.shippingRules.list(queryFnParams);
|
|
@@ -2863,41 +2863,41 @@ const useEditShippingRule = () => {
|
|
|
2863
2863
|
});
|
|
2864
2864
|
};
|
|
2865
2865
|
|
|
2866
|
-
var __defProp$
|
|
2867
|
-
var __defProps$
|
|
2868
|
-
var __getOwnPropDescs$
|
|
2869
|
-
var __getOwnPropSymbols$
|
|
2870
|
-
var __hasOwnProp$
|
|
2871
|
-
var __propIsEnum$
|
|
2872
|
-
var __defNormalProp$
|
|
2873
|
-
var __spreadValues$
|
|
2866
|
+
var __defProp$b = Object.defineProperty;
|
|
2867
|
+
var __defProps$a = Object.defineProperties;
|
|
2868
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2869
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2870
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2871
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2872
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2873
|
+
var __spreadValues$b = (a, b) => {
|
|
2874
2874
|
for (var prop in b || (b = {}))
|
|
2875
|
-
if (__hasOwnProp$
|
|
2876
|
-
__defNormalProp$
|
|
2877
|
-
if (__getOwnPropSymbols$
|
|
2878
|
-
for (var prop of __getOwnPropSymbols$
|
|
2879
|
-
if (__propIsEnum$
|
|
2880
|
-
__defNormalProp$
|
|
2875
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
2876
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2877
|
+
if (__getOwnPropSymbols$c)
|
|
2878
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2879
|
+
if (__propIsEnum$c.call(b, prop))
|
|
2880
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2881
2881
|
}
|
|
2882
2882
|
return a;
|
|
2883
2883
|
};
|
|
2884
|
-
var __spreadProps$
|
|
2885
|
-
var __objRest$
|
|
2884
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2885
|
+
var __objRest$5 = (source, exclude) => {
|
|
2886
2886
|
var target = {};
|
|
2887
2887
|
for (var prop in source)
|
|
2888
|
-
if (__hasOwnProp$
|
|
2888
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2889
2889
|
target[prop] = source[prop];
|
|
2890
|
-
if (source != null && __getOwnPropSymbols$
|
|
2891
|
-
for (var prop of __getOwnPropSymbols$
|
|
2892
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2890
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
2891
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
2892
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
2893
2893
|
target[prop] = source[prop];
|
|
2894
2894
|
}
|
|
2895
2895
|
return target;
|
|
2896
2896
|
};
|
|
2897
2897
|
const useGetShippingRuleConditionsOptions = (params) => {
|
|
2898
2898
|
const { client } = useShipEngine();
|
|
2899
|
-
const _a = __spreadValues$
|
|
2900
|
-
return useQuery(__spreadProps$
|
|
2899
|
+
const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
2900
|
+
return useQuery(__spreadProps$a(__spreadValues$b({}, rest), {
|
|
2901
2901
|
onError,
|
|
2902
2902
|
queryFn: () => {
|
|
2903
2903
|
return client.shippingRules.getConditionOptions(queryFnParams);
|
|
@@ -2907,41 +2907,41 @@ const useGetShippingRuleConditionsOptions = (params) => {
|
|
|
2907
2907
|
}));
|
|
2908
2908
|
};
|
|
2909
2909
|
|
|
2910
|
-
var __defProp$
|
|
2911
|
-
var __defProps$
|
|
2912
|
-
var __getOwnPropDescs$
|
|
2913
|
-
var __getOwnPropSymbols$
|
|
2914
|
-
var __hasOwnProp$
|
|
2915
|
-
var __propIsEnum$
|
|
2916
|
-
var __defNormalProp$
|
|
2917
|
-
var __spreadValues$
|
|
2910
|
+
var __defProp$a = Object.defineProperty;
|
|
2911
|
+
var __defProps$9 = Object.defineProperties;
|
|
2912
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
2913
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2914
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2915
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
2916
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2917
|
+
var __spreadValues$a = (a, b) => {
|
|
2918
2918
|
for (var prop in b || (b = {}))
|
|
2919
|
-
if (__hasOwnProp$
|
|
2920
|
-
__defNormalProp$
|
|
2921
|
-
if (__getOwnPropSymbols$
|
|
2922
|
-
for (var prop of __getOwnPropSymbols$
|
|
2923
|
-
if (__propIsEnum$
|
|
2924
|
-
__defNormalProp$
|
|
2919
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
2920
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2921
|
+
if (__getOwnPropSymbols$b)
|
|
2922
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
2923
|
+
if (__propIsEnum$b.call(b, prop))
|
|
2924
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2925
2925
|
}
|
|
2926
2926
|
return a;
|
|
2927
2927
|
};
|
|
2928
|
-
var __spreadProps$
|
|
2929
|
-
var __objRest$
|
|
2928
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
2929
|
+
var __objRest$4 = (source, exclude) => {
|
|
2930
2930
|
var target = {};
|
|
2931
2931
|
for (var prop in source)
|
|
2932
|
-
if (__hasOwnProp$
|
|
2932
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2933
2933
|
target[prop] = source[prop];
|
|
2934
|
-
if (source != null && __getOwnPropSymbols$
|
|
2935
|
-
for (var prop of __getOwnPropSymbols$
|
|
2936
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2934
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
2935
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
2936
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
2937
2937
|
target[prop] = source[prop];
|
|
2938
2938
|
}
|
|
2939
2939
|
return target;
|
|
2940
2940
|
};
|
|
2941
2941
|
const useGetShippingRuleById = (params) => {
|
|
2942
2942
|
const { client } = useShipEngine();
|
|
2943
|
-
const _a = __spreadValues$
|
|
2944
|
-
return useQuery(__spreadProps$
|
|
2943
|
+
const _a = __spreadValues$a({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
|
|
2944
|
+
return useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
|
|
2945
2945
|
onError,
|
|
2946
2946
|
queryFn: () => {
|
|
2947
2947
|
return client.shippingRules.get(queryFnParams);
|
|
@@ -3030,41 +3030,41 @@ const useDeleteWarehouse = () => {
|
|
|
3030
3030
|
});
|
|
3031
3031
|
};
|
|
3032
3032
|
|
|
3033
|
-
var __defProp$
|
|
3034
|
-
var __defProps$
|
|
3035
|
-
var __getOwnPropDescs$
|
|
3036
|
-
var __getOwnPropSymbols$
|
|
3037
|
-
var __hasOwnProp$
|
|
3038
|
-
var __propIsEnum$
|
|
3039
|
-
var __defNormalProp$
|
|
3040
|
-
var __spreadValues$
|
|
3033
|
+
var __defProp$9 = Object.defineProperty;
|
|
3034
|
+
var __defProps$8 = Object.defineProperties;
|
|
3035
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
3036
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3037
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3038
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3039
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3040
|
+
var __spreadValues$9 = (a, b) => {
|
|
3041
3041
|
for (var prop in b || (b = {}))
|
|
3042
|
-
if (__hasOwnProp$
|
|
3043
|
-
__defNormalProp$
|
|
3044
|
-
if (__getOwnPropSymbols$
|
|
3045
|
-
for (var prop of __getOwnPropSymbols$
|
|
3046
|
-
if (__propIsEnum$
|
|
3047
|
-
__defNormalProp$
|
|
3042
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3043
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3044
|
+
if (__getOwnPropSymbols$a)
|
|
3045
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3046
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3047
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3048
3048
|
}
|
|
3049
3049
|
return a;
|
|
3050
3050
|
};
|
|
3051
|
-
var __spreadProps$
|
|
3052
|
-
var __objRest$
|
|
3051
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
3052
|
+
var __objRest$3 = (source, exclude) => {
|
|
3053
3053
|
var target = {};
|
|
3054
3054
|
for (var prop in source)
|
|
3055
|
-
if (__hasOwnProp$
|
|
3055
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3056
3056
|
target[prop] = source[prop];
|
|
3057
|
-
if (source != null && __getOwnPropSymbols$
|
|
3058
|
-
for (var prop of __getOwnPropSymbols$
|
|
3059
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3057
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
3058
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
3059
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
3060
3060
|
target[prop] = source[prop];
|
|
3061
3061
|
}
|
|
3062
3062
|
return target;
|
|
3063
3063
|
};
|
|
3064
3064
|
const useListWarehouses = (params) => {
|
|
3065
3065
|
const { client } = useShipEngine();
|
|
3066
|
-
const _a = __spreadValues$
|
|
3067
|
-
return useQuery(__spreadProps$
|
|
3066
|
+
const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
|
|
3067
|
+
return useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
|
|
3068
3068
|
onError,
|
|
3069
3069
|
queryFn: () => client.warehouses.list(queryFnParams),
|
|
3070
3070
|
queryKey: ["useListWarehouses", queryFnParams],
|
|
@@ -3072,17 +3072,17 @@ const useListWarehouses = (params) => {
|
|
|
3072
3072
|
}));
|
|
3073
3073
|
};
|
|
3074
3074
|
|
|
3075
|
-
var __getOwnPropSymbols$
|
|
3076
|
-
var __hasOwnProp$
|
|
3077
|
-
var __propIsEnum$
|
|
3078
|
-
var __objRest$
|
|
3075
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
3076
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
3077
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
3078
|
+
var __objRest$2 = (source, exclude) => {
|
|
3079
3079
|
var target = {};
|
|
3080
3080
|
for (var prop in source)
|
|
3081
|
-
if (__hasOwnProp$
|
|
3081
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3082
3082
|
target[prop] = source[prop];
|
|
3083
|
-
if (source != null && __getOwnPropSymbols$
|
|
3084
|
-
for (var prop of __getOwnPropSymbols$
|
|
3085
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3083
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
3084
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
3085
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
3086
3086
|
target[prop] = source[prop];
|
|
3087
3087
|
}
|
|
3088
3088
|
return target;
|
|
@@ -3111,7 +3111,7 @@ const useUpdateWarehouse = () => {
|
|
|
3111
3111
|
const { client } = useShipEngine();
|
|
3112
3112
|
return useMutation({
|
|
3113
3113
|
mutationFn: (_a) => __async$a(void 0, null, function* () {
|
|
3114
|
-
var _b = _a, { warehouseId } = _b, warehouse = __objRest$
|
|
3114
|
+
var _b = _a, { warehouseId } = _b, warehouse = __objRest$2(_b, ["warehouseId"]);
|
|
3115
3115
|
const result = yield client.warehouses.update(warehouseId, warehouse);
|
|
3116
3116
|
return result.data;
|
|
3117
3117
|
}),
|
|
@@ -3150,16 +3150,45 @@ var __async$9 = (__this, __arguments, generator) => {
|
|
|
3150
3150
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3151
3151
|
});
|
|
3152
3152
|
};
|
|
3153
|
-
const useUpdateAccountBillingPlan = () => {
|
|
3153
|
+
const useUpdateAccountBillingPlan = () => {
|
|
3154
|
+
const { client } = useShipEngine();
|
|
3155
|
+
return useMutation({
|
|
3156
|
+
mutationFn: (code) => __async$9(void 0, null, function* () {
|
|
3157
|
+
const result = yield client.accountBillingPlan.update({ code });
|
|
3158
|
+
return result.data;
|
|
3159
|
+
}),
|
|
3160
|
+
mutationKey: ["useUpdateAccountBillingPlan"],
|
|
3161
|
+
onError
|
|
3162
|
+
});
|
|
3163
|
+
};
|
|
3164
|
+
|
|
3165
|
+
var __defProp$8 = Object.defineProperty;
|
|
3166
|
+
var __defProps$7 = Object.defineProperties;
|
|
3167
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
3168
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3169
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3170
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
3171
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3172
|
+
var __spreadValues$8 = (a, b) => {
|
|
3173
|
+
for (var prop in b || (b = {}))
|
|
3174
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
3175
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3176
|
+
if (__getOwnPropSymbols$8)
|
|
3177
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
3178
|
+
if (__propIsEnum$8.call(b, prop))
|
|
3179
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3180
|
+
}
|
|
3181
|
+
return a;
|
|
3182
|
+
};
|
|
3183
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3184
|
+
const useGetAccountBilling = (params) => {
|
|
3154
3185
|
const { client } = useShipEngine();
|
|
3155
|
-
return
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
onError
|
|
3162
|
-
});
|
|
3186
|
+
return useQuery(__spreadProps$7(__spreadValues$8({}, params), {
|
|
3187
|
+
onError,
|
|
3188
|
+
queryFn: () => client.accountBilling.get(),
|
|
3189
|
+
queryKey: ["useGetAccountBilling"],
|
|
3190
|
+
select: (result) => result.data
|
|
3191
|
+
}));
|
|
3163
3192
|
};
|
|
3164
3193
|
|
|
3165
3194
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -3181,35 +3210,6 @@ var __spreadValues$7 = (a, b) => {
|
|
|
3181
3210
|
return a;
|
|
3182
3211
|
};
|
|
3183
3212
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
3184
|
-
const useGetAccountBilling = (params) => {
|
|
3185
|
-
const { client } = useShipEngine();
|
|
3186
|
-
return useQuery(__spreadProps$6(__spreadValues$7({}, params), {
|
|
3187
|
-
onError,
|
|
3188
|
-
queryFn: () => client.accountBilling.get(),
|
|
3189
|
-
queryKey: ["useGetAccountBilling"],
|
|
3190
|
-
select: (result) => result.data
|
|
3191
|
-
}));
|
|
3192
|
-
};
|
|
3193
|
-
|
|
3194
|
-
var __defProp$6 = Object.defineProperty;
|
|
3195
|
-
var __defProps$5 = Object.defineProperties;
|
|
3196
|
-
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3197
|
-
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3198
|
-
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3199
|
-
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
3200
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3201
|
-
var __spreadValues$6 = (a, b) => {
|
|
3202
|
-
for (var prop in b || (b = {}))
|
|
3203
|
-
if (__hasOwnProp$6.call(b, prop))
|
|
3204
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
3205
|
-
if (__getOwnPropSymbols$6)
|
|
3206
|
-
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
3207
|
-
if (__propIsEnum$6.call(b, prop))
|
|
3208
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
3209
|
-
}
|
|
3210
|
-
return a;
|
|
3211
|
-
};
|
|
3212
|
-
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3213
3213
|
var __async$8 = (__this, __arguments, generator) => {
|
|
3214
3214
|
return new Promise((resolve, reject) => {
|
|
3215
3215
|
var fulfilled = (value) => {
|
|
@@ -3232,7 +3232,7 @@ var __async$8 = (__this, __arguments, generator) => {
|
|
|
3232
3232
|
};
|
|
3233
3233
|
const useUpsertAccountBilling = (params) => {
|
|
3234
3234
|
const { client } = useShipEngine();
|
|
3235
|
-
return useMutation(__spreadProps$
|
|
3235
|
+
return useMutation(__spreadProps$6(__spreadValues$7({}, params), {
|
|
3236
3236
|
mutationFn: (billing) => __async$8(void 0, null, function* () {
|
|
3237
3237
|
const result = yield client.accountBilling.put(billing);
|
|
3238
3238
|
return result.data;
|
|
@@ -3242,28 +3242,28 @@ const useUpsertAccountBilling = (params) => {
|
|
|
3242
3242
|
}));
|
|
3243
3243
|
};
|
|
3244
3244
|
|
|
3245
|
-
var __defProp$
|
|
3246
|
-
var __defProps$
|
|
3247
|
-
var __getOwnPropDescs$
|
|
3248
|
-
var __getOwnPropSymbols$
|
|
3249
|
-
var __hasOwnProp$
|
|
3250
|
-
var __propIsEnum$
|
|
3251
|
-
var __defNormalProp$
|
|
3252
|
-
var __spreadValues$
|
|
3245
|
+
var __defProp$6 = Object.defineProperty;
|
|
3246
|
+
var __defProps$5 = Object.defineProperties;
|
|
3247
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3248
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3249
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3250
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
3251
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3252
|
+
var __spreadValues$6 = (a, b) => {
|
|
3253
3253
|
for (var prop in b || (b = {}))
|
|
3254
|
-
if (__hasOwnProp$
|
|
3255
|
-
__defNormalProp$
|
|
3256
|
-
if (__getOwnPropSymbols$
|
|
3257
|
-
for (var prop of __getOwnPropSymbols$
|
|
3258
|
-
if (__propIsEnum$
|
|
3259
|
-
__defNormalProp$
|
|
3254
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
3255
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
3256
|
+
if (__getOwnPropSymbols$6)
|
|
3257
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
3258
|
+
if (__propIsEnum$6.call(b, prop))
|
|
3259
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
3260
3260
|
}
|
|
3261
3261
|
return a;
|
|
3262
3262
|
};
|
|
3263
|
-
var __spreadProps$
|
|
3263
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3264
3264
|
const useGetHereToken = (params) => {
|
|
3265
3265
|
const { client } = useShipEngine();
|
|
3266
|
-
return useQuery(__spreadProps$
|
|
3266
|
+
return useQuery(__spreadProps$5(__spreadValues$6({}, params), {
|
|
3267
3267
|
onError,
|
|
3268
3268
|
queryFn: () => client.servicePoints.getHereToken(),
|
|
3269
3269
|
queryKey: ["useGetHereToken"],
|
|
@@ -3383,19 +3383,19 @@ const useListSandboxSellerIds = (sellerId) => {
|
|
|
3383
3383
|
});
|
|
3384
3384
|
};
|
|
3385
3385
|
|
|
3386
|
-
var __defProp$
|
|
3387
|
-
var __getOwnPropSymbols$
|
|
3388
|
-
var __hasOwnProp$
|
|
3389
|
-
var __propIsEnum$
|
|
3390
|
-
var __defNormalProp$
|
|
3391
|
-
var __spreadValues$
|
|
3386
|
+
var __defProp$5 = Object.defineProperty;
|
|
3387
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
3388
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
3389
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
3390
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3391
|
+
var __spreadValues$5 = (a, b) => {
|
|
3392
3392
|
for (var prop in b || (b = {}))
|
|
3393
|
-
if (__hasOwnProp$
|
|
3394
|
-
__defNormalProp$
|
|
3395
|
-
if (__getOwnPropSymbols$
|
|
3396
|
-
for (var prop of __getOwnPropSymbols$
|
|
3397
|
-
if (__propIsEnum$
|
|
3398
|
-
__defNormalProp$
|
|
3393
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
3394
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
3395
|
+
if (__getOwnPropSymbols$5)
|
|
3396
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
3397
|
+
if (__propIsEnum$5.call(b, prop))
|
|
3398
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
3399
3399
|
}
|
|
3400
3400
|
return a;
|
|
3401
3401
|
};
|
|
@@ -3427,7 +3427,7 @@ const useListSellerApiKeys = (params) => {
|
|
|
3427
3427
|
var _a;
|
|
3428
3428
|
const sellerId = yield client.getTenant((_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.isSandbox);
|
|
3429
3429
|
if (sellerId) {
|
|
3430
|
-
return client.sellers.listSellerApiKeys(__spreadValues$
|
|
3430
|
+
return client.sellers.listSellerApiKeys(__spreadValues$5({ sellerId }, params));
|
|
3431
3431
|
}
|
|
3432
3432
|
return Promise.reject([new CodedError("Missing Seller ID from Token")]);
|
|
3433
3433
|
}),
|
|
@@ -3518,25 +3518,25 @@ const useDeleteSellerApiKey = () => {
|
|
|
3518
3518
|
});
|
|
3519
3519
|
};
|
|
3520
3520
|
|
|
3521
|
-
var __defProp$
|
|
3522
|
-
var __defProps$
|
|
3523
|
-
var __getOwnPropDescs$
|
|
3524
|
-
var __getOwnPropSymbols$
|
|
3525
|
-
var __hasOwnProp$
|
|
3526
|
-
var __propIsEnum$
|
|
3527
|
-
var __defNormalProp$
|
|
3528
|
-
var __spreadValues$
|
|
3521
|
+
var __defProp$4 = Object.defineProperty;
|
|
3522
|
+
var __defProps$4 = Object.defineProperties;
|
|
3523
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
3524
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3525
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3526
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
3527
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3528
|
+
var __spreadValues$4 = (a, b) => {
|
|
3529
3529
|
for (var prop in b || (b = {}))
|
|
3530
|
-
if (__hasOwnProp$
|
|
3531
|
-
__defNormalProp$
|
|
3532
|
-
if (__getOwnPropSymbols$
|
|
3533
|
-
for (var prop of __getOwnPropSymbols$
|
|
3534
|
-
if (__propIsEnum$
|
|
3535
|
-
__defNormalProp$
|
|
3530
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
3531
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
3532
|
+
if (__getOwnPropSymbols$4)
|
|
3533
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
3534
|
+
if (__propIsEnum$4.call(b, prop))
|
|
3535
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
3536
3536
|
}
|
|
3537
3537
|
return a;
|
|
3538
3538
|
};
|
|
3539
|
-
var __spreadProps$
|
|
3539
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
3540
3540
|
var __async$2 = (__this, __arguments, generator) => {
|
|
3541
3541
|
return new Promise((resolve, reject) => {
|
|
3542
3542
|
var fulfilled = (value) => {
|
|
@@ -3559,7 +3559,7 @@ var __async$2 = (__this, __arguments, generator) => {
|
|
|
3559
3559
|
};
|
|
3560
3560
|
const useCreateWebhook = (params) => {
|
|
3561
3561
|
const { client } = useShipEngine();
|
|
3562
|
-
return useMutation(__spreadProps$
|
|
3562
|
+
return useMutation(__spreadProps$4(__spreadValues$4({}, params), {
|
|
3563
3563
|
mutationFn: (data) => __async$2(void 0, null, function* () {
|
|
3564
3564
|
const result = yield client.webhooks.create(data);
|
|
3565
3565
|
return result.data;
|
|
@@ -3569,25 +3569,25 @@ const useCreateWebhook = (params) => {
|
|
|
3569
3569
|
}));
|
|
3570
3570
|
};
|
|
3571
3571
|
|
|
3572
|
-
var __defProp$
|
|
3573
|
-
var __defProps$
|
|
3574
|
-
var __getOwnPropDescs$
|
|
3575
|
-
var __getOwnPropSymbols$
|
|
3576
|
-
var __hasOwnProp$
|
|
3577
|
-
var __propIsEnum$
|
|
3578
|
-
var __defNormalProp$
|
|
3579
|
-
var __spreadValues$
|
|
3572
|
+
var __defProp$3 = Object.defineProperty;
|
|
3573
|
+
var __defProps$3 = Object.defineProperties;
|
|
3574
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
3575
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
3576
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
3577
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
3578
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3579
|
+
var __spreadValues$3 = (a, b) => {
|
|
3580
3580
|
for (var prop in b || (b = {}))
|
|
3581
|
-
if (__hasOwnProp$
|
|
3582
|
-
__defNormalProp$
|
|
3583
|
-
if (__getOwnPropSymbols$
|
|
3584
|
-
for (var prop of __getOwnPropSymbols$
|
|
3585
|
-
if (__propIsEnum$
|
|
3586
|
-
__defNormalProp$
|
|
3581
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
3582
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
3583
|
+
if (__getOwnPropSymbols$3)
|
|
3584
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
3585
|
+
if (__propIsEnum$3.call(b, prop))
|
|
3586
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
3587
3587
|
}
|
|
3588
3588
|
return a;
|
|
3589
3589
|
};
|
|
3590
|
-
var __spreadProps$
|
|
3590
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
3591
3591
|
var __async$1 = (__this, __arguments, generator) => {
|
|
3592
3592
|
return new Promise((resolve, reject) => {
|
|
3593
3593
|
var fulfilled = (value) => {
|
|
@@ -3610,7 +3610,7 @@ var __async$1 = (__this, __arguments, generator) => {
|
|
|
3610
3610
|
};
|
|
3611
3611
|
const useDeleteWebhook = (params) => {
|
|
3612
3612
|
const { client } = useShipEngine();
|
|
3613
|
-
return useMutation(__spreadProps$
|
|
3613
|
+
return useMutation(__spreadProps$3(__spreadValues$3({}, params), {
|
|
3614
3614
|
mutationFn: (webhookId) => __async$1(void 0, null, function* () {
|
|
3615
3615
|
const result = yield client.webhooks.delete(webhookId);
|
|
3616
3616
|
return result.data;
|
|
@@ -3620,41 +3620,41 @@ const useDeleteWebhook = (params) => {
|
|
|
3620
3620
|
}));
|
|
3621
3621
|
};
|
|
3622
3622
|
|
|
3623
|
-
var __defProp$
|
|
3624
|
-
var __defProps$
|
|
3625
|
-
var __getOwnPropDescs$
|
|
3626
|
-
var __getOwnPropSymbols$
|
|
3627
|
-
var __hasOwnProp$
|
|
3628
|
-
var __propIsEnum$
|
|
3629
|
-
var __defNormalProp$
|
|
3630
|
-
var __spreadValues$
|
|
3623
|
+
var __defProp$2 = Object.defineProperty;
|
|
3624
|
+
var __defProps$2 = Object.defineProperties;
|
|
3625
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
3626
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
3627
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
3628
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
3629
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3630
|
+
var __spreadValues$2 = (a, b) => {
|
|
3631
3631
|
for (var prop in b || (b = {}))
|
|
3632
|
-
if (__hasOwnProp$
|
|
3633
|
-
__defNormalProp$
|
|
3634
|
-
if (__getOwnPropSymbols$
|
|
3635
|
-
for (var prop of __getOwnPropSymbols$
|
|
3636
|
-
if (__propIsEnum$
|
|
3637
|
-
__defNormalProp$
|
|
3632
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
3633
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3634
|
+
if (__getOwnPropSymbols$2)
|
|
3635
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
3636
|
+
if (__propIsEnum$2.call(b, prop))
|
|
3637
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3638
3638
|
}
|
|
3639
3639
|
return a;
|
|
3640
3640
|
};
|
|
3641
|
-
var __spreadProps$
|
|
3642
|
-
var __objRest = (source, exclude) => {
|
|
3641
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
3642
|
+
var __objRest$1 = (source, exclude) => {
|
|
3643
3643
|
var target = {};
|
|
3644
3644
|
for (var prop in source)
|
|
3645
|
-
if (__hasOwnProp$
|
|
3645
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3646
3646
|
target[prop] = source[prop];
|
|
3647
|
-
if (source != null && __getOwnPropSymbols$
|
|
3648
|
-
for (var prop of __getOwnPropSymbols$
|
|
3649
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3647
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
3648
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
3649
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
3650
3650
|
target[prop] = source[prop];
|
|
3651
3651
|
}
|
|
3652
3652
|
return target;
|
|
3653
3653
|
};
|
|
3654
3654
|
const useListWebhooks = (params) => {
|
|
3655
3655
|
const { client } = useShipEngine();
|
|
3656
|
-
const _a = __spreadValues$
|
|
3657
|
-
return useQuery(__spreadProps$
|
|
3656
|
+
const _a = __spreadValues$2({}, params), { queryFnParams } = _a, rest = __objRest$1(_a, ["queryFnParams"]);
|
|
3657
|
+
return useQuery(__spreadProps$2(__spreadValues$2({}, rest), {
|
|
3658
3658
|
onError,
|
|
3659
3659
|
queryFn: () => client.webhooks.list(queryFnParams),
|
|
3660
3660
|
queryKey: ["useListWebhooks", queryFnParams],
|
|
@@ -3662,25 +3662,25 @@ const useListWebhooks = (params) => {
|
|
|
3662
3662
|
}));
|
|
3663
3663
|
};
|
|
3664
3664
|
|
|
3665
|
-
var __defProp = Object.defineProperty;
|
|
3666
|
-
var __defProps = Object.defineProperties;
|
|
3667
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3668
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3669
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3670
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3671
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3672
|
-
var __spreadValues = (a, b) => {
|
|
3665
|
+
var __defProp$1 = Object.defineProperty;
|
|
3666
|
+
var __defProps$1 = Object.defineProperties;
|
|
3667
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
3668
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
3669
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
3670
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
3671
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3672
|
+
var __spreadValues$1 = (a, b) => {
|
|
3673
3673
|
for (var prop in b || (b = {}))
|
|
3674
|
-
if (__hasOwnProp.call(b, prop))
|
|
3675
|
-
__defNormalProp(a, prop, b[prop]);
|
|
3676
|
-
if (__getOwnPropSymbols)
|
|
3677
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
3678
|
-
if (__propIsEnum.call(b, prop))
|
|
3679
|
-
__defNormalProp(a, prop, b[prop]);
|
|
3674
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
3675
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3676
|
+
if (__getOwnPropSymbols$1)
|
|
3677
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
3678
|
+
if (__propIsEnum$1.call(b, prop))
|
|
3679
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3680
3680
|
}
|
|
3681
3681
|
return a;
|
|
3682
3682
|
};
|
|
3683
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3683
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
3684
3684
|
var __async = (__this, __arguments, generator) => {
|
|
3685
3685
|
return new Promise((resolve, reject) => {
|
|
3686
3686
|
var fulfilled = (value) => {
|
|
@@ -3703,7 +3703,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3703
3703
|
};
|
|
3704
3704
|
const useUpdateWebhook = (params) => {
|
|
3705
3705
|
const { client } = useShipEngine();
|
|
3706
|
-
return useMutation(__spreadProps(__spreadValues({}, params), {
|
|
3706
|
+
return useMutation(__spreadProps$1(__spreadValues$1({}, params), {
|
|
3707
3707
|
mutationFn: (newWebhook) => __async(void 0, null, function* () {
|
|
3708
3708
|
const result = yield client.webhooks.update(newWebhook);
|
|
3709
3709
|
return result.data;
|
|
@@ -3713,4 +3713,46 @@ const useUpdateWebhook = (params) => {
|
|
|
3713
3713
|
}));
|
|
3714
3714
|
};
|
|
3715
3715
|
|
|
3716
|
-
|
|
3716
|
+
var __defProp = Object.defineProperty;
|
|
3717
|
+
var __defProps = Object.defineProperties;
|
|
3718
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3719
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3720
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3721
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3722
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3723
|
+
var __spreadValues = (a, b) => {
|
|
3724
|
+
for (var prop in b || (b = {}))
|
|
3725
|
+
if (__hasOwnProp.call(b, prop))
|
|
3726
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3727
|
+
if (__getOwnPropSymbols)
|
|
3728
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
3729
|
+
if (__propIsEnum.call(b, prop))
|
|
3730
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3731
|
+
}
|
|
3732
|
+
return a;
|
|
3733
|
+
};
|
|
3734
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3735
|
+
var __objRest = (source, exclude) => {
|
|
3736
|
+
var target = {};
|
|
3737
|
+
for (var prop in source)
|
|
3738
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3739
|
+
target[prop] = source[prop];
|
|
3740
|
+
if (source != null && __getOwnPropSymbols)
|
|
3741
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
3742
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
3743
|
+
target[prop] = source[prop];
|
|
3744
|
+
}
|
|
3745
|
+
return target;
|
|
3746
|
+
};
|
|
3747
|
+
const useListUsers = (params) => {
|
|
3748
|
+
const { client } = useShipEngine();
|
|
3749
|
+
const _a = __spreadValues({}, params), { queryFnParams } = _a, rest = __objRest(_a, ["queryFnParams"]);
|
|
3750
|
+
return useQuery(__spreadProps(__spreadValues({}, rest), {
|
|
3751
|
+
onError,
|
|
3752
|
+
queryFn: () => client.users.list(queryFnParams),
|
|
3753
|
+
queryKey: ["useListUsers", queryFnParams],
|
|
3754
|
+
select: (result) => result.data
|
|
3755
|
+
}));
|
|
3756
|
+
};
|
|
3757
|
+
|
|
3758
|
+
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, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|