@shipengine/react-api 4.3.4 → 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/account-billing/use-get-account-billing.d.ts +4 -0
- package/hooks/account-billing/use-upsert-account-billing.d.ts +2 -1
- package/hooks/funding-sources/use-update-funding-source.d.ts +1 -3
- 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 -727
- package/index.mjs +768 -728
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -79,25 +79,25 @@ const onError = (_errors) => _default();
|
|
|
79
79
|
|
|
80
80
|
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}();
|
|
81
81
|
|
|
82
|
-
var __defProp$
|
|
83
|
-
var __defProps$
|
|
84
|
-
var __getOwnPropDescs$
|
|
85
|
-
var __getOwnPropSymbols$
|
|
86
|
-
var __hasOwnProp$
|
|
87
|
-
var __propIsEnum$
|
|
88
|
-
var __defNormalProp$
|
|
89
|
-
var __spreadValues$
|
|
82
|
+
var __defProp$z = Object.defineProperty;
|
|
83
|
+
var __defProps$y = Object.defineProperties;
|
|
84
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
85
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
86
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
87
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
88
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
89
|
+
var __spreadValues$z = (a, b) => {
|
|
90
90
|
for (var prop in b || (b = {}))
|
|
91
|
-
if (__hasOwnProp$
|
|
92
|
-
__defNormalProp$
|
|
93
|
-
if (__getOwnPropSymbols$
|
|
94
|
-
for (var prop of __getOwnPropSymbols$
|
|
95
|
-
if (__propIsEnum$
|
|
96
|
-
__defNormalProp$
|
|
91
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
92
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
93
|
+
if (__getOwnPropSymbols$I)
|
|
94
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
95
|
+
if (__propIsEnum$I.call(b, prop))
|
|
96
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
97
97
|
}
|
|
98
98
|
return a;
|
|
99
99
|
};
|
|
100
|
-
var __spreadProps$
|
|
100
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
101
101
|
const streams = [];
|
|
102
102
|
if (process.env.NODE_ENV === "production") {
|
|
103
103
|
streams.push({
|
|
@@ -106,7 +106,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
106
106
|
}
|
|
107
107
|
const logger = E({
|
|
108
108
|
name: "shipengine",
|
|
109
|
-
serializers: __spreadProps$
|
|
109
|
+
serializers: __spreadProps$y(__spreadValues$z({}, k), {
|
|
110
110
|
req: (req) => ({
|
|
111
111
|
headers: req.headers,
|
|
112
112
|
method: req.method,
|
|
@@ -343,25 +343,25 @@ const useValidateAddresses = () => {
|
|
|
343
343
|
});
|
|
344
344
|
};
|
|
345
345
|
|
|
346
|
-
var __defProp$
|
|
347
|
-
var __defProps$
|
|
348
|
-
var __getOwnPropDescs$
|
|
349
|
-
var __getOwnPropSymbols$
|
|
350
|
-
var __hasOwnProp$
|
|
351
|
-
var __propIsEnum$
|
|
352
|
-
var __defNormalProp$
|
|
353
|
-
var __spreadValues$
|
|
346
|
+
var __defProp$y = Object.defineProperty;
|
|
347
|
+
var __defProps$x = Object.defineProperties;
|
|
348
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
349
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
350
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
351
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
352
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
353
|
+
var __spreadValues$y = (a, b) => {
|
|
354
354
|
for (var prop in b || (b = {}))
|
|
355
|
-
if (__hasOwnProp$
|
|
356
|
-
__defNormalProp$
|
|
357
|
-
if (__getOwnPropSymbols$
|
|
358
|
-
for (var prop of __getOwnPropSymbols$
|
|
359
|
-
if (__propIsEnum$
|
|
360
|
-
__defNormalProp$
|
|
355
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
356
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
357
|
+
if (__getOwnPropSymbols$H)
|
|
358
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
359
|
+
if (__propIsEnum$H.call(b, prop))
|
|
360
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
361
361
|
}
|
|
362
362
|
return a;
|
|
363
363
|
};
|
|
364
|
-
var __spreadProps$
|
|
364
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
365
365
|
var __async$N = (__this, __arguments, generator) => {
|
|
366
366
|
return new Promise((resolve, reject) => {
|
|
367
367
|
var fulfilled = (value) => {
|
|
@@ -384,7 +384,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
384
384
|
};
|
|
385
385
|
const useCreateAuctanePaySession = (params) => {
|
|
386
386
|
const { client } = useShipEngine();
|
|
387
|
-
return reactQuery.useMutation(__spreadProps$
|
|
387
|
+
return reactQuery.useMutation(__spreadProps$x(__spreadValues$y({}, params), {
|
|
388
388
|
mutationFn: (request) => __async$N(void 0, null, function* () {
|
|
389
389
|
const result = yield client.auctanePay.createSession(request);
|
|
390
390
|
return result.data;
|
|
@@ -394,29 +394,29 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
394
394
|
}));
|
|
395
395
|
};
|
|
396
396
|
|
|
397
|
-
var __defProp$
|
|
398
|
-
var __defProps$
|
|
399
|
-
var __getOwnPropDescs$
|
|
400
|
-
var __getOwnPropSymbols$
|
|
401
|
-
var __hasOwnProp$
|
|
402
|
-
var __propIsEnum$
|
|
403
|
-
var __defNormalProp$
|
|
404
|
-
var __spreadValues$
|
|
397
|
+
var __defProp$x = Object.defineProperty;
|
|
398
|
+
var __defProps$w = Object.defineProperties;
|
|
399
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
400
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
401
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
402
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
403
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
404
|
+
var __spreadValues$x = (a, b) => {
|
|
405
405
|
for (var prop in b || (b = {}))
|
|
406
|
-
if (__hasOwnProp$
|
|
407
|
-
__defNormalProp$
|
|
408
|
-
if (__getOwnPropSymbols$
|
|
409
|
-
for (var prop of __getOwnPropSymbols$
|
|
410
|
-
if (__propIsEnum$
|
|
411
|
-
__defNormalProp$
|
|
406
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
407
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
408
|
+
if (__getOwnPropSymbols$G)
|
|
409
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
410
|
+
if (__propIsEnum$G.call(b, prop))
|
|
411
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
412
412
|
}
|
|
413
413
|
return a;
|
|
414
414
|
};
|
|
415
|
-
var __spreadProps$
|
|
415
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
416
416
|
const useGetAuctanePayConfig = (params) => {
|
|
417
417
|
const { client } = useShipEngine();
|
|
418
|
-
const queryParams = __spreadValues$
|
|
419
|
-
return reactQuery.useQuery(__spreadProps$
|
|
418
|
+
const queryParams = __spreadValues$x({}, params);
|
|
419
|
+
return reactQuery.useQuery(__spreadProps$w(__spreadValues$x({}, queryParams), {
|
|
420
420
|
onError,
|
|
421
421
|
queryFn: () => client.auctanePay.getConfig(),
|
|
422
422
|
queryKey: ["useGetAuctanePayConfig"],
|
|
@@ -588,41 +588,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
588
588
|
});
|
|
589
589
|
};
|
|
590
590
|
|
|
591
|
-
var __defProp$
|
|
592
|
-
var __defProps$
|
|
593
|
-
var __getOwnPropDescs$
|
|
594
|
-
var __getOwnPropSymbols$
|
|
595
|
-
var __hasOwnProp$
|
|
596
|
-
var __propIsEnum$
|
|
597
|
-
var __defNormalProp$
|
|
598
|
-
var __spreadValues$
|
|
591
|
+
var __defProp$w = Object.defineProperty;
|
|
592
|
+
var __defProps$v = Object.defineProperties;
|
|
593
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
594
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
595
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
596
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
597
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
598
|
+
var __spreadValues$w = (a, b) => {
|
|
599
599
|
for (var prop in b || (b = {}))
|
|
600
|
-
if (__hasOwnProp$
|
|
601
|
-
__defNormalProp$
|
|
602
|
-
if (__getOwnPropSymbols$
|
|
603
|
-
for (var prop of __getOwnPropSymbols$
|
|
604
|
-
if (__propIsEnum$
|
|
605
|
-
__defNormalProp$
|
|
600
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
601
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
602
|
+
if (__getOwnPropSymbols$F)
|
|
603
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
604
|
+
if (__propIsEnum$F.call(b, prop))
|
|
605
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
606
606
|
}
|
|
607
607
|
return a;
|
|
608
608
|
};
|
|
609
|
-
var __spreadProps$
|
|
610
|
-
var __objRest$
|
|
609
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
610
|
+
var __objRest$q = (source, exclude) => {
|
|
611
611
|
var target = {};
|
|
612
612
|
for (var prop in source)
|
|
613
|
-
if (__hasOwnProp$
|
|
613
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
614
614
|
target[prop] = source[prop];
|
|
615
|
-
if (source != null && __getOwnPropSymbols$
|
|
616
|
-
for (var prop of __getOwnPropSymbols$
|
|
617
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
615
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
616
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
617
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
618
618
|
target[prop] = source[prop];
|
|
619
619
|
}
|
|
620
620
|
return target;
|
|
621
621
|
};
|
|
622
622
|
const useListCarriers = (params) => {
|
|
623
623
|
const { client } = useShipEngine();
|
|
624
|
-
const _a = __spreadValues$
|
|
625
|
-
return reactQuery.useQuery(__spreadProps$
|
|
624
|
+
const _a = __spreadValues$w({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
|
|
625
|
+
return reactQuery.useQuery(__spreadProps$v(__spreadValues$w({}, rest), {
|
|
626
626
|
onError,
|
|
627
627
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
628
628
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -630,17 +630,17 @@ const useListCarriers = (params) => {
|
|
|
630
630
|
}));
|
|
631
631
|
};
|
|
632
632
|
|
|
633
|
-
var __getOwnPropSymbols$
|
|
634
|
-
var __hasOwnProp$
|
|
635
|
-
var __propIsEnum$
|
|
636
|
-
var __objRest$
|
|
633
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
634
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
635
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
636
|
+
var __objRest$p = (source, exclude) => {
|
|
637
637
|
var target = {};
|
|
638
638
|
for (var prop in source)
|
|
639
|
-
if (__hasOwnProp$
|
|
639
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
640
640
|
target[prop] = source[prop];
|
|
641
|
-
if (source != null && __getOwnPropSymbols$
|
|
642
|
-
for (var prop of __getOwnPropSymbols$
|
|
643
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
641
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
642
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
643
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
644
644
|
target[prop] = source[prop];
|
|
645
645
|
}
|
|
646
646
|
return target;
|
|
@@ -670,7 +670,7 @@ const useUpdateAutoFunding = () => {
|
|
|
670
670
|
const queryClient = reactQuery.useQueryClient();
|
|
671
671
|
return reactQuery.useMutation({
|
|
672
672
|
mutationFn: (_a) => __async$K(void 0, null, function* () {
|
|
673
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
673
|
+
var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
|
|
674
674
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
675
675
|
return result.data;
|
|
676
676
|
}),
|
|
@@ -731,24 +731,24 @@ const useDeleteCarrier = () => {
|
|
|
731
731
|
});
|
|
732
732
|
};
|
|
733
733
|
|
|
734
|
-
var __getOwnPropSymbols$
|
|
735
|
-
var __hasOwnProp$
|
|
736
|
-
var __propIsEnum$
|
|
737
|
-
var __objRest$
|
|
734
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
735
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
736
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
737
|
+
var __objRest$o = (source, exclude) => {
|
|
738
738
|
var target = {};
|
|
739
739
|
for (var prop in source)
|
|
740
|
-
if (__hasOwnProp$
|
|
740
|
+
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
741
741
|
target[prop] = source[prop];
|
|
742
|
-
if (source != null && __getOwnPropSymbols$
|
|
743
|
-
for (var prop of __getOwnPropSymbols$
|
|
744
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
742
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
743
|
+
for (var prop of __getOwnPropSymbols$D(source)) {
|
|
744
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
|
|
745
745
|
target[prop] = source[prop];
|
|
746
746
|
}
|
|
747
747
|
return target;
|
|
748
748
|
};
|
|
749
749
|
const useGetCarrierConnectionForm = (_params) => {
|
|
750
750
|
const { client } = useShipEngine();
|
|
751
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
751
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$o(_a, ["carrierName", "enabled"]);
|
|
752
752
|
return reactQuery.useQuery({
|
|
753
753
|
enabled,
|
|
754
754
|
onError,
|
|
@@ -758,24 +758,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
758
758
|
});
|
|
759
759
|
};
|
|
760
760
|
|
|
761
|
-
var __getOwnPropSymbols$
|
|
762
|
-
var __hasOwnProp$
|
|
763
|
-
var __propIsEnum$
|
|
764
|
-
var __objRest$
|
|
761
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
762
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
763
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
764
|
+
var __objRest$n = (source, exclude) => {
|
|
765
765
|
var target = {};
|
|
766
766
|
for (var prop in source)
|
|
767
|
-
if (__hasOwnProp$
|
|
767
|
+
if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
768
768
|
target[prop] = source[prop];
|
|
769
|
-
if (source != null && __getOwnPropSymbols$
|
|
770
|
-
for (var prop of __getOwnPropSymbols$
|
|
771
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
769
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
770
|
+
for (var prop of __getOwnPropSymbols$C(source)) {
|
|
771
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
|
|
772
772
|
target[prop] = source[prop];
|
|
773
773
|
}
|
|
774
774
|
return target;
|
|
775
775
|
};
|
|
776
776
|
const useListCarrierConnections = (_params) => {
|
|
777
777
|
const { client } = useShipEngine();
|
|
778
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
778
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$n(_a, ["enabled"]);
|
|
779
779
|
return reactQuery.useQuery({
|
|
780
780
|
enabled,
|
|
781
781
|
onError,
|
|
@@ -785,25 +785,25 @@ const useListCarrierConnections = (_params) => {
|
|
|
785
785
|
});
|
|
786
786
|
};
|
|
787
787
|
|
|
788
|
-
var __defProp$
|
|
789
|
-
var __defProps$
|
|
790
|
-
var __getOwnPropDescs$
|
|
791
|
-
var __getOwnPropSymbols$
|
|
792
|
-
var __hasOwnProp$
|
|
793
|
-
var __propIsEnum$
|
|
794
|
-
var __defNormalProp$
|
|
795
|
-
var __spreadValues$
|
|
788
|
+
var __defProp$v = Object.defineProperty;
|
|
789
|
+
var __defProps$u = Object.defineProperties;
|
|
790
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
791
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
792
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
793
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
794
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
795
|
+
var __spreadValues$v = (a, b) => {
|
|
796
796
|
for (var prop in b || (b = {}))
|
|
797
|
-
if (__hasOwnProp$
|
|
798
|
-
__defNormalProp$
|
|
799
|
-
if (__getOwnPropSymbols$
|
|
800
|
-
for (var prop of __getOwnPropSymbols$
|
|
801
|
-
if (__propIsEnum$
|
|
802
|
-
__defNormalProp$
|
|
797
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
798
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
799
|
+
if (__getOwnPropSymbols$B)
|
|
800
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
801
|
+
if (__propIsEnum$B.call(b, prop))
|
|
802
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
803
803
|
}
|
|
804
804
|
return a;
|
|
805
805
|
};
|
|
806
|
-
var __spreadProps$
|
|
806
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
807
807
|
var __async$I = (__this, __arguments, generator) => {
|
|
808
808
|
return new Promise((resolve, reject) => {
|
|
809
809
|
var fulfilled = (value) => {
|
|
@@ -828,7 +828,7 @@ const useConnectCarrierAccount = () => {
|
|
|
828
828
|
const { client } = useShipEngine();
|
|
829
829
|
return reactQuery.useMutation({
|
|
830
830
|
mutationFn: (_0) => __async$I(void 0, [_0], function* ({ carrierName, formData }) {
|
|
831
|
-
const formDataWithFlag = __spreadProps$
|
|
831
|
+
const formDataWithFlag = __spreadProps$u(__spreadValues$v({}, formData), { __skipDecamelize: true });
|
|
832
832
|
const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
|
|
833
833
|
return result.data;
|
|
834
834
|
}),
|
|
@@ -848,33 +848,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
848
848
|
});
|
|
849
849
|
};
|
|
850
850
|
|
|
851
|
-
var __defProp$
|
|
852
|
-
var __defProps$
|
|
853
|
-
var __getOwnPropDescs$
|
|
854
|
-
var __getOwnPropSymbols$
|
|
855
|
-
var __hasOwnProp$
|
|
856
|
-
var __propIsEnum$
|
|
857
|
-
var __defNormalProp$
|
|
858
|
-
var __spreadValues$
|
|
851
|
+
var __defProp$u = Object.defineProperty;
|
|
852
|
+
var __defProps$t = Object.defineProperties;
|
|
853
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
854
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
855
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
856
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
857
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
858
|
+
var __spreadValues$u = (a, b) => {
|
|
859
859
|
for (var prop in b || (b = {}))
|
|
860
|
-
if (__hasOwnProp$
|
|
861
|
-
__defNormalProp$
|
|
862
|
-
if (__getOwnPropSymbols$
|
|
863
|
-
for (var prop of __getOwnPropSymbols$
|
|
864
|
-
if (__propIsEnum$
|
|
865
|
-
__defNormalProp$
|
|
860
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
861
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
862
|
+
if (__getOwnPropSymbols$A)
|
|
863
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
864
|
+
if (__propIsEnum$A.call(b, prop))
|
|
865
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
866
866
|
}
|
|
867
867
|
return a;
|
|
868
868
|
};
|
|
869
|
-
var __spreadProps$
|
|
870
|
-
var __objRest$
|
|
869
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
870
|
+
var __objRest$m = (source, exclude) => {
|
|
871
871
|
var target = {};
|
|
872
872
|
for (var prop in source)
|
|
873
|
-
if (__hasOwnProp$
|
|
873
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
874
874
|
target[prop] = source[prop];
|
|
875
|
-
if (source != null && __getOwnPropSymbols$
|
|
876
|
-
for (var prop of __getOwnPropSymbols$
|
|
877
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
875
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
876
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
877
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
878
878
|
target[prop] = source[prop];
|
|
879
879
|
}
|
|
880
880
|
return target;
|
|
@@ -882,12 +882,12 @@ var __objRest$l = (source, exclude) => {
|
|
|
882
882
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
883
883
|
var _b = _a, {
|
|
884
884
|
queryFnParams
|
|
885
|
-
} = _b, params = __objRest$
|
|
885
|
+
} = _b, params = __objRest$m(_b, [
|
|
886
886
|
"queryFnParams"
|
|
887
887
|
]);
|
|
888
888
|
const { client } = useShipEngine();
|
|
889
889
|
const { carrierName, carrierId } = queryFnParams;
|
|
890
|
-
return reactQuery.useQuery(__spreadProps$
|
|
890
|
+
return reactQuery.useQuery(__spreadProps$t(__spreadValues$u({}, params), {
|
|
891
891
|
onError,
|
|
892
892
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
893
893
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -895,25 +895,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
895
895
|
}));
|
|
896
896
|
};
|
|
897
897
|
|
|
898
|
-
var __defProp$
|
|
899
|
-
var __defProps$
|
|
900
|
-
var __getOwnPropDescs$
|
|
901
|
-
var __getOwnPropSymbols$
|
|
902
|
-
var __hasOwnProp$
|
|
903
|
-
var __propIsEnum$
|
|
904
|
-
var __defNormalProp$
|
|
905
|
-
var __spreadValues$
|
|
898
|
+
var __defProp$t = Object.defineProperty;
|
|
899
|
+
var __defProps$s = Object.defineProperties;
|
|
900
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
901
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
902
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
903
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
904
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
905
|
+
var __spreadValues$t = (a, b) => {
|
|
906
906
|
for (var prop in b || (b = {}))
|
|
907
|
-
if (__hasOwnProp$
|
|
908
|
-
__defNormalProp$
|
|
909
|
-
if (__getOwnPropSymbols$
|
|
910
|
-
for (var prop of __getOwnPropSymbols$
|
|
911
|
-
if (__propIsEnum$
|
|
912
|
-
__defNormalProp$
|
|
907
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
908
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
909
|
+
if (__getOwnPropSymbols$z)
|
|
910
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
911
|
+
if (__propIsEnum$z.call(b, prop))
|
|
912
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
913
913
|
}
|
|
914
914
|
return a;
|
|
915
915
|
};
|
|
916
|
-
var __spreadProps$
|
|
916
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
917
917
|
var __async$H = (__this, __arguments, generator) => {
|
|
918
918
|
return new Promise((resolve, reject) => {
|
|
919
919
|
var fulfilled = (value) => {
|
|
@@ -936,7 +936,7 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
936
936
|
};
|
|
937
937
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
938
938
|
const { client } = useShipEngine();
|
|
939
|
-
return reactQuery.useMutation(__spreadProps$
|
|
939
|
+
return reactQuery.useMutation(__spreadProps$s(__spreadValues$t({}, params), {
|
|
940
940
|
mutationFn: (_0) => __async$H(void 0, [_0], function* ({
|
|
941
941
|
carrierName,
|
|
942
942
|
carrierId,
|
|
@@ -1106,14 +1106,12 @@ const useUpdateFundingSource = () => {
|
|
|
1106
1106
|
mutationFn: (_0) => __async$D(void 0, [_0], function* ({
|
|
1107
1107
|
billingInfo,
|
|
1108
1108
|
creditCardInfo,
|
|
1109
|
-
bankAccountInfo,
|
|
1110
1109
|
fundingSourceId,
|
|
1111
1110
|
auctanePayInfo
|
|
1112
1111
|
}) {
|
|
1113
1112
|
const result = yield client.fundingSources.update(
|
|
1114
1113
|
billingInfo,
|
|
1115
1114
|
creditCardInfo,
|
|
1116
|
-
bankAccountInfo,
|
|
1117
1115
|
auctanePayInfo,
|
|
1118
1116
|
fundingSourceId
|
|
1119
1117
|
);
|
|
@@ -1146,29 +1144,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
|
|
|
1146
1144
|
});
|
|
1147
1145
|
};
|
|
1148
1146
|
|
|
1149
|
-
var __defProp$
|
|
1150
|
-
var __defProps$
|
|
1151
|
-
var __getOwnPropDescs$
|
|
1152
|
-
var __getOwnPropSymbols$
|
|
1153
|
-
var __hasOwnProp$
|
|
1154
|
-
var __propIsEnum$
|
|
1155
|
-
var __defNormalProp$
|
|
1156
|
-
var __spreadValues$
|
|
1147
|
+
var __defProp$s = Object.defineProperty;
|
|
1148
|
+
var __defProps$r = Object.defineProperties;
|
|
1149
|
+
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
1150
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
1151
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
1152
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
1153
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1154
|
+
var __spreadValues$s = (a, b) => {
|
|
1157
1155
|
for (var prop in b || (b = {}))
|
|
1158
|
-
if (__hasOwnProp$
|
|
1159
|
-
__defNormalProp$
|
|
1160
|
-
if (__getOwnPropSymbols$
|
|
1161
|
-
for (var prop of __getOwnPropSymbols$
|
|
1162
|
-
if (__propIsEnum$
|
|
1163
|
-
__defNormalProp$
|
|
1156
|
+
if (__hasOwnProp$y.call(b, prop))
|
|
1157
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
1158
|
+
if (__getOwnPropSymbols$y)
|
|
1159
|
+
for (var prop of __getOwnPropSymbols$y(b)) {
|
|
1160
|
+
if (__propIsEnum$y.call(b, prop))
|
|
1161
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
1164
1162
|
}
|
|
1165
1163
|
return a;
|
|
1166
1164
|
};
|
|
1167
|
-
var __spreadProps$
|
|
1165
|
+
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
1168
1166
|
const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
|
|
1169
1167
|
const { client } = useShipEngine();
|
|
1170
|
-
const queryParams = __spreadValues$
|
|
1171
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1168
|
+
const queryParams = __spreadValues$s({}, params);
|
|
1169
|
+
return reactQuery.useQuery(__spreadProps$r(__spreadValues$s({}, queryParams), {
|
|
1172
1170
|
onError,
|
|
1173
1171
|
queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
|
|
1174
1172
|
queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
|
|
@@ -1191,17 +1189,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1191
1189
|
});
|
|
1192
1190
|
};
|
|
1193
1191
|
|
|
1194
|
-
var __getOwnPropSymbols$
|
|
1195
|
-
var __hasOwnProp$
|
|
1196
|
-
var __propIsEnum$
|
|
1197
|
-
var __objRest$
|
|
1192
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
1193
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
1194
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
1195
|
+
var __objRest$l = (source, exclude) => {
|
|
1198
1196
|
var target = {};
|
|
1199
1197
|
for (var prop in source)
|
|
1200
|
-
if (__hasOwnProp$
|
|
1198
|
+
if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1201
1199
|
target[prop] = source[prop];
|
|
1202
|
-
if (source != null && __getOwnPropSymbols$
|
|
1203
|
-
for (var prop of __getOwnPropSymbols$
|
|
1204
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1200
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
1201
|
+
for (var prop of __getOwnPropSymbols$x(source)) {
|
|
1202
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
|
|
1205
1203
|
target[prop] = source[prop];
|
|
1206
1204
|
}
|
|
1207
1205
|
return target;
|
|
@@ -1230,7 +1228,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1230
1228
|
const { client } = useShipEngine();
|
|
1231
1229
|
return reactQuery.useMutation({
|
|
1232
1230
|
mutationFn: (_a) => __async$C(void 0, null, function* () {
|
|
1233
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1231
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$l(_b, ["insuranceProvider"]);
|
|
1234
1232
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1235
1233
|
return result.data;
|
|
1236
1234
|
}),
|
|
@@ -1239,25 +1237,25 @@ const useAddInsuranceFunds = () => {
|
|
|
1239
1237
|
});
|
|
1240
1238
|
};
|
|
1241
1239
|
|
|
1242
|
-
var __defProp$
|
|
1243
|
-
var __defProps$
|
|
1244
|
-
var __getOwnPropDescs$
|
|
1245
|
-
var __getOwnPropSymbols$
|
|
1246
|
-
var __hasOwnProp$
|
|
1247
|
-
var __propIsEnum$
|
|
1248
|
-
var __defNormalProp$
|
|
1249
|
-
var __spreadValues$
|
|
1240
|
+
var __defProp$r = Object.defineProperty;
|
|
1241
|
+
var __defProps$q = Object.defineProperties;
|
|
1242
|
+
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
1243
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
1244
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
1245
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
1246
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1247
|
+
var __spreadValues$r = (a, b) => {
|
|
1250
1248
|
for (var prop in b || (b = {}))
|
|
1251
|
-
if (__hasOwnProp$
|
|
1252
|
-
__defNormalProp$
|
|
1253
|
-
if (__getOwnPropSymbols$
|
|
1254
|
-
for (var prop of __getOwnPropSymbols$
|
|
1255
|
-
if (__propIsEnum$
|
|
1256
|
-
__defNormalProp$
|
|
1249
|
+
if (__hasOwnProp$w.call(b, prop))
|
|
1250
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
1251
|
+
if (__getOwnPropSymbols$w)
|
|
1252
|
+
for (var prop of __getOwnPropSymbols$w(b)) {
|
|
1253
|
+
if (__propIsEnum$w.call(b, prop))
|
|
1254
|
+
__defNormalProp$r(a, prop, b[prop]);
|
|
1257
1255
|
}
|
|
1258
1256
|
return a;
|
|
1259
1257
|
};
|
|
1260
|
-
var __spreadProps$
|
|
1258
|
+
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
1261
1259
|
var __async$B = (__this, __arguments, generator) => {
|
|
1262
1260
|
return new Promise((resolve, reject) => {
|
|
1263
1261
|
var fulfilled = (value) => {
|
|
@@ -1280,7 +1278,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
1280
1278
|
};
|
|
1281
1279
|
const useCreateInvoiceAddress = (params) => {
|
|
1282
1280
|
const { client } = useShipEngine();
|
|
1283
|
-
return reactQuery.useMutation(__spreadProps$
|
|
1281
|
+
return reactQuery.useMutation(__spreadProps$q(__spreadValues$r({}, params), {
|
|
1284
1282
|
mutationFn: (invoiceAddress) => __async$B(void 0, null, function* () {
|
|
1285
1283
|
const result = yield client.invoiceAddress.create(invoiceAddress);
|
|
1286
1284
|
return result.data;
|
|
@@ -1290,25 +1288,25 @@ const useCreateInvoiceAddress = (params) => {
|
|
|
1290
1288
|
}));
|
|
1291
1289
|
};
|
|
1292
1290
|
|
|
1293
|
-
var __defProp$
|
|
1294
|
-
var __defProps$
|
|
1295
|
-
var __getOwnPropDescs$
|
|
1296
|
-
var __getOwnPropSymbols$
|
|
1297
|
-
var __hasOwnProp$
|
|
1298
|
-
var __propIsEnum$
|
|
1299
|
-
var __defNormalProp$
|
|
1300
|
-
var __spreadValues$
|
|
1291
|
+
var __defProp$q = Object.defineProperty;
|
|
1292
|
+
var __defProps$p = Object.defineProperties;
|
|
1293
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
1294
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
1295
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
1296
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
1297
|
+
var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1298
|
+
var __spreadValues$q = (a, b) => {
|
|
1301
1299
|
for (var prop in b || (b = {}))
|
|
1302
|
-
if (__hasOwnProp$
|
|
1303
|
-
__defNormalProp$
|
|
1304
|
-
if (__getOwnPropSymbols$
|
|
1305
|
-
for (var prop of __getOwnPropSymbols$
|
|
1306
|
-
if (__propIsEnum$
|
|
1307
|
-
__defNormalProp$
|
|
1300
|
+
if (__hasOwnProp$v.call(b, prop))
|
|
1301
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
1302
|
+
if (__getOwnPropSymbols$v)
|
|
1303
|
+
for (var prop of __getOwnPropSymbols$v(b)) {
|
|
1304
|
+
if (__propIsEnum$v.call(b, prop))
|
|
1305
|
+
__defNormalProp$q(a, prop, b[prop]);
|
|
1308
1306
|
}
|
|
1309
1307
|
return a;
|
|
1310
1308
|
};
|
|
1311
|
-
var __spreadProps$
|
|
1309
|
+
var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
|
|
1312
1310
|
var __async$A = (__this, __arguments, generator) => {
|
|
1313
1311
|
return new Promise((resolve, reject) => {
|
|
1314
1312
|
var fulfilled = (value) => {
|
|
@@ -1331,7 +1329,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
1331
1329
|
};
|
|
1332
1330
|
const useUpdateInvoiceAddress = (params) => {
|
|
1333
1331
|
const { client } = useShipEngine();
|
|
1334
|
-
return reactQuery.useMutation(__spreadProps$
|
|
1332
|
+
return reactQuery.useMutation(__spreadProps$p(__spreadValues$q({}, params), {
|
|
1335
1333
|
mutationFn: (invoiceAddress) => __async$A(void 0, null, function* () {
|
|
1336
1334
|
const result = yield client.invoiceAddress.update(invoiceAddress);
|
|
1337
1335
|
return result.data;
|
|
@@ -1341,6 +1339,35 @@ const useUpdateInvoiceAddress = (params) => {
|
|
|
1341
1339
|
}));
|
|
1342
1340
|
};
|
|
1343
1341
|
|
|
1342
|
+
var __defProp$p = Object.defineProperty;
|
|
1343
|
+
var __defProps$o = Object.defineProperties;
|
|
1344
|
+
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
1345
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
1346
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
1347
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
1348
|
+
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1349
|
+
var __spreadValues$p = (a, b) => {
|
|
1350
|
+
for (var prop in b || (b = {}))
|
|
1351
|
+
if (__hasOwnProp$u.call(b, prop))
|
|
1352
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
1353
|
+
if (__getOwnPropSymbols$u)
|
|
1354
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
1355
|
+
if (__propIsEnum$u.call(b, prop))
|
|
1356
|
+
__defNormalProp$p(a, prop, b[prop]);
|
|
1357
|
+
}
|
|
1358
|
+
return a;
|
|
1359
|
+
};
|
|
1360
|
+
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
1361
|
+
const useGetInvoiceAddress = (params) => {
|
|
1362
|
+
const { client } = useShipEngine();
|
|
1363
|
+
return reactQuery.useQuery(__spreadProps$o(__spreadValues$p({}, params), {
|
|
1364
|
+
onError,
|
|
1365
|
+
queryFn: () => client.invoiceAddress.get(),
|
|
1366
|
+
queryKey: ["useGetInvoiceAddress"],
|
|
1367
|
+
select: (result) => result.data
|
|
1368
|
+
}));
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1344
1371
|
var __defProp$o = Object.defineProperty;
|
|
1345
1372
|
var __defProps$n = Object.defineProperties;
|
|
1346
1373
|
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
@@ -1360,13 +1387,48 @@ var __spreadValues$o = (a, b) => {
|
|
|
1360
1387
|
return a;
|
|
1361
1388
|
};
|
|
1362
1389
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
1363
|
-
|
|
1390
|
+
var __objRest$k = (source, exclude) => {
|
|
1391
|
+
var target = {};
|
|
1392
|
+
for (var prop in source)
|
|
1393
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1394
|
+
target[prop] = source[prop];
|
|
1395
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
1396
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
1397
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
1398
|
+
target[prop] = source[prop];
|
|
1399
|
+
}
|
|
1400
|
+
return target;
|
|
1401
|
+
};
|
|
1402
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
1403
|
+
return new Promise((resolve, reject) => {
|
|
1404
|
+
var fulfilled = (value) => {
|
|
1405
|
+
try {
|
|
1406
|
+
step(generator.next(value));
|
|
1407
|
+
} catch (e) {
|
|
1408
|
+
reject(e);
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
var rejected = (value) => {
|
|
1412
|
+
try {
|
|
1413
|
+
step(generator.throw(value));
|
|
1414
|
+
} catch (e) {
|
|
1415
|
+
reject(e);
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1419
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
1420
|
+
});
|
|
1421
|
+
};
|
|
1422
|
+
const useCreateLabelByRateId = (params) => {
|
|
1364
1423
|
const { client } = useShipEngine();
|
|
1365
|
-
return reactQuery.
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1424
|
+
return reactQuery.useMutation(__spreadProps$n(__spreadValues$o({}, params), {
|
|
1425
|
+
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
1426
|
+
var _b = _a, { rateId } = _b, options = __objRest$k(_b, ["rateId"]);
|
|
1427
|
+
const result = yield client.labels.createByRateId(rateId, options);
|
|
1428
|
+
return result.data;
|
|
1429
|
+
}),
|
|
1430
|
+
mutationKey: ["useCreateLabelByRateId"],
|
|
1431
|
+
onError
|
|
1370
1432
|
}));
|
|
1371
1433
|
};
|
|
1372
1434
|
|
|
@@ -1401,7 +1463,7 @@ var __objRest$j = (source, exclude) => {
|
|
|
1401
1463
|
}
|
|
1402
1464
|
return target;
|
|
1403
1465
|
};
|
|
1404
|
-
var __async$
|
|
1466
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
1405
1467
|
return new Promise((resolve, reject) => {
|
|
1406
1468
|
var fulfilled = (value) => {
|
|
1407
1469
|
try {
|
|
@@ -1421,15 +1483,15 @@ var __async$z = (__this, __arguments, generator) => {
|
|
|
1421
1483
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1422
1484
|
});
|
|
1423
1485
|
};
|
|
1424
|
-
const
|
|
1486
|
+
const useCreateLabelByShipmentId = (params) => {
|
|
1425
1487
|
const { client } = useShipEngine();
|
|
1426
1488
|
return reactQuery.useMutation(__spreadProps$m(__spreadValues$n({}, params), {
|
|
1427
|
-
mutationFn: (_a) => __async$
|
|
1428
|
-
var _b = _a, {
|
|
1429
|
-
const result = yield client.labels.
|
|
1489
|
+
mutationFn: (_a) => __async$y(void 0, null, function* () {
|
|
1490
|
+
var _b = _a, { shipmentId } = _b, options = __objRest$j(_b, ["shipmentId"]);
|
|
1491
|
+
const result = yield client.labels.createByShipmentId(shipmentId, options);
|
|
1430
1492
|
return result.data;
|
|
1431
1493
|
}),
|
|
1432
|
-
mutationKey: ["
|
|
1494
|
+
mutationKey: ["useCreateLabelByShipmentId"],
|
|
1433
1495
|
onError
|
|
1434
1496
|
}));
|
|
1435
1497
|
};
|
|
@@ -1465,7 +1527,7 @@ var __objRest$i = (source, exclude) => {
|
|
|
1465
1527
|
}
|
|
1466
1528
|
return target;
|
|
1467
1529
|
};
|
|
1468
|
-
var __async$
|
|
1530
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
1469
1531
|
return new Promise((resolve, reject) => {
|
|
1470
1532
|
var fulfilled = (value) => {
|
|
1471
1533
|
try {
|
|
@@ -1485,19 +1547,34 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
1485
1547
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1486
1548
|
});
|
|
1487
1549
|
};
|
|
1488
|
-
const
|
|
1550
|
+
const useCreateLabel = (params) => {
|
|
1489
1551
|
const { client } = useShipEngine();
|
|
1490
1552
|
return reactQuery.useMutation(__spreadProps$l(__spreadValues$m({}, params), {
|
|
1491
|
-
mutationFn: (_a) => __async$
|
|
1492
|
-
var _b = _a, {
|
|
1493
|
-
const result = yield client.labels.
|
|
1553
|
+
mutationFn: (_a) => __async$x(void 0, null, function* () {
|
|
1554
|
+
var _b = _a, { rateId } = _b, options = __objRest$i(_b, ["rateId"]);
|
|
1555
|
+
const result = yield client.labels.createByRateId(rateId, options);
|
|
1494
1556
|
return result.data;
|
|
1495
1557
|
}),
|
|
1496
|
-
mutationKey: ["
|
|
1558
|
+
mutationKey: ["useCreateLabel"],
|
|
1497
1559
|
onError
|
|
1498
1560
|
}));
|
|
1499
1561
|
};
|
|
1500
1562
|
|
|
1563
|
+
const useGetLabel = (labelId) => {
|
|
1564
|
+
const { client } = useShipEngine();
|
|
1565
|
+
return reactQuery.useQuery({
|
|
1566
|
+
enabled: labelId !== void 0,
|
|
1567
|
+
onError,
|
|
1568
|
+
queryFn: () => {
|
|
1569
|
+
if (labelId)
|
|
1570
|
+
return client.labels.get(labelId);
|
|
1571
|
+
return Promise.reject(new Error("labelId is require"));
|
|
1572
|
+
},
|
|
1573
|
+
queryKey: ["useGetLabel", labelId],
|
|
1574
|
+
select: (result) => result.data
|
|
1575
|
+
});
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1501
1578
|
var __defProp$l = Object.defineProperty;
|
|
1502
1579
|
var __defProps$k = Object.defineProperties;
|
|
1503
1580
|
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
@@ -1529,7 +1606,18 @@ var __objRest$h = (source, exclude) => {
|
|
|
1529
1606
|
}
|
|
1530
1607
|
return target;
|
|
1531
1608
|
};
|
|
1532
|
-
|
|
1609
|
+
const useListLabels = (params) => {
|
|
1610
|
+
const { client } = useShipEngine();
|
|
1611
|
+
const _a = __spreadValues$l({}, params), { queryFnParams } = _a, rest = __objRest$h(_a, ["queryFnParams"]);
|
|
1612
|
+
return reactQuery.useQuery(__spreadProps$k(__spreadValues$l({}, rest), {
|
|
1613
|
+
onError,
|
|
1614
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
1615
|
+
queryKey: ["useListLabels", params],
|
|
1616
|
+
select: (result) => result.data
|
|
1617
|
+
}));
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
var __async$w = (__this, __arguments, generator) => {
|
|
1533
1621
|
return new Promise((resolve, reject) => {
|
|
1534
1622
|
var fulfilled = (value) => {
|
|
1535
1623
|
try {
|
|
@@ -1549,31 +1637,15 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
1549
1637
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1550
1638
|
});
|
|
1551
1639
|
};
|
|
1552
|
-
const
|
|
1640
|
+
const useVoidLabel = () => {
|
|
1553
1641
|
const { client } = useShipEngine();
|
|
1554
|
-
return reactQuery.useMutation(
|
|
1555
|
-
mutationFn: (
|
|
1556
|
-
|
|
1557
|
-
const result = yield client.labels.createByRateId(rateId, options);
|
|
1642
|
+
return reactQuery.useMutation({
|
|
1643
|
+
mutationFn: (labelId) => __async$w(void 0, null, function* () {
|
|
1644
|
+
const result = yield client.labels.void(labelId);
|
|
1558
1645
|
return result.data;
|
|
1559
1646
|
}),
|
|
1560
|
-
mutationKey: ["
|
|
1647
|
+
mutationKey: ["useVoidLabel"],
|
|
1561
1648
|
onError
|
|
1562
|
-
}));
|
|
1563
|
-
};
|
|
1564
|
-
|
|
1565
|
-
const useGetLabel = (labelId) => {
|
|
1566
|
-
const { client } = useShipEngine();
|
|
1567
|
-
return reactQuery.useQuery({
|
|
1568
|
-
enabled: labelId !== void 0,
|
|
1569
|
-
onError,
|
|
1570
|
-
queryFn: () => {
|
|
1571
|
-
if (labelId)
|
|
1572
|
-
return client.labels.get(labelId);
|
|
1573
|
-
return Promise.reject(new Error("labelId is require"));
|
|
1574
|
-
},
|
|
1575
|
-
queryKey: ["useGetLabel", labelId],
|
|
1576
|
-
select: (result) => result.data
|
|
1577
1649
|
});
|
|
1578
1650
|
};
|
|
1579
1651
|
|
|
@@ -1608,18 +1680,7 @@ var __objRest$g = (source, exclude) => {
|
|
|
1608
1680
|
}
|
|
1609
1681
|
return target;
|
|
1610
1682
|
};
|
|
1611
|
-
|
|
1612
|
-
const { client } = useShipEngine();
|
|
1613
|
-
const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$g(_a, ["queryFnParams"]);
|
|
1614
|
-
return reactQuery.useQuery(__spreadProps$j(__spreadValues$k({}, rest), {
|
|
1615
|
-
onError,
|
|
1616
|
-
queryFn: () => client.labels.list(queryFnParams),
|
|
1617
|
-
queryKey: ["useListLabels", params],
|
|
1618
|
-
select: (result) => result.data
|
|
1619
|
-
}));
|
|
1620
|
-
};
|
|
1621
|
-
|
|
1622
|
-
var __async$w = (__this, __arguments, generator) => {
|
|
1683
|
+
var __async$v = (__this, __arguments, generator) => {
|
|
1623
1684
|
return new Promise((resolve, reject) => {
|
|
1624
1685
|
var fulfilled = (value) => {
|
|
1625
1686
|
try {
|
|
@@ -1639,16 +1700,30 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
1639
1700
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
1640
1701
|
});
|
|
1641
1702
|
};
|
|
1642
|
-
const
|
|
1703
|
+
const useListLabelsInfinite = (params) => {
|
|
1643
1704
|
const { client } = useShipEngine();
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1705
|
+
const _a = __spreadValues$k({}, params), { queryFnParams } = _a, rest = __objRest$g(_a, ["queryFnParams"]);
|
|
1706
|
+
return reactQuery.useInfiniteQuery(__spreadProps$j(__spreadValues$k({}, rest), {
|
|
1707
|
+
getNextPageParam: (lastPage) => {
|
|
1708
|
+
if (lastPage.page < lastPage.pages) {
|
|
1709
|
+
return lastPage.page + 1;
|
|
1710
|
+
}
|
|
1711
|
+
return void 0;
|
|
1712
|
+
},
|
|
1713
|
+
onError,
|
|
1714
|
+
queryFn: (_0) => __async$v(void 0, [_0], function* ({ pageParam = 1 }) {
|
|
1715
|
+
const response = yield client.labels.list(__spreadProps$j(__spreadValues$k({}, queryFnParams), { page: pageParam }));
|
|
1716
|
+
return response.data;
|
|
1648
1717
|
}),
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1718
|
+
queryKey: ["useListLabelsInfinite", params],
|
|
1719
|
+
select: (data) => {
|
|
1720
|
+
return {
|
|
1721
|
+
labels: data.pages.flatMap((page) => page.labels),
|
|
1722
|
+
pageParams: data.pageParams,
|
|
1723
|
+
pages: data.pages
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
}));
|
|
1652
1727
|
};
|
|
1653
1728
|
|
|
1654
1729
|
var __defProp$j = Object.defineProperty;
|
|
@@ -1682,49 +1757,13 @@ var __objRest$f = (source, exclude) => {
|
|
|
1682
1757
|
}
|
|
1683
1758
|
return target;
|
|
1684
1759
|
};
|
|
1685
|
-
|
|
1686
|
-
return new Promise((resolve, reject) => {
|
|
1687
|
-
var fulfilled = (value) => {
|
|
1688
|
-
try {
|
|
1689
|
-
step(generator.next(value));
|
|
1690
|
-
} catch (e) {
|
|
1691
|
-
reject(e);
|
|
1692
|
-
}
|
|
1693
|
-
};
|
|
1694
|
-
var rejected = (value) => {
|
|
1695
|
-
try {
|
|
1696
|
-
step(generator.throw(value));
|
|
1697
|
-
} catch (e) {
|
|
1698
|
-
reject(e);
|
|
1699
|
-
}
|
|
1700
|
-
};
|
|
1701
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1702
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
1703
|
-
});
|
|
1704
|
-
};
|
|
1705
|
-
const useListLabelsInfinite = (params) => {
|
|
1760
|
+
const useExportLabels = (params) => {
|
|
1706
1761
|
const { client } = useShipEngine();
|
|
1707
1762
|
const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$f(_a, ["queryFnParams"]);
|
|
1708
|
-
return reactQuery.
|
|
1709
|
-
getNextPageParam: (lastPage) => {
|
|
1710
|
-
if (lastPage.page < lastPage.pages) {
|
|
1711
|
-
return lastPage.page + 1;
|
|
1712
|
-
}
|
|
1713
|
-
return void 0;
|
|
1714
|
-
},
|
|
1763
|
+
return reactQuery.useQuery(__spreadProps$i(__spreadValues$j({}, rest), {
|
|
1715
1764
|
onError,
|
|
1716
|
-
queryFn: (
|
|
1717
|
-
|
|
1718
|
-
return response.data;
|
|
1719
|
-
}),
|
|
1720
|
-
queryKey: ["useListLabelsInfinite", params],
|
|
1721
|
-
select: (data) => {
|
|
1722
|
-
return {
|
|
1723
|
-
labels: data.pages.flatMap((page) => page.labels),
|
|
1724
|
-
pageParams: data.pageParams,
|
|
1725
|
-
pages: data.pages
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1765
|
+
queryFn: () => client.labels.export(queryFnParams),
|
|
1766
|
+
queryKey: ["useExportLabels", params]
|
|
1728
1767
|
}));
|
|
1729
1768
|
};
|
|
1730
1769
|
|
|
@@ -1747,50 +1786,9 @@ var __spreadValues$i = (a, b) => {
|
|
|
1747
1786
|
return a;
|
|
1748
1787
|
};
|
|
1749
1788
|
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
1750
|
-
var __objRest$e = (source, exclude) => {
|
|
1751
|
-
var target = {};
|
|
1752
|
-
for (var prop in source)
|
|
1753
|
-
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1754
|
-
target[prop] = source[prop];
|
|
1755
|
-
if (source != null && __getOwnPropSymbols$n)
|
|
1756
|
-
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
1757
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
1758
|
-
target[prop] = source[prop];
|
|
1759
|
-
}
|
|
1760
|
-
return target;
|
|
1761
|
-
};
|
|
1762
|
-
const useExportLabels = (params) => {
|
|
1763
|
-
const { client } = useShipEngine();
|
|
1764
|
-
const _a = __spreadValues$i({}, params), { queryFnParams } = _a, rest = __objRest$e(_a, ["queryFnParams"]);
|
|
1765
|
-
return reactQuery.useQuery(__spreadProps$h(__spreadValues$i({}, rest), {
|
|
1766
|
-
onError,
|
|
1767
|
-
queryFn: () => client.labels.export(queryFnParams),
|
|
1768
|
-
queryKey: ["useExportLabels", params]
|
|
1769
|
-
}));
|
|
1770
|
-
};
|
|
1771
|
-
|
|
1772
|
-
var __defProp$h = Object.defineProperty;
|
|
1773
|
-
var __defProps$g = Object.defineProperties;
|
|
1774
|
-
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
1775
|
-
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
1776
|
-
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
1777
|
-
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
1778
|
-
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1779
|
-
var __spreadValues$h = (a, b) => {
|
|
1780
|
-
for (var prop in b || (b = {}))
|
|
1781
|
-
if (__hasOwnProp$m.call(b, prop))
|
|
1782
|
-
__defNormalProp$h(a, prop, b[prop]);
|
|
1783
|
-
if (__getOwnPropSymbols$m)
|
|
1784
|
-
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
1785
|
-
if (__propIsEnum$m.call(b, prop))
|
|
1786
|
-
__defNormalProp$h(a, prop, b[prop]);
|
|
1787
|
-
}
|
|
1788
|
-
return a;
|
|
1789
|
-
};
|
|
1790
|
-
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
1791
1789
|
const useListOrderSources = (params) => {
|
|
1792
1790
|
const { client } = useShipEngine();
|
|
1793
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1791
|
+
return reactQuery.useQuery(__spreadProps$h(__spreadValues$i({}, params), {
|
|
1794
1792
|
onError,
|
|
1795
1793
|
queryFn: () => client.orderSources.list(),
|
|
1796
1794
|
queryKey: ["useListOrderSources"],
|
|
@@ -2228,17 +2226,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
2228
2226
|
});
|
|
2229
2227
|
};
|
|
2230
2228
|
|
|
2231
|
-
var __getOwnPropSymbols$
|
|
2232
|
-
var __hasOwnProp$
|
|
2233
|
-
var __propIsEnum$
|
|
2234
|
-
var __objRest$
|
|
2229
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
2230
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
2231
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
2232
|
+
var __objRest$e = (source, exclude) => {
|
|
2235
2233
|
var target = {};
|
|
2236
2234
|
for (var prop in source)
|
|
2237
|
-
if (__hasOwnProp$
|
|
2235
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2238
2236
|
target[prop] = source[prop];
|
|
2239
|
-
if (source != null && __getOwnPropSymbols$
|
|
2240
|
-
for (var prop of __getOwnPropSymbols$
|
|
2241
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2237
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
2238
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
2239
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
2242
2240
|
target[prop] = source[prop];
|
|
2243
2241
|
}
|
|
2244
2242
|
return target;
|
|
@@ -2267,7 +2265,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
2267
2265
|
const { client } = useShipEngine();
|
|
2268
2266
|
return reactQuery.useMutation({
|
|
2269
2267
|
mutationFn: (_a) => __async$k(void 0, null, function* () {
|
|
2270
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
2268
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$e(_b, ["salesOrderId"]);
|
|
2271
2269
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
2272
2270
|
return result.data;
|
|
2273
2271
|
}),
|
|
@@ -2276,17 +2274,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
2276
2274
|
});
|
|
2277
2275
|
};
|
|
2278
2276
|
|
|
2279
|
-
var __getOwnPropSymbols$
|
|
2280
|
-
var __hasOwnProp$
|
|
2281
|
-
var __propIsEnum$
|
|
2282
|
-
var __objRest$
|
|
2277
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
2278
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
2279
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
2280
|
+
var __objRest$d = (source, exclude) => {
|
|
2283
2281
|
var target = {};
|
|
2284
2282
|
for (var prop in source)
|
|
2285
|
-
if (__hasOwnProp$
|
|
2283
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2286
2284
|
target[prop] = source[prop];
|
|
2287
|
-
if (source != null && __getOwnPropSymbols$
|
|
2288
|
-
for (var prop of __getOwnPropSymbols$
|
|
2289
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2285
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
2286
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
2287
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
2290
2288
|
target[prop] = source[prop];
|
|
2291
2289
|
}
|
|
2292
2290
|
return target;
|
|
@@ -2315,7 +2313,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
2315
2313
|
const { client } = useShipEngine();
|
|
2316
2314
|
return reactQuery.useMutation({
|
|
2317
2315
|
mutationFn: (_a) => __async$j(void 0, null, function* () {
|
|
2318
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
2316
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$d(_b, ["salesOrderId"]);
|
|
2319
2317
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
2320
2318
|
return result.data;
|
|
2321
2319
|
}),
|
|
@@ -2351,17 +2349,17 @@ const useListSalesOrderShipments = (body) => {
|
|
|
2351
2349
|
});
|
|
2352
2350
|
};
|
|
2353
2351
|
|
|
2354
|
-
var __getOwnPropSymbols$
|
|
2355
|
-
var __hasOwnProp$
|
|
2356
|
-
var __propIsEnum$
|
|
2357
|
-
var __objRest$
|
|
2352
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
2353
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
2354
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
2355
|
+
var __objRest$c = (source, exclude) => {
|
|
2358
2356
|
var target = {};
|
|
2359
2357
|
for (var prop in source)
|
|
2360
|
-
if (__hasOwnProp$
|
|
2358
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2361
2359
|
target[prop] = source[prop];
|
|
2362
|
-
if (source != null && __getOwnPropSymbols$
|
|
2363
|
-
for (var prop of __getOwnPropSymbols$
|
|
2364
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2360
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
2361
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
2362
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
2365
2363
|
target[prop] = source[prop];
|
|
2366
2364
|
}
|
|
2367
2365
|
return target;
|
|
@@ -2390,7 +2388,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
2390
2388
|
const { client } = useShipEngine();
|
|
2391
2389
|
return reactQuery.useMutation({
|
|
2392
2390
|
mutationFn: (_a) => __async$i(void 0, null, function* () {
|
|
2393
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
2391
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$c(_b, ["shipmentId"]);
|
|
2394
2392
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
2395
2393
|
return result.data;
|
|
2396
2394
|
}),
|
|
@@ -2410,25 +2408,25 @@ const useListSalesOrderShipmentsByExternalOrderId = (externalOrderId) => {
|
|
|
2410
2408
|
});
|
|
2411
2409
|
};
|
|
2412
2410
|
|
|
2413
|
-
var __defProp$
|
|
2414
|
-
var __defProps$
|
|
2415
|
-
var __getOwnPropDescs$
|
|
2416
|
-
var __getOwnPropSymbols$
|
|
2417
|
-
var __hasOwnProp$
|
|
2418
|
-
var __propIsEnum$
|
|
2419
|
-
var __defNormalProp$
|
|
2420
|
-
var __spreadValues$
|
|
2411
|
+
var __defProp$h = Object.defineProperty;
|
|
2412
|
+
var __defProps$g = Object.defineProperties;
|
|
2413
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
2414
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
2415
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
2416
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
2417
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2418
|
+
var __spreadValues$h = (a, b) => {
|
|
2421
2419
|
for (var prop in b || (b = {}))
|
|
2422
|
-
if (__hasOwnProp$
|
|
2423
|
-
__defNormalProp$
|
|
2424
|
-
if (__getOwnPropSymbols$
|
|
2425
|
-
for (var prop of __getOwnPropSymbols$
|
|
2426
|
-
if (__propIsEnum$
|
|
2427
|
-
__defNormalProp$
|
|
2420
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
2421
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2422
|
+
if (__getOwnPropSymbols$j)
|
|
2423
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
2424
|
+
if (__propIsEnum$j.call(b, prop))
|
|
2425
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2428
2426
|
}
|
|
2429
2427
|
return a;
|
|
2430
2428
|
};
|
|
2431
|
-
var __spreadProps$
|
|
2429
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
2432
2430
|
var __async$h = (__this, __arguments, generator) => {
|
|
2433
2431
|
return new Promise((resolve, reject) => {
|
|
2434
2432
|
var fulfilled = (value) => {
|
|
@@ -2470,7 +2468,7 @@ const useCreateShipment = () => {
|
|
|
2470
2468
|
postalCode: "",
|
|
2471
2469
|
stateProvince: ""
|
|
2472
2470
|
};
|
|
2473
|
-
return (yield client.shipments.create(__spreadProps$
|
|
2471
|
+
return (yield client.shipments.create(__spreadProps$g(__spreadValues$h({}, shipment), {
|
|
2474
2472
|
shipTo
|
|
2475
2473
|
}))).data;
|
|
2476
2474
|
}),
|
|
@@ -2479,43 +2477,43 @@ const useCreateShipment = () => {
|
|
|
2479
2477
|
});
|
|
2480
2478
|
};
|
|
2481
2479
|
|
|
2482
|
-
var __defProp$
|
|
2483
|
-
var __defProps$
|
|
2484
|
-
var __getOwnPropDescs$
|
|
2485
|
-
var __getOwnPropSymbols$
|
|
2486
|
-
var __hasOwnProp$
|
|
2487
|
-
var __propIsEnum$
|
|
2488
|
-
var __defNormalProp$
|
|
2489
|
-
var __spreadValues$
|
|
2480
|
+
var __defProp$g = Object.defineProperty;
|
|
2481
|
+
var __defProps$f = Object.defineProperties;
|
|
2482
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
2483
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
2484
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
2485
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
2486
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2487
|
+
var __spreadValues$g = (a, b) => {
|
|
2490
2488
|
for (var prop in b || (b = {}))
|
|
2491
|
-
if (__hasOwnProp$
|
|
2492
|
-
__defNormalProp$
|
|
2493
|
-
if (__getOwnPropSymbols$
|
|
2494
|
-
for (var prop of __getOwnPropSymbols$
|
|
2495
|
-
if (__propIsEnum$
|
|
2496
|
-
__defNormalProp$
|
|
2489
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
2490
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2491
|
+
if (__getOwnPropSymbols$i)
|
|
2492
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
2493
|
+
if (__propIsEnum$i.call(b, prop))
|
|
2494
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2497
2495
|
}
|
|
2498
2496
|
return a;
|
|
2499
2497
|
};
|
|
2500
|
-
var __spreadProps$
|
|
2501
|
-
var __objRest$
|
|
2498
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
2499
|
+
var __objRest$b = (source, exclude) => {
|
|
2502
2500
|
var target = {};
|
|
2503
2501
|
for (var prop in source)
|
|
2504
|
-
if (__hasOwnProp$
|
|
2502
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2505
2503
|
target[prop] = source[prop];
|
|
2506
|
-
if (source != null && __getOwnPropSymbols$
|
|
2507
|
-
for (var prop of __getOwnPropSymbols$
|
|
2508
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2504
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
2505
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
2506
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
2509
2507
|
target[prop] = source[prop];
|
|
2510
2508
|
}
|
|
2511
2509
|
return target;
|
|
2512
2510
|
};
|
|
2513
2511
|
const useGetShipmentRates = (params) => {
|
|
2514
2512
|
const { client } = useShipEngine();
|
|
2515
|
-
const _a = params, { queryFnParams } = _a, rest = __objRest$
|
|
2513
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$b(_a, ["queryFnParams"]);
|
|
2516
2514
|
const shipmentId = queryFnParams == null ? void 0 : queryFnParams.shipmentId;
|
|
2517
2515
|
const createdAtStart = queryFnParams == null ? void 0 : queryFnParams.createdAtStart;
|
|
2518
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2516
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$g({
|
|
2519
2517
|
enabled: shipmentId !== void 0
|
|
2520
2518
|
}, rest), {
|
|
2521
2519
|
onError,
|
|
@@ -2530,33 +2528,33 @@ const useGetShipmentRates = (params) => {
|
|
|
2530
2528
|
}));
|
|
2531
2529
|
};
|
|
2532
2530
|
|
|
2533
|
-
var __defProp$
|
|
2534
|
-
var __defProps$
|
|
2535
|
-
var __getOwnPropDescs$
|
|
2536
|
-
var __getOwnPropSymbols$
|
|
2537
|
-
var __hasOwnProp$
|
|
2538
|
-
var __propIsEnum$
|
|
2539
|
-
var __defNormalProp$
|
|
2540
|
-
var __spreadValues$
|
|
2531
|
+
var __defProp$f = Object.defineProperty;
|
|
2532
|
+
var __defProps$e = Object.defineProperties;
|
|
2533
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
2534
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
2535
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
2536
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
2537
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2538
|
+
var __spreadValues$f = (a, b) => {
|
|
2541
2539
|
for (var prop in b || (b = {}))
|
|
2542
|
-
if (__hasOwnProp$
|
|
2543
|
-
__defNormalProp$
|
|
2544
|
-
if (__getOwnPropSymbols$
|
|
2545
|
-
for (var prop of __getOwnPropSymbols$
|
|
2546
|
-
if (__propIsEnum$
|
|
2547
|
-
__defNormalProp$
|
|
2540
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
2541
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2542
|
+
if (__getOwnPropSymbols$h)
|
|
2543
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
2544
|
+
if (__propIsEnum$h.call(b, prop))
|
|
2545
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2548
2546
|
}
|
|
2549
2547
|
return a;
|
|
2550
2548
|
};
|
|
2551
|
-
var __spreadProps$
|
|
2552
|
-
var __objRest$
|
|
2549
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
2550
|
+
var __objRest$a = (source, exclude) => {
|
|
2553
2551
|
var target = {};
|
|
2554
2552
|
for (var prop in source)
|
|
2555
|
-
if (__hasOwnProp$
|
|
2553
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2556
2554
|
target[prop] = source[prop];
|
|
2557
|
-
if (source != null && __getOwnPropSymbols$
|
|
2558
|
-
for (var prop of __getOwnPropSymbols$
|
|
2559
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2555
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
2556
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
2557
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
2560
2558
|
target[prop] = source[prop];
|
|
2561
2559
|
}
|
|
2562
2560
|
return target;
|
|
@@ -2567,12 +2565,12 @@ const useGetShipment = (params) => {
|
|
|
2567
2565
|
const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
|
|
2568
2566
|
const getQueryProps = () => {
|
|
2569
2567
|
if (typeof params !== "string") {
|
|
2570
|
-
const _a2 = params, rest = __objRest$
|
|
2568
|
+
const _a2 = params, rest = __objRest$a(_a2, ["queryFnParams"]);
|
|
2571
2569
|
return rest;
|
|
2572
2570
|
}
|
|
2573
2571
|
return {};
|
|
2574
2572
|
};
|
|
2575
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2573
|
+
return reactQuery.useQuery(__spreadProps$e(__spreadValues$f({}, getQueryProps()), {
|
|
2576
2574
|
enabled: shipmentId !== void 0,
|
|
2577
2575
|
onError,
|
|
2578
2576
|
queryFn: () => {
|
|
@@ -2586,23 +2584,23 @@ const useGetShipment = (params) => {
|
|
|
2586
2584
|
}));
|
|
2587
2585
|
};
|
|
2588
2586
|
|
|
2589
|
-
var __getOwnPropSymbols$
|
|
2590
|
-
var __hasOwnProp$
|
|
2591
|
-
var __propIsEnum$
|
|
2592
|
-
var __objRest$
|
|
2587
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
2588
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
2589
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
2590
|
+
var __objRest$9 = (source, exclude) => {
|
|
2593
2591
|
var target = {};
|
|
2594
2592
|
for (var prop in source)
|
|
2595
|
-
if (__hasOwnProp$
|
|
2593
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2596
2594
|
target[prop] = source[prop];
|
|
2597
|
-
if (source != null && __getOwnPropSymbols$
|
|
2598
|
-
for (var prop of __getOwnPropSymbols$
|
|
2599
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2595
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
2596
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
2597
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
2600
2598
|
target[prop] = source[prop];
|
|
2601
2599
|
}
|
|
2602
2600
|
return target;
|
|
2603
2601
|
};
|
|
2604
2602
|
const useListShipments = (_params) => {
|
|
2605
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
2603
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$9(_a, ["enabled"]);
|
|
2606
2604
|
const { client } = useShipEngine();
|
|
2607
2605
|
return reactQuery.useQuery({
|
|
2608
2606
|
enabled,
|
|
@@ -2613,41 +2611,41 @@ const useListShipments = (_params) => {
|
|
|
2613
2611
|
});
|
|
2614
2612
|
};
|
|
2615
2613
|
|
|
2616
|
-
var __defProp$
|
|
2617
|
-
var __defProps$
|
|
2618
|
-
var __getOwnPropDescs$
|
|
2619
|
-
var __getOwnPropSymbols$
|
|
2620
|
-
var __hasOwnProp$
|
|
2621
|
-
var __propIsEnum$
|
|
2622
|
-
var __defNormalProp$
|
|
2623
|
-
var __spreadValues$
|
|
2614
|
+
var __defProp$e = Object.defineProperty;
|
|
2615
|
+
var __defProps$d = Object.defineProperties;
|
|
2616
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
2617
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
2618
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
2619
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
2620
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2621
|
+
var __spreadValues$e = (a, b) => {
|
|
2624
2622
|
for (var prop in b || (b = {}))
|
|
2625
|
-
if (__hasOwnProp$
|
|
2626
|
-
__defNormalProp$
|
|
2627
|
-
if (__getOwnPropSymbols$
|
|
2628
|
-
for (var prop of __getOwnPropSymbols$
|
|
2629
|
-
if (__propIsEnum$
|
|
2630
|
-
__defNormalProp$
|
|
2623
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
2624
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2625
|
+
if (__getOwnPropSymbols$f)
|
|
2626
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
2627
|
+
if (__propIsEnum$f.call(b, prop))
|
|
2628
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2631
2629
|
}
|
|
2632
2630
|
return a;
|
|
2633
2631
|
};
|
|
2634
|
-
var __spreadProps$
|
|
2635
|
-
var __objRest$
|
|
2632
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
2633
|
+
var __objRest$8 = (source, exclude) => {
|
|
2636
2634
|
var target = {};
|
|
2637
2635
|
for (var prop in source)
|
|
2638
|
-
if (__hasOwnProp$
|
|
2636
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2639
2637
|
target[prop] = source[prop];
|
|
2640
|
-
if (source != null && __getOwnPropSymbols$
|
|
2641
|
-
for (var prop of __getOwnPropSymbols$
|
|
2642
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2638
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
2639
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
2640
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
2643
2641
|
target[prop] = source[prop];
|
|
2644
2642
|
}
|
|
2645
2643
|
return target;
|
|
2646
2644
|
};
|
|
2647
2645
|
const useGetShipmentByExternalId = (params) => {
|
|
2648
2646
|
const { client } = useShipEngine();
|
|
2649
|
-
const _a = params, { queryFnParams } = _a, rest = __objRest$
|
|
2650
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2647
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$8(_a, ["queryFnParams"]);
|
|
2648
|
+
return reactQuery.useQuery(__spreadProps$d(__spreadValues$e({}, rest), {
|
|
2651
2649
|
onError,
|
|
2652
2650
|
queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
|
|
2653
2651
|
queryKey: ["useGetShipmentByExternalId", queryFnParams],
|
|
@@ -2687,6 +2685,47 @@ const useCancelShipment = () => {
|
|
|
2687
2685
|
});
|
|
2688
2686
|
};
|
|
2689
2687
|
|
|
2688
|
+
var __defProp$d = Object.defineProperty;
|
|
2689
|
+
var __defProps$c = Object.defineProperties;
|
|
2690
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
2691
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2692
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2693
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
2694
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2695
|
+
var __spreadValues$d = (a, b) => {
|
|
2696
|
+
for (var prop in b || (b = {}))
|
|
2697
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
2698
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2699
|
+
if (__getOwnPropSymbols$e)
|
|
2700
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
2701
|
+
if (__propIsEnum$e.call(b, prop))
|
|
2702
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2703
|
+
}
|
|
2704
|
+
return a;
|
|
2705
|
+
};
|
|
2706
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
2707
|
+
var __objRest$7 = (source, exclude) => {
|
|
2708
|
+
var target = {};
|
|
2709
|
+
for (var prop in source)
|
|
2710
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2711
|
+
target[prop] = source[prop];
|
|
2712
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
2713
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
2714
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
2715
|
+
target[prop] = source[prop];
|
|
2716
|
+
}
|
|
2717
|
+
return target;
|
|
2718
|
+
};
|
|
2719
|
+
const useExportShipments = (params) => {
|
|
2720
|
+
const { client } = useShipEngine();
|
|
2721
|
+
const _a = __spreadValues$d({}, params), { queryFnParams } = _a, rest = __objRest$7(_a, ["queryFnParams"]);
|
|
2722
|
+
return reactQuery.useQuery(__spreadProps$c(__spreadValues$d({}, rest), {
|
|
2723
|
+
onError,
|
|
2724
|
+
queryFn: () => client.shipments.export(queryFnParams),
|
|
2725
|
+
queryKey: ["useExportShipments", params]
|
|
2726
|
+
}));
|
|
2727
|
+
};
|
|
2728
|
+
|
|
2690
2729
|
var __defProp$c = Object.defineProperty;
|
|
2691
2730
|
var __defProps$b = Object.defineProperties;
|
|
2692
2731
|
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
@@ -2718,51 +2757,10 @@ var __objRest$6 = (source, exclude) => {
|
|
|
2718
2757
|
}
|
|
2719
2758
|
return target;
|
|
2720
2759
|
};
|
|
2721
|
-
const
|
|
2760
|
+
const useListShippingRules = (params) => {
|
|
2722
2761
|
const { client } = useShipEngine();
|
|
2723
2762
|
const _a = __spreadValues$c({}, params), { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
|
|
2724
2763
|
return reactQuery.useQuery(__spreadProps$b(__spreadValues$c({}, rest), {
|
|
2725
|
-
onError,
|
|
2726
|
-
queryFn: () => client.shipments.export(queryFnParams),
|
|
2727
|
-
queryKey: ["useExportShipments", params]
|
|
2728
|
-
}));
|
|
2729
|
-
};
|
|
2730
|
-
|
|
2731
|
-
var __defProp$b = Object.defineProperty;
|
|
2732
|
-
var __defProps$a = Object.defineProperties;
|
|
2733
|
-
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2734
|
-
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2735
|
-
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2736
|
-
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2737
|
-
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2738
|
-
var __spreadValues$b = (a, b) => {
|
|
2739
|
-
for (var prop in b || (b = {}))
|
|
2740
|
-
if (__hasOwnProp$c.call(b, prop))
|
|
2741
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
2742
|
-
if (__getOwnPropSymbols$c)
|
|
2743
|
-
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2744
|
-
if (__propIsEnum$c.call(b, prop))
|
|
2745
|
-
__defNormalProp$b(a, prop, b[prop]);
|
|
2746
|
-
}
|
|
2747
|
-
return a;
|
|
2748
|
-
};
|
|
2749
|
-
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2750
|
-
var __objRest$5 = (source, exclude) => {
|
|
2751
|
-
var target = {};
|
|
2752
|
-
for (var prop in source)
|
|
2753
|
-
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2754
|
-
target[prop] = source[prop];
|
|
2755
|
-
if (source != null && __getOwnPropSymbols$c)
|
|
2756
|
-
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
2757
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
2758
|
-
target[prop] = source[prop];
|
|
2759
|
-
}
|
|
2760
|
-
return target;
|
|
2761
|
-
};
|
|
2762
|
-
const useListShippingRules = (params) => {
|
|
2763
|
-
const { client } = useShipEngine();
|
|
2764
|
-
const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
2765
|
-
return reactQuery.useQuery(__spreadProps$a(__spreadValues$b({}, rest), {
|
|
2766
2764
|
onError,
|
|
2767
2765
|
queryFn: () => {
|
|
2768
2766
|
return client.shippingRules.list(queryFnParams);
|
|
@@ -2868,41 +2866,41 @@ const useEditShippingRule = () => {
|
|
|
2868
2866
|
});
|
|
2869
2867
|
};
|
|
2870
2868
|
|
|
2871
|
-
var __defProp$
|
|
2872
|
-
var __defProps$
|
|
2873
|
-
var __getOwnPropDescs$
|
|
2874
|
-
var __getOwnPropSymbols$
|
|
2875
|
-
var __hasOwnProp$
|
|
2876
|
-
var __propIsEnum$
|
|
2877
|
-
var __defNormalProp$
|
|
2878
|
-
var __spreadValues$
|
|
2869
|
+
var __defProp$b = Object.defineProperty;
|
|
2870
|
+
var __defProps$a = Object.defineProperties;
|
|
2871
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
2872
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2873
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2874
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2875
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2876
|
+
var __spreadValues$b = (a, b) => {
|
|
2879
2877
|
for (var prop in b || (b = {}))
|
|
2880
|
-
if (__hasOwnProp$
|
|
2881
|
-
__defNormalProp$
|
|
2882
|
-
if (__getOwnPropSymbols$
|
|
2883
|
-
for (var prop of __getOwnPropSymbols$
|
|
2884
|
-
if (__propIsEnum$
|
|
2885
|
-
__defNormalProp$
|
|
2878
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
2879
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2880
|
+
if (__getOwnPropSymbols$c)
|
|
2881
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2882
|
+
if (__propIsEnum$c.call(b, prop))
|
|
2883
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2886
2884
|
}
|
|
2887
2885
|
return a;
|
|
2888
2886
|
};
|
|
2889
|
-
var __spreadProps$
|
|
2890
|
-
var __objRest$
|
|
2887
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
2888
|
+
var __objRest$5 = (source, exclude) => {
|
|
2891
2889
|
var target = {};
|
|
2892
2890
|
for (var prop in source)
|
|
2893
|
-
if (__hasOwnProp$
|
|
2891
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2894
2892
|
target[prop] = source[prop];
|
|
2895
|
-
if (source != null && __getOwnPropSymbols$
|
|
2896
|
-
for (var prop of __getOwnPropSymbols$
|
|
2897
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2893
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
2894
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
2895
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
2898
2896
|
target[prop] = source[prop];
|
|
2899
2897
|
}
|
|
2900
2898
|
return target;
|
|
2901
2899
|
};
|
|
2902
2900
|
const useGetShippingRuleConditionsOptions = (params) => {
|
|
2903
2901
|
const { client } = useShipEngine();
|
|
2904
|
-
const _a = __spreadValues$
|
|
2905
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2902
|
+
const _a = __spreadValues$b({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
2903
|
+
return reactQuery.useQuery(__spreadProps$a(__spreadValues$b({}, rest), {
|
|
2906
2904
|
onError,
|
|
2907
2905
|
queryFn: () => {
|
|
2908
2906
|
return client.shippingRules.getConditionOptions(queryFnParams);
|
|
@@ -2912,41 +2910,41 @@ const useGetShippingRuleConditionsOptions = (params) => {
|
|
|
2912
2910
|
}));
|
|
2913
2911
|
};
|
|
2914
2912
|
|
|
2915
|
-
var __defProp$
|
|
2916
|
-
var __defProps$
|
|
2917
|
-
var __getOwnPropDescs$
|
|
2918
|
-
var __getOwnPropSymbols$
|
|
2919
|
-
var __hasOwnProp$
|
|
2920
|
-
var __propIsEnum$
|
|
2921
|
-
var __defNormalProp$
|
|
2922
|
-
var __spreadValues$
|
|
2913
|
+
var __defProp$a = Object.defineProperty;
|
|
2914
|
+
var __defProps$9 = Object.defineProperties;
|
|
2915
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
2916
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
2917
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
2918
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
2919
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2920
|
+
var __spreadValues$a = (a, b) => {
|
|
2923
2921
|
for (var prop in b || (b = {}))
|
|
2924
|
-
if (__hasOwnProp$
|
|
2925
|
-
__defNormalProp$
|
|
2926
|
-
if (__getOwnPropSymbols$
|
|
2927
|
-
for (var prop of __getOwnPropSymbols$
|
|
2928
|
-
if (__propIsEnum$
|
|
2929
|
-
__defNormalProp$
|
|
2922
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
2923
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2924
|
+
if (__getOwnPropSymbols$b)
|
|
2925
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
2926
|
+
if (__propIsEnum$b.call(b, prop))
|
|
2927
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
2930
2928
|
}
|
|
2931
2929
|
return a;
|
|
2932
2930
|
};
|
|
2933
|
-
var __spreadProps$
|
|
2934
|
-
var __objRest$
|
|
2931
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
2932
|
+
var __objRest$4 = (source, exclude) => {
|
|
2935
2933
|
var target = {};
|
|
2936
2934
|
for (var prop in source)
|
|
2937
|
-
if (__hasOwnProp$
|
|
2935
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2938
2936
|
target[prop] = source[prop];
|
|
2939
|
-
if (source != null && __getOwnPropSymbols$
|
|
2940
|
-
for (var prop of __getOwnPropSymbols$
|
|
2941
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2937
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
2938
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
2939
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
2942
2940
|
target[prop] = source[prop];
|
|
2943
2941
|
}
|
|
2944
2942
|
return target;
|
|
2945
2943
|
};
|
|
2946
2944
|
const useGetShippingRuleById = (params) => {
|
|
2947
2945
|
const { client } = useShipEngine();
|
|
2948
|
-
const _a = __spreadValues$
|
|
2949
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2946
|
+
const _a = __spreadValues$a({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
|
|
2947
|
+
return reactQuery.useQuery(__spreadProps$9(__spreadValues$a({}, rest), {
|
|
2950
2948
|
onError,
|
|
2951
2949
|
queryFn: () => {
|
|
2952
2950
|
return client.shippingRules.get(queryFnParams);
|
|
@@ -3035,41 +3033,41 @@ const useDeleteWarehouse = () => {
|
|
|
3035
3033
|
});
|
|
3036
3034
|
};
|
|
3037
3035
|
|
|
3038
|
-
var __defProp$
|
|
3039
|
-
var __defProps$
|
|
3040
|
-
var __getOwnPropDescs$
|
|
3041
|
-
var __getOwnPropSymbols$
|
|
3042
|
-
var __hasOwnProp$
|
|
3043
|
-
var __propIsEnum$
|
|
3044
|
-
var __defNormalProp$
|
|
3045
|
-
var __spreadValues$
|
|
3036
|
+
var __defProp$9 = Object.defineProperty;
|
|
3037
|
+
var __defProps$8 = Object.defineProperties;
|
|
3038
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
3039
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3040
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3041
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3042
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3043
|
+
var __spreadValues$9 = (a, b) => {
|
|
3046
3044
|
for (var prop in b || (b = {}))
|
|
3047
|
-
if (__hasOwnProp$
|
|
3048
|
-
__defNormalProp$
|
|
3049
|
-
if (__getOwnPropSymbols$
|
|
3050
|
-
for (var prop of __getOwnPropSymbols$
|
|
3051
|
-
if (__propIsEnum$
|
|
3052
|
-
__defNormalProp$
|
|
3045
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3046
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3047
|
+
if (__getOwnPropSymbols$a)
|
|
3048
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3049
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3050
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3053
3051
|
}
|
|
3054
3052
|
return a;
|
|
3055
3053
|
};
|
|
3056
|
-
var __spreadProps$
|
|
3057
|
-
var __objRest$
|
|
3054
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
3055
|
+
var __objRest$3 = (source, exclude) => {
|
|
3058
3056
|
var target = {};
|
|
3059
3057
|
for (var prop in source)
|
|
3060
|
-
if (__hasOwnProp$
|
|
3058
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3061
3059
|
target[prop] = source[prop];
|
|
3062
|
-
if (source != null && __getOwnPropSymbols$
|
|
3063
|
-
for (var prop of __getOwnPropSymbols$
|
|
3064
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3060
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
3061
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
3062
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
3065
3063
|
target[prop] = source[prop];
|
|
3066
3064
|
}
|
|
3067
3065
|
return target;
|
|
3068
3066
|
};
|
|
3069
3067
|
const useListWarehouses = (params) => {
|
|
3070
3068
|
const { client } = useShipEngine();
|
|
3071
|
-
const _a = __spreadValues$
|
|
3072
|
-
return reactQuery.useQuery(__spreadProps$
|
|
3069
|
+
const _a = __spreadValues$9({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
|
|
3070
|
+
return reactQuery.useQuery(__spreadProps$8(__spreadValues$9({}, rest), {
|
|
3073
3071
|
onError,
|
|
3074
3072
|
queryFn: () => client.warehouses.list(queryFnParams),
|
|
3075
3073
|
queryKey: ["useListWarehouses", queryFnParams],
|
|
@@ -3077,17 +3075,17 @@ const useListWarehouses = (params) => {
|
|
|
3077
3075
|
}));
|
|
3078
3076
|
};
|
|
3079
3077
|
|
|
3080
|
-
var __getOwnPropSymbols$
|
|
3081
|
-
var __hasOwnProp$
|
|
3082
|
-
var __propIsEnum$
|
|
3083
|
-
var __objRest$
|
|
3078
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
3079
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
3080
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
3081
|
+
var __objRest$2 = (source, exclude) => {
|
|
3084
3082
|
var target = {};
|
|
3085
3083
|
for (var prop in source)
|
|
3086
|
-
if (__hasOwnProp$
|
|
3084
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3087
3085
|
target[prop] = source[prop];
|
|
3088
|
-
if (source != null && __getOwnPropSymbols$
|
|
3089
|
-
for (var prop of __getOwnPropSymbols$
|
|
3090
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3086
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
3087
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
3088
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
3091
3089
|
target[prop] = source[prop];
|
|
3092
3090
|
}
|
|
3093
3091
|
return target;
|
|
@@ -3116,7 +3114,7 @@ const useUpdateWarehouse = () => {
|
|
|
3116
3114
|
const { client } = useShipEngine();
|
|
3117
3115
|
return reactQuery.useMutation({
|
|
3118
3116
|
mutationFn: (_a) => __async$a(void 0, null, function* () {
|
|
3119
|
-
var _b = _a, { warehouseId } = _b, warehouse = __objRest$
|
|
3117
|
+
var _b = _a, { warehouseId } = _b, warehouse = __objRest$2(_b, ["warehouseId"]);
|
|
3120
3118
|
const result = yield client.warehouses.update(warehouseId, warehouse);
|
|
3121
3119
|
return result.data;
|
|
3122
3120
|
}),
|
|
@@ -3155,16 +3153,45 @@ var __async$9 = (__this, __arguments, generator) => {
|
|
|
3155
3153
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
3156
3154
|
});
|
|
3157
3155
|
};
|
|
3158
|
-
const useUpdateAccountBillingPlan = () => {
|
|
3156
|
+
const useUpdateAccountBillingPlan = () => {
|
|
3157
|
+
const { client } = useShipEngine();
|
|
3158
|
+
return reactQuery.useMutation({
|
|
3159
|
+
mutationFn: (code) => __async$9(void 0, null, function* () {
|
|
3160
|
+
const result = yield client.accountBillingPlan.update({ code });
|
|
3161
|
+
return result.data;
|
|
3162
|
+
}),
|
|
3163
|
+
mutationKey: ["useUpdateAccountBillingPlan"],
|
|
3164
|
+
onError
|
|
3165
|
+
});
|
|
3166
|
+
};
|
|
3167
|
+
|
|
3168
|
+
var __defProp$8 = Object.defineProperty;
|
|
3169
|
+
var __defProps$7 = Object.defineProperties;
|
|
3170
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
3171
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3172
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3173
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
3174
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3175
|
+
var __spreadValues$8 = (a, b) => {
|
|
3176
|
+
for (var prop in b || (b = {}))
|
|
3177
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
3178
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3179
|
+
if (__getOwnPropSymbols$8)
|
|
3180
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
3181
|
+
if (__propIsEnum$8.call(b, prop))
|
|
3182
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3183
|
+
}
|
|
3184
|
+
return a;
|
|
3185
|
+
};
|
|
3186
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3187
|
+
const useGetAccountBilling = (params) => {
|
|
3159
3188
|
const { client } = useShipEngine();
|
|
3160
|
-
return reactQuery.
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
onError
|
|
3167
|
-
});
|
|
3189
|
+
return reactQuery.useQuery(__spreadProps$7(__spreadValues$8({}, params), {
|
|
3190
|
+
onError,
|
|
3191
|
+
queryFn: () => client.accountBilling.get(),
|
|
3192
|
+
queryKey: ["useGetAccountBilling"],
|
|
3193
|
+
select: (result) => result.data
|
|
3194
|
+
}));
|
|
3168
3195
|
};
|
|
3169
3196
|
|
|
3170
3197
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -3186,35 +3213,6 @@ var __spreadValues$7 = (a, b) => {
|
|
|
3186
3213
|
return a;
|
|
3187
3214
|
};
|
|
3188
3215
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
3189
|
-
const useGetAccountBilling = (params) => {
|
|
3190
|
-
const { client } = useShipEngine();
|
|
3191
|
-
return reactQuery.useQuery(__spreadProps$6(__spreadValues$7({}, params), {
|
|
3192
|
-
onError,
|
|
3193
|
-
queryFn: () => client.accountBilling.get(),
|
|
3194
|
-
queryKey: ["useGetAccountBilling"],
|
|
3195
|
-
select: (result) => result.data
|
|
3196
|
-
}));
|
|
3197
|
-
};
|
|
3198
|
-
|
|
3199
|
-
var __defProp$6 = Object.defineProperty;
|
|
3200
|
-
var __defProps$5 = Object.defineProperties;
|
|
3201
|
-
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3202
|
-
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3203
|
-
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3204
|
-
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
3205
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3206
|
-
var __spreadValues$6 = (a, b) => {
|
|
3207
|
-
for (var prop in b || (b = {}))
|
|
3208
|
-
if (__hasOwnProp$6.call(b, prop))
|
|
3209
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
3210
|
-
if (__getOwnPropSymbols$6)
|
|
3211
|
-
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
3212
|
-
if (__propIsEnum$6.call(b, prop))
|
|
3213
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
3214
|
-
}
|
|
3215
|
-
return a;
|
|
3216
|
-
};
|
|
3217
|
-
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3218
3216
|
var __async$8 = (__this, __arguments, generator) => {
|
|
3219
3217
|
return new Promise((resolve, reject) => {
|
|
3220
3218
|
var fulfilled = (value) => {
|
|
@@ -3237,7 +3235,7 @@ var __async$8 = (__this, __arguments, generator) => {
|
|
|
3237
3235
|
};
|
|
3238
3236
|
const useUpsertAccountBilling = (params) => {
|
|
3239
3237
|
const { client } = useShipEngine();
|
|
3240
|
-
return reactQuery.useMutation(__spreadProps$
|
|
3238
|
+
return reactQuery.useMutation(__spreadProps$6(__spreadValues$7({}, params), {
|
|
3241
3239
|
mutationFn: (billing) => __async$8(void 0, null, function* () {
|
|
3242
3240
|
const result = yield client.accountBilling.put(billing);
|
|
3243
3241
|
return result.data;
|
|
@@ -3247,28 +3245,28 @@ const useUpsertAccountBilling = (params) => {
|
|
|
3247
3245
|
}));
|
|
3248
3246
|
};
|
|
3249
3247
|
|
|
3250
|
-
var __defProp$
|
|
3251
|
-
var __defProps$
|
|
3252
|
-
var __getOwnPropDescs$
|
|
3253
|
-
var __getOwnPropSymbols$
|
|
3254
|
-
var __hasOwnProp$
|
|
3255
|
-
var __propIsEnum$
|
|
3256
|
-
var __defNormalProp$
|
|
3257
|
-
var __spreadValues$
|
|
3248
|
+
var __defProp$6 = Object.defineProperty;
|
|
3249
|
+
var __defProps$5 = Object.defineProperties;
|
|
3250
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
3251
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
3252
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
3253
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
3254
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3255
|
+
var __spreadValues$6 = (a, b) => {
|
|
3258
3256
|
for (var prop in b || (b = {}))
|
|
3259
|
-
if (__hasOwnProp$
|
|
3260
|
-
__defNormalProp$
|
|
3261
|
-
if (__getOwnPropSymbols$
|
|
3262
|
-
for (var prop of __getOwnPropSymbols$
|
|
3263
|
-
if (__propIsEnum$
|
|
3264
|
-
__defNormalProp$
|
|
3257
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
3258
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
3259
|
+
if (__getOwnPropSymbols$6)
|
|
3260
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
3261
|
+
if (__propIsEnum$6.call(b, prop))
|
|
3262
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
3265
3263
|
}
|
|
3266
3264
|
return a;
|
|
3267
3265
|
};
|
|
3268
|
-
var __spreadProps$
|
|
3266
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
3269
3267
|
const useGetHereToken = (params) => {
|
|
3270
3268
|
const { client } = useShipEngine();
|
|
3271
|
-
return reactQuery.useQuery(__spreadProps$
|
|
3269
|
+
return reactQuery.useQuery(__spreadProps$5(__spreadValues$6({}, params), {
|
|
3272
3270
|
onError,
|
|
3273
3271
|
queryFn: () => client.servicePoints.getHereToken(),
|
|
3274
3272
|
queryKey: ["useGetHereToken"],
|
|
@@ -3388,19 +3386,19 @@ const useListSandboxSellerIds = (sellerId) => {
|
|
|
3388
3386
|
});
|
|
3389
3387
|
};
|
|
3390
3388
|
|
|
3391
|
-
var __defProp$
|
|
3392
|
-
var __getOwnPropSymbols$
|
|
3393
|
-
var __hasOwnProp$
|
|
3394
|
-
var __propIsEnum$
|
|
3395
|
-
var __defNormalProp$
|
|
3396
|
-
var __spreadValues$
|
|
3389
|
+
var __defProp$5 = Object.defineProperty;
|
|
3390
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
3391
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
3392
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
3393
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3394
|
+
var __spreadValues$5 = (a, b) => {
|
|
3397
3395
|
for (var prop in b || (b = {}))
|
|
3398
|
-
if (__hasOwnProp$
|
|
3399
|
-
__defNormalProp$
|
|
3400
|
-
if (__getOwnPropSymbols$
|
|
3401
|
-
for (var prop of __getOwnPropSymbols$
|
|
3402
|
-
if (__propIsEnum$
|
|
3403
|
-
__defNormalProp$
|
|
3396
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
3397
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
3398
|
+
if (__getOwnPropSymbols$5)
|
|
3399
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
3400
|
+
if (__propIsEnum$5.call(b, prop))
|
|
3401
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
3404
3402
|
}
|
|
3405
3403
|
return a;
|
|
3406
3404
|
};
|
|
@@ -3432,7 +3430,7 @@ const useListSellerApiKeys = (params) => {
|
|
|
3432
3430
|
var _a;
|
|
3433
3431
|
const sellerId = yield client.getTenant((_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.isSandbox);
|
|
3434
3432
|
if (sellerId) {
|
|
3435
|
-
return client.sellers.listSellerApiKeys(__spreadValues$
|
|
3433
|
+
return client.sellers.listSellerApiKeys(__spreadValues$5({ sellerId }, params));
|
|
3436
3434
|
}
|
|
3437
3435
|
return Promise.reject([new jsApi.CodedError("Missing Seller ID from Token")]);
|
|
3438
3436
|
}),
|
|
@@ -3523,25 +3521,25 @@ const useDeleteSellerApiKey = () => {
|
|
|
3523
3521
|
});
|
|
3524
3522
|
};
|
|
3525
3523
|
|
|
3526
|
-
var __defProp$
|
|
3527
|
-
var __defProps$
|
|
3528
|
-
var __getOwnPropDescs$
|
|
3529
|
-
var __getOwnPropSymbols$
|
|
3530
|
-
var __hasOwnProp$
|
|
3531
|
-
var __propIsEnum$
|
|
3532
|
-
var __defNormalProp$
|
|
3533
|
-
var __spreadValues$
|
|
3524
|
+
var __defProp$4 = Object.defineProperty;
|
|
3525
|
+
var __defProps$4 = Object.defineProperties;
|
|
3526
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
3527
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3528
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3529
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
3530
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3531
|
+
var __spreadValues$4 = (a, b) => {
|
|
3534
3532
|
for (var prop in b || (b = {}))
|
|
3535
|
-
if (__hasOwnProp$
|
|
3536
|
-
__defNormalProp$
|
|
3537
|
-
if (__getOwnPropSymbols$
|
|
3538
|
-
for (var prop of __getOwnPropSymbols$
|
|
3539
|
-
if (__propIsEnum$
|
|
3540
|
-
__defNormalProp$
|
|
3533
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
3534
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
3535
|
+
if (__getOwnPropSymbols$4)
|
|
3536
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
3537
|
+
if (__propIsEnum$4.call(b, prop))
|
|
3538
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
3541
3539
|
}
|
|
3542
3540
|
return a;
|
|
3543
3541
|
};
|
|
3544
|
-
var __spreadProps$
|
|
3542
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
3545
3543
|
var __async$2 = (__this, __arguments, generator) => {
|
|
3546
3544
|
return new Promise((resolve, reject) => {
|
|
3547
3545
|
var fulfilled = (value) => {
|
|
@@ -3564,7 +3562,7 @@ var __async$2 = (__this, __arguments, generator) => {
|
|
|
3564
3562
|
};
|
|
3565
3563
|
const useCreateWebhook = (params) => {
|
|
3566
3564
|
const { client } = useShipEngine();
|
|
3567
|
-
return reactQuery.useMutation(__spreadProps$
|
|
3565
|
+
return reactQuery.useMutation(__spreadProps$4(__spreadValues$4({}, params), {
|
|
3568
3566
|
mutationFn: (data) => __async$2(void 0, null, function* () {
|
|
3569
3567
|
const result = yield client.webhooks.create(data);
|
|
3570
3568
|
return result.data;
|
|
@@ -3574,25 +3572,25 @@ const useCreateWebhook = (params) => {
|
|
|
3574
3572
|
}));
|
|
3575
3573
|
};
|
|
3576
3574
|
|
|
3577
|
-
var __defProp$
|
|
3578
|
-
var __defProps$
|
|
3579
|
-
var __getOwnPropDescs$
|
|
3580
|
-
var __getOwnPropSymbols$
|
|
3581
|
-
var __hasOwnProp$
|
|
3582
|
-
var __propIsEnum$
|
|
3583
|
-
var __defNormalProp$
|
|
3584
|
-
var __spreadValues$
|
|
3575
|
+
var __defProp$3 = Object.defineProperty;
|
|
3576
|
+
var __defProps$3 = Object.defineProperties;
|
|
3577
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
3578
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
3579
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
3580
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
3581
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3582
|
+
var __spreadValues$3 = (a, b) => {
|
|
3585
3583
|
for (var prop in b || (b = {}))
|
|
3586
|
-
if (__hasOwnProp$
|
|
3587
|
-
__defNormalProp$
|
|
3588
|
-
if (__getOwnPropSymbols$
|
|
3589
|
-
for (var prop of __getOwnPropSymbols$
|
|
3590
|
-
if (__propIsEnum$
|
|
3591
|
-
__defNormalProp$
|
|
3584
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
3585
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
3586
|
+
if (__getOwnPropSymbols$3)
|
|
3587
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
3588
|
+
if (__propIsEnum$3.call(b, prop))
|
|
3589
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
3592
3590
|
}
|
|
3593
3591
|
return a;
|
|
3594
3592
|
};
|
|
3595
|
-
var __spreadProps$
|
|
3593
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
3596
3594
|
var __async$1 = (__this, __arguments, generator) => {
|
|
3597
3595
|
return new Promise((resolve, reject) => {
|
|
3598
3596
|
var fulfilled = (value) => {
|
|
@@ -3615,7 +3613,7 @@ var __async$1 = (__this, __arguments, generator) => {
|
|
|
3615
3613
|
};
|
|
3616
3614
|
const useDeleteWebhook = (params) => {
|
|
3617
3615
|
const { client } = useShipEngine();
|
|
3618
|
-
return reactQuery.useMutation(__spreadProps$
|
|
3616
|
+
return reactQuery.useMutation(__spreadProps$3(__spreadValues$3({}, params), {
|
|
3619
3617
|
mutationFn: (webhookId) => __async$1(void 0, null, function* () {
|
|
3620
3618
|
const result = yield client.webhooks.delete(webhookId);
|
|
3621
3619
|
return result.data;
|
|
@@ -3625,41 +3623,41 @@ const useDeleteWebhook = (params) => {
|
|
|
3625
3623
|
}));
|
|
3626
3624
|
};
|
|
3627
3625
|
|
|
3628
|
-
var __defProp$
|
|
3629
|
-
var __defProps$
|
|
3630
|
-
var __getOwnPropDescs$
|
|
3631
|
-
var __getOwnPropSymbols$
|
|
3632
|
-
var __hasOwnProp$
|
|
3633
|
-
var __propIsEnum$
|
|
3634
|
-
var __defNormalProp$
|
|
3635
|
-
var __spreadValues$
|
|
3626
|
+
var __defProp$2 = Object.defineProperty;
|
|
3627
|
+
var __defProps$2 = Object.defineProperties;
|
|
3628
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
3629
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
3630
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
3631
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
3632
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3633
|
+
var __spreadValues$2 = (a, b) => {
|
|
3636
3634
|
for (var prop in b || (b = {}))
|
|
3637
|
-
if (__hasOwnProp$
|
|
3638
|
-
__defNormalProp$
|
|
3639
|
-
if (__getOwnPropSymbols$
|
|
3640
|
-
for (var prop of __getOwnPropSymbols$
|
|
3641
|
-
if (__propIsEnum$
|
|
3642
|
-
__defNormalProp$
|
|
3635
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
3636
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3637
|
+
if (__getOwnPropSymbols$2)
|
|
3638
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
3639
|
+
if (__propIsEnum$2.call(b, prop))
|
|
3640
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
3643
3641
|
}
|
|
3644
3642
|
return a;
|
|
3645
3643
|
};
|
|
3646
|
-
var __spreadProps$
|
|
3647
|
-
var __objRest = (source, exclude) => {
|
|
3644
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
3645
|
+
var __objRest$1 = (source, exclude) => {
|
|
3648
3646
|
var target = {};
|
|
3649
3647
|
for (var prop in source)
|
|
3650
|
-
if (__hasOwnProp$
|
|
3648
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3651
3649
|
target[prop] = source[prop];
|
|
3652
|
-
if (source != null && __getOwnPropSymbols$
|
|
3653
|
-
for (var prop of __getOwnPropSymbols$
|
|
3654
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3650
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
3651
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
3652
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
3655
3653
|
target[prop] = source[prop];
|
|
3656
3654
|
}
|
|
3657
3655
|
return target;
|
|
3658
3656
|
};
|
|
3659
3657
|
const useListWebhooks = (params) => {
|
|
3660
3658
|
const { client } = useShipEngine();
|
|
3661
|
-
const _a = __spreadValues$
|
|
3662
|
-
return reactQuery.useQuery(__spreadProps$
|
|
3659
|
+
const _a = __spreadValues$2({}, params), { queryFnParams } = _a, rest = __objRest$1(_a, ["queryFnParams"]);
|
|
3660
|
+
return reactQuery.useQuery(__spreadProps$2(__spreadValues$2({}, rest), {
|
|
3663
3661
|
onError,
|
|
3664
3662
|
queryFn: () => client.webhooks.list(queryFnParams),
|
|
3665
3663
|
queryKey: ["useListWebhooks", queryFnParams],
|
|
@@ -3667,25 +3665,25 @@ const useListWebhooks = (params) => {
|
|
|
3667
3665
|
}));
|
|
3668
3666
|
};
|
|
3669
3667
|
|
|
3670
|
-
var __defProp = Object.defineProperty;
|
|
3671
|
-
var __defProps = Object.defineProperties;
|
|
3672
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3673
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3674
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3675
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3676
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3677
|
-
var __spreadValues = (a, b) => {
|
|
3668
|
+
var __defProp$1 = Object.defineProperty;
|
|
3669
|
+
var __defProps$1 = Object.defineProperties;
|
|
3670
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
3671
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
3672
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
3673
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
3674
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3675
|
+
var __spreadValues$1 = (a, b) => {
|
|
3678
3676
|
for (var prop in b || (b = {}))
|
|
3679
|
-
if (__hasOwnProp.call(b, prop))
|
|
3680
|
-
__defNormalProp(a, prop, b[prop]);
|
|
3681
|
-
if (__getOwnPropSymbols)
|
|
3682
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
3683
|
-
if (__propIsEnum.call(b, prop))
|
|
3684
|
-
__defNormalProp(a, prop, b[prop]);
|
|
3677
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
3678
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3679
|
+
if (__getOwnPropSymbols$1)
|
|
3680
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
3681
|
+
if (__propIsEnum$1.call(b, prop))
|
|
3682
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
3685
3683
|
}
|
|
3686
3684
|
return a;
|
|
3687
3685
|
};
|
|
3688
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3686
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
3689
3687
|
var __async = (__this, __arguments, generator) => {
|
|
3690
3688
|
return new Promise((resolve, reject) => {
|
|
3691
3689
|
var fulfilled = (value) => {
|
|
@@ -3708,7 +3706,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
3708
3706
|
};
|
|
3709
3707
|
const useUpdateWebhook = (params) => {
|
|
3710
3708
|
const { client } = useShipEngine();
|
|
3711
|
-
return reactQuery.useMutation(__spreadProps(__spreadValues({}, params), {
|
|
3709
|
+
return reactQuery.useMutation(__spreadProps$1(__spreadValues$1({}, params), {
|
|
3712
3710
|
mutationFn: (newWebhook) => __async(void 0, null, function* () {
|
|
3713
3711
|
const result = yield client.webhooks.update(newWebhook);
|
|
3714
3712
|
return result.data;
|
|
@@ -3718,6 +3716,48 @@ const useUpdateWebhook = (params) => {
|
|
|
3718
3716
|
}));
|
|
3719
3717
|
};
|
|
3720
3718
|
|
|
3719
|
+
var __defProp = Object.defineProperty;
|
|
3720
|
+
var __defProps = Object.defineProperties;
|
|
3721
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3722
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3723
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3724
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3725
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3726
|
+
var __spreadValues = (a, b) => {
|
|
3727
|
+
for (var prop in b || (b = {}))
|
|
3728
|
+
if (__hasOwnProp.call(b, prop))
|
|
3729
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3730
|
+
if (__getOwnPropSymbols)
|
|
3731
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
3732
|
+
if (__propIsEnum.call(b, prop))
|
|
3733
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3734
|
+
}
|
|
3735
|
+
return a;
|
|
3736
|
+
};
|
|
3737
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3738
|
+
var __objRest = (source, exclude) => {
|
|
3739
|
+
var target = {};
|
|
3740
|
+
for (var prop in source)
|
|
3741
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3742
|
+
target[prop] = source[prop];
|
|
3743
|
+
if (source != null && __getOwnPropSymbols)
|
|
3744
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
3745
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
3746
|
+
target[prop] = source[prop];
|
|
3747
|
+
}
|
|
3748
|
+
return target;
|
|
3749
|
+
};
|
|
3750
|
+
const useListUsers = (params) => {
|
|
3751
|
+
const { client } = useShipEngine();
|
|
3752
|
+
const _a = __spreadValues({}, params), { queryFnParams } = _a, rest = __objRest(_a, ["queryFnParams"]);
|
|
3753
|
+
return reactQuery.useQuery(__spreadProps(__spreadValues({}, rest), {
|
|
3754
|
+
onError,
|
|
3755
|
+
queryFn: () => client.users.list(queryFnParams),
|
|
3756
|
+
queryKey: ["useListUsers", queryFnParams],
|
|
3757
|
+
select: (result) => result.data
|
|
3758
|
+
}));
|
|
3759
|
+
};
|
|
3760
|
+
|
|
3721
3761
|
exports.ShipEngine = ShipEngine;
|
|
3722
3762
|
exports.ShipEngineContext = ShipEngineContext;
|
|
3723
3763
|
exports.delay = delay;
|
|
@@ -3810,6 +3850,7 @@ exports.useListSellerApiKeys = useListSellerApiKeys;
|
|
|
3810
3850
|
exports.useListServicePoints = useListServicePoints;
|
|
3811
3851
|
exports.useListShipments = useListShipments;
|
|
3812
3852
|
exports.useListShippingRules = useListShippingRules;
|
|
3853
|
+
exports.useListUsers = useListUsers;
|
|
3813
3854
|
exports.useListWarehouses = useListWarehouses;
|
|
3814
3855
|
exports.useListWebhooks = useListWebhooks;
|
|
3815
3856
|
exports.useNotifySalesOrderShipped = useNotifySalesOrderShipped;
|