@shipengine/react-api 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/labels/use-list-labels.d.ts +3 -4
- package/index.js +58 -43
- package/index.mjs +58 -43
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ListLabelsParams } from "@shipengine/js-api";
|
|
1
|
+
import { ListLabelsParams, ListLabelsResult } from "@shipengine/js-api";
|
|
2
|
+
import { QueryPropsRequiredParams } from "../../utilities";
|
|
2
3
|
/**
|
|
3
4
|
* @category ShipEngine API Hooks
|
|
4
5
|
*
|
|
5
6
|
* @see [ShipEngine Developer Docs](https://www.shipengine.com/docs/reference/list-labels/)
|
|
6
7
|
* @see [ShipEngine API Reference](https://shipengine.github.io/shipengine-openapi/#operation/list_labels)
|
|
7
8
|
*/
|
|
8
|
-
export declare const useListLabels: (
|
|
9
|
-
enabled?: boolean;
|
|
10
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("@shipengine/js-api").ListLabelsResult, import("@shipengine/js-api").CodedError[]>;
|
|
9
|
+
export declare const useListLabels: (params: QueryPropsRequiredParams<ListLabelsResult, ListLabelsParams>) => import("@tanstack/react-query").UseQueryResult<ListLabelsResult, import("@shipengine/js-api").CodedError[]>;
|
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$
|
|
82
|
+
var __defProp$g = Object.defineProperty;
|
|
83
|
+
var __defProps$g = Object.defineProperties;
|
|
84
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
85
85
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
86
86
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
87
87
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
88
|
-
var __defNormalProp$
|
|
89
|
-
var __spreadValues$
|
|
88
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
89
|
+
var __spreadValues$g = (a, b) => {
|
|
90
90
|
for (var prop in b || (b = {}))
|
|
91
91
|
if (__hasOwnProp$q.call(b, prop))
|
|
92
|
-
__defNormalProp$
|
|
92
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
93
93
|
if (__getOwnPropSymbols$q)
|
|
94
94
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
95
95
|
if (__propIsEnum$q.call(b, prop))
|
|
96
|
-
__defNormalProp$
|
|
96
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
97
97
|
}
|
|
98
98
|
return a;
|
|
99
99
|
};
|
|
100
|
-
var __spreadProps$
|
|
100
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(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$g(__spreadValues$g({}, k), {
|
|
110
110
|
req: (req) => ({
|
|
111
111
|
headers: req.headers,
|
|
112
112
|
method: req.method,
|
|
@@ -507,25 +507,25 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
-
var __defProp$
|
|
511
|
-
var __defProps$
|
|
512
|
-
var __getOwnPropDescs$
|
|
510
|
+
var __defProp$f = Object.defineProperty;
|
|
511
|
+
var __defProps$f = Object.defineProperties;
|
|
512
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
513
513
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
514
514
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
515
515
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
516
|
-
var __defNormalProp$
|
|
517
|
-
var __spreadValues$
|
|
516
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
517
|
+
var __spreadValues$f = (a, b) => {
|
|
518
518
|
for (var prop in b || (b = {}))
|
|
519
519
|
if (__hasOwnProp$p.call(b, prop))
|
|
520
|
-
__defNormalProp$
|
|
520
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
521
521
|
if (__getOwnPropSymbols$p)
|
|
522
522
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
523
523
|
if (__propIsEnum$p.call(b, prop))
|
|
524
|
-
__defNormalProp$
|
|
524
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
525
525
|
}
|
|
526
526
|
return a;
|
|
527
527
|
};
|
|
528
|
-
var __spreadProps$
|
|
528
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
529
529
|
var __objRest$j = (source, exclude) => {
|
|
530
530
|
var target = {};
|
|
531
531
|
for (var prop in source)
|
|
@@ -540,8 +540,8 @@ var __objRest$j = (source, exclude) => {
|
|
|
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$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
|
|
544
|
+
return reactQuery.useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
|
|
545
545
|
onError,
|
|
546
546
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
547
547
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -747,25 +747,25 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
747
747
|
});
|
|
748
748
|
};
|
|
749
749
|
|
|
750
|
-
var __defProp$
|
|
751
|
-
var __defProps$
|
|
752
|
-
var __getOwnPropDescs$
|
|
750
|
+
var __defProp$e = Object.defineProperty;
|
|
751
|
+
var __defProps$e = Object.defineProperties;
|
|
752
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
753
753
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
754
754
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
755
755
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
756
|
-
var __defNormalProp$
|
|
757
|
-
var __spreadValues$
|
|
756
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
757
|
+
var __spreadValues$e = (a, b) => {
|
|
758
758
|
for (var prop in b || (b = {}))
|
|
759
759
|
if (__hasOwnProp$l.call(b, prop))
|
|
760
|
-
__defNormalProp$
|
|
760
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
761
761
|
if (__getOwnPropSymbols$l)
|
|
762
762
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
763
763
|
if (__propIsEnum$l.call(b, prop))
|
|
764
|
-
__defNormalProp$
|
|
764
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
765
765
|
}
|
|
766
766
|
return a;
|
|
767
767
|
};
|
|
768
|
-
var __spreadProps$
|
|
768
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
769
769
|
var __objRest$f = (source, exclude) => {
|
|
770
770
|
var target = {};
|
|
771
771
|
for (var prop in source)
|
|
@@ -786,7 +786,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
786
786
|
]);
|
|
787
787
|
const { client } = useShipEngine();
|
|
788
788
|
const { carrierName, carrierCode } = queryFnParams;
|
|
789
|
-
return reactQuery.useQuery(__spreadProps$
|
|
789
|
+
return reactQuery.useQuery(__spreadProps$e(__spreadValues$e({}, params), {
|
|
790
790
|
onError,
|
|
791
791
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
792
792
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
@@ -794,25 +794,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
794
794
|
}));
|
|
795
795
|
};
|
|
796
796
|
|
|
797
|
-
var __defProp$
|
|
798
|
-
var __defProps$
|
|
799
|
-
var __getOwnPropDescs$
|
|
797
|
+
var __defProp$d = Object.defineProperty;
|
|
798
|
+
var __defProps$d = Object.defineProperties;
|
|
799
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
800
800
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
801
801
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
802
802
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
803
|
-
var __defNormalProp$
|
|
804
|
-
var __spreadValues$
|
|
803
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
804
|
+
var __spreadValues$d = (a, b) => {
|
|
805
805
|
for (var prop in b || (b = {}))
|
|
806
806
|
if (__hasOwnProp$k.call(b, prop))
|
|
807
|
-
__defNormalProp$
|
|
807
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
808
808
|
if (__getOwnPropSymbols$k)
|
|
809
809
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
810
810
|
if (__propIsEnum$k.call(b, prop))
|
|
811
|
-
__defNormalProp$
|
|
811
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
812
812
|
}
|
|
813
813
|
return a;
|
|
814
814
|
};
|
|
815
|
-
var __spreadProps$
|
|
815
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
816
816
|
var __async$w = (__this, __arguments, generator) => {
|
|
817
817
|
return new Promise((resolve, reject) => {
|
|
818
818
|
var fulfilled = (value) => {
|
|
@@ -835,7 +835,7 @@ var __async$w = (__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$d(__spreadValues$d({}, params), {
|
|
839
839
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
840
840
|
carrierName,
|
|
841
841
|
carrierCode,
|
|
@@ -1177,9 +1177,25 @@ const useGetLabel = (labelId) => {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
};
|
|
1179
1179
|
|
|
1180
|
+
var __defProp$c = Object.defineProperty;
|
|
1181
|
+
var __defProps$c = Object.defineProperties;
|
|
1182
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1180
1183
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1181
1184
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1182
1185
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1186
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1187
|
+
var __spreadValues$c = (a, b) => {
|
|
1188
|
+
for (var prop in b || (b = {}))
|
|
1189
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1190
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1191
|
+
if (__getOwnPropSymbols$h)
|
|
1192
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1193
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1194
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1195
|
+
}
|
|
1196
|
+
return a;
|
|
1197
|
+
};
|
|
1198
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1183
1199
|
var __objRest$c = (source, exclude) => {
|
|
1184
1200
|
var target = {};
|
|
1185
1201
|
for (var prop in source)
|
|
@@ -1192,16 +1208,15 @@ var __objRest$c = (source, exclude) => {
|
|
|
1192
1208
|
}
|
|
1193
1209
|
return target;
|
|
1194
1210
|
};
|
|
1195
|
-
const useListLabels = (
|
|
1211
|
+
const useListLabels = (params) => {
|
|
1196
1212
|
const { client } = useShipEngine();
|
|
1197
|
-
const _a =
|
|
1198
|
-
return reactQuery.useQuery({
|
|
1199
|
-
enabled,
|
|
1213
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
|
|
1214
|
+
return reactQuery.useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
|
|
1200
1215
|
onError,
|
|
1201
|
-
queryFn: () => client.labels.list(
|
|
1216
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
1202
1217
|
queryKey: ["useListLabels", params],
|
|
1203
1218
|
select: (result) => result.data
|
|
1204
|
-
});
|
|
1219
|
+
}));
|
|
1205
1220
|
};
|
|
1206
1221
|
|
|
1207
1222
|
var __async$p = (__this, __arguments, generator) => {
|
package/index.mjs
CHANGED
|
@@ -76,25 +76,25 @@ const onError = (_errors) => _default();
|
|
|
76
76
|
|
|
77
77
|
var o={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},l={};function a(e){return "string"==typeof e?o[e.toLowerCase()]:e}function c(e,r){return c=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},c(e,r)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function f(e,r,t){return f=u()?Reflect.construct:function(e,r,t){var s=[null];s.push.apply(s,r);var i=new(Function.bind.apply(e,s));return t&&c(i,t.prototype),i},f.apply(null,arguments)}function h(e){if(null==e)return e;if(Array.isArray(e))return e.slice();if("object"==typeof e){var r={};return Object.keys(e).forEach(function(t){r[t]=e[t];}),r}return e}function v(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"[ "+e.map(function(e){return v(e)}).join(", ")+" ]":"object"==typeof e?JSON.stringify(e):"function"==typeof e?"[Function: "+e.name+"]":"boolean"==typeof e||"number"==typeof e?e:"'"+e.toString()+"'"}function p(e){if("string"!=typeof e){for(var r=new Array(arguments.length),t=0;t<arguments.length;t++)r[t]=v(arguments[t]);return r.join(" ")}for(var s=/%[sdj%]/g,i=1,n=arguments,o=n.length,l=String(e).replace(s,function(e){if("%%"===e)return "%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return "[Circular]"}default:return e}}),a=n[i];i<o;a=n[++i])l+=null===a||"object"!=typeof a?" "+a:" "+v(a);return l}function m(e,r){var t=e.split("\n");t[0]&&t[0].indexOf("call-stack-error")>=0&&t.shift();var s=t[r],i=null;if(s){var n=/^\s*(at|.*@)\s*(.+)?$/.exec(s);i=Array.isArray(n)&&n[2]?n[2]:s;}return i}Object.keys(o).forEach(function(e){l[o[e]]=e;});var y={};function d(e,r){if(r){if(y[r])return;y[r]=!0;}console.error(e+"\n");}function g(e){return y[e]}function w(){var e=[];return function(r,t){return t&&"object"==typeof t?-1!==e.indexOf(t)?"[Circular]":(e.push(t),t):t}}var b=/*#__PURE__*/function(){function e(){}return e.prototype.write=function(e){e.level<30?console.log(e):e.level<40?console.info(e):e.level<50?console.warn(e):console.error(e),e.err&&e.err.stack&&console.error(e.err.stack),e.obj&&console.log(e.obj);},e}(),j=/*#__PURE__*/function(){function e(r,t,s){var i,n,o,l,a=this;if(!(this instanceof e))return new e(r,t);if(void 0!==t&&(i=r,r=t,!(i instanceof e)))throw new TypeError("invalid Logger creation: do not pass a second arg");if(!r)throw new TypeError("options (object) is required");if(i){if(r.name)throw new TypeError("invalid options.name: child cannot set logger name")}else if(!r.name)throw new TypeError("options.name (string) is required");if(r.stream&&r.streams)throw new TypeError('cannot mix "streams" and "stream" options');if(r.streams&&!Array.isArray(r.streams))throw new TypeError("invalid options.streams: must be an array");if(r.serializers&&("object"!=typeof r.serializers||Array.isArray(r.serializers)))throw new TypeError("invalid options.serializers: must be an object");if(i&&s){this._level=i._level,this.streams=i.streams,this.serializers=i.serializers,this.src=i.src,n=this.fields={};var c=Object.keys(i.fields);for(l=0;l<c.length;l++)n[o=c[l]]=i.fields[o];var u=Object.keys(r);for(l=0;l<u.length;l++)n[o=u[l]]=r[o];}else {if(i){for(this._level=i._level,this.streams=[],l=0;l<i.streams.length;l++){var f=h(i.streams[l]);this.streams.push(f);}this.serializers=h(i.serializers),this.src=i.src,this.fields=h(i.fields),r.level&&this.level(r.level);}else this._level=Number.POSITIVE_INFINITY,this.streams=[],this.serializers=null,this.src=!1,this.fields={};r.stream?this.addStream({type:"stream",stream:r.stream,level:r.level}):r.streams?r.streams.forEach(function(e){a.addStream(e,r.level);}):i&&r.level?this.level(r.level):i||this.addStream({type:"raw",stream:new b,level:r.level}),r.serializers&&this.addSerializers(r.serializers),r.src&&(this.src=!0),delete(n=h(r)).stream,delete n.level,delete n.streams,delete n.serializers,delete n.src,this.serializers&&this._applySerializers(n),Object.keys(n).forEach(function(e){a.fields[e]=n[e];});}}var r=e.prototype;return r.addStream=function(e,r){void 0===r&&(r=30),(e=h(e)).type="raw",e.level=a(e.level||r),e.level<this._level&&(this._level=e.level),this.streams.push(e),delete this.haveNonRawStreams;},r.addSerializers=function(e){var r=this;this.serializers||(this.serializers={}),Object.keys(e).forEach(function(t){var s=e[t];if("function"!=typeof s)throw new TypeError(p('invalid serializer for "%s" field: must be a function',t));r.serializers[t]=s;});},r.child=function(e,r){return new this.constructor(this,e||{},r)},r.level=function(e){if(void 0===e)return this._level;for(var r=a(e),t=this.streams.length,s=0;s<t;s++)this.streams[s].level=r;this._level=r;},r.levels=function(e,r){if(void 0===e)return this.streams.map(function(e){return e.level});var t;if("number"==typeof e){if(void 0===(t=this.streams[e]))throw new Error("invalid stream index: "+e)}else {for(var s=this.streams.length,i=0;i<s;i++){var n=this.streams[i];if(n.name===e){t=n;break}}if(!t)throw new Error(p('no stream with name "%s"',e))}if(void 0===r)return t.level;var o=a(r);t.level=o,o<this._level&&(this._level=o);},r._applySerializers=function(e,r){var t=this;Object.keys(this.serializers).forEach(function(s){if(!(void 0===e[s]||r&&r[s]))try{e[s]=t.serializers[s](e[s]);}catch(r){d(p('bunyan: ERROR: Exception thrown from the "%s" Bunyan serializer. This should never happen. This is a bugin that serializer function.\n%s',s,r.stack||r)),e[s]=p('(Error in Bunyan log "%s" serializer broke field. See stderr for details.)',s);}});},r._emit=function(e,r){var t,s;if(void 0===this.haveNonRawStreams)for(this.haveNonRawStreams=!1,t=0;t<this.streams.length;t++)if(!this.streams[t].raw){this.haveNonRawStreams=!0;break}if(r||this.haveNonRawStreams)try{s=JSON.stringify(e,w())+"\n";}catch(r){var i=r.stack.split(/\n/g,2).join("\n");d('bunyan: ERROR: Exception in `JSON.stringify(rec)`. You can install the "safe-json-stringify" module to have Bunyan fallback to safer stringification. Record:\n'+function(e,r){return r||(r=" "),r+e.split(/\r?\n/g).join("\n"+r)}(p("%s\n%s",e,r.stack)),i),s=p("(Exception in JSON.stringify(rec): %j. See stderr for details.)\n",r.message);}if(r)return s;var n=e.level;for(t=0;t<this.streams.length;t++){var o=this.streams[t];o.level<=n&&o.stream.write(e);}return s},e}();function z(e){return function(){var r=this;function t(t){var n;t[0]instanceof Error?(s={err:r.serializers&&r.serializers.err?r.serializers.err(t[0]):k.err(t[0])},n={err:!0},i=1===t.length?[s.err.message]:Array.prototype.slice.call(t,1)):"object"!=typeof t[0]&&null!==t[0]||Array.isArray(t[0])?(s=null,i=Array.prototype.slice.call(t)):(s=t[0],i=1===t.length&&s.err&&s.err instanceof Error?[s.err.message]:Array.prototype.slice.call(t,1));var o=h(r.fields);o.level=e;var a=s?h(s):null;if(a&&(r.serializers&&r._applySerializers(a,n),Object.keys(a).forEach(function(e){o[e]=a[e];})),o.levelName=l[e],o.msg=i.length?p.apply(r,i):"",o.time||(o.time=new Date),r.src&&!o.src)try{throw new Error("call-stack-error")}catch(e){var c=e.stack?m(e.stack,2):"";c||g("src")||d("Unable to determine src line info","src"),o.src=c||"";}return o.v=1,o}var s=null,i=arguments,n=null;if(0===arguments.length)return this._level<=e;this._level>e||(n=t(i),this._emit(n));}}function S(e){var r=e.stack||e.toString();if(e.cause&&"function"==typeof e.cause){var t=e.cause();t&&(r+="\nCaused by: "+S(t));}return r}j.prototype.trace=z(10),j.prototype.debug=z(20),j.prototype.info=z(30),j.prototype.warn=z(40),j.prototype.error=z(50),j.prototype.fatal=z(60);var k={err:function(e){return e&&e.stack?{message:e.message,name:e.name,stack:S(e),code:e.code,signal:e.signal}:e}};function E(){return f(j,[].slice.call(arguments))}var A={levels:{trace:"color: DeepPink",debug:"color: GoldenRod",info:"color: DarkTurquoise",warn:"color: Purple",error:"color: Crimson",fatal:"color: Black"},def:"color: DimGray",msg:"color: SteelBlue",src:"color: DimGray; font-style: italic; font-size: 0.9em"},R=/*#__PURE__*/function(){function e(e){var r=void 0===e?{}:e,t=r.logByLevel,s=r.css,i=void 0===s?A:s;this.logByLevel=void 0!==t&&t,this.css=i;}return e.prototype.write=function(e){var r,t,s=this.css.def,i=this.css.msg,n=this.css.src,o=e.childName?e.name+"/"+e.childName:e.name,a=l[e.level],c=(Array(6-a.length).join(" ")+a).toUpperCase();this.logByLevel?(10===e.level?a="debug":60===e.level&&(a="error"),t="function"==typeof console[a]?console[a]:console.log):t=console.log,r=e.level<20?this.css.levels.trace:e.level<30?this.css.levels.debug:e.level<40?this.css.levels.info:e.level<50?this.css.levels.warn:e.level<60?this.css.levels.error:this.css.levels.fatal;var u=function(e,r){return Array(r+1-(e+"").length).join("0")+e},f=[];f.push("[%s:%s:%s:%s] %c%s%c: %s: %c%s "+(e.src?"%c%s":"")),f.push(u(e.time.getHours(),2)),f.push(u(e.time.getMinutes(),2)),f.push(u(e.time.getSeconds(),2)),f.push(u(e.time.getMilliseconds(),4)),f.push(r),f.push(c),f.push(s),f.push(o),f.push(i),f.push(e.msg),e.src&&(f.push(n),f.push(e.src)),e.obj&&(f.push("\n"),f.push(e.obj)),e.err&&e.err.stack&&(f.push("\n"),f.push(e.err.stack)),t.apply(console,f);},e.getDefaultCss=function(){return A},e}();
|
|
78
78
|
|
|
79
|
-
var __defProp$
|
|
80
|
-
var __defProps$
|
|
81
|
-
var __getOwnPropDescs$
|
|
79
|
+
var __defProp$g = Object.defineProperty;
|
|
80
|
+
var __defProps$g = Object.defineProperties;
|
|
81
|
+
var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
|
|
82
82
|
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
83
83
|
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
84
84
|
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
85
|
-
var __defNormalProp$
|
|
86
|
-
var __spreadValues$
|
|
85
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
86
|
+
var __spreadValues$g = (a, b) => {
|
|
87
87
|
for (var prop in b || (b = {}))
|
|
88
88
|
if (__hasOwnProp$q.call(b, prop))
|
|
89
|
-
__defNormalProp$
|
|
89
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
90
90
|
if (__getOwnPropSymbols$q)
|
|
91
91
|
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
92
92
|
if (__propIsEnum$q.call(b, prop))
|
|
93
|
-
__defNormalProp$
|
|
93
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
94
94
|
}
|
|
95
95
|
return a;
|
|
96
96
|
};
|
|
97
|
-
var __spreadProps$
|
|
97
|
+
var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
|
|
98
98
|
const streams = [];
|
|
99
99
|
if (process.env.NODE_ENV === "production") {
|
|
100
100
|
streams.push({
|
|
@@ -103,7 +103,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
103
103
|
}
|
|
104
104
|
const logger = E({
|
|
105
105
|
name: "shipengine",
|
|
106
|
-
serializers: __spreadProps$
|
|
106
|
+
serializers: __spreadProps$g(__spreadValues$g({}, k), {
|
|
107
107
|
req: (req) => ({
|
|
108
108
|
headers: req.headers,
|
|
109
109
|
method: req.method,
|
|
@@ -504,25 +504,25 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
504
504
|
});
|
|
505
505
|
};
|
|
506
506
|
|
|
507
|
-
var __defProp$
|
|
508
|
-
var __defProps$
|
|
509
|
-
var __getOwnPropDescs$
|
|
507
|
+
var __defProp$f = Object.defineProperty;
|
|
508
|
+
var __defProps$f = Object.defineProperties;
|
|
509
|
+
var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
|
|
510
510
|
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
511
511
|
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
512
512
|
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
513
|
-
var __defNormalProp$
|
|
514
|
-
var __spreadValues$
|
|
513
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
514
|
+
var __spreadValues$f = (a, b) => {
|
|
515
515
|
for (var prop in b || (b = {}))
|
|
516
516
|
if (__hasOwnProp$p.call(b, prop))
|
|
517
|
-
__defNormalProp$
|
|
517
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
518
518
|
if (__getOwnPropSymbols$p)
|
|
519
519
|
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
520
520
|
if (__propIsEnum$p.call(b, prop))
|
|
521
|
-
__defNormalProp$
|
|
521
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
522
522
|
}
|
|
523
523
|
return a;
|
|
524
524
|
};
|
|
525
|
-
var __spreadProps$
|
|
525
|
+
var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
|
|
526
526
|
var __objRest$j = (source, exclude) => {
|
|
527
527
|
var target = {};
|
|
528
528
|
for (var prop in source)
|
|
@@ -537,8 +537,8 @@ var __objRest$j = (source, exclude) => {
|
|
|
537
537
|
};
|
|
538
538
|
const useListCarriers = (params) => {
|
|
539
539
|
const { client } = useShipEngine();
|
|
540
|
-
const _a = __spreadValues$
|
|
541
|
-
return useQuery(__spreadProps$
|
|
540
|
+
const _a = __spreadValues$f({}, params), { queryFnParams } = _a, rest = __objRest$j(_a, ["queryFnParams"]);
|
|
541
|
+
return useQuery(__spreadProps$f(__spreadValues$f({}, rest), {
|
|
542
542
|
onError,
|
|
543
543
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
544
544
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -744,25 +744,25 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
744
744
|
});
|
|
745
745
|
};
|
|
746
746
|
|
|
747
|
-
var __defProp$
|
|
748
|
-
var __defProps$
|
|
749
|
-
var __getOwnPropDescs$
|
|
747
|
+
var __defProp$e = Object.defineProperty;
|
|
748
|
+
var __defProps$e = Object.defineProperties;
|
|
749
|
+
var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
|
|
750
750
|
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
751
751
|
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
752
752
|
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
753
|
-
var __defNormalProp$
|
|
754
|
-
var __spreadValues$
|
|
753
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
754
|
+
var __spreadValues$e = (a, b) => {
|
|
755
755
|
for (var prop in b || (b = {}))
|
|
756
756
|
if (__hasOwnProp$l.call(b, prop))
|
|
757
|
-
__defNormalProp$
|
|
757
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
758
758
|
if (__getOwnPropSymbols$l)
|
|
759
759
|
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
760
760
|
if (__propIsEnum$l.call(b, prop))
|
|
761
|
-
__defNormalProp$
|
|
761
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
762
762
|
}
|
|
763
763
|
return a;
|
|
764
764
|
};
|
|
765
|
-
var __spreadProps$
|
|
765
|
+
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
766
766
|
var __objRest$f = (source, exclude) => {
|
|
767
767
|
var target = {};
|
|
768
768
|
for (var prop in source)
|
|
@@ -783,7 +783,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
783
783
|
]);
|
|
784
784
|
const { client } = useShipEngine();
|
|
785
785
|
const { carrierName, carrierCode } = queryFnParams;
|
|
786
|
-
return useQuery(__spreadProps$
|
|
786
|
+
return useQuery(__spreadProps$e(__spreadValues$e({}, params), {
|
|
787
787
|
onError,
|
|
788
788
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
789
789
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
@@ -791,25 +791,25 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
791
791
|
}));
|
|
792
792
|
};
|
|
793
793
|
|
|
794
|
-
var __defProp$
|
|
795
|
-
var __defProps$
|
|
796
|
-
var __getOwnPropDescs$
|
|
794
|
+
var __defProp$d = Object.defineProperty;
|
|
795
|
+
var __defProps$d = Object.defineProperties;
|
|
796
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
797
797
|
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
798
798
|
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
799
799
|
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
800
|
-
var __defNormalProp$
|
|
801
|
-
var __spreadValues$
|
|
800
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
801
|
+
var __spreadValues$d = (a, b) => {
|
|
802
802
|
for (var prop in b || (b = {}))
|
|
803
803
|
if (__hasOwnProp$k.call(b, prop))
|
|
804
|
-
__defNormalProp$
|
|
804
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
805
805
|
if (__getOwnPropSymbols$k)
|
|
806
806
|
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
807
807
|
if (__propIsEnum$k.call(b, prop))
|
|
808
|
-
__defNormalProp$
|
|
808
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
809
809
|
}
|
|
810
810
|
return a;
|
|
811
811
|
};
|
|
812
|
-
var __spreadProps$
|
|
812
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
813
813
|
var __async$w = (__this, __arguments, generator) => {
|
|
814
814
|
return new Promise((resolve, reject) => {
|
|
815
815
|
var fulfilled = (value) => {
|
|
@@ -832,7 +832,7 @@ var __async$w = (__this, __arguments, generator) => {
|
|
|
832
832
|
};
|
|
833
833
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
834
834
|
const { client } = useShipEngine();
|
|
835
|
-
return useMutation(__spreadProps$
|
|
835
|
+
return useMutation(__spreadProps$d(__spreadValues$d({}, params), {
|
|
836
836
|
mutationFn: (_0) => __async$w(void 0, [_0], function* ({
|
|
837
837
|
carrierName,
|
|
838
838
|
carrierCode,
|
|
@@ -1174,9 +1174,25 @@ const useGetLabel = (labelId) => {
|
|
|
1174
1174
|
});
|
|
1175
1175
|
};
|
|
1176
1176
|
|
|
1177
|
+
var __defProp$c = Object.defineProperty;
|
|
1178
|
+
var __defProps$c = Object.defineProperties;
|
|
1179
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
1177
1180
|
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1178
1181
|
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1179
1182
|
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1183
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1184
|
+
var __spreadValues$c = (a, b) => {
|
|
1185
|
+
for (var prop in b || (b = {}))
|
|
1186
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1187
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1188
|
+
if (__getOwnPropSymbols$h)
|
|
1189
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1190
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1191
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
1192
|
+
}
|
|
1193
|
+
return a;
|
|
1194
|
+
};
|
|
1195
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
1180
1196
|
var __objRest$c = (source, exclude) => {
|
|
1181
1197
|
var target = {};
|
|
1182
1198
|
for (var prop in source)
|
|
@@ -1189,16 +1205,15 @@ var __objRest$c = (source, exclude) => {
|
|
|
1189
1205
|
}
|
|
1190
1206
|
return target;
|
|
1191
1207
|
};
|
|
1192
|
-
const useListLabels = (
|
|
1208
|
+
const useListLabels = (params) => {
|
|
1193
1209
|
const { client } = useShipEngine();
|
|
1194
|
-
const _a =
|
|
1195
|
-
return useQuery({
|
|
1196
|
-
enabled,
|
|
1210
|
+
const _a = params, { queryFnParams } = _a, rest = __objRest$c(_a, ["queryFnParams"]);
|
|
1211
|
+
return useQuery(__spreadProps$c(__spreadValues$c({}, rest), {
|
|
1197
1212
|
onError,
|
|
1198
|
-
queryFn: () => client.labels.list(
|
|
1213
|
+
queryFn: () => client.labels.list(queryFnParams),
|
|
1199
1214
|
queryKey: ["useListLabels", params],
|
|
1200
1215
|
select: (result) => result.data
|
|
1201
|
-
});
|
|
1216
|
+
}));
|
|
1202
1217
|
};
|
|
1203
1218
|
|
|
1204
1219
|
var __async$p = (__this, __arguments, generator) => {
|