@shipengine/react-api 2.14.0 → 2.15.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.d.ts +5 -1
- package/index.js +194 -154
- package/index.mjs +194 -154
- package/package.json +1 -1
- package/utilities/types.d.ts +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { SalesOrderShipment } from "@shipengine/js-api";
|
|
2
|
+
import { QueryProps } from "../../utilities";
|
|
1
3
|
/**
|
|
2
4
|
* @category ShipEngine API Hooks
|
|
3
5
|
*
|
|
4
6
|
* @see [ShipEngine Developer Docs](https://www.shipengine.com/docs/reference/list-orders/)
|
|
5
7
|
*/
|
|
6
|
-
export declare const useGetShipment: (
|
|
8
|
+
export declare const useGetShipment: (params?: string | QueryProps<SalesOrderShipment, {
|
|
9
|
+
shipmentId?: string;
|
|
10
|
+
}>) => import("@tanstack/react-query").UseQueryResult<SalesOrderShipment, import("@shipengine/js-api").CodedError[]>;
|
package/index.js
CHANGED
|
@@ -77,25 +77,25 @@ const onError = (_errors) => _default();
|
|
|
77
77
|
|
|
78
78
|
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
79
|
|
|
80
|
-
var __defProp$
|
|
81
|
-
var __defProps$
|
|
82
|
-
var __getOwnPropDescs$
|
|
83
|
-
var __getOwnPropSymbols$
|
|
84
|
-
var __hasOwnProp$
|
|
85
|
-
var __propIsEnum$
|
|
86
|
-
var __defNormalProp$
|
|
87
|
-
var __spreadValues$
|
|
80
|
+
var __defProp$b = Object.defineProperty;
|
|
81
|
+
var __defProps$b = Object.defineProperties;
|
|
82
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
83
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
84
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
85
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
86
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
87
|
+
var __spreadValues$b = (a, b) => {
|
|
88
88
|
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$
|
|
89
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
90
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
91
|
+
if (__getOwnPropSymbols$m)
|
|
92
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
93
|
+
if (__propIsEnum$m.call(b, prop))
|
|
94
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
95
95
|
}
|
|
96
96
|
return a;
|
|
97
97
|
};
|
|
98
|
-
var __spreadProps$
|
|
98
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
99
99
|
const streams = [];
|
|
100
100
|
if (process.env.NODE_ENV === "production") {
|
|
101
101
|
streams.push({
|
|
@@ -104,7 +104,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
104
104
|
}
|
|
105
105
|
const logger = E({
|
|
106
106
|
name: "shipengine",
|
|
107
|
-
serializers: __spreadProps$
|
|
107
|
+
serializers: __spreadProps$b(__spreadValues$b({}, k), {
|
|
108
108
|
req: (req) => ({
|
|
109
109
|
headers: req.headers,
|
|
110
110
|
method: req.method,
|
|
@@ -515,17 +515,17 @@ const useListCarriers = () => {
|
|
|
515
515
|
});
|
|
516
516
|
};
|
|
517
517
|
|
|
518
|
-
var __getOwnPropSymbols$
|
|
519
|
-
var __hasOwnProp$
|
|
520
|
-
var __propIsEnum$
|
|
521
|
-
var __objRest$
|
|
518
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
519
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
520
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
521
|
+
var __objRest$e = (source, exclude) => {
|
|
522
522
|
var target = {};
|
|
523
523
|
for (var prop in source)
|
|
524
|
-
if (__hasOwnProp$
|
|
524
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
525
525
|
target[prop] = source[prop];
|
|
526
|
-
if (source != null && __getOwnPropSymbols$
|
|
527
|
-
for (var prop of __getOwnPropSymbols$
|
|
528
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
526
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
527
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
528
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
529
529
|
target[prop] = source[prop];
|
|
530
530
|
}
|
|
531
531
|
return target;
|
|
@@ -555,7 +555,7 @@ const useUpdateAutoFunding = () => {
|
|
|
555
555
|
const queryClient = reactQuery.useQueryClient();
|
|
556
556
|
return reactQuery.useMutation({
|
|
557
557
|
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
558
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
558
|
+
var _b = _a, { carrierId } = _b, options = __objRest$e(_b, ["carrierId"]);
|
|
559
559
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
560
560
|
return result.data;
|
|
561
561
|
}),
|
|
@@ -616,24 +616,24 @@ const useDeleteCarrier = () => {
|
|
|
616
616
|
});
|
|
617
617
|
};
|
|
618
618
|
|
|
619
|
-
var __getOwnPropSymbols$
|
|
620
|
-
var __hasOwnProp$
|
|
621
|
-
var __propIsEnum$
|
|
622
|
-
var __objRest$
|
|
619
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
620
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
621
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
622
|
+
var __objRest$d = (source, exclude) => {
|
|
623
623
|
var target = {};
|
|
624
624
|
for (var prop in source)
|
|
625
|
-
if (__hasOwnProp$
|
|
625
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
626
626
|
target[prop] = source[prop];
|
|
627
|
-
if (source != null && __getOwnPropSymbols$
|
|
628
|
-
for (var prop of __getOwnPropSymbols$
|
|
629
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
627
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
628
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
629
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
630
630
|
target[prop] = source[prop];
|
|
631
631
|
}
|
|
632
632
|
return target;
|
|
633
633
|
};
|
|
634
634
|
const useGetCarrierConnectionForm = (_params) => {
|
|
635
635
|
const { client } = useShipEngine();
|
|
636
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
636
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$d(_a, ["carrierName", "enabled"]);
|
|
637
637
|
return reactQuery.useQuery({
|
|
638
638
|
enabled,
|
|
639
639
|
onError,
|
|
@@ -643,24 +643,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
643
643
|
});
|
|
644
644
|
};
|
|
645
645
|
|
|
646
|
-
var __getOwnPropSymbols$
|
|
647
|
-
var __hasOwnProp$
|
|
648
|
-
var __propIsEnum$
|
|
649
|
-
var __objRest$
|
|
646
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
647
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
648
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
649
|
+
var __objRest$c = (source, exclude) => {
|
|
650
650
|
var target = {};
|
|
651
651
|
for (var prop in source)
|
|
652
|
-
if (__hasOwnProp$
|
|
652
|
+
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
653
653
|
target[prop] = source[prop];
|
|
654
|
-
if (source != null && __getOwnPropSymbols$
|
|
655
|
-
for (var prop of __getOwnPropSymbols$
|
|
656
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
654
|
+
if (source != null && __getOwnPropSymbols$j)
|
|
655
|
+
for (var prop of __getOwnPropSymbols$j(source)) {
|
|
656
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
|
|
657
657
|
target[prop] = source[prop];
|
|
658
658
|
}
|
|
659
659
|
return target;
|
|
660
660
|
};
|
|
661
661
|
const useListCarrierConnections = (_params) => {
|
|
662
662
|
const { client } = useShipEngine();
|
|
663
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
663
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$c(_a, ["enabled"]);
|
|
664
664
|
return reactQuery.useQuery({
|
|
665
665
|
enabled,
|
|
666
666
|
onError,
|
|
@@ -713,33 +713,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
713
713
|
});
|
|
714
714
|
};
|
|
715
715
|
|
|
716
|
-
var __defProp$
|
|
717
|
-
var __defProps$
|
|
718
|
-
var __getOwnPropDescs$
|
|
719
|
-
var __getOwnPropSymbols$
|
|
720
|
-
var __hasOwnProp$
|
|
721
|
-
var __propIsEnum$
|
|
722
|
-
var __defNormalProp$
|
|
723
|
-
var __spreadValues$
|
|
716
|
+
var __defProp$a = Object.defineProperty;
|
|
717
|
+
var __defProps$a = Object.defineProperties;
|
|
718
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
719
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
720
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
721
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
722
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
723
|
+
var __spreadValues$a = (a, b) => {
|
|
724
724
|
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$
|
|
725
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
726
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
727
|
+
if (__getOwnPropSymbols$i)
|
|
728
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
729
|
+
if (__propIsEnum$i.call(b, prop))
|
|
730
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
731
731
|
}
|
|
732
732
|
return a;
|
|
733
733
|
};
|
|
734
|
-
var __spreadProps$
|
|
735
|
-
var __objRest$
|
|
734
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
735
|
+
var __objRest$b = (source, exclude) => {
|
|
736
736
|
var target = {};
|
|
737
737
|
for (var prop in source)
|
|
738
|
-
if (__hasOwnProp$
|
|
738
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
739
739
|
target[prop] = source[prop];
|
|
740
|
-
if (source != null && __getOwnPropSymbols$
|
|
741
|
-
for (var prop of __getOwnPropSymbols$
|
|
742
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
740
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
741
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
742
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
743
743
|
target[prop] = source[prop];
|
|
744
744
|
}
|
|
745
745
|
return target;
|
|
@@ -747,12 +747,12 @@ var __objRest$a = (source, exclude) => {
|
|
|
747
747
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
748
748
|
var _b = _a, {
|
|
749
749
|
queryFnParams
|
|
750
|
-
} = _b, params = __objRest$
|
|
750
|
+
} = _b, params = __objRest$b(_b, [
|
|
751
751
|
"queryFnParams"
|
|
752
752
|
]);
|
|
753
753
|
const { client } = useShipEngine();
|
|
754
754
|
const { carrierName, carrierCode } = queryFnParams;
|
|
755
|
-
return reactQuery.useQuery(__spreadProps$
|
|
755
|
+
return reactQuery.useQuery(__spreadProps$a(__spreadValues$a({}, params), {
|
|
756
756
|
onError,
|
|
757
757
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
758
758
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
@@ -760,25 +760,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
760
760
|
}));
|
|
761
761
|
};
|
|
762
762
|
|
|
763
|
-
var __defProp$
|
|
764
|
-
var __defProps$
|
|
765
|
-
var __getOwnPropDescs$
|
|
766
|
-
var __getOwnPropSymbols$
|
|
767
|
-
var __hasOwnProp$
|
|
768
|
-
var __propIsEnum$
|
|
769
|
-
var __defNormalProp$
|
|
770
|
-
var __spreadValues$
|
|
763
|
+
var __defProp$9 = Object.defineProperty;
|
|
764
|
+
var __defProps$9 = Object.defineProperties;
|
|
765
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
766
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
767
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
768
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
769
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
770
|
+
var __spreadValues$9 = (a, b) => {
|
|
771
771
|
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$
|
|
772
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
773
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
774
|
+
if (__getOwnPropSymbols$h)
|
|
775
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
776
|
+
if (__propIsEnum$h.call(b, prop))
|
|
777
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
778
778
|
}
|
|
779
779
|
return a;
|
|
780
780
|
};
|
|
781
|
-
var __spreadProps$
|
|
781
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
782
782
|
var __async$w = (__this, __arguments, generator) => {
|
|
783
783
|
return new Promise((resolve, reject) => {
|
|
784
784
|
var fulfilled = (value) => {
|
|
@@ -801,7 +801,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
801
801
|
};
|
|
802
802
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
803
803
|
const { client } = useShipEngine();
|
|
804
|
-
return reactQuery.useMutation(__spreadProps$
|
|
804
|
+
return reactQuery.useMutation(__spreadProps$9(__spreadValues$9({}, params), {
|
|
805
805
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
806
806
|
carrierName,
|
|
807
807
|
carrierCode,
|
|
@@ -1032,17 +1032,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1032
1032
|
});
|
|
1033
1033
|
};
|
|
1034
1034
|
|
|
1035
|
-
var __getOwnPropSymbols$
|
|
1036
|
-
var __hasOwnProp$
|
|
1037
|
-
var __propIsEnum$
|
|
1038
|
-
var __objRest$
|
|
1035
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1036
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1037
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1038
|
+
var __objRest$a = (source, exclude) => {
|
|
1039
1039
|
var target = {};
|
|
1040
1040
|
for (var prop in source)
|
|
1041
|
-
if (__hasOwnProp$
|
|
1041
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1042
1042
|
target[prop] = source[prop];
|
|
1043
|
-
if (source != null && __getOwnPropSymbols$
|
|
1044
|
-
for (var prop of __getOwnPropSymbols$
|
|
1045
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1043
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1044
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1045
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1046
1046
|
target[prop] = source[prop];
|
|
1047
1047
|
}
|
|
1048
1048
|
return target;
|
|
@@ -1071,7 +1071,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1071
1071
|
const { client } = useShipEngine();
|
|
1072
1072
|
return reactQuery.useMutation({
|
|
1073
1073
|
mutationFn: (_a) => __async$r(void 0, null, function* () {
|
|
1074
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1074
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$a(_b, ["insuranceProvider"]);
|
|
1075
1075
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1076
1076
|
return result.data;
|
|
1077
1077
|
}),
|
|
@@ -1080,17 +1080,17 @@ const useAddInsuranceFunds = () => {
|
|
|
1080
1080
|
});
|
|
1081
1081
|
};
|
|
1082
1082
|
|
|
1083
|
-
var __getOwnPropSymbols$
|
|
1084
|
-
var __hasOwnProp$
|
|
1085
|
-
var __propIsEnum$
|
|
1086
|
-
var __objRest$
|
|
1083
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1084
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1085
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1086
|
+
var __objRest$9 = (source, exclude) => {
|
|
1087
1087
|
var target = {};
|
|
1088
1088
|
for (var prop in source)
|
|
1089
|
-
if (__hasOwnProp$
|
|
1089
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1090
1090
|
target[prop] = source[prop];
|
|
1091
|
-
if (source != null && __getOwnPropSymbols$
|
|
1092
|
-
for (var prop of __getOwnPropSymbols$
|
|
1093
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1091
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
1092
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
1093
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
1094
1094
|
target[prop] = source[prop];
|
|
1095
1095
|
}
|
|
1096
1096
|
return target;
|
|
@@ -1119,7 +1119,7 @@ const useCreateLabel = () => {
|
|
|
1119
1119
|
const { client } = useShipEngine();
|
|
1120
1120
|
return reactQuery.useMutation({
|
|
1121
1121
|
mutationFn: (_a) => __async$q(void 0, null, function* () {
|
|
1122
|
-
var _b = _a, { rateId } = _b, options = __objRest$
|
|
1122
|
+
var _b = _a, { rateId } = _b, options = __objRest$9(_b, ["rateId"]);
|
|
1123
1123
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
1124
1124
|
return result.data;
|
|
1125
1125
|
}),
|
|
@@ -1143,24 +1143,24 @@ const useGetLabel = (labelId) => {
|
|
|
1143
1143
|
});
|
|
1144
1144
|
};
|
|
1145
1145
|
|
|
1146
|
-
var __getOwnPropSymbols$
|
|
1147
|
-
var __hasOwnProp$
|
|
1148
|
-
var __propIsEnum$
|
|
1149
|
-
var __objRest$
|
|
1146
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1147
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1148
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1149
|
+
var __objRest$8 = (source, exclude) => {
|
|
1150
1150
|
var target = {};
|
|
1151
1151
|
for (var prop in source)
|
|
1152
|
-
if (__hasOwnProp$
|
|
1152
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1153
1153
|
target[prop] = source[prop];
|
|
1154
|
-
if (source != null && __getOwnPropSymbols$
|
|
1155
|
-
for (var prop of __getOwnPropSymbols$
|
|
1156
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1154
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
1155
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
1156
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
1157
1157
|
target[prop] = source[prop];
|
|
1158
1158
|
}
|
|
1159
1159
|
return target;
|
|
1160
1160
|
};
|
|
1161
1161
|
const useListLabels = (_params) => {
|
|
1162
1162
|
const { client } = useShipEngine();
|
|
1163
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
1163
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
|
|
1164
1164
|
return reactQuery.useQuery({
|
|
1165
1165
|
enabled,
|
|
1166
1166
|
onError,
|
|
@@ -1581,17 +1581,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
1581
1581
|
});
|
|
1582
1582
|
};
|
|
1583
1583
|
|
|
1584
|
-
var __getOwnPropSymbols$
|
|
1585
|
-
var __hasOwnProp$
|
|
1586
|
-
var __propIsEnum$
|
|
1587
|
-
var __objRest$
|
|
1584
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
1585
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
1586
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
1587
|
+
var __objRest$7 = (source, exclude) => {
|
|
1588
1588
|
var target = {};
|
|
1589
1589
|
for (var prop in source)
|
|
1590
|
-
if (__hasOwnProp$
|
|
1590
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1591
1591
|
target[prop] = source[prop];
|
|
1592
|
-
if (source != null && __getOwnPropSymbols$
|
|
1593
|
-
for (var prop of __getOwnPropSymbols$
|
|
1594
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1592
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
1593
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
1594
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
1595
1595
|
target[prop] = source[prop];
|
|
1596
1596
|
}
|
|
1597
1597
|
return target;
|
|
@@ -1620,7 +1620,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1620
1620
|
const { client } = useShipEngine();
|
|
1621
1621
|
return reactQuery.useMutation({
|
|
1622
1622
|
mutationFn: (_a) => __async$f(void 0, null, function* () {
|
|
1623
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
1623
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$7(_b, ["salesOrderId"]);
|
|
1624
1624
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
1625
1625
|
return result.data;
|
|
1626
1626
|
}),
|
|
@@ -1629,17 +1629,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1629
1629
|
});
|
|
1630
1630
|
};
|
|
1631
1631
|
|
|
1632
|
-
var __getOwnPropSymbols$
|
|
1633
|
-
var __hasOwnProp$
|
|
1634
|
-
var __propIsEnum$
|
|
1635
|
-
var __objRest$
|
|
1632
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
1633
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
1634
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
1635
|
+
var __objRest$6 = (source, exclude) => {
|
|
1636
1636
|
var target = {};
|
|
1637
1637
|
for (var prop in source)
|
|
1638
|
-
if (__hasOwnProp$
|
|
1638
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1639
1639
|
target[prop] = source[prop];
|
|
1640
|
-
if (source != null && __getOwnPropSymbols$
|
|
1641
|
-
for (var prop of __getOwnPropSymbols$
|
|
1642
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1640
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
1641
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
1642
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
1643
1643
|
target[prop] = source[prop];
|
|
1644
1644
|
}
|
|
1645
1645
|
return target;
|
|
@@ -1668,7 +1668,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
1668
1668
|
const { client } = useShipEngine();
|
|
1669
1669
|
return reactQuery.useMutation({
|
|
1670
1670
|
mutationFn: (_a) => __async$e(void 0, null, function* () {
|
|
1671
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
1671
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$6(_b, ["salesOrderId"]);
|
|
1672
1672
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
1673
1673
|
return result.data;
|
|
1674
1674
|
}),
|
|
@@ -1703,17 +1703,17 @@ const useListSalesOrderShipments = (params) => {
|
|
|
1703
1703
|
});
|
|
1704
1704
|
};
|
|
1705
1705
|
|
|
1706
|
-
var __getOwnPropSymbols$
|
|
1707
|
-
var __hasOwnProp$
|
|
1708
|
-
var __propIsEnum$
|
|
1709
|
-
var __objRest$
|
|
1706
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
1707
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
1708
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
1709
|
+
var __objRest$5 = (source, exclude) => {
|
|
1710
1710
|
var target = {};
|
|
1711
1711
|
for (var prop in source)
|
|
1712
|
-
if (__hasOwnProp$
|
|
1712
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1713
1713
|
target[prop] = source[prop];
|
|
1714
|
-
if (source != null && __getOwnPropSymbols$
|
|
1715
|
-
for (var prop of __getOwnPropSymbols$
|
|
1716
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1714
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
1715
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
1716
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
1717
1717
|
target[prop] = source[prop];
|
|
1718
1718
|
}
|
|
1719
1719
|
return target;
|
|
@@ -1742,7 +1742,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1742
1742
|
const { client } = useShipEngine();
|
|
1743
1743
|
return reactQuery.useMutation({
|
|
1744
1744
|
mutationFn: (_a) => __async$d(void 0, null, function* () {
|
|
1745
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
1745
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$5(_b, ["shipmentId"]);
|
|
1746
1746
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
1747
1747
|
return result.data;
|
|
1748
1748
|
}),
|
|
@@ -1751,25 +1751,25 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1751
1751
|
});
|
|
1752
1752
|
};
|
|
1753
1753
|
|
|
1754
|
-
var __defProp$
|
|
1755
|
-
var __defProps$
|
|
1756
|
-
var __getOwnPropDescs$
|
|
1757
|
-
var __getOwnPropSymbols$
|
|
1758
|
-
var __hasOwnProp$
|
|
1759
|
-
var __propIsEnum$
|
|
1760
|
-
var __defNormalProp$
|
|
1761
|
-
var __spreadValues$
|
|
1754
|
+
var __defProp$8 = Object.defineProperty;
|
|
1755
|
+
var __defProps$8 = Object.defineProperties;
|
|
1756
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1757
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1758
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1759
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1760
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1761
|
+
var __spreadValues$8 = (a, b) => {
|
|
1762
1762
|
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$
|
|
1763
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1764
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1765
|
+
if (__getOwnPropSymbols$a)
|
|
1766
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1767
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1768
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1769
1769
|
}
|
|
1770
1770
|
return a;
|
|
1771
1771
|
};
|
|
1772
|
-
var __spreadProps$
|
|
1772
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1773
1773
|
var __async$c = (__this, __arguments, generator) => {
|
|
1774
1774
|
return new Promise((resolve, reject) => {
|
|
1775
1775
|
var fulfilled = (value) => {
|
|
@@ -1811,7 +1811,7 @@ const useCreateShipment = () => {
|
|
|
1811
1811
|
postalCode: "",
|
|
1812
1812
|
stateProvince: ""
|
|
1813
1813
|
};
|
|
1814
|
-
return (yield client.shipments.create(__spreadProps$
|
|
1814
|
+
return (yield client.shipments.create(__spreadProps$8(__spreadValues$8({}, shipment), {
|
|
1815
1815
|
shipTo
|
|
1816
1816
|
}))).data;
|
|
1817
1817
|
}),
|
|
@@ -1836,9 +1836,49 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
|
|
|
1836
1836
|
});
|
|
1837
1837
|
};
|
|
1838
1838
|
|
|
1839
|
-
|
|
1839
|
+
var __defProp$7 = Object.defineProperty;
|
|
1840
|
+
var __defProps$7 = Object.defineProperties;
|
|
1841
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1842
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1843
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1844
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1845
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1846
|
+
var __spreadValues$7 = (a, b) => {
|
|
1847
|
+
for (var prop in b || (b = {}))
|
|
1848
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1849
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1850
|
+
if (__getOwnPropSymbols$9)
|
|
1851
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1852
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1853
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1854
|
+
}
|
|
1855
|
+
return a;
|
|
1856
|
+
};
|
|
1857
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1858
|
+
var __objRest$4 = (source, exclude) => {
|
|
1859
|
+
var target = {};
|
|
1860
|
+
for (var prop in source)
|
|
1861
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1862
|
+
target[prop] = source[prop];
|
|
1863
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
1864
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
1865
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
1866
|
+
target[prop] = source[prop];
|
|
1867
|
+
}
|
|
1868
|
+
return target;
|
|
1869
|
+
};
|
|
1870
|
+
const useGetShipment = (params) => {
|
|
1871
|
+
var _a;
|
|
1840
1872
|
const { client } = useShipEngine();
|
|
1841
|
-
|
|
1873
|
+
const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
|
|
1874
|
+
const getQueryProps = () => {
|
|
1875
|
+
if (typeof params !== "string") {
|
|
1876
|
+
const _a2 = params, rest = __objRest$4(_a2, ["queryFnParams"]);
|
|
1877
|
+
return rest;
|
|
1878
|
+
}
|
|
1879
|
+
return {};
|
|
1880
|
+
};
|
|
1881
|
+
return reactQuery.useQuery(__spreadProps$7(__spreadValues$7({}, getQueryProps()), {
|
|
1842
1882
|
enabled: shipmentId !== void 0,
|
|
1843
1883
|
onError,
|
|
1844
1884
|
queryFn: () => {
|
|
@@ -1849,7 +1889,7 @@ const useGetShipment = (shipmentId) => {
|
|
|
1849
1889
|
},
|
|
1850
1890
|
queryKey: ["useGetShipment", shipmentId],
|
|
1851
1891
|
select: (result) => result.data
|
|
1852
|
-
});
|
|
1892
|
+
}));
|
|
1853
1893
|
};
|
|
1854
1894
|
|
|
1855
1895
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
package/index.mjs
CHANGED
|
@@ -74,25 +74,25 @@ const onError = (_errors) => _default();
|
|
|
74
74
|
|
|
75
75
|
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}();
|
|
76
76
|
|
|
77
|
-
var __defProp$
|
|
78
|
-
var __defProps$
|
|
79
|
-
var __getOwnPropDescs$
|
|
80
|
-
var __getOwnPropSymbols$
|
|
81
|
-
var __hasOwnProp$
|
|
82
|
-
var __propIsEnum$
|
|
83
|
-
var __defNormalProp$
|
|
84
|
-
var __spreadValues$
|
|
77
|
+
var __defProp$b = Object.defineProperty;
|
|
78
|
+
var __defProps$b = Object.defineProperties;
|
|
79
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
80
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
81
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
82
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
83
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
84
|
+
var __spreadValues$b = (a, b) => {
|
|
85
85
|
for (var prop in b || (b = {}))
|
|
86
|
-
if (__hasOwnProp$
|
|
87
|
-
__defNormalProp$
|
|
88
|
-
if (__getOwnPropSymbols$
|
|
89
|
-
for (var prop of __getOwnPropSymbols$
|
|
90
|
-
if (__propIsEnum$
|
|
91
|
-
__defNormalProp$
|
|
86
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
87
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
88
|
+
if (__getOwnPropSymbols$m)
|
|
89
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
90
|
+
if (__propIsEnum$m.call(b, prop))
|
|
91
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
92
92
|
}
|
|
93
93
|
return a;
|
|
94
94
|
};
|
|
95
|
-
var __spreadProps$
|
|
95
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
96
96
|
const streams = [];
|
|
97
97
|
if (process.env.NODE_ENV === "production") {
|
|
98
98
|
streams.push({
|
|
@@ -101,7 +101,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
101
101
|
}
|
|
102
102
|
const logger = E({
|
|
103
103
|
name: "shipengine",
|
|
104
|
-
serializers: __spreadProps$
|
|
104
|
+
serializers: __spreadProps$b(__spreadValues$b({}, k), {
|
|
105
105
|
req: (req) => ({
|
|
106
106
|
headers: req.headers,
|
|
107
107
|
method: req.method,
|
|
@@ -512,17 +512,17 @@ const useListCarriers = () => {
|
|
|
512
512
|
});
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
-
var __getOwnPropSymbols$
|
|
516
|
-
var __hasOwnProp$
|
|
517
|
-
var __propIsEnum$
|
|
518
|
-
var __objRest$
|
|
515
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
516
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
517
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
518
|
+
var __objRest$e = (source, exclude) => {
|
|
519
519
|
var target = {};
|
|
520
520
|
for (var prop in source)
|
|
521
|
-
if (__hasOwnProp$
|
|
521
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
522
522
|
target[prop] = source[prop];
|
|
523
|
-
if (source != null && __getOwnPropSymbols$
|
|
524
|
-
for (var prop of __getOwnPropSymbols$
|
|
525
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
523
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
524
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
525
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
526
526
|
target[prop] = source[prop];
|
|
527
527
|
}
|
|
528
528
|
return target;
|
|
@@ -552,7 +552,7 @@ const useUpdateAutoFunding = () => {
|
|
|
552
552
|
const queryClient = useQueryClient();
|
|
553
553
|
return useMutation({
|
|
554
554
|
mutationFn: (_a) => __async$z(void 0, null, function* () {
|
|
555
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
555
|
+
var _b = _a, { carrierId } = _b, options = __objRest$e(_b, ["carrierId"]);
|
|
556
556
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
557
557
|
return result.data;
|
|
558
558
|
}),
|
|
@@ -613,24 +613,24 @@ const useDeleteCarrier = () => {
|
|
|
613
613
|
});
|
|
614
614
|
};
|
|
615
615
|
|
|
616
|
-
var __getOwnPropSymbols$
|
|
617
|
-
var __hasOwnProp$
|
|
618
|
-
var __propIsEnum$
|
|
619
|
-
var __objRest$
|
|
616
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
617
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
618
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
619
|
+
var __objRest$d = (source, exclude) => {
|
|
620
620
|
var target = {};
|
|
621
621
|
for (var prop in source)
|
|
622
|
-
if (__hasOwnProp$
|
|
622
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
623
623
|
target[prop] = source[prop];
|
|
624
|
-
if (source != null && __getOwnPropSymbols$
|
|
625
|
-
for (var prop of __getOwnPropSymbols$
|
|
626
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
624
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
625
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
626
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
627
627
|
target[prop] = source[prop];
|
|
628
628
|
}
|
|
629
629
|
return target;
|
|
630
630
|
};
|
|
631
631
|
const useGetCarrierConnectionForm = (_params) => {
|
|
632
632
|
const { client } = useShipEngine();
|
|
633
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
633
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$d(_a, ["carrierName", "enabled"]);
|
|
634
634
|
return useQuery({
|
|
635
635
|
enabled,
|
|
636
636
|
onError,
|
|
@@ -640,24 +640,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
642
|
|
|
643
|
-
var __getOwnPropSymbols$
|
|
644
|
-
var __hasOwnProp$
|
|
645
|
-
var __propIsEnum$
|
|
646
|
-
var __objRest$
|
|
643
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
644
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
645
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
646
|
+
var __objRest$c = (source, exclude) => {
|
|
647
647
|
var target = {};
|
|
648
648
|
for (var prop in source)
|
|
649
|
-
if (__hasOwnProp$
|
|
649
|
+
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
650
650
|
target[prop] = source[prop];
|
|
651
|
-
if (source != null && __getOwnPropSymbols$
|
|
652
|
-
for (var prop of __getOwnPropSymbols$
|
|
653
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
651
|
+
if (source != null && __getOwnPropSymbols$j)
|
|
652
|
+
for (var prop of __getOwnPropSymbols$j(source)) {
|
|
653
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
|
|
654
654
|
target[prop] = source[prop];
|
|
655
655
|
}
|
|
656
656
|
return target;
|
|
657
657
|
};
|
|
658
658
|
const useListCarrierConnections = (_params) => {
|
|
659
659
|
const { client } = useShipEngine();
|
|
660
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
660
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$c(_a, ["enabled"]);
|
|
661
661
|
return useQuery({
|
|
662
662
|
enabled,
|
|
663
663
|
onError,
|
|
@@ -710,33 +710,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
710
710
|
});
|
|
711
711
|
};
|
|
712
712
|
|
|
713
|
-
var __defProp$
|
|
714
|
-
var __defProps$
|
|
715
|
-
var __getOwnPropDescs$
|
|
716
|
-
var __getOwnPropSymbols$
|
|
717
|
-
var __hasOwnProp$
|
|
718
|
-
var __propIsEnum$
|
|
719
|
-
var __defNormalProp$
|
|
720
|
-
var __spreadValues$
|
|
713
|
+
var __defProp$a = Object.defineProperty;
|
|
714
|
+
var __defProps$a = Object.defineProperties;
|
|
715
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
716
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
717
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
718
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
719
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
720
|
+
var __spreadValues$a = (a, b) => {
|
|
721
721
|
for (var prop in b || (b = {}))
|
|
722
|
-
if (__hasOwnProp$
|
|
723
|
-
__defNormalProp$
|
|
724
|
-
if (__getOwnPropSymbols$
|
|
725
|
-
for (var prop of __getOwnPropSymbols$
|
|
726
|
-
if (__propIsEnum$
|
|
727
|
-
__defNormalProp$
|
|
722
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
723
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
724
|
+
if (__getOwnPropSymbols$i)
|
|
725
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
726
|
+
if (__propIsEnum$i.call(b, prop))
|
|
727
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
728
728
|
}
|
|
729
729
|
return a;
|
|
730
730
|
};
|
|
731
|
-
var __spreadProps$
|
|
732
|
-
var __objRest$
|
|
731
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
732
|
+
var __objRest$b = (source, exclude) => {
|
|
733
733
|
var target = {};
|
|
734
734
|
for (var prop in source)
|
|
735
|
-
if (__hasOwnProp$
|
|
735
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
736
736
|
target[prop] = source[prop];
|
|
737
|
-
if (source != null && __getOwnPropSymbols$
|
|
738
|
-
for (var prop of __getOwnPropSymbols$
|
|
739
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
737
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
738
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
739
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
740
740
|
target[prop] = source[prop];
|
|
741
741
|
}
|
|
742
742
|
return target;
|
|
@@ -744,12 +744,12 @@ var __objRest$a = (source, exclude) => {
|
|
|
744
744
|
const useGetConnectionsCarrierSettings = (_a) => {
|
|
745
745
|
var _b = _a, {
|
|
746
746
|
queryFnParams
|
|
747
|
-
} = _b, params = __objRest$
|
|
747
|
+
} = _b, params = __objRest$b(_b, [
|
|
748
748
|
"queryFnParams"
|
|
749
749
|
]);
|
|
750
750
|
const { client } = useShipEngine();
|
|
751
751
|
const { carrierName, carrierCode } = queryFnParams;
|
|
752
|
-
return useQuery(__spreadProps$
|
|
752
|
+
return useQuery(__spreadProps$a(__spreadValues$a({}, params), {
|
|
753
753
|
onError,
|
|
754
754
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
755
755
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
@@ -757,25 +757,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
757
757
|
}));
|
|
758
758
|
};
|
|
759
759
|
|
|
760
|
-
var __defProp$
|
|
761
|
-
var __defProps$
|
|
762
|
-
var __getOwnPropDescs$
|
|
763
|
-
var __getOwnPropSymbols$
|
|
764
|
-
var __hasOwnProp$
|
|
765
|
-
var __propIsEnum$
|
|
766
|
-
var __defNormalProp$
|
|
767
|
-
var __spreadValues$
|
|
760
|
+
var __defProp$9 = Object.defineProperty;
|
|
761
|
+
var __defProps$9 = Object.defineProperties;
|
|
762
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
763
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
764
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
765
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
766
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
767
|
+
var __spreadValues$9 = (a, b) => {
|
|
768
768
|
for (var prop in b || (b = {}))
|
|
769
|
-
if (__hasOwnProp$
|
|
770
|
-
__defNormalProp$
|
|
771
|
-
if (__getOwnPropSymbols$
|
|
772
|
-
for (var prop of __getOwnPropSymbols$
|
|
773
|
-
if (__propIsEnum$
|
|
774
|
-
__defNormalProp$
|
|
769
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
770
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
771
|
+
if (__getOwnPropSymbols$h)
|
|
772
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
773
|
+
if (__propIsEnum$h.call(b, prop))
|
|
774
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
775
775
|
}
|
|
776
776
|
return a;
|
|
777
777
|
};
|
|
778
|
-
var __spreadProps$
|
|
778
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
779
779
|
var __async$w = (__this, __arguments, generator) => {
|
|
780
780
|
return new Promise((resolve, reject) => {
|
|
781
781
|
var fulfilled = (value) => {
|
|
@@ -798,7 +798,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
798
798
|
};
|
|
799
799
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
800
800
|
const { client } = useShipEngine();
|
|
801
|
-
return useMutation(__spreadProps$
|
|
801
|
+
return useMutation(__spreadProps$9(__spreadValues$9({}, params), {
|
|
802
802
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
803
803
|
carrierName,
|
|
804
804
|
carrierCode,
|
|
@@ -1029,17 +1029,17 @@ const useGetInsuranceAccount = (insuranceProvider) => {
|
|
|
1029
1029
|
});
|
|
1030
1030
|
};
|
|
1031
1031
|
|
|
1032
|
-
var __getOwnPropSymbols$
|
|
1033
|
-
var __hasOwnProp$
|
|
1034
|
-
var __propIsEnum$
|
|
1035
|
-
var __objRest$
|
|
1032
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1033
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1034
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1035
|
+
var __objRest$a = (source, exclude) => {
|
|
1036
1036
|
var target = {};
|
|
1037
1037
|
for (var prop in source)
|
|
1038
|
-
if (__hasOwnProp$
|
|
1038
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1039
1039
|
target[prop] = source[prop];
|
|
1040
|
-
if (source != null && __getOwnPropSymbols$
|
|
1041
|
-
for (var prop of __getOwnPropSymbols$
|
|
1042
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1040
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1041
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1042
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1043
1043
|
target[prop] = source[prop];
|
|
1044
1044
|
}
|
|
1045
1045
|
return target;
|
|
@@ -1068,7 +1068,7 @@ const useAddInsuranceFunds = () => {
|
|
|
1068
1068
|
const { client } = useShipEngine();
|
|
1069
1069
|
return useMutation({
|
|
1070
1070
|
mutationFn: (_a) => __async$r(void 0, null, function* () {
|
|
1071
|
-
var _b = _a, { insuranceProvider } = _b, rest = __objRest$
|
|
1071
|
+
var _b = _a, { insuranceProvider } = _b, rest = __objRest$a(_b, ["insuranceProvider"]);
|
|
1072
1072
|
const result = yield client.insurance.addFunds(insuranceProvider, rest);
|
|
1073
1073
|
return result.data;
|
|
1074
1074
|
}),
|
|
@@ -1077,17 +1077,17 @@ const useAddInsuranceFunds = () => {
|
|
|
1077
1077
|
});
|
|
1078
1078
|
};
|
|
1079
1079
|
|
|
1080
|
-
var __getOwnPropSymbols$
|
|
1081
|
-
var __hasOwnProp$
|
|
1082
|
-
var __propIsEnum$
|
|
1083
|
-
var __objRest$
|
|
1080
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
1081
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
1082
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
1083
|
+
var __objRest$9 = (source, exclude) => {
|
|
1084
1084
|
var target = {};
|
|
1085
1085
|
for (var prop in source)
|
|
1086
|
-
if (__hasOwnProp$
|
|
1086
|
+
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1087
1087
|
target[prop] = source[prop];
|
|
1088
|
-
if (source != null && __getOwnPropSymbols$
|
|
1089
|
-
for (var prop of __getOwnPropSymbols$
|
|
1090
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1088
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
1089
|
+
for (var prop of __getOwnPropSymbols$f(source)) {
|
|
1090
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
|
|
1091
1091
|
target[prop] = source[prop];
|
|
1092
1092
|
}
|
|
1093
1093
|
return target;
|
|
@@ -1116,7 +1116,7 @@ const useCreateLabel = () => {
|
|
|
1116
1116
|
const { client } = useShipEngine();
|
|
1117
1117
|
return useMutation({
|
|
1118
1118
|
mutationFn: (_a) => __async$q(void 0, null, function* () {
|
|
1119
|
-
var _b = _a, { rateId } = _b, options = __objRest$
|
|
1119
|
+
var _b = _a, { rateId } = _b, options = __objRest$9(_b, ["rateId"]);
|
|
1120
1120
|
const result = yield client.labels.createByRateId(rateId, options);
|
|
1121
1121
|
return result.data;
|
|
1122
1122
|
}),
|
|
@@ -1140,24 +1140,24 @@ const useGetLabel = (labelId) => {
|
|
|
1140
1140
|
});
|
|
1141
1141
|
};
|
|
1142
1142
|
|
|
1143
|
-
var __getOwnPropSymbols$
|
|
1144
|
-
var __hasOwnProp$
|
|
1145
|
-
var __propIsEnum$
|
|
1146
|
-
var __objRest$
|
|
1143
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
1144
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
1145
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
1146
|
+
var __objRest$8 = (source, exclude) => {
|
|
1147
1147
|
var target = {};
|
|
1148
1148
|
for (var prop in source)
|
|
1149
|
-
if (__hasOwnProp$
|
|
1149
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1150
1150
|
target[prop] = source[prop];
|
|
1151
|
-
if (source != null && __getOwnPropSymbols$
|
|
1152
|
-
for (var prop of __getOwnPropSymbols$
|
|
1153
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1151
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
1152
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
1153
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
1154
1154
|
target[prop] = source[prop];
|
|
1155
1155
|
}
|
|
1156
1156
|
return target;
|
|
1157
1157
|
};
|
|
1158
1158
|
const useListLabels = (_params) => {
|
|
1159
1159
|
const { client } = useShipEngine();
|
|
1160
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
1160
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$8(_a, ["enabled"]);
|
|
1161
1161
|
return useQuery({
|
|
1162
1162
|
enabled,
|
|
1163
1163
|
onError,
|
|
@@ -1578,17 +1578,17 @@ const useListSalesOrders = (params = {}) => {
|
|
|
1578
1578
|
});
|
|
1579
1579
|
};
|
|
1580
1580
|
|
|
1581
|
-
var __getOwnPropSymbols$
|
|
1582
|
-
var __hasOwnProp$
|
|
1583
|
-
var __propIsEnum$
|
|
1584
|
-
var __objRest$
|
|
1581
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
1582
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
1583
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
1584
|
+
var __objRest$7 = (source, exclude) => {
|
|
1585
1585
|
var target = {};
|
|
1586
1586
|
for (var prop in source)
|
|
1587
|
-
if (__hasOwnProp$
|
|
1587
|
+
if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1588
1588
|
target[prop] = source[prop];
|
|
1589
|
-
if (source != null && __getOwnPropSymbols$
|
|
1590
|
-
for (var prop of __getOwnPropSymbols$
|
|
1591
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1589
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
1590
|
+
for (var prop of __getOwnPropSymbols$d(source)) {
|
|
1591
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
|
|
1592
1592
|
target[prop] = source[prop];
|
|
1593
1593
|
}
|
|
1594
1594
|
return target;
|
|
@@ -1617,7 +1617,7 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1617
1617
|
const { client } = useShipEngine();
|
|
1618
1618
|
return useMutation({
|
|
1619
1619
|
mutationFn: (_a) => __async$f(void 0, null, function* () {
|
|
1620
|
-
var _b = _a, { salesOrderId } = _b, tracking = __objRest$
|
|
1620
|
+
var _b = _a, { salesOrderId } = _b, tracking = __objRest$7(_b, ["salesOrderId"]);
|
|
1621
1621
|
const result = yield client.salesOrders.notifyShipped(salesOrderId, tracking);
|
|
1622
1622
|
return result.data;
|
|
1623
1623
|
}),
|
|
@@ -1626,17 +1626,17 @@ const useNotifySalesOrderShipped = () => {
|
|
|
1626
1626
|
});
|
|
1627
1627
|
};
|
|
1628
1628
|
|
|
1629
|
-
var __getOwnPropSymbols$
|
|
1630
|
-
var __hasOwnProp$
|
|
1631
|
-
var __propIsEnum$
|
|
1632
|
-
var __objRest$
|
|
1629
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
1630
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
1631
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
1632
|
+
var __objRest$6 = (source, exclude) => {
|
|
1633
1633
|
var target = {};
|
|
1634
1634
|
for (var prop in source)
|
|
1635
|
-
if (__hasOwnProp$
|
|
1635
|
+
if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1636
1636
|
target[prop] = source[prop];
|
|
1637
|
-
if (source != null && __getOwnPropSymbols$
|
|
1638
|
-
for (var prop of __getOwnPropSymbols$
|
|
1639
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1637
|
+
if (source != null && __getOwnPropSymbols$c)
|
|
1638
|
+
for (var prop of __getOwnPropSymbols$c(source)) {
|
|
1639
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
|
|
1640
1640
|
target[prop] = source[prop];
|
|
1641
1641
|
}
|
|
1642
1642
|
return target;
|
|
@@ -1665,7 +1665,7 @@ const useCreateSalesOrderShipment = () => {
|
|
|
1665
1665
|
const { client } = useShipEngine();
|
|
1666
1666
|
return useMutation({
|
|
1667
1667
|
mutationFn: (_a) => __async$e(void 0, null, function* () {
|
|
1668
|
-
var _b = _a, { salesOrderId } = _b, shipment = __objRest$
|
|
1668
|
+
var _b = _a, { salesOrderId } = _b, shipment = __objRest$6(_b, ["salesOrderId"]);
|
|
1669
1669
|
const result = yield client.salesOrderShipments.create(salesOrderId, shipment);
|
|
1670
1670
|
return result.data;
|
|
1671
1671
|
}),
|
|
@@ -1700,17 +1700,17 @@ const useListSalesOrderShipments = (params) => {
|
|
|
1700
1700
|
});
|
|
1701
1701
|
};
|
|
1702
1702
|
|
|
1703
|
-
var __getOwnPropSymbols$
|
|
1704
|
-
var __hasOwnProp$
|
|
1705
|
-
var __propIsEnum$
|
|
1706
|
-
var __objRest$
|
|
1703
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
1704
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
1705
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
1706
|
+
var __objRest$5 = (source, exclude) => {
|
|
1707
1707
|
var target = {};
|
|
1708
1708
|
for (var prop in source)
|
|
1709
|
-
if (__hasOwnProp$
|
|
1709
|
+
if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1710
1710
|
target[prop] = source[prop];
|
|
1711
|
-
if (source != null && __getOwnPropSymbols$
|
|
1712
|
-
for (var prop of __getOwnPropSymbols$
|
|
1713
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1711
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
1712
|
+
for (var prop of __getOwnPropSymbols$b(source)) {
|
|
1713
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop))
|
|
1714
1714
|
target[prop] = source[prop];
|
|
1715
1715
|
}
|
|
1716
1716
|
return target;
|
|
@@ -1739,7 +1739,7 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1739
1739
|
const { client } = useShipEngine();
|
|
1740
1740
|
return useMutation({
|
|
1741
1741
|
mutationFn: (_a) => __async$d(void 0, null, function* () {
|
|
1742
|
-
var _b = _a, { shipmentId } = _b, shipment = __objRest$
|
|
1742
|
+
var _b = _a, { shipmentId } = _b, shipment = __objRest$5(_b, ["shipmentId"]);
|
|
1743
1743
|
const result = yield client.salesOrderShipments.update(shipmentId, shipment);
|
|
1744
1744
|
return result.data;
|
|
1745
1745
|
}),
|
|
@@ -1748,25 +1748,25 @@ const useUpdateSalesOrderShipment = () => {
|
|
|
1748
1748
|
});
|
|
1749
1749
|
};
|
|
1750
1750
|
|
|
1751
|
-
var __defProp$
|
|
1752
|
-
var __defProps$
|
|
1753
|
-
var __getOwnPropDescs$
|
|
1754
|
-
var __getOwnPropSymbols$
|
|
1755
|
-
var __hasOwnProp$
|
|
1756
|
-
var __propIsEnum$
|
|
1757
|
-
var __defNormalProp$
|
|
1758
|
-
var __spreadValues$
|
|
1751
|
+
var __defProp$8 = Object.defineProperty;
|
|
1752
|
+
var __defProps$8 = Object.defineProperties;
|
|
1753
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1754
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
1755
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
1756
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
1757
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1758
|
+
var __spreadValues$8 = (a, b) => {
|
|
1759
1759
|
for (var prop in b || (b = {}))
|
|
1760
|
-
if (__hasOwnProp$
|
|
1761
|
-
__defNormalProp$
|
|
1762
|
-
if (__getOwnPropSymbols$
|
|
1763
|
-
for (var prop of __getOwnPropSymbols$
|
|
1764
|
-
if (__propIsEnum$
|
|
1765
|
-
__defNormalProp$
|
|
1760
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
1761
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1762
|
+
if (__getOwnPropSymbols$a)
|
|
1763
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
1764
|
+
if (__propIsEnum$a.call(b, prop))
|
|
1765
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
1766
1766
|
}
|
|
1767
1767
|
return a;
|
|
1768
1768
|
};
|
|
1769
|
-
var __spreadProps$
|
|
1769
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
1770
1770
|
var __async$c = (__this, __arguments, generator) => {
|
|
1771
1771
|
return new Promise((resolve, reject) => {
|
|
1772
1772
|
var fulfilled = (value) => {
|
|
@@ -1808,7 +1808,7 @@ const useCreateShipment = () => {
|
|
|
1808
1808
|
postalCode: "",
|
|
1809
1809
|
stateProvince: ""
|
|
1810
1810
|
};
|
|
1811
|
-
return (yield client.shipments.create(__spreadProps$
|
|
1811
|
+
return (yield client.shipments.create(__spreadProps$8(__spreadValues$8({}, shipment), {
|
|
1812
1812
|
shipTo
|
|
1813
1813
|
}))).data;
|
|
1814
1814
|
}),
|
|
@@ -1833,9 +1833,49 @@ const useGetShipmentRates = (shipmentId, createdAtStart) => {
|
|
|
1833
1833
|
});
|
|
1834
1834
|
};
|
|
1835
1835
|
|
|
1836
|
-
|
|
1836
|
+
var __defProp$7 = Object.defineProperty;
|
|
1837
|
+
var __defProps$7 = Object.defineProperties;
|
|
1838
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1839
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
1840
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
1841
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
1842
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1843
|
+
var __spreadValues$7 = (a, b) => {
|
|
1844
|
+
for (var prop in b || (b = {}))
|
|
1845
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
1846
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1847
|
+
if (__getOwnPropSymbols$9)
|
|
1848
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
1849
|
+
if (__propIsEnum$9.call(b, prop))
|
|
1850
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
1851
|
+
}
|
|
1852
|
+
return a;
|
|
1853
|
+
};
|
|
1854
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
1855
|
+
var __objRest$4 = (source, exclude) => {
|
|
1856
|
+
var target = {};
|
|
1857
|
+
for (var prop in source)
|
|
1858
|
+
if (__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1859
|
+
target[prop] = source[prop];
|
|
1860
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
1861
|
+
for (var prop of __getOwnPropSymbols$9(source)) {
|
|
1862
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop))
|
|
1863
|
+
target[prop] = source[prop];
|
|
1864
|
+
}
|
|
1865
|
+
return target;
|
|
1866
|
+
};
|
|
1867
|
+
const useGetShipment = (params) => {
|
|
1868
|
+
var _a;
|
|
1837
1869
|
const { client } = useShipEngine();
|
|
1838
|
-
|
|
1870
|
+
const shipmentId = typeof params === "string" ? params : (_a = params == null ? void 0 : params.queryFnParams) == null ? void 0 : _a.shipmentId;
|
|
1871
|
+
const getQueryProps = () => {
|
|
1872
|
+
if (typeof params !== "string") {
|
|
1873
|
+
const _a2 = params, rest = __objRest$4(_a2, ["queryFnParams"]);
|
|
1874
|
+
return rest;
|
|
1875
|
+
}
|
|
1876
|
+
return {};
|
|
1877
|
+
};
|
|
1878
|
+
return useQuery(__spreadProps$7(__spreadValues$7({}, getQueryProps()), {
|
|
1839
1879
|
enabled: shipmentId !== void 0,
|
|
1840
1880
|
onError,
|
|
1841
1881
|
queryFn: () => {
|
|
@@ -1846,7 +1886,7 @@ const useGetShipment = (shipmentId) => {
|
|
|
1846
1886
|
},
|
|
1847
1887
|
queryKey: ["useGetShipment", shipmentId],
|
|
1848
1888
|
select: (result) => result.data
|
|
1849
|
-
});
|
|
1889
|
+
}));
|
|
1850
1890
|
};
|
|
1851
1891
|
|
|
1852
1892
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
package/package.json
CHANGED
package/utilities/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { CodedError } from "@shipengine/js-api";
|
|
|
9
9
|
*/
|
|
10
10
|
export type QueryProps<TResponseData, TQueryFnParams = unknown> = {
|
|
11
11
|
queryFnParams?: TQueryFnParams;
|
|
12
|
-
} & Pick<UseQueryOptions<AxiosResponse<TResponseData, any>, CodedError[], TResponseData>, "cacheTime" | "enabled" | "staleTime">;
|
|
12
|
+
} & Pick<UseQueryOptions<AxiosResponse<TResponseData, any>, CodedError[], TResponseData>, "cacheTime" | "enabled" | "staleTime" | "retry">;
|
|
13
13
|
/**
|
|
14
14
|
* @category Entities
|
|
15
15
|
* Generic object type to be used in any useQuery hook
|