@shipengine/react-api 3.7.0 → 3.8.1
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/shipments/use-get-shipment-rates.d.ts +6 -1
- package/index.js +258 -224
- package/index.mjs +258 -224
- 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$k = Object.defineProperty;
|
|
83
|
+
var __defProps$j = Object.defineProperties;
|
|
84
|
+
var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
|
|
85
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
86
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
87
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
88
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
89
|
+
var __spreadValues$k = (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$u.call(b, prop))
|
|
92
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
93
|
+
if (__getOwnPropSymbols$u)
|
|
94
|
+
for (var prop of __getOwnPropSymbols$u(b)) {
|
|
95
|
+
if (__propIsEnum$u.call(b, prop))
|
|
96
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
97
97
|
}
|
|
98
98
|
return a;
|
|
99
99
|
};
|
|
100
|
-
var __spreadProps$
|
|
100
|
+
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(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$j(__spreadValues$k({}, k), {
|
|
110
110
|
req: (req) => ({
|
|
111
111
|
headers: req.headers,
|
|
112
112
|
method: req.method,
|
|
@@ -507,41 +507,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
-
var __defProp$
|
|
511
|
-
var __defProps$
|
|
512
|
-
var __getOwnPropDescs$
|
|
513
|
-
var __getOwnPropSymbols$
|
|
514
|
-
var __hasOwnProp$
|
|
515
|
-
var __propIsEnum$
|
|
516
|
-
var __defNormalProp$
|
|
517
|
-
var __spreadValues$
|
|
510
|
+
var __defProp$j = Object.defineProperty;
|
|
511
|
+
var __defProps$i = Object.defineProperties;
|
|
512
|
+
var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
|
|
513
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
514
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
515
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
516
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
517
|
+
var __spreadValues$j = (a, b) => {
|
|
518
518
|
for (var prop in b || (b = {}))
|
|
519
|
-
if (__hasOwnProp$
|
|
520
|
-
__defNormalProp$
|
|
521
|
-
if (__getOwnPropSymbols$
|
|
522
|
-
for (var prop of __getOwnPropSymbols$
|
|
523
|
-
if (__propIsEnum$
|
|
524
|
-
__defNormalProp$
|
|
519
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
520
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
521
|
+
if (__getOwnPropSymbols$t)
|
|
522
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
523
|
+
if (__propIsEnum$t.call(b, prop))
|
|
524
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
525
525
|
}
|
|
526
526
|
return a;
|
|
527
527
|
};
|
|
528
|
-
var __spreadProps$
|
|
529
|
-
var __objRest$
|
|
528
|
+
var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
529
|
+
var __objRest$k = (source, exclude) => {
|
|
530
530
|
var target = {};
|
|
531
531
|
for (var prop in source)
|
|
532
|
-
if (__hasOwnProp$
|
|
532
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
533
533
|
target[prop] = source[prop];
|
|
534
|
-
if (source != null && __getOwnPropSymbols$
|
|
535
|
-
for (var prop of __getOwnPropSymbols$
|
|
536
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
534
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
535
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
536
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
537
537
|
target[prop] = source[prop];
|
|
538
538
|
}
|
|
539
539
|
return target;
|
|
540
540
|
};
|
|
541
541
|
const useListCarriers = (params) => {
|
|
542
542
|
const { client } = useShipEngine();
|
|
543
|
-
const _a = __spreadValues$
|
|
544
|
-
return reactQuery.useQuery(__spreadProps$
|
|
543
|
+
const _a = __spreadValues$j({}, params), { queryFnParams } = _a, rest = __objRest$k(_a, ["queryFnParams"]);
|
|
544
|
+
return reactQuery.useQuery(__spreadProps$i(__spreadValues$j({}, rest), {
|
|
545
545
|
onError,
|
|
546
546
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
547
547
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -549,17 +549,17 @@ const useListCarriers = (params) => {
|
|
|
549
549
|
}));
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
var __getOwnPropSymbols$
|
|
553
|
-
var __hasOwnProp$
|
|
554
|
-
var __propIsEnum$
|
|
555
|
-
var __objRest$
|
|
552
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
553
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
554
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
555
|
+
var __objRest$j = (source, exclude) => {
|
|
556
556
|
var target = {};
|
|
557
557
|
for (var prop in source)
|
|
558
|
-
if (__hasOwnProp$
|
|
558
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
559
559
|
target[prop] = source[prop];
|
|
560
|
-
if (source != null && __getOwnPropSymbols$
|
|
561
|
-
for (var prop of __getOwnPropSymbols$
|
|
562
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
560
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
561
|
+
for (var prop of __getOwnPropSymbols$s(source)) {
|
|
562
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
|
|
563
563
|
target[prop] = source[prop];
|
|
564
564
|
}
|
|
565
565
|
return target;
|
|
@@ -589,7 +589,7 @@ const useUpdateAutoFunding = () => {
|
|
|
589
589
|
const queryClient = reactQuery.useQueryClient();
|
|
590
590
|
return reactQuery.useMutation({
|
|
591
591
|
mutationFn: (_a) => __async$E(void 0, null, function* () {
|
|
592
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
592
|
+
var _b = _a, { carrierId } = _b, options = __objRest$j(_b, ["carrierId"]);
|
|
593
593
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
594
594
|
return result.data;
|
|
595
595
|
}),
|
|
@@ -650,24 +650,24 @@ const useDeleteCarrier = () => {
|
|
|
650
650
|
});
|
|
651
651
|
};
|
|
652
652
|
|
|
653
|
-
var __getOwnPropSymbols$
|
|
654
|
-
var __hasOwnProp$
|
|
655
|
-
var __propIsEnum$
|
|
656
|
-
var __objRest$
|
|
653
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
654
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
655
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
656
|
+
var __objRest$i = (source, exclude) => {
|
|
657
657
|
var target = {};
|
|
658
658
|
for (var prop in source)
|
|
659
|
-
if (__hasOwnProp$
|
|
659
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
660
660
|
target[prop] = source[prop];
|
|
661
|
-
if (source != null && __getOwnPropSymbols$
|
|
662
|
-
for (var prop of __getOwnPropSymbols$
|
|
663
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
661
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
662
|
+
for (var prop of __getOwnPropSymbols$r(source)) {
|
|
663
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
|
|
664
664
|
target[prop] = source[prop];
|
|
665
665
|
}
|
|
666
666
|
return target;
|
|
667
667
|
};
|
|
668
668
|
const useGetCarrierConnectionForm = (_params) => {
|
|
669
669
|
const { client } = useShipEngine();
|
|
670
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
670
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$i(_a, ["carrierName", "enabled"]);
|
|
671
671
|
return reactQuery.useQuery({
|
|
672
672
|
enabled,
|
|
673
673
|
onError,
|
|
@@ -677,24 +677,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
677
677
|
});
|
|
678
678
|
};
|
|
679
679
|
|
|
680
|
-
var __getOwnPropSymbols$
|
|
681
|
-
var __hasOwnProp$
|
|
682
|
-
var __propIsEnum$
|
|
683
|
-
var __objRest$
|
|
680
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
681
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
682
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
683
|
+
var __objRest$h = (source, exclude) => {
|
|
684
684
|
var target = {};
|
|
685
685
|
for (var prop in source)
|
|
686
|
-
if (__hasOwnProp$
|
|
686
|
+
if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
687
687
|
target[prop] = source[prop];
|
|
688
|
-
if (source != null && __getOwnPropSymbols$
|
|
689
|
-
for (var prop of __getOwnPropSymbols$
|
|
690
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
688
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
689
|
+
for (var prop of __getOwnPropSymbols$q(source)) {
|
|
690
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
|
|
691
691
|
target[prop] = source[prop];
|
|
692
692
|
}
|
|
693
693
|
return target;
|
|
694
694
|
};
|
|
695
695
|
const useListCarrierConnections = (_params) => {
|
|
696
696
|
const { client } = useShipEngine();
|
|
697
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
697
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$h(_a, ["enabled"]);
|
|
698
698
|
return reactQuery.useQuery({
|
|
699
699
|
enabled,
|
|
700
700
|
onError,
|
|
@@ -747,33 +747,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
747
747
|
});
|
|
748
748
|
};
|
|
749
749
|
|
|
750
|
-
var __defProp$
|
|
751
|
-
var __defProps$
|
|
752
|
-
var __getOwnPropDescs$
|
|
753
|
-
var __getOwnPropSymbols$
|
|
754
|
-
var __hasOwnProp$
|
|
755
|
-
var __propIsEnum$
|
|
756
|
-
var __defNormalProp$
|
|
757
|
-
var __spreadValues$
|
|
750
|
+
var __defProp$i = Object.defineProperty;
|
|
751
|
+
var __defProps$h = Object.defineProperties;
|
|
752
|
+
var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
|
|
753
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
754
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
755
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
756
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
757
|
+
var __spreadValues$i = (a, b) => {
|
|
758
758
|
for (var prop in b || (b = {}))
|
|
759
|
-
if (__hasOwnProp$
|
|
760
|
-
__defNormalProp$
|
|
761
|
-
if (__getOwnPropSymbols$
|
|
762
|
-
for (var prop of __getOwnPropSymbols$
|
|
763
|
-
if (__propIsEnum$
|
|
764
|
-
__defNormalProp$
|
|
759
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
760
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
761
|
+
if (__getOwnPropSymbols$p)
|
|
762
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
763
|
+
if (__propIsEnum$p.call(b, prop))
|
|
764
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
765
765
|
}
|
|
766
766
|
return a;
|
|
767
767
|
};
|
|
768
|
-
var __spreadProps$
|
|
769
|
-
var __objRest$
|
|
768
|
+
var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
|
|
769
|
+
var __objRest$g = (source, exclude) => {
|
|
770
770
|
var target = {};
|
|
771
771
|
for (var prop in source)
|
|
772
|
-
if (__hasOwnProp$
|
|
772
|
+
if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
773
773
|
target[prop] = source[prop];
|
|
774
|
-
if (source != null && __getOwnPropSymbols$
|
|
775
|
-
for (var prop of __getOwnPropSymbols$
|
|
776
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
774
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
775
|
+
for (var prop of __getOwnPropSymbols$p(source)) {
|
|
776
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
|
|
777
777
|
target[prop] = source[prop];
|
|
778
778
|
}
|
|
779
779
|
return target;
|
|
@@ -781,12 +781,12 @@ var __objRest$f = (source, exclude) => {
|
|
|
781
781
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
782
782
|
var _b = _a, {
|
|
783
783
|
queryFnParams
|
|
784
|
-
} = _b, params = __objRest$
|
|
784
|
+
} = _b, params = __objRest$g(_b, [
|
|
785
785
|
"queryFnParams"
|
|
786
786
|
]);
|
|
787
787
|
const { client } = useShipEngine();
|
|
788
788
|
const { carrierName, carrierId } = queryFnParams;
|
|
789
|
-
return reactQuery.useQuery(__spreadProps$
|
|
789
|
+
return reactQuery.useQuery(__spreadProps$h(__spreadValues$i({}, params), {
|
|
790
790
|
onError,
|
|
791
791
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
792
792
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -794,25 +794,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
794
794
|
}));
|
|
795
795
|
};
|
|
796
796
|
|
|
797
|
-
var __defProp$
|
|
798
|
-
var __defProps$
|
|
799
|
-
var __getOwnPropDescs$
|
|
800
|
-
var __getOwnPropSymbols$
|
|
801
|
-
var __hasOwnProp$
|
|
802
|
-
var __propIsEnum$
|
|
803
|
-
var __defNormalProp$
|
|
804
|
-
var __spreadValues$
|
|
797
|
+
var __defProp$h = Object.defineProperty;
|
|
798
|
+
var __defProps$g = Object.defineProperties;
|
|
799
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
800
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
801
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
802
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
803
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
804
|
+
var __spreadValues$h = (a, b) => {
|
|
805
805
|
for (var prop in b || (b = {}))
|
|
806
|
-
if (__hasOwnProp$
|
|
807
|
-
__defNormalProp$
|
|
808
|
-
if (__getOwnPropSymbols$
|
|
809
|
-
for (var prop of __getOwnPropSymbols$
|
|
810
|
-
if (__propIsEnum$
|
|
811
|
-
__defNormalProp$
|
|
806
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
807
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
808
|
+
if (__getOwnPropSymbols$o)
|
|
809
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
810
|
+
if (__propIsEnum$o.call(b, prop))
|
|
811
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
812
812
|
}
|
|
813
813
|
return a;
|
|
814
814
|
};
|
|
815
|
-
var __spreadProps$
|
|
815
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
816
816
|
var __async$B = (__this, __arguments, generator) => {
|
|
817
817
|
return new Promise((resolve, reject) => {
|
|
818
818
|
var fulfilled = (value) => {
|
|
@@ -835,7 +835,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
835
835
|
};
|
|
836
836
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
837
837
|
const { client } = useShipEngine();
|
|
838
|
-
return reactQuery.useMutation(__spreadProps$
|
|
838
|
+
return reactQuery.useMutation(__spreadProps$g(__spreadValues$h({}, params), {
|
|
839
839
|
mutationFn: (_0) => __async$B(void 0, [_0], function* ({
|
|
840
840
|
carrierName,
|
|
841
841
|
carrierId,
|
|
@@ -1041,29 +1041,29 @@ const useGetFundingSourceTransactions = (fundingSourceId, params) => {
|
|
|
1041
1041
|
});
|
|
1042
1042
|
};
|
|
1043
1043
|
|
|
1044
|
-
var __defProp$
|
|
1045
|
-
var __defProps$
|
|
1046
|
-
var __getOwnPropDescs$
|
|
1047
|
-
var __getOwnPropSymbols$
|
|
1048
|
-
var __hasOwnProp$
|
|
1049
|
-
var __propIsEnum$
|
|
1050
|
-
var __defNormalProp$
|
|
1051
|
-
var __spreadValues$
|
|
1044
|
+
var __defProp$g = Object.defineProperty;
|
|
1045
|
+
var __defProps$f = Object.defineProperties;
|
|
1046
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
1047
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
1048
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
1049
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
1050
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1051
|
+
var __spreadValues$g = (a, b) => {
|
|
1052
1052
|
for (var prop in b || (b = {}))
|
|
1053
|
-
if (__hasOwnProp$
|
|
1054
|
-
__defNormalProp$
|
|
1055
|
-
if (__getOwnPropSymbols$
|
|
1056
|
-
for (var prop of __getOwnPropSymbols$
|
|
1057
|
-
if (__propIsEnum$
|
|
1058
|
-
__defNormalProp$
|
|
1053
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
1054
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1055
|
+
if (__getOwnPropSymbols$n)
|
|
1056
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
1057
|
+
if (__propIsEnum$n.call(b, prop))
|
|
1058
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1059
1059
|
}
|
|
1060
1060
|
return a;
|
|
1061
1061
|
};
|
|
1062
|
-
var __spreadProps$
|
|
1062
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
1063
1063
|
const useGetInsuranceFundingSourceAcceptedTerms = (params) => {
|
|
1064
1064
|
const { client } = useShipEngine();
|
|
1065
|
-
const queryParams = __spreadValues$
|
|
1066
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1065
|
+
const queryParams = __spreadValues$g({}, params);
|
|
1066
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$g({}, queryParams), {
|
|
1067
1067
|
onError,
|
|
1068
1068
|
queryFn: () => client.fundingSources.insuranceAcceptedTerms(),
|
|
1069
1069
|
queryKey: ["useGetInsuranceFundingSourceAcceptedTerms"],
|
|
@@ -1086,17 +1086,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1086
1086
|
});
|
|
1087
1087
|
};
|
|
1088
1088
|
|
|
1089
|
-
var __getOwnPropSymbols$
|
|
1090
|
-
var __hasOwnProp$
|
|
1091
|
-
var __propIsEnum$
|
|
1092
|
-
var __objRest$
|
|
1089
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
1090
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
1091
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
1092
|
+
var __objRest$f = (source, exclude) => {
|
|
1093
1093
|
var target = {};
|
|
1094
1094
|
for (var prop in source)
|
|
1095
|
-
if (__hasOwnProp$
|
|
1095
|
+
if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1096
1096
|
target[prop] = source[prop];
|
|
1097
|
-
if (source != null && __getOwnPropSymbols$
|
|
1098
|
-
for (var prop of __getOwnPropSymbols$
|
|
1099
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1097
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
1098
|
+
for (var prop of __getOwnPropSymbols$m(source)) {
|
|
1099
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
|
|
1100
1100
|
target[prop] = source[prop];
|
|
1101
1101
|
}
|
|
1102
1102
|
return target;
|
|
@@ -1125,7 +1125,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1125
1125
|
const { client } = useShipEngine();
|
|
1126
1126
|
return reactQuery.useMutation({
|
|
1127
1127
|
mutationFn: (_a) => __async$w(void 0, null, function* () {
|
|
1128
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1128
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$f(_b, ["insuranceProvider"]);
|
|
1129
1129
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1130
1130
|
return result.data;
|
|
1131
1131
|
}),
|
|
@@ -1134,17 +1134,17 @@ const useAddInsuranceFunds = () => {
|
|
|
1134
1134
|
});
|
|
1135
1135
|
};
|
|
1136
1136
|
|
|
1137
|
-
var __getOwnPropSymbols$
|
|
1138
|
-
var __hasOwnProp$
|
|
1139
|
-
var __propIsEnum$
|
|
1140
|
-
var __objRest$
|
|
1137
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
1138
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
1139
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
1140
|
+
var __objRest$e = (source, exclude) => {
|
|
1141
1141
|
var target = {};
|
|
1142
1142
|
for (var prop in source)
|
|
1143
|
-
if (__hasOwnProp$
|
|
1143
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1144
1144
|
target[prop] = source[prop];
|
|
1145
|
-
if (source != null && __getOwnPropSymbols$
|
|
1146
|
-
for (var prop of __getOwnPropSymbols$
|
|
1147
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1145
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
1146
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
1147
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
1148
1148
|
target[prop] = source[prop];
|
|
1149
1149
|
}
|
|
1150
1150
|
return target;
|
|
@@ -1173,7 +1173,7 @@ const useCreateLabel = () => {
|
|
|
1173
1173
|
const { client } = useShipEngine();
|
|
1174
1174
|
return reactQuery.useMutation({
|
|
1175
1175
|
mutationFn: (_a) => __async$v(void 0, null, function* () {
|
|
1176
|
-
var _b = _a, { rateId } = _b, options = __objRest$
|
|
1176
|
+
var _b = _a, { rateId } = _b, options = __objRest$e(_b, ["rateId"]);
|
|
1177
1177
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
1178
1178
|
return result.data;
|
|
1179
1179
|
}),
|
|
@@ -1197,41 +1197,41 @@ const useGetLabel = (labelId) => {
|
|
|
1197
1197
|
});
|
|
1198
1198
|
};
|
|
1199
1199
|
|
|
1200
|
-
var __defProp$
|
|
1201
|
-
var __defProps$
|
|
1202
|
-
var __getOwnPropDescs$
|
|
1203
|
-
var __getOwnPropSymbols$
|
|
1204
|
-
var __hasOwnProp$
|
|
1205
|
-
var __propIsEnum$
|
|
1206
|
-
var __defNormalProp$
|
|
1207
|
-
var __spreadValues$
|
|
1200
|
+
var __defProp$f = Object.defineProperty;
|
|
1201
|
+
var __defProps$e = Object.defineProperties;
|
|
1202
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
1203
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
1204
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
1205
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
1206
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1207
|
+
var __spreadValues$f = (a, b) => {
|
|
1208
1208
|
for (var prop in b || (b = {}))
|
|
1209
|
-
if (__hasOwnProp$
|
|
1210
|
-
__defNormalProp$
|
|
1211
|
-
if (__getOwnPropSymbols$
|
|
1212
|
-
for (var prop of __getOwnPropSymbols$
|
|
1213
|
-
if (__propIsEnum$
|
|
1214
|
-
__defNormalProp$
|
|
1209
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
1210
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1211
|
+
if (__getOwnPropSymbols$k)
|
|
1212
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
1213
|
+
if (__propIsEnum$k.call(b, prop))
|
|
1214
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1215
1215
|
}
|
|
1216
1216
|
return a;
|
|
1217
1217
|
};
|
|
1218
|
-
var __spreadProps$
|
|
1219
|
-
var __objRest$
|
|
1218
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
1219
|
+
var __objRest$d = (source, exclude) => {
|
|
1220
1220
|
var target = {};
|
|
1221
1221
|
for (var prop in source)
|
|
1222
|
-
if (__hasOwnProp$
|
|
1222
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1223
1223
|
target[prop] = source[prop];
|
|
1224
|
-
if (source != null && __getOwnPropSymbols$
|
|
1225
|
-
for (var prop of __getOwnPropSymbols$
|
|
1226
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1224
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
1225
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
1226
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
1227
1227
|
target[prop] = source[prop];
|
|
1228
1228
|
}
|
|
1229
1229
|
return target;
|
|
1230
1230
|
};
|
|
1231
1231
|
const useListLabels = (params) => {
|
|
1232
1232
|
const { client } = useShipEngine();
|
|
1233
|
-
const _a = __spreadValues$
|
|
1234
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1233
|
+
const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$d(_a, ["queryFnParams"]);
|
|
1234
|
+
return reactQuery.useQuery(__spreadProps$e(__spreadValues$f({}, rest), {
|
|
1235
1235
|
onError,
|
|
1236
1236
|
queryFn: () => client.labels.list(queryFnParams),
|
|
1237
1237
|
queryKey: ["useListLabels", params],
|
|
@@ -1271,28 +1271,28 @@ const useVoidLabel = () => {
|
|
|
1271
1271
|
});
|
|
1272
1272
|
};
|
|
1273
1273
|
|
|
1274
|
-
var __defProp$
|
|
1275
|
-
var __defProps$
|
|
1276
|
-
var __getOwnPropDescs$
|
|
1277
|
-
var __getOwnPropSymbols$
|
|
1278
|
-
var __hasOwnProp$
|
|
1279
|
-
var __propIsEnum$
|
|
1280
|
-
var __defNormalProp$
|
|
1281
|
-
var __spreadValues$
|
|
1274
|
+
var __defProp$e = Object.defineProperty;
|
|
1275
|
+
var __defProps$d = Object.defineProperties;
|
|
1276
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
1277
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
1278
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
1279
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
1280
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1281
|
+
var __spreadValues$e = (a, b) => {
|
|
1282
1282
|
for (var prop in b || (b = {}))
|
|
1283
|
-
if (__hasOwnProp$
|
|
1284
|
-
__defNormalProp$
|
|
1285
|
-
if (__getOwnPropSymbols$
|
|
1286
|
-
for (var prop of __getOwnPropSymbols$
|
|
1287
|
-
if (__propIsEnum$
|
|
1288
|
-
__defNormalProp$
|
|
1283
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
1284
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1285
|
+
if (__getOwnPropSymbols$j)
|
|
1286
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
1287
|
+
if (__propIsEnum$j.call(b, prop))
|
|
1288
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
1289
1289
|
}
|
|
1290
1290
|
return a;
|
|
1291
1291
|
};
|
|
1292
|
-
var __spreadProps$
|
|
1292
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
1293
1293
|
const useListOrderSources = (params) => {
|
|
1294
1294
|
const { client } = useShipEngine();
|
|
1295
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1295
|
+
return reactQuery.useQuery(__spreadProps$d(__spreadValues$e({}, params), {
|
|
1296
1296
|
onError,
|
|
1297
1297
|
queryFn: () => client.orderSources.list(),
|
|
1298
1298
|
queryKey: ["useListOrderSources"],
|
|
@@ -1711,17 +1711,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
1711
1711
|
});
|
|
1712
1712
|
};
|
|
1713
1713
|
|
|
1714
|
-
var __getOwnPropSymbols$
|
|
1715
|
-
var __hasOwnProp$
|
|
1716
|
-
var __propIsEnum$
|
|
1717
|
-
var __objRest$
|
|
1714
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
1715
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
1716
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
1717
|
+
var __objRest$c = (source, exclude) => {
|
|
1718
1718
|
var target = {};
|
|
1719
1719
|
for (var prop in source)
|
|
1720
|
-
if (__hasOwnProp$
|
|
1720
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1721
1721
|
target[prop] = source[prop];
|
|
1722
|
-
if (source != null && __getOwnPropSymbols$
|
|
1723
|
-
for (var prop of __getOwnPropSymbols$
|
|
1724
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1722
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
1723
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
1724
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
1725
1725
|
target[prop] = source[prop];
|
|
1726
1726
|
}
|
|
1727
1727
|
return target;
|
|
@@ -1750,7 +1750,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1750
1750
|
const { client } = useShipEngine();
|
|
1751
1751
|
return reactQuery.useMutation({
|
|
1752
1752
|
mutationFn: (_a) => __async$j(void 0, null, function* () {
|
|
1753
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
1753
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$c(_b, ["salesOrderId"]);
|
|
1754
1754
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
1755
1755
|
return result.data;
|
|
1756
1756
|
}),
|
|
@@ -1759,17 +1759,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1759
1759
|
});
|
|
1760
1760
|
};
|
|
1761
1761
|
|
|
1762
|
-
var __getOwnPropSymbols$
|
|
1763
|
-
var __hasOwnProp$
|
|
1764
|
-
var __propIsEnum$
|
|
1765
|
-
var __objRest$
|
|
1762
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1763
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1764
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1765
|
+
var __objRest$b = (source, exclude) => {
|
|
1766
1766
|
var target = {};
|
|
1767
1767
|
for (var prop in source)
|
|
1768
|
-
if (__hasOwnProp$
|
|
1768
|
+
if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1769
1769
|
target[prop] = source[prop];
|
|
1770
|
-
if (source != null && __getOwnPropSymbols$
|
|
1771
|
-
for (var prop of __getOwnPropSymbols$
|
|
1772
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1770
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
1771
|
+
for (var prop of __getOwnPropSymbols$h(source)) {
|
|
1772
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
|
|
1773
1773
|
target[prop] = source[prop];
|
|
1774
1774
|
}
|
|
1775
1775
|
return target;
|
|
@@ -1798,7 +1798,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
1798
1798
|
const { client } = useShipEngine();
|
|
1799
1799
|
return reactQuery.useMutation({
|
|
1800
1800
|
mutationFn: (_a) => __async$i(void 0, null, function* () {
|
|
1801
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
1801
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$b(_b, ["salesOrderId"]);
|
|
1802
1802
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
1803
1803
|
return result.data;
|
|
1804
1804
|
}),
|
|
@@ -1833,17 +1833,17 @@ const useListSalesOrderShipments = (params) => {
|
|
|
1833
1833
|
});
|
|
1834
1834
|
};
|
|
1835
1835
|
|
|
1836
|
-
var __getOwnPropSymbols$
|
|
1837
|
-
var __hasOwnProp$
|
|
1838
|
-
var __propIsEnum$
|
|
1839
|
-
var __objRest$
|
|
1836
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1837
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1838
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1839
|
+
var __objRest$a = (source, exclude) => {
|
|
1840
1840
|
var target = {};
|
|
1841
1841
|
for (var prop in source)
|
|
1842
|
-
if (__hasOwnProp$
|
|
1842
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1843
1843
|
target[prop] = source[prop];
|
|
1844
|
-
if (source != null && __getOwnPropSymbols$
|
|
1845
|
-
for (var prop of __getOwnPropSymbols$
|
|
1846
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1844
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1845
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1846
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1847
1847
|
target[prop] = source[prop];
|
|
1848
1848
|
}
|
|
1849
1849
|
return target;
|
|
@@ -1872,7 +1872,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1872
1872
|
const { client } = useShipEngine();
|
|
1873
1873
|
return reactQuery.useMutation({
|
|
1874
1874
|
mutationFn: (_a) => __async$h(void 0, null, function* () {
|
|
1875
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
1875
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$a(_b, ["shipmentId"]);
|
|
1876
1876
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
1877
1877
|
return result.data;
|
|
1878
1878
|
}),
|
|
@@ -1881,25 +1881,25 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
};
|
|
1883
1883
|
|
|
1884
|
-
var __defProp$
|
|
1885
|
-
var __defProps$
|
|
1886
|
-
var __getOwnPropDescs$
|
|
1887
|
-
var __getOwnPropSymbols$
|
|
1888
|
-
var __hasOwnProp$
|
|
1889
|
-
var __propIsEnum$
|
|
1890
|
-
var __defNormalProp$
|
|
1891
|
-
var __spreadValues$
|
|
1884
|
+
var __defProp$d = Object.defineProperty;
|
|
1885
|
+
var __defProps$c = Object.defineProperties;
|
|
1886
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1887
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1888
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1889
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1890
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1891
|
+
var __spreadValues$d = (a, b) => {
|
|
1892
1892
|
for (var prop in b || (b = {}))
|
|
1893
|
-
if (__hasOwnProp$
|
|
1894
|
-
__defNormalProp$
|
|
1895
|
-
if (__getOwnPropSymbols$
|
|
1896
|
-
for (var prop of __getOwnPropSymbols$
|
|
1897
|
-
if (__propIsEnum$
|
|
1898
|
-
__defNormalProp$
|
|
1893
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
1894
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1895
|
+
if (__getOwnPropSymbols$f)
|
|
1896
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
1897
|
+
if (__propIsEnum$f.call(b, prop))
|
|
1898
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
1899
1899
|
}
|
|
1900
1900
|
return a;
|
|
1901
1901
|
};
|
|
1902
|
-
var __spreadProps$
|
|
1902
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1903
1903
|
var __async$g = (__this, __arguments, generator) => {
|
|
1904
1904
|
return new Promise((resolve, reject) => {
|
|
1905
1905
|
var fulfilled = (value) => {
|
|
@@ -1941,7 +1941,7 @@ const useCreateShipment = () => {
|
|
|
1941
1941
|
postalCode: "",
|
|
1942
1942
|
stateProvince: ""
|
|
1943
1943
|
};
|
|
1944
|
-
return (yield client.shipments.create(__spreadProps$
|
|
1944
|
+
return (yield client.shipments.create(__spreadProps$c(__spreadValues$d({}, shipment), {
|
|
1945
1945
|
shipTo
|
|
1946
1946
|
}))).data;
|
|
1947
1947
|
}),
|
|
@@ -1950,10 +1950,44 @@ const useCreateShipment = () => {
|
|
|
1950
1950
|
});
|
|
1951
1951
|
};
|
|
1952
1952
|
|
|
1953
|
-
|
|
1953
|
+
var __defProp$c = Object.defineProperty;
|
|
1954
|
+
var __defProps$b = Object.defineProperties;
|
|
1955
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
1956
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1957
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1958
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1959
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1960
|
+
var __spreadValues$c = (a, b) => {
|
|
1961
|
+
for (var prop in b || (b = {}))
|
|
1962
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
1963
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1964
|
+
if (__getOwnPropSymbols$e)
|
|
1965
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
1966
|
+
if (__propIsEnum$e.call(b, prop))
|
|
1967
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1968
|
+
}
|
|
1969
|
+
return a;
|
|
1970
|
+
};
|
|
1971
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
1972
|
+
var __objRest$9 = (source, exclude) => {
|
|
1973
|
+
var target = {};
|
|
1974
|
+
for (var prop in source)
|
|
1975
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1976
|
+
target[prop] = source[prop];
|
|
1977
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
1978
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
1979
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
1980
|
+
target[prop] = source[prop];
|
|
1981
|
+
}
|
|
1982
|
+
return target;
|
|
1983
|
+
};
|
|
1984
|
+
const useGetShipmentRates = (params) => {
|
|
1954
1985
|
const { client } = useShipEngine();
|
|
1955
|
-
|
|
1956
|
-
|
|
1986
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$9(_a, ["queryFnParams"]);
|
|
1987
|
+
const { createdAtStart, shipmentId } = queryFnParams;
|
|
1988
|
+
return reactQuery.useQuery(__spreadProps$b(__spreadValues$c({
|
|
1989
|
+
enabled: shipmentId !== void 0
|
|
1990
|
+
}, rest), {
|
|
1957
1991
|
onError,
|
|
1958
1992
|
queryFn: () => {
|
|
1959
1993
|
if (shipmentId) {
|
|
@@ -1961,9 +1995,9 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
|
|
|
1961
1995
|
}
|
|
1962
1996
|
return Promise.reject(new Error("shipmentId is required"));
|
|
1963
1997
|
},
|
|
1964
|
-
queryKey: ["useGetShipmentRates",
|
|
1998
|
+
queryKey: ["useGetShipmentRates", queryFnParams],
|
|
1965
1999
|
select: (result) => result.data
|
|
1966
|
-
});
|
|
2000
|
+
}));
|
|
1967
2001
|
};
|
|
1968
2002
|
|
|
1969
2003
|
var __defProp$b = Object.defineProperty;
|