@shipengine/react-api 4.4.0 → 4.5.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/connections/index.d.ts +1 -0
- package/hooks/connections/use-request-stamps-account-urls.d.ts +6 -0
- package/index.js +215 -163
- package/index.mjs +215 -164
- package/package.json +1 -1
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$
|
|
82
|
-
var __getOwnPropSymbols$
|
|
83
|
-
var __hasOwnProp$
|
|
84
|
-
var __propIsEnum$
|
|
85
|
-
var __defNormalProp$
|
|
86
|
-
var __spreadValues$
|
|
79
|
+
var __defProp$A = Object.defineProperty;
|
|
80
|
+
var __defProps$z = Object.defineProperties;
|
|
81
|
+
var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
|
|
82
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
83
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
84
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
85
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
86
|
+
var __spreadValues$A = (a, b) => {
|
|
87
87
|
for (var prop in b || (b = {}))
|
|
88
|
-
if (__hasOwnProp$
|
|
89
|
-
__defNormalProp$
|
|
90
|
-
if (__getOwnPropSymbols$
|
|
91
|
-
for (var prop of __getOwnPropSymbols$
|
|
92
|
-
if (__propIsEnum$
|
|
93
|
-
__defNormalProp$
|
|
88
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
89
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
90
|
+
if (__getOwnPropSymbols$J)
|
|
91
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
92
|
+
if (__propIsEnum$J.call(b, prop))
|
|
93
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
94
94
|
}
|
|
95
95
|
return a;
|
|
96
96
|
};
|
|
97
|
-
var __spreadProps$
|
|
97
|
+
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(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$z(__spreadValues$A({}, k), {
|
|
107
107
|
req: (req) => ({
|
|
108
108
|
headers: req.headers,
|
|
109
109
|
method: req.method,
|
|
@@ -128,7 +128,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
128
128
|
throw error;
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
var __async$
|
|
131
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
132
132
|
return new Promise((resolve, reject) => {
|
|
133
133
|
var fulfilled = (value) => {
|
|
134
134
|
try {
|
|
@@ -151,7 +151,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
151
151
|
const useCreateAccountImage = () => {
|
|
152
152
|
const { client } = useShipEngine();
|
|
153
153
|
return useMutation({
|
|
154
|
-
mutationFn: (data) => __async$
|
|
154
|
+
mutationFn: (data) => __async$U(void 0, null, function* () {
|
|
155
155
|
const result = yield client.accountSettings.createImage(data);
|
|
156
156
|
return result.data;
|
|
157
157
|
}),
|
|
@@ -160,7 +160,7 @@ const useCreateAccountImage = () => {
|
|
|
160
160
|
});
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
var __async$
|
|
163
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
164
164
|
return new Promise((resolve, reject) => {
|
|
165
165
|
var fulfilled = (value) => {
|
|
166
166
|
try {
|
|
@@ -183,7 +183,7 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
183
183
|
const useDeleteAccountImage = () => {
|
|
184
184
|
const { client } = useShipEngine();
|
|
185
185
|
return useMutation({
|
|
186
|
-
mutationFn: (labelImageId) => __async$
|
|
186
|
+
mutationFn: (labelImageId) => __async$T(void 0, null, function* () {
|
|
187
187
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
188
188
|
return result.data;
|
|
189
189
|
}),
|
|
@@ -212,7 +212,7 @@ const useGetAccountSettings = () => {
|
|
|
212
212
|
});
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
var __async$
|
|
215
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
216
216
|
return new Promise((resolve, reject) => {
|
|
217
217
|
var fulfilled = (value) => {
|
|
218
218
|
try {
|
|
@@ -235,7 +235,7 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
235
235
|
const useUpdateAccountImage = () => {
|
|
236
236
|
const { client } = useShipEngine();
|
|
237
237
|
return useMutation({
|
|
238
|
-
mutationFn: (data) => __async$
|
|
238
|
+
mutationFn: (data) => __async$S(void 0, null, function* () {
|
|
239
239
|
const result = yield client.accountSettings.updateImage(data);
|
|
240
240
|
return result.data;
|
|
241
241
|
}),
|
|
@@ -244,7 +244,7 @@ const useUpdateAccountImage = () => {
|
|
|
244
244
|
});
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
var __async$
|
|
247
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
248
248
|
return new Promise((resolve, reject) => {
|
|
249
249
|
var fulfilled = (value) => {
|
|
250
250
|
try {
|
|
@@ -267,7 +267,7 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
267
267
|
const useUpdateAccountSettings = () => {
|
|
268
268
|
const { client } = useShipEngine();
|
|
269
269
|
return useMutation({
|
|
270
|
-
mutationFn: (settings) => __async$
|
|
270
|
+
mutationFn: (settings) => __async$R(void 0, null, function* () {
|
|
271
271
|
const result = yield client.accountSettings.update(settings);
|
|
272
272
|
return result.data;
|
|
273
273
|
}),
|
|
@@ -276,7 +276,7 @@ const useUpdateAccountSettings = () => {
|
|
|
276
276
|
});
|
|
277
277
|
};
|
|
278
278
|
|
|
279
|
-
var __async$
|
|
279
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
280
280
|
return new Promise((resolve, reject) => {
|
|
281
281
|
var fulfilled = (value) => {
|
|
282
282
|
try {
|
|
@@ -299,7 +299,7 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
299
299
|
const useParseAddress = () => {
|
|
300
300
|
const { client } = useShipEngine();
|
|
301
301
|
return useMutation({
|
|
302
|
-
mutationFn: (_0) => __async$
|
|
302
|
+
mutationFn: (_0) => __async$Q(void 0, [_0], function* ({ address, text }) {
|
|
303
303
|
const result = yield client.addresses.parse(text, address);
|
|
304
304
|
return result.data;
|
|
305
305
|
}),
|
|
@@ -308,7 +308,7 @@ const useParseAddress = () => {
|
|
|
308
308
|
});
|
|
309
309
|
};
|
|
310
310
|
|
|
311
|
-
var __async$
|
|
311
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
312
312
|
return new Promise((resolve, reject) => {
|
|
313
313
|
var fulfilled = (value) => {
|
|
314
314
|
try {
|
|
@@ -331,7 +331,7 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
331
331
|
const useValidateAddresses = () => {
|
|
332
332
|
const { client } = useShipEngine();
|
|
333
333
|
return useMutation({
|
|
334
|
-
mutationFn: (addresses) => __async$
|
|
334
|
+
mutationFn: (addresses) => __async$P(void 0, null, function* () {
|
|
335
335
|
const result = yield client.addresses.validate(addresses);
|
|
336
336
|
return result.data;
|
|
337
337
|
}),
|
|
@@ -340,26 +340,26 @@ const useValidateAddresses = () => {
|
|
|
340
340
|
});
|
|
341
341
|
};
|
|
342
342
|
|
|
343
|
-
var __defProp$
|
|
344
|
-
var __defProps$
|
|
345
|
-
var __getOwnPropDescs$
|
|
346
|
-
var __getOwnPropSymbols$
|
|
347
|
-
var __hasOwnProp$
|
|
348
|
-
var __propIsEnum$
|
|
349
|
-
var __defNormalProp$
|
|
350
|
-
var __spreadValues$
|
|
343
|
+
var __defProp$z = Object.defineProperty;
|
|
344
|
+
var __defProps$y = Object.defineProperties;
|
|
345
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
346
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
347
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
348
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
349
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
350
|
+
var __spreadValues$z = (a, b) => {
|
|
351
351
|
for (var prop in b || (b = {}))
|
|
352
|
-
if (__hasOwnProp$
|
|
353
|
-
__defNormalProp$
|
|
354
|
-
if (__getOwnPropSymbols$
|
|
355
|
-
for (var prop of __getOwnPropSymbols$
|
|
356
|
-
if (__propIsEnum$
|
|
357
|
-
__defNormalProp$
|
|
352
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
353
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
354
|
+
if (__getOwnPropSymbols$I)
|
|
355
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
356
|
+
if (__propIsEnum$I.call(b, prop))
|
|
357
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
358
358
|
}
|
|
359
359
|
return a;
|
|
360
360
|
};
|
|
361
|
-
var __spreadProps$
|
|
362
|
-
var __async$
|
|
361
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
362
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
363
363
|
return new Promise((resolve, reject) => {
|
|
364
364
|
var fulfilled = (value) => {
|
|
365
365
|
try {
|
|
@@ -381,8 +381,8 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
381
381
|
};
|
|
382
382
|
const useCreateAuctanePaySession = (params) => {
|
|
383
383
|
const { client } = useShipEngine();
|
|
384
|
-
return useMutation(__spreadProps$
|
|
385
|
-
mutationFn: (request) => __async$
|
|
384
|
+
return useMutation(__spreadProps$y(__spreadValues$z({}, params), {
|
|
385
|
+
mutationFn: (request) => __async$O(void 0, null, function* () {
|
|
386
386
|
const result = yield client.auctanePay.createSession(request);
|
|
387
387
|
return result.data;
|
|
388
388
|
}),
|
|
@@ -391,29 +391,29 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
391
391
|
}));
|
|
392
392
|
};
|
|
393
393
|
|
|
394
|
-
var __defProp$
|
|
395
|
-
var __defProps$
|
|
396
|
-
var __getOwnPropDescs$
|
|
397
|
-
var __getOwnPropSymbols$
|
|
398
|
-
var __hasOwnProp$
|
|
399
|
-
var __propIsEnum$
|
|
400
|
-
var __defNormalProp$
|
|
401
|
-
var __spreadValues$
|
|
394
|
+
var __defProp$y = Object.defineProperty;
|
|
395
|
+
var __defProps$x = Object.defineProperties;
|
|
396
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
397
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
398
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
399
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
400
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
401
|
+
var __spreadValues$y = (a, b) => {
|
|
402
402
|
for (var prop in b || (b = {}))
|
|
403
|
-
if (__hasOwnProp$
|
|
404
|
-
__defNormalProp$
|
|
405
|
-
if (__getOwnPropSymbols$
|
|
406
|
-
for (var prop of __getOwnPropSymbols$
|
|
407
|
-
if (__propIsEnum$
|
|
408
|
-
__defNormalProp$
|
|
403
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
404
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
405
|
+
if (__getOwnPropSymbols$H)
|
|
406
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
407
|
+
if (__propIsEnum$H.call(b, prop))
|
|
408
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
409
409
|
}
|
|
410
410
|
return a;
|
|
411
411
|
};
|
|
412
|
-
var __spreadProps$
|
|
412
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
413
413
|
const useGetAuctanePayConfig = (params) => {
|
|
414
414
|
const { client } = useShipEngine();
|
|
415
|
-
const queryParams = __spreadValues$
|
|
416
|
-
return useQuery(__spreadProps$
|
|
415
|
+
const queryParams = __spreadValues$y({}, params);
|
|
416
|
+
return useQuery(__spreadProps$x(__spreadValues$y({}, queryParams), {
|
|
417
417
|
onError,
|
|
418
418
|
queryFn: () => client.auctanePay.getConfig(),
|
|
419
419
|
queryKey: ["useGetAuctanePayConfig"],
|
|
@@ -421,7 +421,7 @@ const useGetAuctanePayConfig = (params) => {
|
|
|
421
421
|
}));
|
|
422
422
|
};
|
|
423
423
|
|
|
424
|
-
var __async$
|
|
424
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
425
425
|
return new Promise((resolve, reject) => {
|
|
426
426
|
var fulfilled = (value) => {
|
|
427
427
|
try {
|
|
@@ -444,7 +444,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
444
444
|
const useAddFunds = () => {
|
|
445
445
|
const { client } = useShipEngine();
|
|
446
446
|
return useMutation({
|
|
447
|
-
mutationFn: (_0) => __async$
|
|
447
|
+
mutationFn: (_0) => __async$N(void 0, [_0], function* ({ carrierId, funds }) {
|
|
448
448
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
449
449
|
return result.data;
|
|
450
450
|
}),
|
|
@@ -453,7 +453,7 @@ const useAddFunds = () => {
|
|
|
453
453
|
});
|
|
454
454
|
};
|
|
455
455
|
|
|
456
|
-
var __async$
|
|
456
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
457
457
|
return new Promise((resolve, reject) => {
|
|
458
458
|
var fulfilled = (value) => {
|
|
459
459
|
try {
|
|
@@ -476,7 +476,7 @@ var __async$L = (__this, __arguments, generator) => {
|
|
|
476
476
|
const useConnectCarrier = () => {
|
|
477
477
|
const { client } = useShipEngine();
|
|
478
478
|
return useMutation({
|
|
479
|
-
mutationFn: (params) => __async$
|
|
479
|
+
mutationFn: (params) => __async$M(void 0, null, function* () {
|
|
480
480
|
const result = yield client.carriers.connect(params);
|
|
481
481
|
return result.data;
|
|
482
482
|
}),
|
|
@@ -585,41 +585,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
585
585
|
});
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
var __defProp$
|
|
589
|
-
var __defProps$
|
|
590
|
-
var __getOwnPropDescs$
|
|
591
|
-
var __getOwnPropSymbols$
|
|
592
|
-
var __hasOwnProp$
|
|
593
|
-
var __propIsEnum$
|
|
594
|
-
var __defNormalProp$
|
|
595
|
-
var __spreadValues$
|
|
588
|
+
var __defProp$x = Object.defineProperty;
|
|
589
|
+
var __defProps$w = Object.defineProperties;
|
|
590
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
591
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
592
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
593
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
594
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
595
|
+
var __spreadValues$x = (a, b) => {
|
|
596
596
|
for (var prop in b || (b = {}))
|
|
597
|
-
if (__hasOwnProp$
|
|
598
|
-
__defNormalProp$
|
|
599
|
-
if (__getOwnPropSymbols$
|
|
600
|
-
for (var prop of __getOwnPropSymbols$
|
|
601
|
-
if (__propIsEnum$
|
|
602
|
-
__defNormalProp$
|
|
597
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
598
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
599
|
+
if (__getOwnPropSymbols$G)
|
|
600
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
601
|
+
if (__propIsEnum$G.call(b, prop))
|
|
602
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
603
603
|
}
|
|
604
604
|
return a;
|
|
605
605
|
};
|
|
606
|
-
var __spreadProps$
|
|
606
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
607
607
|
var __objRest$q = (source, exclude) => {
|
|
608
608
|
var target = {};
|
|
609
609
|
for (var prop in source)
|
|
610
|
-
if (__hasOwnProp$
|
|
610
|
+
if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
611
611
|
target[prop] = source[prop];
|
|
612
|
-
if (source != null && __getOwnPropSymbols$
|
|
613
|
-
for (var prop of __getOwnPropSymbols$
|
|
614
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
612
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
613
|
+
for (var prop of __getOwnPropSymbols$G(source)) {
|
|
614
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
|
|
615
615
|
target[prop] = source[prop];
|
|
616
616
|
}
|
|
617
617
|
return target;
|
|
618
618
|
};
|
|
619
619
|
const useListCarriers = (params) => {
|
|
620
620
|
const { client } = useShipEngine();
|
|
621
|
-
const _a = __spreadValues$
|
|
622
|
-
return useQuery(__spreadProps$
|
|
621
|
+
const _a = __spreadValues$x({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
|
|
622
|
+
return useQuery(__spreadProps$w(__spreadValues$x({}, rest), {
|
|
623
623
|
onError,
|
|
624
624
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
625
625
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -627,22 +627,22 @@ const useListCarriers = (params) => {
|
|
|
627
627
|
}));
|
|
628
628
|
};
|
|
629
629
|
|
|
630
|
-
var __getOwnPropSymbols$
|
|
631
|
-
var __hasOwnProp$
|
|
632
|
-
var __propIsEnum$
|
|
630
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
631
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
632
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
633
633
|
var __objRest$p = (source, exclude) => {
|
|
634
634
|
var target = {};
|
|
635
635
|
for (var prop in source)
|
|
636
|
-
if (__hasOwnProp$
|
|
636
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
637
637
|
target[prop] = source[prop];
|
|
638
|
-
if (source != null && __getOwnPropSymbols$
|
|
639
|
-
for (var prop of __getOwnPropSymbols$
|
|
640
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
638
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
639
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
640
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
641
641
|
target[prop] = source[prop];
|
|
642
642
|
}
|
|
643
643
|
return target;
|
|
644
644
|
};
|
|
645
|
-
var __async$
|
|
645
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
646
646
|
return new Promise((resolve, reject) => {
|
|
647
647
|
var fulfilled = (value) => {
|
|
648
648
|
try {
|
|
@@ -666,7 +666,7 @@ const useUpdateAutoFunding = () => {
|
|
|
666
666
|
const { client } = useShipEngine();
|
|
667
667
|
const queryClient = useQueryClient();
|
|
668
668
|
return useMutation({
|
|
669
|
-
mutationFn: (_a) => __async$
|
|
669
|
+
mutationFn: (_a) => __async$L(void 0, null, function* () {
|
|
670
670
|
var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
|
|
671
671
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
672
672
|
return result.data;
|
|
@@ -696,7 +696,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
696
696
|
});
|
|
697
697
|
};
|
|
698
698
|
|
|
699
|
-
var __async$
|
|
699
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
700
700
|
return new Promise((resolve, reject) => {
|
|
701
701
|
var fulfilled = (value) => {
|
|
702
702
|
try {
|
|
@@ -719,7 +719,7 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
719
719
|
const useDeleteCarrier = () => {
|
|
720
720
|
const { client } = useShipEngine();
|
|
721
721
|
return useMutation({
|
|
722
|
-
mutationFn: (carrierId) => __async$
|
|
722
|
+
mutationFn: (carrierId) => __async$K(void 0, null, function* () {
|
|
723
723
|
const result = yield client.carriers.delete(carrierId);
|
|
724
724
|
return result.data;
|
|
725
725
|
}),
|
|
@@ -728,17 +728,17 @@ const useDeleteCarrier = () => {
|
|
|
728
728
|
});
|
|
729
729
|
};
|
|
730
730
|
|
|
731
|
-
var __getOwnPropSymbols$
|
|
732
|
-
var __hasOwnProp$
|
|
733
|
-
var __propIsEnum$
|
|
731
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
732
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
733
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
734
734
|
var __objRest$o = (source, exclude) => {
|
|
735
735
|
var target = {};
|
|
736
736
|
for (var prop in source)
|
|
737
|
-
if (__hasOwnProp$
|
|
737
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
738
738
|
target[prop] = source[prop];
|
|
739
|
-
if (source != null && __getOwnPropSymbols$
|
|
740
|
-
for (var prop of __getOwnPropSymbols$
|
|
741
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
739
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
740
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
741
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
742
742
|
target[prop] = source[prop];
|
|
743
743
|
}
|
|
744
744
|
return target;
|
|
@@ -755,17 +755,17 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
755
755
|
});
|
|
756
756
|
};
|
|
757
757
|
|
|
758
|
-
var __getOwnPropSymbols$
|
|
759
|
-
var __hasOwnProp$
|
|
760
|
-
var __propIsEnum$
|
|
758
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
759
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
760
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
761
761
|
var __objRest$n = (source, exclude) => {
|
|
762
762
|
var target = {};
|
|
763
763
|
for (var prop in source)
|
|
764
|
-
if (__hasOwnProp$
|
|
764
|
+
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
765
765
|
target[prop] = source[prop];
|
|
766
|
-
if (source != null && __getOwnPropSymbols$
|
|
767
|
-
for (var prop of __getOwnPropSymbols$
|
|
768
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
766
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
767
|
+
for (var prop of __getOwnPropSymbols$D(source)) {
|
|
768
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
|
|
769
769
|
target[prop] = source[prop];
|
|
770
770
|
}
|
|
771
771
|
return target;
|
|
@@ -782,26 +782,26 @@ const useListCarrierConnections = (_params) => {
|
|
|
782
782
|
});
|
|
783
783
|
};
|
|
784
784
|
|
|
785
|
-
var __defProp$
|
|
786
|
-
var __defProps$
|
|
787
|
-
var __getOwnPropDescs$
|
|
788
|
-
var __getOwnPropSymbols$
|
|
789
|
-
var __hasOwnProp$
|
|
790
|
-
var __propIsEnum$
|
|
791
|
-
var __defNormalProp$
|
|
792
|
-
var __spreadValues$
|
|
785
|
+
var __defProp$w = Object.defineProperty;
|
|
786
|
+
var __defProps$v = Object.defineProperties;
|
|
787
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
788
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
789
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
790
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
791
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
792
|
+
var __spreadValues$w = (a, b) => {
|
|
793
793
|
for (var prop in b || (b = {}))
|
|
794
|
-
if (__hasOwnProp$
|
|
795
|
-
__defNormalProp$
|
|
796
|
-
if (__getOwnPropSymbols$
|
|
797
|
-
for (var prop of __getOwnPropSymbols$
|
|
798
|
-
if (__propIsEnum$
|
|
799
|
-
__defNormalProp$
|
|
794
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
795
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
796
|
+
if (__getOwnPropSymbols$C)
|
|
797
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
798
|
+
if (__propIsEnum$C.call(b, prop))
|
|
799
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
800
800
|
}
|
|
801
801
|
return a;
|
|
802
802
|
};
|
|
803
|
-
var __spreadProps$
|
|
804
|
-
var __async$
|
|
803
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
804
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
805
805
|
return new Promise((resolve, reject) => {
|
|
806
806
|
var fulfilled = (value) => {
|
|
807
807
|
try {
|
|
@@ -824,8 +824,8 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
824
824
|
const useConnectCarrierAccount = () => {
|
|
825
825
|
const { client } = useShipEngine();
|
|
826
826
|
return useMutation({
|
|
827
|
-
mutationFn: (_0) => __async$
|
|
828
|
-
const formDataWithFlag = __spreadProps$
|
|
827
|
+
mutationFn: (_0) => __async$J(void 0, [_0], function* ({ carrierName, formData }) {
|
|
828
|
+
const formDataWithFlag = __spreadProps$v(__spreadValues$w({}, formData), { __skipDecamelize: true });
|
|
829
829
|
const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
|
|
830
830
|
return result.data;
|
|
831
831
|
}),
|
|
@@ -845,33 +845,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
845
845
|
});
|
|
846
846
|
};
|
|
847
847
|
|
|
848
|
-
var __defProp$
|
|
849
|
-
var __defProps$
|
|
850
|
-
var __getOwnPropDescs$
|
|
851
|
-
var __getOwnPropSymbols$
|
|
852
|
-
var __hasOwnProp$
|
|
853
|
-
var __propIsEnum$
|
|
854
|
-
var __defNormalProp$
|
|
855
|
-
var __spreadValues$
|
|
848
|
+
var __defProp$v = Object.defineProperty;
|
|
849
|
+
var __defProps$u = Object.defineProperties;
|
|
850
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
851
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
852
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
853
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
854
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
855
|
+
var __spreadValues$v = (a, b) => {
|
|
856
856
|
for (var prop in b || (b = {}))
|
|
857
|
-
if (__hasOwnProp$
|
|
858
|
-
__defNormalProp$
|
|
859
|
-
if (__getOwnPropSymbols$
|
|
860
|
-
for (var prop of __getOwnPropSymbols$
|
|
861
|
-
if (__propIsEnum$
|
|
862
|
-
__defNormalProp$
|
|
857
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
858
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
859
|
+
if (__getOwnPropSymbols$B)
|
|
860
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
861
|
+
if (__propIsEnum$B.call(b, prop))
|
|
862
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
863
863
|
}
|
|
864
864
|
return a;
|
|
865
865
|
};
|
|
866
|
-
var __spreadProps$
|
|
866
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
867
867
|
var __objRest$m = (source, exclude) => {
|
|
868
868
|
var target = {};
|
|
869
869
|
for (var prop in source)
|
|
870
|
-
if (__hasOwnProp$
|
|
870
|
+
if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
871
871
|
target[prop] = source[prop];
|
|
872
|
-
if (source != null && __getOwnPropSymbols$
|
|
873
|
-
for (var prop of __getOwnPropSymbols$
|
|
874
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
872
|
+
if (source != null && __getOwnPropSymbols$B)
|
|
873
|
+
for (var prop of __getOwnPropSymbols$B(source)) {
|
|
874
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
|
|
875
875
|
target[prop] = source[prop];
|
|
876
876
|
}
|
|
877
877
|
return target;
|
|
@@ -884,7 +884,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
884
884
|
]);
|
|
885
885
|
const { client } = useShipEngine();
|
|
886
886
|
const { carrierName, carrierId } = queryFnParams;
|
|
887
|
-
return useQuery(__spreadProps$
|
|
887
|
+
return useQuery(__spreadProps$u(__spreadValues$v({}, params), {
|
|
888
888
|
onError,
|
|
889
889
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
890
890
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -892,6 +892,65 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
892
892
|
}));
|
|
893
893
|
};
|
|
894
894
|
|
|
895
|
+
var __defProp$u = Object.defineProperty;
|
|
896
|
+
var __defProps$t = Object.defineProperties;
|
|
897
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
898
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
899
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
900
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
901
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
902
|
+
var __spreadValues$u = (a, b) => {
|
|
903
|
+
for (var prop in b || (b = {}))
|
|
904
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
905
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
906
|
+
if (__getOwnPropSymbols$A)
|
|
907
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
908
|
+
if (__propIsEnum$A.call(b, prop))
|
|
909
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
910
|
+
}
|
|
911
|
+
return a;
|
|
912
|
+
};
|
|
913
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
914
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
915
|
+
return new Promise((resolve, reject) => {
|
|
916
|
+
var fulfilled = (value) => {
|
|
917
|
+
try {
|
|
918
|
+
step(generator.next(value));
|
|
919
|
+
} catch (e) {
|
|
920
|
+
reject(e);
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
var rejected = (value) => {
|
|
924
|
+
try {
|
|
925
|
+
step(generator.throw(value));
|
|
926
|
+
} catch (e) {
|
|
927
|
+
reject(e);
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
931
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
932
|
+
});
|
|
933
|
+
};
|
|
934
|
+
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
935
|
+
const { client } = useShipEngine();
|
|
936
|
+
return useMutation(__spreadProps$t(__spreadValues$u({}, params), {
|
|
937
|
+
mutationFn: (_0) => __async$I(void 0, [_0], function* ({
|
|
938
|
+
carrierName,
|
|
939
|
+
carrierId,
|
|
940
|
+
formData
|
|
941
|
+
}) {
|
|
942
|
+
const result = yield client.connections.updateCarrierSettings(
|
|
943
|
+
carrierName,
|
|
944
|
+
carrierId,
|
|
945
|
+
formData
|
|
946
|
+
);
|
|
947
|
+
return result.data;
|
|
948
|
+
}),
|
|
949
|
+
mutationKey: ["useUpdateConnectionsCarrierSettings"],
|
|
950
|
+
onError
|
|
951
|
+
}));
|
|
952
|
+
};
|
|
953
|
+
|
|
895
954
|
var __defProp$t = Object.defineProperty;
|
|
896
955
|
var __defProps$s = Object.defineProperties;
|
|
897
956
|
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
@@ -931,22 +990,14 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
931
990
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
932
991
|
});
|
|
933
992
|
};
|
|
934
|
-
const
|
|
993
|
+
const useRequestStampsAccountUrls = (params) => {
|
|
935
994
|
const { client } = useShipEngine();
|
|
936
995
|
return useMutation(__spreadProps$s(__spreadValues$t({}, params), {
|
|
937
|
-
mutationFn: (
|
|
938
|
-
|
|
939
|
-
carrierId,
|
|
940
|
-
formData
|
|
941
|
-
}) {
|
|
942
|
-
const result = yield client.connections.updateCarrierSettings(
|
|
943
|
-
carrierName,
|
|
944
|
-
carrierId,
|
|
945
|
-
formData
|
|
946
|
-
);
|
|
996
|
+
mutationFn: (request) => __async$H(void 0, null, function* () {
|
|
997
|
+
const result = yield client.connections.requestStampsAccountUrls(request);
|
|
947
998
|
return result.data;
|
|
948
999
|
}),
|
|
949
|
-
mutationKey: ["
|
|
1000
|
+
mutationKey: ["useRequestStampsAccountUrls"],
|
|
950
1001
|
onError
|
|
951
1002
|
}));
|
|
952
1003
|
};
|
|
@@ -3755,4 +3806,4 @@ const useListUsers = (params) => {
|
|
|
3755
3806
|
}));
|
|
3756
3807
|
};
|
|
3757
3808
|
|
|
3758
|
-
export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|
|
3809
|
+
export { ShipEngine, ShipEngineContext, delay, logger, onError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useCalculateRates, useCancelShipment, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateAuctanePaySession, useCreateFundingSource, useCreateInvoiceAddress, useCreateLabel, useCreateLabelByRateId, useCreateLabelByShipmentId, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateSellerApiKey, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|