@shipengine/react-api 2.15.3 → 3.1.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/carriers/use-list-carriers.d.ts +3 -1
- package/hooks/labels/use-list-labels.d.ts +3 -4
- package/hooks/shipping-rules/use-create-shipping-rule.d.ts +4 -2
- package/hooks/shipping-rules/use-delete-shipping-rule.d.ts +4 -1
- package/hooks/shipping-rules/use-edit-shipping-rule.d.ts +4 -2
- package/hooks/shipping-rules/use-get-shipping-rule-by-id.d.ts +5 -1
- package/hooks/shipping-rules/use-get-shipping-rule-conditions-options.d.ts +3 -1
- package/hooks/shipping-rules/use-list-shipping-rules.d.ts +2 -2
- package/hooks/warehouses/use-list-warehouses.d.ts +3 -4
- package/index.js +411 -256
- package/index.mjs +411 -256
- package/package.json +1 -1
- package/providers/shipengine.d.ts +1 -1
package/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const ShipEngine = ({
|
|
|
12
12
|
baseURL,
|
|
13
13
|
children,
|
|
14
14
|
headers,
|
|
15
|
+
getSandboxToken,
|
|
15
16
|
getToken,
|
|
16
17
|
onApiError,
|
|
17
18
|
defaultQueryClientOptions = {}
|
|
@@ -26,6 +27,7 @@ const ShipEngine = ({
|
|
|
26
27
|
const token = getToken();
|
|
27
28
|
const commonClientProps = {
|
|
28
29
|
baseURL,
|
|
30
|
+
getSandboxToken,
|
|
29
31
|
getToken,
|
|
30
32
|
headers: headers != null ? headers : {},
|
|
31
33
|
onApiError
|
|
@@ -77,25 +79,25 @@ const onError = (_errors) => _default();
|
|
|
77
79
|
|
|
78
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}();
|
|
79
81
|
|
|
80
|
-
var __defProp$
|
|
81
|
-
var __defProps$
|
|
82
|
-
var __getOwnPropDescs$
|
|
83
|
-
var __getOwnPropSymbols$
|
|
84
|
-
var __hasOwnProp$
|
|
85
|
-
var __propIsEnum$
|
|
86
|
-
var __defNormalProp$
|
|
87
|
-
var __spreadValues$
|
|
82
|
+
var __defProp$g = Object.defineProperty;
|
|
83
|
+
var __defProps$g = Object.defineProperties;
|
|
84
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
85
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
86
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
87
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
88
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
89
|
+
var __spreadValues$g = (a, b) => {
|
|
88
90
|
for (var prop in b || (b = {}))
|
|
89
|
-
if (__hasOwnProp$
|
|
90
|
-
__defNormalProp$
|
|
91
|
-
if (__getOwnPropSymbols$
|
|
92
|
-
for (var prop of __getOwnPropSymbols$
|
|
93
|
-
if (__propIsEnum$
|
|
94
|
-
__defNormalProp$
|
|
91
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
92
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
93
|
+
if (__getOwnPropSymbols$q)
|
|
94
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
95
|
+
if (__propIsEnum$q.call(b, prop))
|
|
96
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
95
97
|
}
|
|
96
98
|
return a;
|
|
97
99
|
};
|
|
98
|
-
var __spreadProps$
|
|
100
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
99
101
|
const streams = [];
|
|
100
102
|
if (process.env.NODE_ENV === "production") {
|
|
101
103
|
streams.push({
|
|
@@ -104,7 +106,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
104
106
|
}
|
|
105
107
|
const logger = E({
|
|
106
108
|
name: "shipengine",
|
|
107
|
-
serializers: __spreadProps$
|
|
109
|
+
serializers: __spreadProps$g(__spreadValues$g({}, k), {
|
|
108
110
|
req: (req) => ({
|
|
109
111
|
headers: req.headers,
|
|
110
112
|
method: req.method,
|
|
@@ -505,27 +507,59 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
505
507
|
});
|
|
506
508
|
};
|
|
507
509
|
|
|
508
|
-
|
|
510
|
+
var __defProp$f = Object.defineProperty;
|
|
511
|
+
var __defProps$f = Object.defineProperties;
|
|
512
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
513
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
514
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
515
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
516
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
517
|
+
var __spreadValues$f = (a, b) => {
|
|
518
|
+
for (var prop in b || (b = {}))
|
|
519
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
520
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
521
|
+
if (__getOwnPropSymbols$p)
|
|
522
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
523
|
+
if (__propIsEnum$p.call(b, prop))
|
|
524
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
525
|
+
}
|
|
526
|
+
return a;
|
|
527
|
+
};
|
|
528
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
529
|
+
var __objRest$j = (source, exclude) => {
|
|
530
|
+
var target = {};
|
|
531
|
+
for (var prop in source)
|
|
532
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
533
|
+
target[prop] = source[prop];
|
|
534
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
535
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
536
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
537
|
+
target[prop] = source[prop];
|
|
538
|
+
}
|
|
539
|
+
return target;
|
|
540
|
+
};
|
|
541
|
+
const useListCarriers = (params) => {
|
|
509
542
|
const { client } = useShipEngine();
|
|
510
|
-
|
|
543
|
+
const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
|
|
544
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
|
|
511
545
|
onError,
|
|
512
|
-
queryFn: () => client.carriers.list(),
|
|
513
|
-
queryKey: ["useListCarriers"],
|
|
546
|
+
queryFn: () => client.carriers.list(queryFnParams),
|
|
547
|
+
queryKey: ["useListCarriers", queryFnParams],
|
|
514
548
|
select: (result) => result.data.carriers
|
|
515
|
-
});
|
|
549
|
+
}));
|
|
516
550
|
};
|
|
517
551
|
|
|
518
|
-
var __getOwnPropSymbols$
|
|
519
|
-
var __hasOwnProp$
|
|
520
|
-
var __propIsEnum$
|
|
521
|
-
var __objRest$
|
|
552
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
553
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
554
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
555
|
+
var __objRest$i = (source, exclude) => {
|
|
522
556
|
var target = {};
|
|
523
557
|
for (var prop in source)
|
|
524
|
-
if (__hasOwnProp$
|
|
558
|
+
if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
525
559
|
target[prop] = source[prop];
|
|
526
|
-
if (source != null && __getOwnPropSymbols$
|
|
527
|
-
for (var prop of __getOwnPropSymbols$
|
|
528
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
560
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
561
|
+
for (var prop of __getOwnPropSymbols$o(source)) {
|
|
562
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
|
|
529
563
|
target[prop] = source[prop];
|
|
530
564
|
}
|
|
531
565
|
return target;
|
|
@@ -555,7 +589,7 @@ const useUpdateAutoFunding = () => {
|
|
|
555
589
|
const queryClient = reactQuery.useQueryClient();
|
|
556
590
|
return reactQuery.useMutation({
|
|
557
591
|
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
558
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
592
|
+
var _b = _a, { carrierId } = _b, options = __objRest$i(_b, ["carrierId"]);
|
|
559
593
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
560
594
|
return result.data;
|
|
561
595
|
}),
|
|
@@ -616,24 +650,24 @@ const useDeleteCarrier = () => {
|
|
|
616
650
|
});
|
|
617
651
|
};
|
|
618
652
|
|
|
619
|
-
var __getOwnPropSymbols$
|
|
620
|
-
var __hasOwnProp$
|
|
621
|
-
var __propIsEnum$
|
|
622
|
-
var __objRest$
|
|
653
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
654
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
655
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
656
|
+
var __objRest$h = (source, exclude) => {
|
|
623
657
|
var target = {};
|
|
624
658
|
for (var prop in source)
|
|
625
|
-
if (__hasOwnProp$
|
|
659
|
+
if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
626
660
|
target[prop] = source[prop];
|
|
627
|
-
if (source != null && __getOwnPropSymbols$
|
|
628
|
-
for (var prop of __getOwnPropSymbols$
|
|
629
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
661
|
+
if (source != null && __getOwnPropSymbols$n)
|
|
662
|
+
for (var prop of __getOwnPropSymbols$n(source)) {
|
|
663
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
|
|
630
664
|
target[prop] = source[prop];
|
|
631
665
|
}
|
|
632
666
|
return target;
|
|
633
667
|
};
|
|
634
668
|
const useGetCarrierConnectionForm = (_params) => {
|
|
635
669
|
const { client } = useShipEngine();
|
|
636
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
670
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$h(_a, ["carrierName", "enabled"]);
|
|
637
671
|
return reactQuery.useQuery({
|
|
638
672
|
enabled,
|
|
639
673
|
onError,
|
|
@@ -643,24 +677,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
643
677
|
});
|
|
644
678
|
};
|
|
645
679
|
|
|
646
|
-
var __getOwnPropSymbols$
|
|
647
|
-
var __hasOwnProp$
|
|
648
|
-
var __propIsEnum$
|
|
649
|
-
var __objRest$
|
|
680
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
681
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
682
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
683
|
+
var __objRest$g = (source, exclude) => {
|
|
650
684
|
var target = {};
|
|
651
685
|
for (var prop in source)
|
|
652
|
-
if (__hasOwnProp$
|
|
686
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
653
687
|
target[prop] = source[prop];
|
|
654
|
-
if (source != null && __getOwnPropSymbols$
|
|
655
|
-
for (var prop of __getOwnPropSymbols$
|
|
656
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
688
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
689
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
690
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
657
691
|
target[prop] = source[prop];
|
|
658
692
|
}
|
|
659
693
|
return target;
|
|
660
694
|
};
|
|
661
695
|
const useListCarrierConnections = (_params) => {
|
|
662
696
|
const { client } = useShipEngine();
|
|
663
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
697
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$g(_a, ["enabled"]);
|
|
664
698
|
return reactQuery.useQuery({
|
|
665
699
|
enabled,
|
|
666
700
|
onError,
|
|
@@ -713,33 +747,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
713
747
|
});
|
|
714
748
|
};
|
|
715
749
|
|
|
716
|
-
var __defProp$
|
|
717
|
-
var __defProps$
|
|
718
|
-
var __getOwnPropDescs$
|
|
719
|
-
var __getOwnPropSymbols$
|
|
720
|
-
var __hasOwnProp$
|
|
721
|
-
var __propIsEnum$
|
|
722
|
-
var __defNormalProp$
|
|
723
|
-
var __spreadValues$
|
|
750
|
+
var __defProp$e = Object.defineProperty;
|
|
751
|
+
var __defProps$e = Object.defineProperties;
|
|
752
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
753
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
754
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
755
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
756
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
757
|
+
var __spreadValues$e = (a, b) => {
|
|
724
758
|
for (var prop in b || (b = {}))
|
|
725
|
-
if (__hasOwnProp$
|
|
726
|
-
__defNormalProp$
|
|
727
|
-
if (__getOwnPropSymbols$
|
|
728
|
-
for (var prop of __getOwnPropSymbols$
|
|
729
|
-
if (__propIsEnum$
|
|
730
|
-
__defNormalProp$
|
|
759
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
760
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
761
|
+
if (__getOwnPropSymbols$l)
|
|
762
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
763
|
+
if (__propIsEnum$l.call(b, prop))
|
|
764
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
731
765
|
}
|
|
732
766
|
return a;
|
|
733
767
|
};
|
|
734
|
-
var __spreadProps$
|
|
735
|
-
var __objRest$
|
|
768
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
769
|
+
var __objRest$f = (source, exclude) => {
|
|
736
770
|
var target = {};
|
|
737
771
|
for (var prop in source)
|
|
738
|
-
if (__hasOwnProp$
|
|
772
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
739
773
|
target[prop] = source[prop];
|
|
740
|
-
if (source != null && __getOwnPropSymbols$
|
|
741
|
-
for (var prop of __getOwnPropSymbols$
|
|
742
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
774
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
775
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
776
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
743
777
|
target[prop] = source[prop];
|
|
744
778
|
}
|
|
745
779
|
return target;
|
|
@@ -747,12 +781,12 @@ var __objRest$b = (source, exclude) => {
|
|
|
747
781
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
748
782
|
var _b = _a, {
|
|
749
783
|
queryFnParams
|
|
750
|
-
} = _b, params = __objRest$
|
|
784
|
+
} = _b, params = __objRest$f(_b, [
|
|
751
785
|
"queryFnParams"
|
|
752
786
|
]);
|
|
753
787
|
const { client } = useShipEngine();
|
|
754
788
|
const { carrierName, carrierCode } = queryFnParams;
|
|
755
|
-
return reactQuery.useQuery(__spreadProps$
|
|
789
|
+
return reactQuery.useQuery(__spreadProps$e(__spreadValues$e({}, params), {
|
|
756
790
|
onError,
|
|
757
791
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
758
792
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
@@ -760,25 +794,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
760
794
|
}));
|
|
761
795
|
};
|
|
762
796
|
|
|
763
|
-
var __defProp$
|
|
764
|
-
var __defProps$
|
|
765
|
-
var __getOwnPropDescs$
|
|
766
|
-
var __getOwnPropSymbols$
|
|
767
|
-
var __hasOwnProp$
|
|
768
|
-
var __propIsEnum$
|
|
769
|
-
var __defNormalProp$
|
|
770
|
-
var __spreadValues$
|
|
797
|
+
var __defProp$d = Object.defineProperty;
|
|
798
|
+
var __defProps$d = Object.defineProperties;
|
|
799
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
800
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
801
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
802
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
803
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
804
|
+
var __spreadValues$d = (a, b) => {
|
|
771
805
|
for (var prop in b || (b = {}))
|
|
772
|
-
if (__hasOwnProp$
|
|
773
|
-
__defNormalProp$
|
|
774
|
-
if (__getOwnPropSymbols$
|
|
775
|
-
for (var prop of __getOwnPropSymbols$
|
|
776
|
-
if (__propIsEnum$
|
|
777
|
-
__defNormalProp$
|
|
806
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
807
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
808
|
+
if (__getOwnPropSymbols$k)
|
|
809
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
810
|
+
if (__propIsEnum$k.call(b, prop))
|
|
811
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
778
812
|
}
|
|
779
813
|
return a;
|
|
780
814
|
};
|
|
781
|
-
var __spreadProps$
|
|
815
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
782
816
|
var __async$w = (__this, __arguments, generator) => {
|
|
783
817
|
return new Promise((resolve, reject) => {
|
|
784
818
|
var fulfilled = (value) => {
|
|
@@ -801,7 +835,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
801
835
|
};
|
|
802
836
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
803
837
|
const { client } = useShipEngine();
|
|
804
|
-
return reactQuery.useMutation(__spreadProps$
|
|
838
|
+
return reactQuery.useMutation(__spreadProps$d(__spreadValues$d({}, params), {
|
|
805
839
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
806
840
|
carrierName,
|
|
807
841
|
carrierCode,
|
|
@@ -1032,17 +1066,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1032
1066
|
});
|
|
1033
1067
|
};
|
|
1034
1068
|
|
|
1035
|
-
var __getOwnPropSymbols$
|
|
1036
|
-
var __hasOwnProp$
|
|
1037
|
-
var __propIsEnum$
|
|
1038
|
-
var __objRest$
|
|
1069
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
1070
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
1071
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
1072
|
+
var __objRest$e = (source, exclude) => {
|
|
1039
1073
|
var target = {};
|
|
1040
1074
|
for (var prop in source)
|
|
1041
|
-
if (__hasOwnProp$
|
|
1075
|
+
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1042
1076
|
target[prop] = source[prop];
|
|
1043
|
-
if (source != null && __getOwnPropSymbols$
|
|
1044
|
-
for (var prop of __getOwnPropSymbols$
|
|
1045
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1077
|
+
if (source != null && __getOwnPropSymbols$j)
|
|
1078
|
+
for (var prop of __getOwnPropSymbols$j(source)) {
|
|
1079
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
|
|
1046
1080
|
target[prop] = source[prop];
|
|
1047
1081
|
}
|
|
1048
1082
|
return target;
|
|
@@ -1071,7 +1105,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1071
1105
|
const { client } = useShipEngine();
|
|
1072
1106
|
return reactQuery.useMutation({
|
|
1073
1107
|
mutationFn: (_a) => __async$r(void 0, null, function* () {
|
|
1074
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1108
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$e(_b, ["insuranceProvider"]);
|
|
1075
1109
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1076
1110
|
return result.data;
|
|
1077
1111
|
}),
|
|
@@ -1080,17 +1114,17 @@ const useAddInsuranceFunds = () => {
|
|
|
1080
1114
|
});
|
|
1081
1115
|
};
|
|
1082
1116
|
|
|
1083
|
-
var __getOwnPropSymbols$
|
|
1084
|
-
var __hasOwnProp$
|
|
1085
|
-
var __propIsEnum$
|
|
1086
|
-
var __objRest$
|
|
1117
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
1118
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
1119
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
1120
|
+
var __objRest$d = (source, exclude) => {
|
|
1087
1121
|
var target = {};
|
|
1088
1122
|
for (var prop in source)
|
|
1089
|
-
if (__hasOwnProp$
|
|
1123
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1090
1124
|
target[prop] = source[prop];
|
|
1091
|
-
if (source != null && __getOwnPropSymbols$
|
|
1092
|
-
for (var prop of __getOwnPropSymbols$
|
|
1093
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1125
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
1126
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
1127
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
1094
1128
|
target[prop] = source[prop];
|
|
1095
1129
|
}
|
|
1096
1130
|
return target;
|
|
@@ -1119,7 +1153,7 @@ const useCreateLabel = () => {
|
|
|
1119
1153
|
const { client } = useShipEngine();
|
|
1120
1154
|
return reactQuery.useMutation({
|
|
1121
1155
|
mutationFn: (_a) => __async$q(void 0, null, function* () {
|
|
1122
|
-
var _b = _a, { rateId } = _b, options = __objRest$
|
|
1156
|
+
var _b = _a, { rateId } = _b, options = __objRest$d(_b, ["rateId"]);
|
|
1123
1157
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
1124
1158
|
return result.data;
|
|
1125
1159
|
}),
|
|
@@ -1143,31 +1177,46 @@ const useGetLabel = (labelId) => {
|
|
|
1143
1177
|
});
|
|
1144
1178
|
};
|
|
1145
1179
|
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1149
|
-
var
|
|
1180
|
+
var __defProp$c = Object.defineProperty;
|
|
1181
|
+
var __defProps$c = Object.defineProperties;
|
|
1182
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1183
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1184
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1185
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1186
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1187
|
+
var __spreadValues$c = (a, b) => {
|
|
1188
|
+
for (var prop in b || (b = {}))
|
|
1189
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1190
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1191
|
+
if (__getOwnPropSymbols$h)
|
|
1192
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1193
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1194
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1195
|
+
}
|
|
1196
|
+
return a;
|
|
1197
|
+
};
|
|
1198
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1199
|
+
var __objRest$c = (source, exclude) => {
|
|
1150
1200
|
var target = {};
|
|
1151
1201
|
for (var prop in source)
|
|
1152
|
-
if (__hasOwnProp$
|
|
1202
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1153
1203
|
target[prop] = source[prop];
|
|
1154
|
-
if (source != null && __getOwnPropSymbols$
|
|
1155
|
-
for (var prop of __getOwnPropSymbols$
|
|
1156
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1204
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
1205
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
1206
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
1157
1207
|
target[prop] = source[prop];
|
|
1158
1208
|
}
|
|
1159
1209
|
return target;
|
|
1160
1210
|
};
|
|
1161
|
-
const useListLabels = (
|
|
1211
|
+
const useListLabels = (params) => {
|
|
1162
1212
|
const { client } = useShipEngine();
|
|
1163
|
-
const _a =
|
|
1164
|
-
return reactQuery.useQuery({
|
|
1165
|
-
enabled,
|
|
1213
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
|
|
1214
|
+
return reactQuery.useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
|
|
1166
1215
|
onError,
|
|
1167
|
-
queryFn: () => client.labels.list(
|
|
1216
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
1168
1217
|
queryKey: ["useListLabels", params],
|
|
1169
1218
|
select: (result) => result.data
|
|
1170
|
-
});
|
|
1219
|
+
}));
|
|
1171
1220
|
};
|
|
1172
1221
|
|
|
1173
1222
|
var __async$p = (__this, __arguments, generator) => {
|
|
@@ -1581,17 +1630,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
1581
1630
|
});
|
|
1582
1631
|
};
|
|
1583
1632
|
|
|
1584
|
-
var __getOwnPropSymbols$
|
|
1585
|
-
var __hasOwnProp$
|
|
1586
|
-
var __propIsEnum$
|
|
1587
|
-
var __objRest$
|
|
1633
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1634
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1635
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1636
|
+
var __objRest$b = (source, exclude) => {
|
|
1588
1637
|
var target = {};
|
|
1589
1638
|
for (var prop in source)
|
|
1590
|
-
if (__hasOwnProp$
|
|
1639
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1591
1640
|
target[prop] = source[prop];
|
|
1592
|
-
if (source != null && __getOwnPropSymbols$
|
|
1593
|
-
for (var prop of __getOwnPropSymbols$
|
|
1594
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1641
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1642
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1643
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1595
1644
|
target[prop] = source[prop];
|
|
1596
1645
|
}
|
|
1597
1646
|
return target;
|
|
@@ -1620,7 +1669,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1620
1669
|
const { client } = useShipEngine();
|
|
1621
1670
|
return reactQuery.useMutation({
|
|
1622
1671
|
mutationFn: (_a) => __async$f(void 0, null, function* () {
|
|
1623
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
1672
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$b(_b, ["salesOrderId"]);
|
|
1624
1673
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
1625
1674
|
return result.data;
|
|
1626
1675
|
}),
|
|
@@ -1629,17 +1678,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1629
1678
|
});
|
|
1630
1679
|
};
|
|
1631
1680
|
|
|
1632
|
-
var __getOwnPropSymbols$
|
|
1633
|
-
var __hasOwnProp$
|
|
1634
|
-
var __propIsEnum$
|
|
1635
|
-
var __objRest$
|
|
1681
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1682
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1683
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1684
|
+
var __objRest$a = (source, exclude) => {
|
|
1636
1685
|
var target = {};
|
|
1637
1686
|
for (var prop in source)
|
|
1638
|
-
if (__hasOwnProp$
|
|
1687
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1639
1688
|
target[prop] = source[prop];
|
|
1640
|
-
if (source != null && __getOwnPropSymbols$
|
|
1641
|
-
for (var prop of __getOwnPropSymbols$
|
|
1642
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1689
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
1690
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
1691
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
1643
1692
|
target[prop] = source[prop];
|
|
1644
1693
|
}
|
|
1645
1694
|
return target;
|
|
@@ -1668,7 +1717,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
1668
1717
|
const { client } = useShipEngine();
|
|
1669
1718
|
return reactQuery.useMutation({
|
|
1670
1719
|
mutationFn: (_a) => __async$e(void 0, null, function* () {
|
|
1671
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
1720
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$a(_b, ["salesOrderId"]);
|
|
1672
1721
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
1673
1722
|
return result.data;
|
|
1674
1723
|
}),
|
|
@@ -1703,17 +1752,17 @@ const useListSalesOrderShipments = (params) => {
|
|
|
1703
1752
|
});
|
|
1704
1753
|
};
|
|
1705
1754
|
|
|
1706
|
-
var __getOwnPropSymbols$
|
|
1707
|
-
var __hasOwnProp$
|
|
1708
|
-
var __propIsEnum$
|
|
1709
|
-
var __objRest$
|
|
1755
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1756
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1757
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1758
|
+
var __objRest$9 = (source, exclude) => {
|
|
1710
1759
|
var target = {};
|
|
1711
1760
|
for (var prop in source)
|
|
1712
|
-
if (__hasOwnProp$
|
|
1761
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1713
1762
|
target[prop] = source[prop];
|
|
1714
|
-
if (source != null && __getOwnPropSymbols$
|
|
1715
|
-
for (var prop of __getOwnPropSymbols$
|
|
1716
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1763
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
1764
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
1765
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
1717
1766
|
target[prop] = source[prop];
|
|
1718
1767
|
}
|
|
1719
1768
|
return target;
|
|
@@ -1742,7 +1791,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1742
1791
|
const { client } = useShipEngine();
|
|
1743
1792
|
return reactQuery.useMutation({
|
|
1744
1793
|
mutationFn: (_a) => __async$d(void 0, null, function* () {
|
|
1745
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
1794
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$9(_b, ["shipmentId"]);
|
|
1746
1795
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
1747
1796
|
return result.data;
|
|
1748
1797
|
}),
|
|
@@ -1751,25 +1800,25 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1751
1800
|
});
|
|
1752
1801
|
};
|
|
1753
1802
|
|
|
1754
|
-
var __defProp$
|
|
1755
|
-
var __defProps$
|
|
1756
|
-
var __getOwnPropDescs$
|
|
1757
|
-
var __getOwnPropSymbols$
|
|
1758
|
-
var __hasOwnProp$
|
|
1759
|
-
var __propIsEnum$
|
|
1760
|
-
var __defNormalProp$
|
|
1761
|
-
var __spreadValues$
|
|
1803
|
+
var __defProp$b = Object.defineProperty;
|
|
1804
|
+
var __defProps$b = Object.defineProperties;
|
|
1805
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
1806
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
1807
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
1808
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
1809
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1810
|
+
var __spreadValues$b = (a, b) => {
|
|
1762
1811
|
for (var prop in b || (b = {}))
|
|
1763
|
-
if (__hasOwnProp$
|
|
1764
|
-
__defNormalProp$
|
|
1765
|
-
if (__getOwnPropSymbols$
|
|
1766
|
-
for (var prop of __getOwnPropSymbols$
|
|
1767
|
-
if (__propIsEnum$
|
|
1768
|
-
__defNormalProp$
|
|
1812
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
1813
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1814
|
+
if (__getOwnPropSymbols$d)
|
|
1815
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
1816
|
+
if (__propIsEnum$d.call(b, prop))
|
|
1817
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
1769
1818
|
}
|
|
1770
1819
|
return a;
|
|
1771
1820
|
};
|
|
1772
|
-
var __spreadProps$
|
|
1821
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
1773
1822
|
var __async$c = (__this, __arguments, generator) => {
|
|
1774
1823
|
return new Promise((resolve, reject) => {
|
|
1775
1824
|
var fulfilled = (value) => {
|
|
@@ -1811,7 +1860,7 @@ const useCreateShipment = () => {
|
|
|
1811
1860
|
postalCode: "",
|
|
1812
1861
|
stateProvince: ""
|
|
1813
1862
|
};
|
|
1814
|
-
return (yield client.shipments.create(__spreadProps$
|
|
1863
|
+
return (yield client.shipments.create(__spreadProps$b(__spreadValues$b({}, shipment), {
|
|
1815
1864
|
shipTo
|
|
1816
1865
|
}))).data;
|
|
1817
1866
|
}),
|
|
@@ -1836,33 +1885,33 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
|
|
|
1836
1885
|
});
|
|
1837
1886
|
};
|
|
1838
1887
|
|
|
1839
|
-
var __defProp$
|
|
1840
|
-
var __defProps$
|
|
1841
|
-
var __getOwnPropDescs$
|
|
1842
|
-
var __getOwnPropSymbols$
|
|
1843
|
-
var __hasOwnProp$
|
|
1844
|
-
var __propIsEnum$
|
|
1845
|
-
var __defNormalProp$
|
|
1846
|
-
var __spreadValues$
|
|
1888
|
+
var __defProp$a = Object.defineProperty;
|
|
1889
|
+
var __defProps$a = Object.defineProperties;
|
|
1890
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
1891
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
1892
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
1893
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
1894
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1895
|
+
var __spreadValues$a = (a, b) => {
|
|
1847
1896
|
for (var prop in b || (b = {}))
|
|
1848
|
-
if (__hasOwnProp$
|
|
1849
|
-
__defNormalProp$
|
|
1850
|
-
if (__getOwnPropSymbols$
|
|
1851
|
-
for (var prop of __getOwnPropSymbols$
|
|
1852
|
-
if (__propIsEnum$
|
|
1853
|
-
__defNormalProp$
|
|
1897
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
1898
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
1899
|
+
if (__getOwnPropSymbols$c)
|
|
1900
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
1901
|
+
if (__propIsEnum$c.call(b, prop))
|
|
1902
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
1854
1903
|
}
|
|
1855
1904
|
return a;
|
|
1856
1905
|
};
|
|
1857
|
-
var __spreadProps$
|
|
1858
|
-
var __objRest$
|
|
1906
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
1907
|
+
var __objRest$8 = (source, exclude) => {
|
|
1859
1908
|
var target = {};
|
|
1860
1909
|
for (var prop in source)
|
|
1861
|
-
if (__hasOwnProp$
|
|
1910
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1862
1911
|
target[prop] = source[prop];
|
|
1863
|
-
if (source != null && __getOwnPropSymbols$
|
|
1864
|
-
for (var prop of __getOwnPropSymbols$
|
|
1865
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1912
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
1913
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
1914
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
1866
1915
|
target[prop] = source[prop];
|
|
1867
1916
|
}
|
|
1868
1917
|
return target;
|
|
@@ -1873,12 +1922,12 @@ const useGetShipment = (params) => {
|
|
|
1873
1922
|
const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
|
|
1874
1923
|
const getQueryProps = () => {
|
|
1875
1924
|
if (typeof params !== "string") {
|
|
1876
|
-
const _a2 = params, rest = __objRest$
|
|
1925
|
+
const _a2 = params, rest = __objRest$8(_a2, ["queryFnParams"]);
|
|
1877
1926
|
return rest;
|
|
1878
1927
|
}
|
|
1879
1928
|
return {};
|
|
1880
1929
|
};
|
|
1881
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1930
|
+
return reactQuery.useQuery(__spreadProps$a(__spreadValues$a({}, getQueryProps()), {
|
|
1882
1931
|
enabled: shipmentId !== void 0,
|
|
1883
1932
|
onError,
|
|
1884
1933
|
queryFn: () => {
|
|
@@ -1892,23 +1941,23 @@ const useGetShipment = (params) => {
|
|
|
1892
1941
|
}));
|
|
1893
1942
|
};
|
|
1894
1943
|
|
|
1895
|
-
var __getOwnPropSymbols$
|
|
1896
|
-
var __hasOwnProp$
|
|
1897
|
-
var __propIsEnum$
|
|
1898
|
-
var __objRest$
|
|
1944
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
1945
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
1946
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
1947
|
+
var __objRest$7 = (source, exclude) => {
|
|
1899
1948
|
var target = {};
|
|
1900
1949
|
for (var prop in source)
|
|
1901
|
-
if (__hasOwnProp$
|
|
1950
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1902
1951
|
target[prop] = source[prop];
|
|
1903
|
-
if (source != null && __getOwnPropSymbols$
|
|
1904
|
-
for (var prop of __getOwnPropSymbols$
|
|
1905
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1952
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
1953
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
1954
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
1906
1955
|
target[prop] = source[prop];
|
|
1907
1956
|
}
|
|
1908
1957
|
return target;
|
|
1909
1958
|
};
|
|
1910
1959
|
const useListShipments = (_params) => {
|
|
1911
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
1960
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$7(_a, ["enabled"]);
|
|
1912
1961
|
const { client } = useShipEngine();
|
|
1913
1962
|
return reactQuery.useQuery({
|
|
1914
1963
|
enabled,
|
|
@@ -1919,41 +1968,41 @@ const useListShipments = (_params) => {
|
|
|
1919
1968
|
});
|
|
1920
1969
|
};
|
|
1921
1970
|
|
|
1922
|
-
var __defProp$
|
|
1923
|
-
var __defProps$
|
|
1924
|
-
var __getOwnPropDescs$
|
|
1925
|
-
var __getOwnPropSymbols$
|
|
1926
|
-
var __hasOwnProp$
|
|
1927
|
-
var __propIsEnum$
|
|
1928
|
-
var __defNormalProp$
|
|
1929
|
-
var __spreadValues$
|
|
1971
|
+
var __defProp$9 = Object.defineProperty;
|
|
1972
|
+
var __defProps$9 = Object.defineProperties;
|
|
1973
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
1974
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1975
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1976
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1977
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1978
|
+
var __spreadValues$9 = (a, b) => {
|
|
1930
1979
|
for (var prop in b || (b = {}))
|
|
1931
|
-
if (__hasOwnProp$
|
|
1932
|
-
__defNormalProp$
|
|
1933
|
-
if (__getOwnPropSymbols$
|
|
1934
|
-
for (var prop of __getOwnPropSymbols$
|
|
1935
|
-
if (__propIsEnum$
|
|
1936
|
-
__defNormalProp$
|
|
1980
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1981
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
1982
|
+
if (__getOwnPropSymbols$a)
|
|
1983
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1984
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1985
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
1937
1986
|
}
|
|
1938
1987
|
return a;
|
|
1939
1988
|
};
|
|
1940
|
-
var __spreadProps$
|
|
1941
|
-
var __objRest$
|
|
1989
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
1990
|
+
var __objRest$6 = (source, exclude) => {
|
|
1942
1991
|
var target = {};
|
|
1943
1992
|
for (var prop in source)
|
|
1944
|
-
if (__hasOwnProp$
|
|
1993
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1945
1994
|
target[prop] = source[prop];
|
|
1946
|
-
if (source != null && __getOwnPropSymbols$
|
|
1947
|
-
for (var prop of __getOwnPropSymbols$
|
|
1948
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1995
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
1996
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
1997
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
1949
1998
|
target[prop] = source[prop];
|
|
1950
1999
|
}
|
|
1951
2000
|
return target;
|
|
1952
2001
|
};
|
|
1953
2002
|
const useGetShipmentByExternalId = (params) => {
|
|
1954
2003
|
const { client } = useShipEngine();
|
|
1955
|
-
const _a = params, { queryFnParams } = _a, rest = __objRest$
|
|
1956
|
-
return reactQuery.useQuery(__spreadProps$
|
|
2004
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$6(_a, ["queryFnParams"]);
|
|
2005
|
+
return reactQuery.useQuery(__spreadProps$9(__spreadValues$9({}, rest), {
|
|
1957
2006
|
onError,
|
|
1958
2007
|
queryFn: () => client.shipments.getByExternalId(queryFnParams.externalId),
|
|
1959
2008
|
queryKey: ["useGetShipmentByExternalId", queryFnParams],
|
|
@@ -1961,33 +2010,46 @@ const useGetShipmentByExternalId = (params) => {
|
|
|
1961
2010
|
}));
|
|
1962
2011
|
};
|
|
1963
2012
|
|
|
1964
|
-
var __defProp$
|
|
1965
|
-
var __defProps$
|
|
1966
|
-
var __getOwnPropDescs$
|
|
1967
|
-
var __getOwnPropSymbols$
|
|
1968
|
-
var __hasOwnProp$
|
|
1969
|
-
var __propIsEnum$
|
|
1970
|
-
var __defNormalProp$
|
|
1971
|
-
var __spreadValues$
|
|
2013
|
+
var __defProp$8 = Object.defineProperty;
|
|
2014
|
+
var __defProps$8 = Object.defineProperties;
|
|
2015
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
2016
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
2017
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
2018
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
2019
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2020
|
+
var __spreadValues$8 = (a, b) => {
|
|
1972
2021
|
for (var prop in b || (b = {}))
|
|
1973
|
-
if (__hasOwnProp$
|
|
1974
|
-
__defNormalProp$
|
|
1975
|
-
if (__getOwnPropSymbols$
|
|
1976
|
-
for (var prop of __getOwnPropSymbols$
|
|
1977
|
-
if (__propIsEnum$
|
|
1978
|
-
__defNormalProp$
|
|
2022
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
2023
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
2024
|
+
if (__getOwnPropSymbols$9)
|
|
2025
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
2026
|
+
if (__propIsEnum$9.call(b, prop))
|
|
2027
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1979
2028
|
}
|
|
1980
2029
|
return a;
|
|
1981
2030
|
};
|
|
1982
|
-
var __spreadProps$
|
|
2031
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
2032
|
+
var __objRest$5 = (source, exclude) => {
|
|
2033
|
+
var target = {};
|
|
2034
|
+
for (var prop in source)
|
|
2035
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2036
|
+
target[prop] = source[prop];
|
|
2037
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
2038
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
2039
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
2040
|
+
target[prop] = source[prop];
|
|
2041
|
+
}
|
|
2042
|
+
return target;
|
|
2043
|
+
};
|
|
1983
2044
|
const useListShippingRules = (params) => {
|
|
1984
2045
|
const { client } = useShipEngine();
|
|
1985
|
-
|
|
2046
|
+
const _a = __spreadValues$8({}, params), { queryFnParams } = _a, rest = __objRest$5(_a, ["queryFnParams"]);
|
|
2047
|
+
return reactQuery.useQuery(__spreadProps$8(__spreadValues$8({}, rest), {
|
|
1986
2048
|
onError,
|
|
1987
2049
|
queryFn: () => {
|
|
1988
|
-
return client.shippingRules.list();
|
|
2050
|
+
return client.shippingRules.list(queryFnParams);
|
|
1989
2051
|
},
|
|
1990
|
-
queryKey: ["useListShippingRules"],
|
|
2052
|
+
queryKey: ["useListShippingRules", queryFnParams],
|
|
1991
2053
|
select: (result) => result.data.shippingRules
|
|
1992
2054
|
}));
|
|
1993
2055
|
};
|
|
@@ -2015,8 +2077,8 @@ var __async$b = (__this, __arguments, generator) => {
|
|
|
2015
2077
|
const useCreateShippingRule = () => {
|
|
2016
2078
|
const { client } = useShipEngine();
|
|
2017
2079
|
return reactQuery.useMutation({
|
|
2018
|
-
mutationFn: (
|
|
2019
|
-
const result = yield client.shippingRules.create(
|
|
2080
|
+
mutationFn: (props) => __async$b(void 0, null, function* () {
|
|
2081
|
+
const result = yield client.shippingRules.create(props);
|
|
2020
2082
|
return result.data;
|
|
2021
2083
|
}),
|
|
2022
2084
|
mutationKey: ["useCreateShippingRule"],
|
|
@@ -2047,8 +2109,8 @@ var __async$a = (__this, __arguments, generator) => {
|
|
|
2047
2109
|
const useDeleteShippingRule = () => {
|
|
2048
2110
|
const { client } = useShipEngine();
|
|
2049
2111
|
return reactQuery.useMutation({
|
|
2050
|
-
mutationFn: (
|
|
2051
|
-
const result = yield client.shippingRules.delete(
|
|
2112
|
+
mutationFn: (props) => __async$a(void 0, null, function* () {
|
|
2113
|
+
const result = yield client.shippingRules.delete(props);
|
|
2052
2114
|
return result.data;
|
|
2053
2115
|
}),
|
|
2054
2116
|
mutationKey: ["useDeleteShippingRule"],
|
|
@@ -2079,8 +2141,8 @@ var __async$9 = (__this, __arguments, generator) => {
|
|
|
2079
2141
|
const useEditShippingRule = () => {
|
|
2080
2142
|
const { client } = useShipEngine();
|
|
2081
2143
|
return reactQuery.useMutation({
|
|
2082
|
-
mutationFn: (
|
|
2083
|
-
const result = yield client.shippingRules.edit(
|
|
2144
|
+
mutationFn: (props) => __async$9(void 0, null, function* () {
|
|
2145
|
+
const result = yield client.shippingRules.edit(props);
|
|
2084
2146
|
return result.data;
|
|
2085
2147
|
}),
|
|
2086
2148
|
mutationKey: ["useEditShippingRule"],
|
|
@@ -2088,29 +2150,92 @@ const useEditShippingRule = () => {
|
|
|
2088
2150
|
});
|
|
2089
2151
|
};
|
|
2090
2152
|
|
|
2091
|
-
|
|
2153
|
+
var __defProp$7 = Object.defineProperty;
|
|
2154
|
+
var __defProps$7 = Object.defineProperties;
|
|
2155
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
2156
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
2157
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
2158
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
2159
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2160
|
+
var __spreadValues$7 = (a, b) => {
|
|
2161
|
+
for (var prop in b || (b = {}))
|
|
2162
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
2163
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
2164
|
+
if (__getOwnPropSymbols$8)
|
|
2165
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
2166
|
+
if (__propIsEnum$8.call(b, prop))
|
|
2167
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
2168
|
+
}
|
|
2169
|
+
return a;
|
|
2170
|
+
};
|
|
2171
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
2172
|
+
var __objRest$4 = (source, exclude) => {
|
|
2173
|
+
var target = {};
|
|
2174
|
+
for (var prop in source)
|
|
2175
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2176
|
+
target[prop] = source[prop];
|
|
2177
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
2178
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
2179
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
2180
|
+
target[prop] = source[prop];
|
|
2181
|
+
}
|
|
2182
|
+
return target;
|
|
2183
|
+
};
|
|
2184
|
+
const useGetShippingRuleConditionsOptions = (params) => {
|
|
2092
2185
|
const { client } = useShipEngine();
|
|
2093
|
-
|
|
2186
|
+
const _a = __spreadValues$7({}, params), { queryFnParams } = _a, rest = __objRest$4(_a, ["queryFnParams"]);
|
|
2187
|
+
return reactQuery.useQuery(__spreadProps$7(__spreadValues$7({}, rest), {
|
|
2094
2188
|
onError,
|
|
2095
2189
|
queryFn: () => {
|
|
2096
|
-
return client.shippingRules.getConditionOptions();
|
|
2190
|
+
return client.shippingRules.getConditionOptions(queryFnParams);
|
|
2097
2191
|
},
|
|
2098
|
-
queryKey: ["useGetShippingRuleConditionsOptions"],
|
|
2192
|
+
queryKey: ["useGetShippingRuleConditionsOptions", queryFnParams],
|
|
2099
2193
|
select: (result) => result.data
|
|
2100
|
-
});
|
|
2194
|
+
}));
|
|
2101
2195
|
};
|
|
2102
2196
|
|
|
2103
|
-
|
|
2197
|
+
var __defProp$6 = Object.defineProperty;
|
|
2198
|
+
var __defProps$6 = Object.defineProperties;
|
|
2199
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
2200
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
2201
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
2202
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
2203
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2204
|
+
var __spreadValues$6 = (a, b) => {
|
|
2205
|
+
for (var prop in b || (b = {}))
|
|
2206
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
2207
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2208
|
+
if (__getOwnPropSymbols$7)
|
|
2209
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
2210
|
+
if (__propIsEnum$7.call(b, prop))
|
|
2211
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2212
|
+
}
|
|
2213
|
+
return a;
|
|
2214
|
+
};
|
|
2215
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
2216
|
+
var __objRest$3 = (source, exclude) => {
|
|
2217
|
+
var target = {};
|
|
2218
|
+
for (var prop in source)
|
|
2219
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2220
|
+
target[prop] = source[prop];
|
|
2221
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
2222
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
2223
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
2224
|
+
target[prop] = source[prop];
|
|
2225
|
+
}
|
|
2226
|
+
return target;
|
|
2227
|
+
};
|
|
2228
|
+
const useGetShippingRuleById = (params) => {
|
|
2104
2229
|
const { client } = useShipEngine();
|
|
2105
|
-
|
|
2106
|
-
|
|
2230
|
+
const _a = __spreadValues$6({}, params), { queryFnParams } = _a, rest = __objRest$3(_a, ["queryFnParams"]);
|
|
2231
|
+
return reactQuery.useQuery(__spreadProps$6(__spreadValues$6({}, rest), {
|
|
2107
2232
|
onError,
|
|
2108
2233
|
queryFn: () => {
|
|
2109
|
-
return client.shippingRules.get(
|
|
2234
|
+
return client.shippingRules.get(queryFnParams);
|
|
2110
2235
|
},
|
|
2111
|
-
queryKey: ["useGetShippingRuleById",
|
|
2236
|
+
queryKey: ["useGetShippingRuleById", queryFnParams],
|
|
2112
2237
|
select: (result) => result.data
|
|
2113
|
-
});
|
|
2238
|
+
}));
|
|
2114
2239
|
};
|
|
2115
2240
|
|
|
2116
2241
|
const useGetThemeById = (themeId) => {
|
|
@@ -2192,16 +2317,46 @@ const useDeleteWarehouse = () => {
|
|
|
2192
2317
|
});
|
|
2193
2318
|
};
|
|
2194
2319
|
|
|
2195
|
-
|
|
2196
|
-
|
|
2320
|
+
var __defProp$5 = Object.defineProperty;
|
|
2321
|
+
var __defProps$5 = Object.defineProperties;
|
|
2322
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
2323
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
2324
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
2325
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
2326
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2327
|
+
var __spreadValues$5 = (a, b) => {
|
|
2328
|
+
for (var prop in b || (b = {}))
|
|
2329
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
2330
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2331
|
+
if (__getOwnPropSymbols$6)
|
|
2332
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
2333
|
+
if (__propIsEnum$6.call(b, prop))
|
|
2334
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2335
|
+
}
|
|
2336
|
+
return a;
|
|
2337
|
+
};
|
|
2338
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
2339
|
+
var __objRest$2 = (source, exclude) => {
|
|
2340
|
+
var target = {};
|
|
2341
|
+
for (var prop in source)
|
|
2342
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2343
|
+
target[prop] = source[prop];
|
|
2344
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
2345
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
2346
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
2347
|
+
target[prop] = source[prop];
|
|
2348
|
+
}
|
|
2349
|
+
return target;
|
|
2350
|
+
};
|
|
2351
|
+
const useListWarehouses = (params) => {
|
|
2197
2352
|
const { client } = useShipEngine();
|
|
2198
|
-
|
|
2199
|
-
|
|
2353
|
+
const _a = __spreadValues$5({}, params), { queryFnParams } = _a, rest = __objRest$2(_a, ["queryFnParams"]);
|
|
2354
|
+
return reactQuery.useQuery(__spreadProps$5(__spreadValues$5({}, rest), {
|
|
2200
2355
|
onError,
|
|
2201
|
-
queryFn: () => client.warehouses.list(),
|
|
2202
|
-
queryKey: ["useListWarehouses"],
|
|
2356
|
+
queryFn: () => client.warehouses.list(queryFnParams),
|
|
2357
|
+
queryKey: ["useListWarehouses", queryFnParams],
|
|
2203
2358
|
select: (result) => result.data.warehouses
|
|
2204
|
-
});
|
|
2359
|
+
}));
|
|
2205
2360
|
};
|
|
2206
2361
|
|
|
2207
2362
|
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|