@shipengine/react-api 4.15.0 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hooks/carriers/index.d.ts +1 -0
- package/hooks/carriers/use-accept-carrier-terms.d.ts +8 -0
- package/hooks/funding-sources/index.d.ts +2 -0
- package/hooks/funding-sources/use-accept-funding-source-terms.d.ts +8 -0
- package/hooks/funding-sources/use-get-funding-source-accepted-terms.d.ts +9 -0
- package/index.js +422 -325
- package/index.mjs +420 -326
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -81,25 +81,25 @@ const onError = (_errors) => _default();
|
|
|
81
81
|
|
|
82
82
|
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}();
|
|
83
83
|
|
|
84
|
-
var __defProp$
|
|
85
|
-
var __defProps$
|
|
86
|
-
var __getOwnPropDescs$
|
|
87
|
-
var __getOwnPropSymbols$
|
|
88
|
-
var __hasOwnProp$
|
|
89
|
-
var __propIsEnum$
|
|
90
|
-
var __defNormalProp$
|
|
91
|
-
var __spreadValues$
|
|
84
|
+
var __defProp$L = Object.defineProperty;
|
|
85
|
+
var __defProps$K = Object.defineProperties;
|
|
86
|
+
var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
|
|
87
|
+
var __getOwnPropSymbols$U = Object.getOwnPropertySymbols;
|
|
88
|
+
var __hasOwnProp$U = Object.prototype.hasOwnProperty;
|
|
89
|
+
var __propIsEnum$U = Object.prototype.propertyIsEnumerable;
|
|
90
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
91
|
+
var __spreadValues$L = (a, b) => {
|
|
92
92
|
for (var prop in b || (b = {}))
|
|
93
|
-
if (__hasOwnProp$
|
|
94
|
-
__defNormalProp$
|
|
95
|
-
if (__getOwnPropSymbols$
|
|
96
|
-
for (var prop of __getOwnPropSymbols$
|
|
97
|
-
if (__propIsEnum$
|
|
98
|
-
__defNormalProp$
|
|
93
|
+
if (__hasOwnProp$U.call(b, prop))
|
|
94
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
95
|
+
if (__getOwnPropSymbols$U)
|
|
96
|
+
for (var prop of __getOwnPropSymbols$U(b)) {
|
|
97
|
+
if (__propIsEnum$U.call(b, prop))
|
|
98
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
99
99
|
}
|
|
100
100
|
return a;
|
|
101
101
|
};
|
|
102
|
-
var __spreadProps$
|
|
102
|
+
var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
|
|
103
103
|
const streams = [];
|
|
104
104
|
if (process.env.NODE_ENV === "production") {
|
|
105
105
|
streams.push({
|
|
@@ -108,7 +108,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
108
108
|
}
|
|
109
109
|
const logger = E({
|
|
110
110
|
name: "shipengine",
|
|
111
|
-
serializers: __spreadProps$
|
|
111
|
+
serializers: __spreadProps$K(__spreadValues$L({}, k), {
|
|
112
112
|
req: (req) => ({
|
|
113
113
|
headers: req.headers,
|
|
114
114
|
method: req.method,
|
|
@@ -133,7 +133,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
133
133
|
throw error;
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
var __async
|
|
136
|
+
var __async$11 = (__this, __arguments, generator) => {
|
|
137
137
|
return new Promise((resolve, reject) => {
|
|
138
138
|
var fulfilled = (value) => {
|
|
139
139
|
try {
|
|
@@ -156,7 +156,7 @@ var __async$$ = (__this, __arguments, generator) => {
|
|
|
156
156
|
const useCreateAccountImage = () => {
|
|
157
157
|
const { client } = useShipEngine();
|
|
158
158
|
return reactQuery.useMutation({
|
|
159
|
-
mutationFn: (data) => __async
|
|
159
|
+
mutationFn: (data) => __async$11(void 0, null, function* () {
|
|
160
160
|
const result = yield client.accountSettings.createImage(data);
|
|
161
161
|
return result.data;
|
|
162
162
|
}),
|
|
@@ -165,7 +165,7 @@ const useCreateAccountImage = () => {
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
var __async$
|
|
168
|
+
var __async$10 = (__this, __arguments, generator) => {
|
|
169
169
|
return new Promise((resolve, reject) => {
|
|
170
170
|
var fulfilled = (value) => {
|
|
171
171
|
try {
|
|
@@ -188,7 +188,7 @@ var __async$_ = (__this, __arguments, generator) => {
|
|
|
188
188
|
const useDeleteAccountImage = () => {
|
|
189
189
|
const { client } = useShipEngine();
|
|
190
190
|
return reactQuery.useMutation({
|
|
191
|
-
mutationFn: (labelImageId) => __async$
|
|
191
|
+
mutationFn: (labelImageId) => __async$10(void 0, null, function* () {
|
|
192
192
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
193
193
|
return result.data;
|
|
194
194
|
}),
|
|
@@ -217,7 +217,7 @@ const useGetAccountSettings = () => {
|
|
|
217
217
|
});
|
|
218
218
|
};
|
|
219
219
|
|
|
220
|
-
var __async
|
|
220
|
+
var __async$$ = (__this, __arguments, generator) => {
|
|
221
221
|
return new Promise((resolve, reject) => {
|
|
222
222
|
var fulfilled = (value) => {
|
|
223
223
|
try {
|
|
@@ -240,7 +240,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
240
240
|
const useUpdateAccountImage = () => {
|
|
241
241
|
const { client } = useShipEngine();
|
|
242
242
|
return reactQuery.useMutation({
|
|
243
|
-
mutationFn: (data) => __async
|
|
243
|
+
mutationFn: (data) => __async$$(void 0, null, function* () {
|
|
244
244
|
const result = yield client.accountSettings.updateImage(data);
|
|
245
245
|
return result.data;
|
|
246
246
|
}),
|
|
@@ -249,7 +249,7 @@ const useUpdateAccountImage = () => {
|
|
|
249
249
|
});
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
var __async$
|
|
252
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
253
253
|
return new Promise((resolve, reject) => {
|
|
254
254
|
var fulfilled = (value) => {
|
|
255
255
|
try {
|
|
@@ -272,7 +272,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
272
272
|
const useUpdateAccountSettings = () => {
|
|
273
273
|
const { client } = useShipEngine();
|
|
274
274
|
return reactQuery.useMutation({
|
|
275
|
-
mutationFn: (settings) => __async$
|
|
275
|
+
mutationFn: (settings) => __async$_(void 0, null, function* () {
|
|
276
276
|
const result = yield client.accountSettings.update(settings);
|
|
277
277
|
return result.data;
|
|
278
278
|
}),
|
|
@@ -281,6 +281,35 @@ const useUpdateAccountSettings = () => {
|
|
|
281
281
|
});
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
+
var __defProp$K = Object.defineProperty;
|
|
285
|
+
var __defProps$J = Object.defineProperties;
|
|
286
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
287
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
288
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
289
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
290
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
291
|
+
var __spreadValues$K = (a, b) => {
|
|
292
|
+
for (var prop in b || (b = {}))
|
|
293
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
294
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
295
|
+
if (__getOwnPropSymbols$T)
|
|
296
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
297
|
+
if (__propIsEnum$T.call(b, prop))
|
|
298
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
299
|
+
}
|
|
300
|
+
return a;
|
|
301
|
+
};
|
|
302
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
|
|
303
|
+
const useListAccountAddons = (params) => {
|
|
304
|
+
const { client } = useShipEngine();
|
|
305
|
+
return reactQuery.useQuery(__spreadProps$J(__spreadValues$K({}, params), {
|
|
306
|
+
onError,
|
|
307
|
+
queryFn: () => client.accountAddons.list(),
|
|
308
|
+
queryKey: ["useListAccountAddons"],
|
|
309
|
+
select: (result) => result.data.addons
|
|
310
|
+
}));
|
|
311
|
+
};
|
|
312
|
+
|
|
284
313
|
var __defProp$J = Object.defineProperty;
|
|
285
314
|
var __defProps$I = Object.defineProperties;
|
|
286
315
|
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
@@ -300,13 +329,35 @@ var __spreadValues$J = (a, b) => {
|
|
|
300
329
|
return a;
|
|
301
330
|
};
|
|
302
331
|
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
303
|
-
|
|
332
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
333
|
+
return new Promise((resolve, reject) => {
|
|
334
|
+
var fulfilled = (value) => {
|
|
335
|
+
try {
|
|
336
|
+
step(generator.next(value));
|
|
337
|
+
} catch (e) {
|
|
338
|
+
reject(e);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
var rejected = (value) => {
|
|
342
|
+
try {
|
|
343
|
+
step(generator.throw(value));
|
|
344
|
+
} catch (e) {
|
|
345
|
+
reject(e);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
349
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
350
|
+
});
|
|
351
|
+
};
|
|
352
|
+
const useEnableAccountAddon = (params) => {
|
|
304
353
|
const { client } = useShipEngine();
|
|
305
|
-
return reactQuery.
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
354
|
+
return reactQuery.useMutation(__spreadProps$I(__spreadValues$J({}, params), {
|
|
355
|
+
mutationFn: (addonType) => __async$Z(void 0, null, function* () {
|
|
356
|
+
const result = yield client.accountAddons.enable(addonType);
|
|
357
|
+
return result.data;
|
|
358
|
+
}),
|
|
359
|
+
mutationKey: ["useEnableAccountAddon"],
|
|
360
|
+
onError
|
|
310
361
|
}));
|
|
311
362
|
};
|
|
312
363
|
|
|
@@ -329,7 +380,7 @@ var __spreadValues$I = (a, b) => {
|
|
|
329
380
|
return a;
|
|
330
381
|
};
|
|
331
382
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
332
|
-
var __async$
|
|
383
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
333
384
|
return new Promise((resolve, reject) => {
|
|
334
385
|
var fulfilled = (value) => {
|
|
335
386
|
try {
|
|
@@ -349,14 +400,14 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
349
400
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
350
401
|
});
|
|
351
402
|
};
|
|
352
|
-
const
|
|
403
|
+
const useDisableAccountAddon = (params) => {
|
|
353
404
|
const { client } = useShipEngine();
|
|
354
405
|
return reactQuery.useMutation(__spreadProps$H(__spreadValues$I({}, params), {
|
|
355
|
-
mutationFn: (addonType) => __async$
|
|
356
|
-
const result = yield client.accountAddons.
|
|
406
|
+
mutationFn: (addonType) => __async$Y(void 0, null, function* () {
|
|
407
|
+
const result = yield client.accountAddons.disable(addonType);
|
|
357
408
|
return result.data;
|
|
358
409
|
}),
|
|
359
|
-
mutationKey: ["
|
|
410
|
+
mutationKey: ["useDisableAccountAddon"],
|
|
360
411
|
onError
|
|
361
412
|
}));
|
|
362
413
|
};
|
|
@@ -380,60 +431,9 @@ var __spreadValues$H = (a, b) => {
|
|
|
380
431
|
return a;
|
|
381
432
|
};
|
|
382
433
|
var __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b));
|
|
383
|
-
var __async$W = (__this, __arguments, generator) => {
|
|
384
|
-
return new Promise((resolve, reject) => {
|
|
385
|
-
var fulfilled = (value) => {
|
|
386
|
-
try {
|
|
387
|
-
step(generator.next(value));
|
|
388
|
-
} catch (e) {
|
|
389
|
-
reject(e);
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
var rejected = (value) => {
|
|
393
|
-
try {
|
|
394
|
-
step(generator.throw(value));
|
|
395
|
-
} catch (e) {
|
|
396
|
-
reject(e);
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
400
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
401
|
-
});
|
|
402
|
-
};
|
|
403
|
-
const useDisableAccountAddon = (params) => {
|
|
404
|
-
const { client } = useShipEngine();
|
|
405
|
-
return reactQuery.useMutation(__spreadProps$G(__spreadValues$H({}, params), {
|
|
406
|
-
mutationFn: (addonType) => __async$W(void 0, null, function* () {
|
|
407
|
-
const result = yield client.accountAddons.disable(addonType);
|
|
408
|
-
return result.data;
|
|
409
|
-
}),
|
|
410
|
-
mutationKey: ["useDisableAccountAddon"],
|
|
411
|
-
onError
|
|
412
|
-
}));
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
var __defProp$G = Object.defineProperty;
|
|
416
|
-
var __defProps$F = Object.defineProperties;
|
|
417
|
-
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
418
|
-
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
419
|
-
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
420
|
-
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
421
|
-
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
422
|
-
var __spreadValues$G = (a, b) => {
|
|
423
|
-
for (var prop in b || (b = {}))
|
|
424
|
-
if (__hasOwnProp$P.call(b, prop))
|
|
425
|
-
__defNormalProp$G(a, prop, b[prop]);
|
|
426
|
-
if (__getOwnPropSymbols$P)
|
|
427
|
-
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
428
|
-
if (__propIsEnum$P.call(b, prop))
|
|
429
|
-
__defNormalProp$G(a, prop, b[prop]);
|
|
430
|
-
}
|
|
431
|
-
return a;
|
|
432
|
-
};
|
|
433
|
-
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
434
434
|
const useListAccountFeatures = (params) => {
|
|
435
435
|
const { client } = useShipEngine();
|
|
436
|
-
return reactQuery.useQuery(__spreadProps$
|
|
436
|
+
return reactQuery.useQuery(__spreadProps$G(__spreadValues$H({}, params), {
|
|
437
437
|
onError,
|
|
438
438
|
queryFn: () => client.accountFeatures.list(),
|
|
439
439
|
queryKey: ["useListAccountFeatures"],
|
|
@@ -441,7 +441,7 @@ const useListAccountFeatures = (params) => {
|
|
|
441
441
|
}));
|
|
442
442
|
};
|
|
443
443
|
|
|
444
|
-
var __async$
|
|
444
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
445
445
|
return new Promise((resolve, reject) => {
|
|
446
446
|
var fulfilled = (value) => {
|
|
447
447
|
try {
|
|
@@ -464,7 +464,7 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
464
464
|
const useRequestAccountFeature = () => {
|
|
465
465
|
const { client } = useShipEngine();
|
|
466
466
|
return reactQuery.useMutation({
|
|
467
|
-
mutationFn: (request) => __async$
|
|
467
|
+
mutationFn: (request) => __async$X(void 0, null, function* () {
|
|
468
468
|
const result = yield client.accountFeatures.request(request);
|
|
469
469
|
return result.data;
|
|
470
470
|
}),
|
|
@@ -473,7 +473,7 @@ const useRequestAccountFeature = () => {
|
|
|
473
473
|
});
|
|
474
474
|
};
|
|
475
475
|
|
|
476
|
-
var __async$
|
|
476
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
477
477
|
return new Promise((resolve, reject) => {
|
|
478
478
|
var fulfilled = (value) => {
|
|
479
479
|
try {
|
|
@@ -496,7 +496,7 @@ var __async$U = (__this, __arguments, generator) => {
|
|
|
496
496
|
const useParseAddress = () => {
|
|
497
497
|
const { client } = useShipEngine();
|
|
498
498
|
return reactQuery.useMutation({
|
|
499
|
-
mutationFn: (_0) => __async$
|
|
499
|
+
mutationFn: (_0) => __async$W(void 0, [_0], function* ({ address, text }) {
|
|
500
500
|
const result = yield client.addresses.parse(text, address);
|
|
501
501
|
return result.data;
|
|
502
502
|
}),
|
|
@@ -505,7 +505,7 @@ const useParseAddress = () => {
|
|
|
505
505
|
});
|
|
506
506
|
};
|
|
507
507
|
|
|
508
|
-
var __async$
|
|
508
|
+
var __async$V = (__this, __arguments, generator) => {
|
|
509
509
|
return new Promise((resolve, reject) => {
|
|
510
510
|
var fulfilled = (value) => {
|
|
511
511
|
try {
|
|
@@ -528,7 +528,7 @@ var __async$T = (__this, __arguments, generator) => {
|
|
|
528
528
|
const useValidateAddresses = () => {
|
|
529
529
|
const { client } = useShipEngine();
|
|
530
530
|
return reactQuery.useMutation({
|
|
531
|
-
mutationFn: (addresses) => __async$
|
|
531
|
+
mutationFn: (addresses) => __async$V(void 0, null, function* () {
|
|
532
532
|
const result = yield client.addresses.validate(addresses);
|
|
533
533
|
return result.data;
|
|
534
534
|
}),
|
|
@@ -537,26 +537,26 @@ const useValidateAddresses = () => {
|
|
|
537
537
|
});
|
|
538
538
|
};
|
|
539
539
|
|
|
540
|
-
var __defProp$
|
|
541
|
-
var __defProps$
|
|
542
|
-
var __getOwnPropDescs$
|
|
543
|
-
var __getOwnPropSymbols$
|
|
544
|
-
var __hasOwnProp$
|
|
545
|
-
var __propIsEnum$
|
|
546
|
-
var __defNormalProp$
|
|
547
|
-
var __spreadValues$
|
|
540
|
+
var __defProp$G = Object.defineProperty;
|
|
541
|
+
var __defProps$F = Object.defineProperties;
|
|
542
|
+
var __getOwnPropDescs$F = Object.getOwnPropertyDescriptors;
|
|
543
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
544
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
545
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
546
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
547
|
+
var __spreadValues$G = (a, b) => {
|
|
548
548
|
for (var prop in b || (b = {}))
|
|
549
|
-
if (__hasOwnProp$
|
|
550
|
-
__defNormalProp$
|
|
551
|
-
if (__getOwnPropSymbols$
|
|
552
|
-
for (var prop of __getOwnPropSymbols$
|
|
553
|
-
if (__propIsEnum$
|
|
554
|
-
__defNormalProp$
|
|
549
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
550
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
551
|
+
if (__getOwnPropSymbols$P)
|
|
552
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
553
|
+
if (__propIsEnum$P.call(b, prop))
|
|
554
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
555
555
|
}
|
|
556
556
|
return a;
|
|
557
557
|
};
|
|
558
|
-
var __spreadProps$
|
|
559
|
-
var __async$
|
|
558
|
+
var __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b));
|
|
559
|
+
var __async$U = (__this, __arguments, generator) => {
|
|
560
560
|
return new Promise((resolve, reject) => {
|
|
561
561
|
var fulfilled = (value) => {
|
|
562
562
|
try {
|
|
@@ -578,8 +578,8 @@ var __async$S = (__this, __arguments, generator) => {
|
|
|
578
578
|
};
|
|
579
579
|
const useCreateAuctanePaySession = (params) => {
|
|
580
580
|
const { client } = useShipEngine();
|
|
581
|
-
return reactQuery.useMutation(__spreadProps$
|
|
582
|
-
mutationFn: (request) => __async$
|
|
581
|
+
return reactQuery.useMutation(__spreadProps$F(__spreadValues$G({}, params), {
|
|
582
|
+
mutationFn: (request) => __async$U(void 0, null, function* () {
|
|
583
583
|
const result = yield client.auctanePay.createSession(request);
|
|
584
584
|
return result.data;
|
|
585
585
|
}),
|
|
@@ -588,6 +588,36 @@ const useCreateAuctanePaySession = (params) => {
|
|
|
588
588
|
}));
|
|
589
589
|
};
|
|
590
590
|
|
|
591
|
+
var __defProp$F = Object.defineProperty;
|
|
592
|
+
var __defProps$E = Object.defineProperties;
|
|
593
|
+
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
594
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
595
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
596
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
597
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
598
|
+
var __spreadValues$F = (a, b) => {
|
|
599
|
+
for (var prop in b || (b = {}))
|
|
600
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
601
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
602
|
+
if (__getOwnPropSymbols$O)
|
|
603
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
604
|
+
if (__propIsEnum$O.call(b, prop))
|
|
605
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
606
|
+
}
|
|
607
|
+
return a;
|
|
608
|
+
};
|
|
609
|
+
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
610
|
+
const useGetAuctanePayConfig = (params) => {
|
|
611
|
+
const { client } = useShipEngine();
|
|
612
|
+
const queryParams = __spreadValues$F({}, params);
|
|
613
|
+
return reactQuery.useQuery(__spreadProps$E(__spreadValues$F({}, queryParams), {
|
|
614
|
+
onError,
|
|
615
|
+
queryFn: () => client.auctanePay.getConfig(),
|
|
616
|
+
queryKey: ["useGetAuctanePayConfig"],
|
|
617
|
+
select: (result) => result.data
|
|
618
|
+
}));
|
|
619
|
+
};
|
|
620
|
+
|
|
591
621
|
var __defProp$E = Object.defineProperty;
|
|
592
622
|
var __defProps$D = Object.defineProperties;
|
|
593
623
|
var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
|
|
@@ -607,37 +637,7 @@ var __spreadValues$E = (a, b) => {
|
|
|
607
637
|
return a;
|
|
608
638
|
};
|
|
609
639
|
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
610
|
-
|
|
611
|
-
const { client } = useShipEngine();
|
|
612
|
-
const queryParams = __spreadValues$E({}, params);
|
|
613
|
-
return reactQuery.useQuery(__spreadProps$D(__spreadValues$E({}, queryParams), {
|
|
614
|
-
onError,
|
|
615
|
-
queryFn: () => client.auctanePay.getConfig(),
|
|
616
|
-
queryKey: ["useGetAuctanePayConfig"],
|
|
617
|
-
select: (result) => result.data
|
|
618
|
-
}));
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
var __defProp$D = Object.defineProperty;
|
|
622
|
-
var __defProps$C = Object.defineProperties;
|
|
623
|
-
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
624
|
-
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
625
|
-
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
626
|
-
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
627
|
-
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
628
|
-
var __spreadValues$D = (a, b) => {
|
|
629
|
-
for (var prop in b || (b = {}))
|
|
630
|
-
if (__hasOwnProp$M.call(b, prop))
|
|
631
|
-
__defNormalProp$D(a, prop, b[prop]);
|
|
632
|
-
if (__getOwnPropSymbols$M)
|
|
633
|
-
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
634
|
-
if (__propIsEnum$M.call(b, prop))
|
|
635
|
-
__defNormalProp$D(a, prop, b[prop]);
|
|
636
|
-
}
|
|
637
|
-
return a;
|
|
638
|
-
};
|
|
639
|
-
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
640
|
-
var __async$R = (__this, __arguments, generator) => {
|
|
640
|
+
var __async$T = (__this, __arguments, generator) => {
|
|
641
641
|
return new Promise((resolve, reject) => {
|
|
642
642
|
var fulfilled = (value) => {
|
|
643
643
|
try {
|
|
@@ -659,8 +659,8 @@ var __async$R = (__this, __arguments, generator) => {
|
|
|
659
659
|
};
|
|
660
660
|
const usePreviewTransaction = (params) => {
|
|
661
661
|
const { client } = useShipEngine();
|
|
662
|
-
return reactQuery.useMutation(__spreadProps$
|
|
663
|
-
mutationFn: (_0) => __async$
|
|
662
|
+
return reactQuery.useMutation(__spreadProps$D(__spreadValues$E({}, params), {
|
|
663
|
+
mutationFn: (_0) => __async$T(void 0, [_0], function* ({ amount, transactionCategory = "add_funds" }) {
|
|
664
664
|
const request = {
|
|
665
665
|
amount,
|
|
666
666
|
transactionCategory
|
|
@@ -673,6 +673,36 @@ const usePreviewTransaction = (params) => {
|
|
|
673
673
|
}));
|
|
674
674
|
};
|
|
675
675
|
|
|
676
|
+
var __defProp$D = Object.defineProperty;
|
|
677
|
+
var __defProps$C = Object.defineProperties;
|
|
678
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
679
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
680
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
681
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
682
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
683
|
+
var __spreadValues$D = (a, b) => {
|
|
684
|
+
for (var prop in b || (b = {}))
|
|
685
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
686
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
687
|
+
if (__getOwnPropSymbols$M)
|
|
688
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
689
|
+
if (__propIsEnum$M.call(b, prop))
|
|
690
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
691
|
+
}
|
|
692
|
+
return a;
|
|
693
|
+
};
|
|
694
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
695
|
+
const useGetPaymentMethods = (params) => {
|
|
696
|
+
const { client } = useShipEngine();
|
|
697
|
+
const queryParams = __spreadValues$D({}, params);
|
|
698
|
+
return reactQuery.useQuery(__spreadProps$C(__spreadValues$D({}, queryParams), {
|
|
699
|
+
onError,
|
|
700
|
+
queryFn: () => client.auctanePay.getPaymentMethods(),
|
|
701
|
+
queryKey: ["useGetPaymentMethods"],
|
|
702
|
+
select: (result) => result.data
|
|
703
|
+
}));
|
|
704
|
+
};
|
|
705
|
+
|
|
676
706
|
var __defProp$C = Object.defineProperty;
|
|
677
707
|
var __defProps$B = Object.defineProperties;
|
|
678
708
|
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
@@ -692,14 +722,35 @@ var __spreadValues$C = (a, b) => {
|
|
|
692
722
|
return a;
|
|
693
723
|
};
|
|
694
724
|
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
695
|
-
|
|
725
|
+
var __async$S = (__this, __arguments, generator) => {
|
|
726
|
+
return new Promise((resolve, reject) => {
|
|
727
|
+
var fulfilled = (value) => {
|
|
728
|
+
try {
|
|
729
|
+
step(generator.next(value));
|
|
730
|
+
} catch (e) {
|
|
731
|
+
reject(e);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
var rejected = (value) => {
|
|
735
|
+
try {
|
|
736
|
+
step(generator.throw(value));
|
|
737
|
+
} catch (e) {
|
|
738
|
+
reject(e);
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
742
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
743
|
+
});
|
|
744
|
+
};
|
|
745
|
+
const useDeletePaymentMethod = (params) => {
|
|
696
746
|
const { client } = useShipEngine();
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
747
|
+
return reactQuery.useMutation(__spreadProps$B(__spreadValues$C({}, params), {
|
|
748
|
+
mutationFn: (paymentMethodId) => __async$S(void 0, null, function* () {
|
|
749
|
+
const result = yield client.auctanePay.deletePaymentMethod(paymentMethodId);
|
|
750
|
+
return result.data;
|
|
751
|
+
}),
|
|
752
|
+
mutationKey: ["useDeletePaymentMethod"],
|
|
753
|
+
onError
|
|
703
754
|
}));
|
|
704
755
|
};
|
|
705
756
|
|
|
@@ -722,7 +773,7 @@ var __spreadValues$B = (a, b) => {
|
|
|
722
773
|
return a;
|
|
723
774
|
};
|
|
724
775
|
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
725
|
-
var __async$
|
|
776
|
+
var __async$R = (__this, __arguments, generator) => {
|
|
726
777
|
return new Promise((resolve, reject) => {
|
|
727
778
|
var fulfilled = (value) => {
|
|
728
779
|
try {
|
|
@@ -742,14 +793,14 @@ var __async$Q = (__this, __arguments, generator) => {
|
|
|
742
793
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
743
794
|
});
|
|
744
795
|
};
|
|
745
|
-
const
|
|
796
|
+
const useUpdatePaymentMethod = (params) => {
|
|
746
797
|
const { client } = useShipEngine();
|
|
747
798
|
return reactQuery.useMutation(__spreadProps$A(__spreadValues$B({}, params), {
|
|
748
|
-
mutationFn: (
|
|
749
|
-
const result = yield client.auctanePay.
|
|
799
|
+
mutationFn: (_0) => __async$R(void 0, [_0], function* ({ paymentMethodId, payload }) {
|
|
800
|
+
const result = yield client.auctanePay.updatePaymentMethod(paymentMethodId, payload);
|
|
750
801
|
return result.data;
|
|
751
802
|
}),
|
|
752
|
-
mutationKey: ["
|
|
803
|
+
mutationKey: ["useUpdatePaymentMethod"],
|
|
753
804
|
onError
|
|
754
805
|
}));
|
|
755
806
|
};
|
|
@@ -773,7 +824,7 @@ var __spreadValues$A = (a, b) => {
|
|
|
773
824
|
return a;
|
|
774
825
|
};
|
|
775
826
|
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
776
|
-
var __async$
|
|
827
|
+
var __async$Q = (__this, __arguments, generator) => {
|
|
777
828
|
return new Promise((resolve, reject) => {
|
|
778
829
|
var fulfilled = (value) => {
|
|
779
830
|
try {
|
|
@@ -793,14 +844,14 @@ var __async$P = (__this, __arguments, generator) => {
|
|
|
793
844
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
794
845
|
});
|
|
795
846
|
};
|
|
796
|
-
const
|
|
847
|
+
const useIdentityVerification = (params) => {
|
|
797
848
|
const { client } = useShipEngine();
|
|
798
849
|
return reactQuery.useMutation(__spreadProps$z(__spreadValues$A({}, params), {
|
|
799
|
-
mutationFn: (
|
|
800
|
-
const result = yield client.auctanePay.
|
|
850
|
+
mutationFn: () => __async$Q(void 0, null, function* () {
|
|
851
|
+
const result = yield client.auctanePay.identityVerification();
|
|
801
852
|
return result.data;
|
|
802
853
|
}),
|
|
803
|
-
mutationKey: ["
|
|
854
|
+
mutationKey: ["useIdentityVerification"],
|
|
804
855
|
onError
|
|
805
856
|
}));
|
|
806
857
|
};
|
|
@@ -824,7 +875,18 @@ var __spreadValues$z = (a, b) => {
|
|
|
824
875
|
return a;
|
|
825
876
|
};
|
|
826
877
|
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
827
|
-
|
|
878
|
+
const useGetPaymentAccount = (params) => {
|
|
879
|
+
const { client } = useShipEngine();
|
|
880
|
+
const queryParams = __spreadValues$z({}, params);
|
|
881
|
+
return reactQuery.useQuery(__spreadProps$y(__spreadValues$z({}, queryParams), {
|
|
882
|
+
onError,
|
|
883
|
+
queryFn: () => client.auctanePay.getPaymentAccount(),
|
|
884
|
+
queryKey: ["useGetPaymentAccount"],
|
|
885
|
+
select: (result) => result.data
|
|
886
|
+
}));
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
var __async$P = (__this, __arguments, generator) => {
|
|
828
890
|
return new Promise((resolve, reject) => {
|
|
829
891
|
var fulfilled = (value) => {
|
|
830
892
|
try {
|
|
@@ -844,49 +906,19 @@ var __async$O = (__this, __arguments, generator) => {
|
|
|
844
906
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
845
907
|
});
|
|
846
908
|
};
|
|
847
|
-
const
|
|
848
|
-
const { client } = useShipEngine();
|
|
849
|
-
return reactQuery.useMutation(__spreadProps$y(__spreadValues$z({}, params), {
|
|
850
|
-
mutationFn: () => __async$O(void 0, null, function* () {
|
|
851
|
-
const result = yield client.auctanePay.identityVerification();
|
|
852
|
-
return result.data;
|
|
853
|
-
}),
|
|
854
|
-
mutationKey: ["useIdentityVerification"],
|
|
855
|
-
onError
|
|
856
|
-
}));
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
var __defProp$y = Object.defineProperty;
|
|
860
|
-
var __defProps$x = Object.defineProperties;
|
|
861
|
-
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
862
|
-
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
863
|
-
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
864
|
-
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
865
|
-
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
866
|
-
var __spreadValues$y = (a, b) => {
|
|
867
|
-
for (var prop in b || (b = {}))
|
|
868
|
-
if (__hasOwnProp$H.call(b, prop))
|
|
869
|
-
__defNormalProp$y(a, prop, b[prop]);
|
|
870
|
-
if (__getOwnPropSymbols$H)
|
|
871
|
-
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
872
|
-
if (__propIsEnum$H.call(b, prop))
|
|
873
|
-
__defNormalProp$y(a, prop, b[prop]);
|
|
874
|
-
}
|
|
875
|
-
return a;
|
|
876
|
-
};
|
|
877
|
-
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
878
|
-
const useGetPaymentAccount = (params) => {
|
|
909
|
+
const useAcceptCarrierTerms = (carrierId) => {
|
|
879
910
|
const { client } = useShipEngine();
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
911
|
+
return reactQuery.useMutation({
|
|
912
|
+
mutationFn: (request) => __async$P(void 0, null, function* () {
|
|
913
|
+
const result = yield client.carriers.acceptTerms(carrierId, request);
|
|
914
|
+
return result.data.acceptedTerms;
|
|
915
|
+
}),
|
|
916
|
+
mutationKey: ["useAcceptCarrierTerms", carrierId],
|
|
917
|
+
onError
|
|
918
|
+
});
|
|
887
919
|
};
|
|
888
920
|
|
|
889
|
-
var __async$
|
|
921
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
890
922
|
return new Promise((resolve, reject) => {
|
|
891
923
|
var fulfilled = (value) => {
|
|
892
924
|
try {
|
|
@@ -909,7 +941,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
909
941
|
const useAddFunds = () => {
|
|
910
942
|
const { client } = useShipEngine();
|
|
911
943
|
return reactQuery.useMutation({
|
|
912
|
-
mutationFn: (_0) => __async$
|
|
944
|
+
mutationFn: (_0) => __async$O(void 0, [_0], function* ({ carrierId, funds }) {
|
|
913
945
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
914
946
|
return result.data;
|
|
915
947
|
}),
|
|
@@ -918,7 +950,7 @@ const useAddFunds = () => {
|
|
|
918
950
|
});
|
|
919
951
|
};
|
|
920
952
|
|
|
921
|
-
var __async$
|
|
953
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
922
954
|
return new Promise((resolve, reject) => {
|
|
923
955
|
var fulfilled = (value) => {
|
|
924
956
|
try {
|
|
@@ -941,7 +973,7 @@ var __async$M = (__this, __arguments, generator) => {
|
|
|
941
973
|
const useConnectCarrier = () => {
|
|
942
974
|
const { client } = useShipEngine();
|
|
943
975
|
return reactQuery.useMutation({
|
|
944
|
-
mutationFn: (params) => __async$
|
|
976
|
+
mutationFn: (params) => __async$N(void 0, null, function* () {
|
|
945
977
|
const result = yield client.carriers.connect(params);
|
|
946
978
|
return result.data;
|
|
947
979
|
}),
|
|
@@ -1050,41 +1082,41 @@ const useGetServicesByCarrier = (carrierId) => {
|
|
|
1050
1082
|
});
|
|
1051
1083
|
};
|
|
1052
1084
|
|
|
1053
|
-
var __defProp$
|
|
1054
|
-
var __defProps$
|
|
1055
|
-
var __getOwnPropDescs$
|
|
1056
|
-
var __getOwnPropSymbols$
|
|
1057
|
-
var __hasOwnProp$
|
|
1058
|
-
var __propIsEnum$
|
|
1059
|
-
var __defNormalProp$
|
|
1060
|
-
var __spreadValues$
|
|
1085
|
+
var __defProp$y = Object.defineProperty;
|
|
1086
|
+
var __defProps$x = Object.defineProperties;
|
|
1087
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
1088
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
1089
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
1090
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
1091
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1092
|
+
var __spreadValues$y = (a, b) => {
|
|
1061
1093
|
for (var prop in b || (b = {}))
|
|
1062
|
-
if (__hasOwnProp$
|
|
1063
|
-
__defNormalProp$
|
|
1064
|
-
if (__getOwnPropSymbols$
|
|
1065
|
-
for (var prop of __getOwnPropSymbols$
|
|
1066
|
-
if (__propIsEnum$
|
|
1067
|
-
__defNormalProp$
|
|
1094
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
1095
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
1096
|
+
if (__getOwnPropSymbols$H)
|
|
1097
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
1098
|
+
if (__propIsEnum$H.call(b, prop))
|
|
1099
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
1068
1100
|
}
|
|
1069
1101
|
return a;
|
|
1070
1102
|
};
|
|
1071
|
-
var __spreadProps$
|
|
1103
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
1072
1104
|
var __objRest$q = (source, exclude) => {
|
|
1073
1105
|
var target = {};
|
|
1074
1106
|
for (var prop in source)
|
|
1075
|
-
if (__hasOwnProp$
|
|
1107
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1076
1108
|
target[prop] = source[prop];
|
|
1077
|
-
if (source != null && __getOwnPropSymbols$
|
|
1078
|
-
for (var prop of __getOwnPropSymbols$
|
|
1079
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1109
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
1110
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
1111
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
1080
1112
|
target[prop] = source[prop];
|
|
1081
1113
|
}
|
|
1082
1114
|
return target;
|
|
1083
1115
|
};
|
|
1084
1116
|
const useListCarriers = (params) => {
|
|
1085
1117
|
const { client } = useShipEngine();
|
|
1086
|
-
const _a = __spreadValues$
|
|
1087
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1118
|
+
const _a = __spreadValues$y({}, params), { queryFnParams } = _a, rest = __objRest$q(_a, ["queryFnParams"]);
|
|
1119
|
+
return reactQuery.useQuery(__spreadProps$x(__spreadValues$y({}, rest), {
|
|
1088
1120
|
onError,
|
|
1089
1121
|
queryFn: () => client.carriers.list(queryFnParams),
|
|
1090
1122
|
queryKey: ["useListCarriers", queryFnParams],
|
|
@@ -1092,22 +1124,22 @@ const useListCarriers = (params) => {
|
|
|
1092
1124
|
}));
|
|
1093
1125
|
};
|
|
1094
1126
|
|
|
1095
|
-
var __getOwnPropSymbols$
|
|
1096
|
-
var __hasOwnProp$
|
|
1097
|
-
var __propIsEnum$
|
|
1127
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
1128
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
1129
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
1098
1130
|
var __objRest$p = (source, exclude) => {
|
|
1099
1131
|
var target = {};
|
|
1100
1132
|
for (var prop in source)
|
|
1101
|
-
if (__hasOwnProp$
|
|
1133
|
+
if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1102
1134
|
target[prop] = source[prop];
|
|
1103
|
-
if (source != null && __getOwnPropSymbols$
|
|
1104
|
-
for (var prop of __getOwnPropSymbols$
|
|
1105
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1135
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
1136
|
+
for (var prop of __getOwnPropSymbols$G(source)) {
|
|
1137
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
|
|
1106
1138
|
target[prop] = source[prop];
|
|
1107
1139
|
}
|
|
1108
1140
|
return target;
|
|
1109
1141
|
};
|
|
1110
|
-
var __async$
|
|
1142
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
1111
1143
|
return new Promise((resolve, reject) => {
|
|
1112
1144
|
var fulfilled = (value) => {
|
|
1113
1145
|
try {
|
|
@@ -1131,7 +1163,7 @@ const useUpdateAutoFunding = () => {
|
|
|
1131
1163
|
const { client } = useShipEngine();
|
|
1132
1164
|
const queryClient = reactQuery.useQueryClient();
|
|
1133
1165
|
return reactQuery.useMutation({
|
|
1134
|
-
mutationFn: (_a) => __async$
|
|
1166
|
+
mutationFn: (_a) => __async$M(void 0, null, function* () {
|
|
1135
1167
|
var _b = _a, { carrierId } = _b, options = __objRest$p(_b, ["carrierId"]);
|
|
1136
1168
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
1137
1169
|
return result.data;
|
|
@@ -1161,7 +1193,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
1161
1193
|
});
|
|
1162
1194
|
};
|
|
1163
1195
|
|
|
1164
|
-
var __async$
|
|
1196
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
1165
1197
|
return new Promise((resolve, reject) => {
|
|
1166
1198
|
var fulfilled = (value) => {
|
|
1167
1199
|
try {
|
|
@@ -1184,7 +1216,7 @@ var __async$K = (__this, __arguments, generator) => {
|
|
|
1184
1216
|
const useDeleteCarrier = () => {
|
|
1185
1217
|
const { client } = useShipEngine();
|
|
1186
1218
|
return reactQuery.useMutation({
|
|
1187
|
-
mutationFn: (carrierId) => __async$
|
|
1219
|
+
mutationFn: (carrierId) => __async$L(void 0, null, function* () {
|
|
1188
1220
|
const result = yield client.carriers.delete(carrierId);
|
|
1189
1221
|
return result.data;
|
|
1190
1222
|
}),
|
|
@@ -1193,17 +1225,17 @@ const useDeleteCarrier = () => {
|
|
|
1193
1225
|
});
|
|
1194
1226
|
};
|
|
1195
1227
|
|
|
1196
|
-
var __getOwnPropSymbols$
|
|
1197
|
-
var __hasOwnProp$
|
|
1198
|
-
var __propIsEnum$
|
|
1228
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
1229
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
1230
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
1199
1231
|
var __objRest$o = (source, exclude) => {
|
|
1200
1232
|
var target = {};
|
|
1201
1233
|
for (var prop in source)
|
|
1202
|
-
if (__hasOwnProp$
|
|
1234
|
+
if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1203
1235
|
target[prop] = source[prop];
|
|
1204
|
-
if (source != null && __getOwnPropSymbols$
|
|
1205
|
-
for (var prop of __getOwnPropSymbols$
|
|
1206
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1236
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
1237
|
+
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
1238
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
1207
1239
|
target[prop] = source[prop];
|
|
1208
1240
|
}
|
|
1209
1241
|
return target;
|
|
@@ -1220,17 +1252,17 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
1220
1252
|
});
|
|
1221
1253
|
};
|
|
1222
1254
|
|
|
1223
|
-
var __getOwnPropSymbols$
|
|
1224
|
-
var __hasOwnProp$
|
|
1225
|
-
var __propIsEnum$
|
|
1255
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
1256
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
1257
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
1226
1258
|
var __objRest$n = (source, exclude) => {
|
|
1227
1259
|
var target = {};
|
|
1228
1260
|
for (var prop in source)
|
|
1229
|
-
if (__hasOwnProp$
|
|
1261
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1230
1262
|
target[prop] = source[prop];
|
|
1231
|
-
if (source != null && __getOwnPropSymbols$
|
|
1232
|
-
for (var prop of __getOwnPropSymbols$
|
|
1233
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1263
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
1264
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
1265
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
1234
1266
|
target[prop] = source[prop];
|
|
1235
1267
|
}
|
|
1236
1268
|
return target;
|
|
@@ -1247,26 +1279,26 @@ const useListCarrierConnections = (_params) => {
|
|
|
1247
1279
|
});
|
|
1248
1280
|
};
|
|
1249
1281
|
|
|
1250
|
-
var __defProp$
|
|
1251
|
-
var __defProps$
|
|
1252
|
-
var __getOwnPropDescs$
|
|
1253
|
-
var __getOwnPropSymbols$
|
|
1254
|
-
var __hasOwnProp$
|
|
1255
|
-
var __propIsEnum$
|
|
1256
|
-
var __defNormalProp$
|
|
1257
|
-
var __spreadValues$
|
|
1282
|
+
var __defProp$x = Object.defineProperty;
|
|
1283
|
+
var __defProps$w = Object.defineProperties;
|
|
1284
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
1285
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
1286
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
1287
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
1288
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1289
|
+
var __spreadValues$x = (a, b) => {
|
|
1258
1290
|
for (var prop in b || (b = {}))
|
|
1259
|
-
if (__hasOwnProp$
|
|
1260
|
-
__defNormalProp$
|
|
1261
|
-
if (__getOwnPropSymbols$
|
|
1262
|
-
for (var prop of __getOwnPropSymbols$
|
|
1263
|
-
if (__propIsEnum$
|
|
1264
|
-
__defNormalProp$
|
|
1291
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
1292
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
1293
|
+
if (__getOwnPropSymbols$D)
|
|
1294
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
1295
|
+
if (__propIsEnum$D.call(b, prop))
|
|
1296
|
+
__defNormalProp$x(a, prop, b[prop]);
|
|
1265
1297
|
}
|
|
1266
1298
|
return a;
|
|
1267
1299
|
};
|
|
1268
|
-
var __spreadProps$
|
|
1269
|
-
var __async$
|
|
1300
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
1301
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
1270
1302
|
return new Promise((resolve, reject) => {
|
|
1271
1303
|
var fulfilled = (value) => {
|
|
1272
1304
|
try {
|
|
@@ -1289,8 +1321,8 @@ var __async$J = (__this, __arguments, generator) => {
|
|
|
1289
1321
|
const useConnectCarrierAccount = () => {
|
|
1290
1322
|
const { client } = useShipEngine();
|
|
1291
1323
|
return reactQuery.useMutation({
|
|
1292
|
-
mutationFn: (_0) => __async$
|
|
1293
|
-
const formDataWithFlag = __spreadProps$
|
|
1324
|
+
mutationFn: (_0) => __async$K(void 0, [_0], function* ({ carrierName, formData }) {
|
|
1325
|
+
const formDataWithFlag = __spreadProps$w(__spreadValues$x({}, formData), { __skipDecamelize: true });
|
|
1294
1326
|
const result = yield client.connections.connectCarrier(carrierName, formDataWithFlag);
|
|
1295
1327
|
return result.data;
|
|
1296
1328
|
}),
|
|
@@ -1310,33 +1342,33 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
1310
1342
|
});
|
|
1311
1343
|
};
|
|
1312
1344
|
|
|
1313
|
-
var __defProp$
|
|
1314
|
-
var __defProps$
|
|
1315
|
-
var __getOwnPropDescs$
|
|
1316
|
-
var __getOwnPropSymbols$
|
|
1317
|
-
var __hasOwnProp$
|
|
1318
|
-
var __propIsEnum$
|
|
1319
|
-
var __defNormalProp$
|
|
1320
|
-
var __spreadValues$
|
|
1345
|
+
var __defProp$w = Object.defineProperty;
|
|
1346
|
+
var __defProps$v = Object.defineProperties;
|
|
1347
|
+
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
1348
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
1349
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
1350
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
1351
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1352
|
+
var __spreadValues$w = (a, b) => {
|
|
1321
1353
|
for (var prop in b || (b = {}))
|
|
1322
|
-
if (__hasOwnProp$
|
|
1323
|
-
__defNormalProp$
|
|
1324
|
-
if (__getOwnPropSymbols$
|
|
1325
|
-
for (var prop of __getOwnPropSymbols$
|
|
1326
|
-
if (__propIsEnum$
|
|
1327
|
-
__defNormalProp$
|
|
1354
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
1355
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
1356
|
+
if (__getOwnPropSymbols$C)
|
|
1357
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
1358
|
+
if (__propIsEnum$C.call(b, prop))
|
|
1359
|
+
__defNormalProp$w(a, prop, b[prop]);
|
|
1328
1360
|
}
|
|
1329
1361
|
return a;
|
|
1330
1362
|
};
|
|
1331
|
-
var __spreadProps$
|
|
1363
|
+
var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
1332
1364
|
var __objRest$m = (source, exclude) => {
|
|
1333
1365
|
var target = {};
|
|
1334
1366
|
for (var prop in source)
|
|
1335
|
-
if (__hasOwnProp$
|
|
1367
|
+
if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1336
1368
|
target[prop] = source[prop];
|
|
1337
|
-
if (source != null && __getOwnPropSymbols$
|
|
1338
|
-
for (var prop of __getOwnPropSymbols$
|
|
1339
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1369
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
1370
|
+
for (var prop of __getOwnPropSymbols$C(source)) {
|
|
1371
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
|
|
1340
1372
|
target[prop] = source[prop];
|
|
1341
1373
|
}
|
|
1342
1374
|
return target;
|
|
@@ -1349,7 +1381,7 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
1349
1381
|
]);
|
|
1350
1382
|
const { client } = useShipEngine();
|
|
1351
1383
|
const { carrierName, carrierId } = queryFnParams;
|
|
1352
|
-
return reactQuery.useQuery(__spreadProps$
|
|
1384
|
+
return reactQuery.useQuery(__spreadProps$v(__spreadValues$w({}, params), {
|
|
1353
1385
|
onError,
|
|
1354
1386
|
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierId),
|
|
1355
1387
|
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierId],
|
|
@@ -1357,26 +1389,26 @@ const useGetConnectionsCarrierSettings = (_a) => {
|
|
|
1357
1389
|
}));
|
|
1358
1390
|
};
|
|
1359
1391
|
|
|
1360
|
-
var __defProp$
|
|
1361
|
-
var __defProps$
|
|
1362
|
-
var __getOwnPropDescs$
|
|
1363
|
-
var __getOwnPropSymbols$
|
|
1364
|
-
var __hasOwnProp$
|
|
1365
|
-
var __propIsEnum$
|
|
1366
|
-
var __defNormalProp$
|
|
1367
|
-
var __spreadValues$
|
|
1392
|
+
var __defProp$v = Object.defineProperty;
|
|
1393
|
+
var __defProps$u = Object.defineProperties;
|
|
1394
|
+
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
1395
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
1396
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
1397
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
1398
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1399
|
+
var __spreadValues$v = (a, b) => {
|
|
1368
1400
|
for (var prop in b || (b = {}))
|
|
1369
|
-
if (__hasOwnProp$
|
|
1370
|
-
__defNormalProp$
|
|
1371
|
-
if (__getOwnPropSymbols$
|
|
1372
|
-
for (var prop of __getOwnPropSymbols$
|
|
1373
|
-
if (__propIsEnum$
|
|
1374
|
-
__defNormalProp$
|
|
1401
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
1402
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
1403
|
+
if (__getOwnPropSymbols$B)
|
|
1404
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
1405
|
+
if (__propIsEnum$B.call(b, prop))
|
|
1406
|
+
__defNormalProp$v(a, prop, b[prop]);
|
|
1375
1407
|
}
|
|
1376
1408
|
return a;
|
|
1377
1409
|
};
|
|
1378
|
-
var __spreadProps$
|
|
1379
|
-
var __async$
|
|
1410
|
+
var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
|
|
1411
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
1380
1412
|
return new Promise((resolve, reject) => {
|
|
1381
1413
|
var fulfilled = (value) => {
|
|
1382
1414
|
try {
|
|
@@ -1398,8 +1430,8 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
1398
1430
|
};
|
|
1399
1431
|
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
1400
1432
|
const { client } = useShipEngine();
|
|
1401
|
-
return reactQuery.useMutation(__spreadProps$
|
|
1402
|
-
mutationFn: (_0) => __async$
|
|
1433
|
+
return reactQuery.useMutation(__spreadProps$u(__spreadValues$v({}, params), {
|
|
1434
|
+
mutationFn: (_0) => __async$J(void 0, [_0], function* ({
|
|
1403
1435
|
carrierName,
|
|
1404
1436
|
carrierId,
|
|
1405
1437
|
formData
|
|
@@ -1416,26 +1448,26 @@ const useUpdateConnectionsCarrierSettings = (params) => {
|
|
|
1416
1448
|
}));
|
|
1417
1449
|
};
|
|
1418
1450
|
|
|
1419
|
-
var __defProp$
|
|
1420
|
-
var __defProps$
|
|
1421
|
-
var __getOwnPropDescs$
|
|
1422
|
-
var __getOwnPropSymbols$
|
|
1423
|
-
var __hasOwnProp$
|
|
1424
|
-
var __propIsEnum$
|
|
1425
|
-
var __defNormalProp$
|
|
1426
|
-
var __spreadValues$
|
|
1451
|
+
var __defProp$u = Object.defineProperty;
|
|
1452
|
+
var __defProps$t = Object.defineProperties;
|
|
1453
|
+
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
1454
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
1455
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
1456
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
1457
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1458
|
+
var __spreadValues$u = (a, b) => {
|
|
1427
1459
|
for (var prop in b || (b = {}))
|
|
1428
|
-
if (__hasOwnProp$
|
|
1429
|
-
__defNormalProp$
|
|
1430
|
-
if (__getOwnPropSymbols$
|
|
1431
|
-
for (var prop of __getOwnPropSymbols$
|
|
1432
|
-
if (__propIsEnum$
|
|
1433
|
-
__defNormalProp$
|
|
1460
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
1461
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
1462
|
+
if (__getOwnPropSymbols$A)
|
|
1463
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
1464
|
+
if (__propIsEnum$A.call(b, prop))
|
|
1465
|
+
__defNormalProp$u(a, prop, b[prop]);
|
|
1434
1466
|
}
|
|
1435
1467
|
return a;
|
|
1436
1468
|
};
|
|
1437
|
-
var __spreadProps$
|
|
1438
|
-
var __async$
|
|
1469
|
+
var __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b));
|
|
1470
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
1439
1471
|
return new Promise((resolve, reject) => {
|
|
1440
1472
|
var fulfilled = (value) => {
|
|
1441
1473
|
try {
|
|
@@ -1457,8 +1489,8 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
1457
1489
|
};
|
|
1458
1490
|
const useRequestStampsAccountUrls = (params) => {
|
|
1459
1491
|
const { client } = useShipEngine();
|
|
1460
|
-
return reactQuery.useMutation(__spreadProps$
|
|
1461
|
-
mutationFn: (request) => __async$
|
|
1492
|
+
return reactQuery.useMutation(__spreadProps$t(__spreadValues$u({}, params), {
|
|
1493
|
+
mutationFn: (request) => __async$I(void 0, null, function* () {
|
|
1462
1494
|
const result = yield client.connections.requestStampsAccountUrls(request);
|
|
1463
1495
|
return result.data;
|
|
1464
1496
|
}),
|
|
@@ -1477,6 +1509,38 @@ const useListCustomPackageTypes = () => {
|
|
|
1477
1509
|
});
|
|
1478
1510
|
};
|
|
1479
1511
|
|
|
1512
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
1513
|
+
return new Promise((resolve, reject) => {
|
|
1514
|
+
var fulfilled = (value) => {
|
|
1515
|
+
try {
|
|
1516
|
+
step(generator.next(value));
|
|
1517
|
+
} catch (e) {
|
|
1518
|
+
reject(e);
|
|
1519
|
+
}
|
|
1520
|
+
};
|
|
1521
|
+
var rejected = (value) => {
|
|
1522
|
+
try {
|
|
1523
|
+
step(generator.throw(value));
|
|
1524
|
+
} catch (e) {
|
|
1525
|
+
reject(e);
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
1529
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
const useAcceptFundingSourceTerms = (fundingSourceId) => {
|
|
1533
|
+
const { client } = useShipEngine();
|
|
1534
|
+
return reactQuery.useMutation({
|
|
1535
|
+
mutationFn: (request) => __async$H(void 0, null, function* () {
|
|
1536
|
+
const result = yield client.fundingSources.acceptTerms(fundingSourceId, request);
|
|
1537
|
+
return result.data.acceptedTerms;
|
|
1538
|
+
}),
|
|
1539
|
+
mutationKey: ["useAcceptFundingSourceTerms", fundingSourceId],
|
|
1540
|
+
onError
|
|
1541
|
+
});
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1480
1544
|
var __async$G = (__this, __arguments, generator) => {
|
|
1481
1545
|
return new Promise((resolve, reject) => {
|
|
1482
1546
|
var fulfilled = (value) => {
|
|
@@ -1541,6 +1605,36 @@ const useFundingSourcesAddFunds = () => {
|
|
|
1541
1605
|
});
|
|
1542
1606
|
};
|
|
1543
1607
|
|
|
1608
|
+
var __defProp$t = Object.defineProperty;
|
|
1609
|
+
var __defProps$s = Object.defineProperties;
|
|
1610
|
+
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
1611
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
1612
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
1613
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
1614
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1615
|
+
var __spreadValues$t = (a, b) => {
|
|
1616
|
+
for (var prop in b || (b = {}))
|
|
1617
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
1618
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
1619
|
+
if (__getOwnPropSymbols$z)
|
|
1620
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
1621
|
+
if (__propIsEnum$z.call(b, prop))
|
|
1622
|
+
__defNormalProp$t(a, prop, b[prop]);
|
|
1623
|
+
}
|
|
1624
|
+
return a;
|
|
1625
|
+
};
|
|
1626
|
+
var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
1627
|
+
const useGetFundingSourceAcceptedTerms = (fundingSourceId, params) => {
|
|
1628
|
+
const { client } = useShipEngine();
|
|
1629
|
+
const queryParams = __spreadValues$t({}, params);
|
|
1630
|
+
return reactQuery.useQuery(__spreadProps$s(__spreadValues$t({}, queryParams), {
|
|
1631
|
+
onError,
|
|
1632
|
+
queryFn: () => client.fundingSources.acceptedTerms(fundingSourceId),
|
|
1633
|
+
queryKey: ["useGetFundingSourceAcceptedTerms", fundingSourceId],
|
|
1634
|
+
select: (result) => result.data.acceptedTerms
|
|
1635
|
+
}));
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1544
1638
|
const useGetFundingSourceById = (fundingSourceId) => {
|
|
1545
1639
|
const { client } = useShipEngine();
|
|
1546
1640
|
return reactQuery.useQuery({
|
|
@@ -4277,6 +4371,8 @@ exports.delay = delay;
|
|
|
4277
4371
|
exports.logger = logger;
|
|
4278
4372
|
exports.onError = onError;
|
|
4279
4373
|
exports.retryUntil = retryUntil;
|
|
4374
|
+
exports.useAcceptCarrierTerms = useAcceptCarrierTerms;
|
|
4375
|
+
exports.useAcceptFundingSourceTerms = useAcceptFundingSourceTerms;
|
|
4280
4376
|
exports.useAddFunds = useAddFunds;
|
|
4281
4377
|
exports.useAddInsuranceFunds = useAddInsuranceFunds;
|
|
4282
4378
|
exports.useAddSandboxCarriers = useAddSandboxCarriers;
|
|
@@ -4327,6 +4423,7 @@ exports.useGetCarrierConnectionForm = useGetCarrierConnectionForm;
|
|
|
4327
4423
|
exports.useGetConnectionsCarrierSettings = useGetConnectionsCarrierSettings;
|
|
4328
4424
|
exports.useGetCountriesByCarrier = useGetCountriesByCarrier;
|
|
4329
4425
|
exports.useGetCurrenciesByCarrier = useGetCurrenciesByCarrier;
|
|
4426
|
+
exports.useGetFundingSourceAcceptedTerms = useGetFundingSourceAcceptedTerms;
|
|
4330
4427
|
exports.useGetFundingSourceById = useGetFundingSourceById;
|
|
4331
4428
|
exports.useGetFundingSourceMetadata = useGetFundingSourceMetadata;
|
|
4332
4429
|
exports.useGetFundingSourceTransactions = useGetFundingSourceTransactions;
|