@shipengine/react-api 4.13.4 → 4.13.5-next.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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
|
+
import { MutationProps } from "../../utilities";
|
|
3
|
+
/**
|
|
4
|
+
* @category ShipEngine API Hooks
|
|
5
|
+
* @see [ShipEngine API Reference](https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6364332064/Add-ons+New+endpoints+definition)
|
|
6
|
+
*/
|
|
7
|
+
export declare const useDisableAccountAddon: (params?: MutationProps<SE.AddonCodes, void>) => import("@tanstack/react-query").UseMutationResult<void, SE.CodedError[], "ss_api_analytics", unknown>;
|
|
@@ -4,4 +4,4 @@ import { MutationProps } from "../../utilities";
|
|
|
4
4
|
* @category ShipEngine API Hooks
|
|
5
5
|
* @see [ShipEngine API Reference](https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6364332064/Add-ons+New+endpoints+definition)
|
|
6
6
|
*/
|
|
7
|
-
export declare const useEnableAccountAddon: (params?: MutationProps<SE.
|
|
7
|
+
export declare const useEnableAccountAddon: (params?: MutationProps<SE.AddonCodes, void>) => import("@tanstack/react-query").UseMutationResult<void, SE.CodedError[], "ss_api_analytics", unknown>;
|
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$K = Object.defineProperty;
|
|
85
|
+
var __defProps$J = Object.defineProperties;
|
|
86
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
87
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
88
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
89
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
90
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
91
|
+
var __spreadValues$K = (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$T.call(b, prop))
|
|
94
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
95
|
+
if (__getOwnPropSymbols$T)
|
|
96
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
97
|
+
if (__propIsEnum$T.call(b, prop))
|
|
98
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
99
99
|
}
|
|
100
100
|
return a;
|
|
101
101
|
};
|
|
102
|
-
var __spreadProps$
|
|
102
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(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$J(__spreadValues$K({}, 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$_ = (__this, __arguments, generator) => {
|
|
137
137
|
return new Promise((resolve, reject) => {
|
|
138
138
|
var fulfilled = (value) => {
|
|
139
139
|
try {
|
|
@@ -156,7 +156,7 @@ var __async$Z = (__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$_(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$Z = (__this, __arguments, generator) => {
|
|
169
169
|
return new Promise((resolve, reject) => {
|
|
170
170
|
var fulfilled = (value) => {
|
|
171
171
|
try {
|
|
@@ -188,7 +188,7 @@ var __async$Y = (__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$Z(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$Y = (__this, __arguments, generator) => {
|
|
221
221
|
return new Promise((resolve, reject) => {
|
|
222
222
|
var fulfilled = (value) => {
|
|
223
223
|
try {
|
|
@@ -240,7 +240,7 @@ var __async$X = (__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$Y(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$X = (__this, __arguments, generator) => {
|
|
253
253
|
return new Promise((resolve, reject) => {
|
|
254
254
|
var fulfilled = (value) => {
|
|
255
255
|
try {
|
|
@@ -272,7 +272,7 @@ var __async$W = (__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$X(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$J = Object.defineProperty;
|
|
285
|
+
var __defProps$I = Object.defineProperties;
|
|
286
|
+
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
287
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
288
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
289
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
290
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
291
|
+
var __spreadValues$J = (a, b) => {
|
|
292
|
+
for (var prop in b || (b = {}))
|
|
293
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
294
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
295
|
+
if (__getOwnPropSymbols$S)
|
|
296
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
297
|
+
if (__propIsEnum$S.call(b, prop))
|
|
298
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
299
|
+
}
|
|
300
|
+
return a;
|
|
301
|
+
};
|
|
302
|
+
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
303
|
+
const useListAccountAddons = (params) => {
|
|
304
|
+
const { client } = useShipEngine();
|
|
305
|
+
return reactQuery.useQuery(__spreadProps$I(__spreadValues$J({}, params), {
|
|
306
|
+
onError,
|
|
307
|
+
queryFn: () => client.accountAddons.list(),
|
|
308
|
+
queryKey: ["useListAccountAddons"],
|
|
309
|
+
select: (result) => result.data.addons
|
|
310
|
+
}));
|
|
311
|
+
};
|
|
312
|
+
|
|
284
313
|
var __defProp$I = Object.defineProperty;
|
|
285
314
|
var __defProps$H = Object.defineProperties;
|
|
286
315
|
var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
|
|
@@ -300,13 +329,35 @@ var __spreadValues$I = (a, b) => {
|
|
|
300
329
|
return a;
|
|
301
330
|
};
|
|
302
331
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
303
|
-
|
|
332
|
+
var __async$W = (__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$H(__spreadValues$I({}, params), {
|
|
355
|
+
mutationFn: (addonType) => __async$W(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
|
|
|
@@ -349,14 +400,14 @@ var __async$V = (__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$G(__spreadValues$H({}, params), {
|
|
355
406
|
mutationFn: (addonType) => __async$V(void 0, null, function* () {
|
|
356
|
-
const result = yield client.accountAddons.
|
|
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
|
};
|
|
@@ -4226,6 +4277,7 @@ exports.useDeleteSellerApiKey = useDeleteSellerApiKey;
|
|
|
4226
4277
|
exports.useDeleteShippingRule = useDeleteShippingRule;
|
|
4227
4278
|
exports.useDeleteWarehouse = useDeleteWarehouse;
|
|
4228
4279
|
exports.useDeleteWebhook = useDeleteWebhook;
|
|
4280
|
+
exports.useDisableAccountAddon = useDisableAccountAddon;
|
|
4229
4281
|
exports.useDownloadRateCard = useDownloadRateCard;
|
|
4230
4282
|
exports.useEditShippingRule = useEditShippingRule;
|
|
4231
4283
|
exports.useEnableAccountAddon = useEnableAccountAddon;
|
package/index.mjs
CHANGED
|
@@ -78,25 +78,25 @@ const onError = (_errors) => _default();
|
|
|
78
78
|
|
|
79
79
|
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}();
|
|
80
80
|
|
|
81
|
-
var __defProp$
|
|
82
|
-
var __defProps$
|
|
83
|
-
var __getOwnPropDescs$
|
|
84
|
-
var __getOwnPropSymbols$
|
|
85
|
-
var __hasOwnProp$
|
|
86
|
-
var __propIsEnum$
|
|
87
|
-
var __defNormalProp$
|
|
88
|
-
var __spreadValues$
|
|
81
|
+
var __defProp$K = Object.defineProperty;
|
|
82
|
+
var __defProps$J = Object.defineProperties;
|
|
83
|
+
var __getOwnPropDescs$J = Object.getOwnPropertyDescriptors;
|
|
84
|
+
var __getOwnPropSymbols$T = Object.getOwnPropertySymbols;
|
|
85
|
+
var __hasOwnProp$T = Object.prototype.hasOwnProperty;
|
|
86
|
+
var __propIsEnum$T = Object.prototype.propertyIsEnumerable;
|
|
87
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
88
|
+
var __spreadValues$K = (a, b) => {
|
|
89
89
|
for (var prop in b || (b = {}))
|
|
90
|
-
if (__hasOwnProp$
|
|
91
|
-
__defNormalProp$
|
|
92
|
-
if (__getOwnPropSymbols$
|
|
93
|
-
for (var prop of __getOwnPropSymbols$
|
|
94
|
-
if (__propIsEnum$
|
|
95
|
-
__defNormalProp$
|
|
90
|
+
if (__hasOwnProp$T.call(b, prop))
|
|
91
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
92
|
+
if (__getOwnPropSymbols$T)
|
|
93
|
+
for (var prop of __getOwnPropSymbols$T(b)) {
|
|
94
|
+
if (__propIsEnum$T.call(b, prop))
|
|
95
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
96
96
|
}
|
|
97
97
|
return a;
|
|
98
98
|
};
|
|
99
|
-
var __spreadProps$
|
|
99
|
+
var __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b));
|
|
100
100
|
const streams = [];
|
|
101
101
|
if (process.env.NODE_ENV === "production") {
|
|
102
102
|
streams.push({
|
|
@@ -105,7 +105,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
105
105
|
}
|
|
106
106
|
const logger = E({
|
|
107
107
|
name: "shipengine",
|
|
108
|
-
serializers: __spreadProps$
|
|
108
|
+
serializers: __spreadProps$J(__spreadValues$K({}, k), {
|
|
109
109
|
req: (req) => ({
|
|
110
110
|
headers: req.headers,
|
|
111
111
|
method: req.method,
|
|
@@ -130,7 +130,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
130
130
|
throw error;
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
var __async$
|
|
133
|
+
var __async$_ = (__this, __arguments, generator) => {
|
|
134
134
|
return new Promise((resolve, reject) => {
|
|
135
135
|
var fulfilled = (value) => {
|
|
136
136
|
try {
|
|
@@ -153,7 +153,7 @@ var __async$Z = (__this, __arguments, generator) => {
|
|
|
153
153
|
const useCreateAccountImage = () => {
|
|
154
154
|
const { client } = useShipEngine();
|
|
155
155
|
return useMutation({
|
|
156
|
-
mutationFn: (data) => __async$
|
|
156
|
+
mutationFn: (data) => __async$_(void 0, null, function* () {
|
|
157
157
|
const result = yield client.accountSettings.createImage(data);
|
|
158
158
|
return result.data;
|
|
159
159
|
}),
|
|
@@ -162,7 +162,7 @@ const useCreateAccountImage = () => {
|
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
var __async$
|
|
165
|
+
var __async$Z = (__this, __arguments, generator) => {
|
|
166
166
|
return new Promise((resolve, reject) => {
|
|
167
167
|
var fulfilled = (value) => {
|
|
168
168
|
try {
|
|
@@ -185,7 +185,7 @@ var __async$Y = (__this, __arguments, generator) => {
|
|
|
185
185
|
const useDeleteAccountImage = () => {
|
|
186
186
|
const { client } = useShipEngine();
|
|
187
187
|
return useMutation({
|
|
188
|
-
mutationFn: (labelImageId) => __async$
|
|
188
|
+
mutationFn: (labelImageId) => __async$Z(void 0, null, function* () {
|
|
189
189
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
190
190
|
return result.data;
|
|
191
191
|
}),
|
|
@@ -214,7 +214,7 @@ const useGetAccountSettings = () => {
|
|
|
214
214
|
});
|
|
215
215
|
};
|
|
216
216
|
|
|
217
|
-
var __async$
|
|
217
|
+
var __async$Y = (__this, __arguments, generator) => {
|
|
218
218
|
return new Promise((resolve, reject) => {
|
|
219
219
|
var fulfilled = (value) => {
|
|
220
220
|
try {
|
|
@@ -237,7 +237,7 @@ var __async$X = (__this, __arguments, generator) => {
|
|
|
237
237
|
const useUpdateAccountImage = () => {
|
|
238
238
|
const { client } = useShipEngine();
|
|
239
239
|
return useMutation({
|
|
240
|
-
mutationFn: (data) => __async$
|
|
240
|
+
mutationFn: (data) => __async$Y(void 0, null, function* () {
|
|
241
241
|
const result = yield client.accountSettings.updateImage(data);
|
|
242
242
|
return result.data;
|
|
243
243
|
}),
|
|
@@ -246,7 +246,7 @@ const useUpdateAccountImage = () => {
|
|
|
246
246
|
});
|
|
247
247
|
};
|
|
248
248
|
|
|
249
|
-
var __async$
|
|
249
|
+
var __async$X = (__this, __arguments, generator) => {
|
|
250
250
|
return new Promise((resolve, reject) => {
|
|
251
251
|
var fulfilled = (value) => {
|
|
252
252
|
try {
|
|
@@ -269,7 +269,7 @@ var __async$W = (__this, __arguments, generator) => {
|
|
|
269
269
|
const useUpdateAccountSettings = () => {
|
|
270
270
|
const { client } = useShipEngine();
|
|
271
271
|
return useMutation({
|
|
272
|
-
mutationFn: (settings) => __async$
|
|
272
|
+
mutationFn: (settings) => __async$X(void 0, null, function* () {
|
|
273
273
|
const result = yield client.accountSettings.update(settings);
|
|
274
274
|
return result.data;
|
|
275
275
|
}),
|
|
@@ -278,6 +278,35 @@ const useUpdateAccountSettings = () => {
|
|
|
278
278
|
});
|
|
279
279
|
};
|
|
280
280
|
|
|
281
|
+
var __defProp$J = Object.defineProperty;
|
|
282
|
+
var __defProps$I = Object.defineProperties;
|
|
283
|
+
var __getOwnPropDescs$I = Object.getOwnPropertyDescriptors;
|
|
284
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
285
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
286
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
287
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
288
|
+
var __spreadValues$J = (a, b) => {
|
|
289
|
+
for (var prop in b || (b = {}))
|
|
290
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
291
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
292
|
+
if (__getOwnPropSymbols$S)
|
|
293
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
294
|
+
if (__propIsEnum$S.call(b, prop))
|
|
295
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
296
|
+
}
|
|
297
|
+
return a;
|
|
298
|
+
};
|
|
299
|
+
var __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b));
|
|
300
|
+
const useListAccountAddons = (params) => {
|
|
301
|
+
const { client } = useShipEngine();
|
|
302
|
+
return useQuery(__spreadProps$I(__spreadValues$J({}, params), {
|
|
303
|
+
onError,
|
|
304
|
+
queryFn: () => client.accountAddons.list(),
|
|
305
|
+
queryKey: ["useListAccountAddons"],
|
|
306
|
+
select: (result) => result.data.addons
|
|
307
|
+
}));
|
|
308
|
+
};
|
|
309
|
+
|
|
281
310
|
var __defProp$I = Object.defineProperty;
|
|
282
311
|
var __defProps$H = Object.defineProperties;
|
|
283
312
|
var __getOwnPropDescs$H = Object.getOwnPropertyDescriptors;
|
|
@@ -297,13 +326,35 @@ var __spreadValues$I = (a, b) => {
|
|
|
297
326
|
return a;
|
|
298
327
|
};
|
|
299
328
|
var __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
300
|
-
|
|
329
|
+
var __async$W = (__this, __arguments, generator) => {
|
|
330
|
+
return new Promise((resolve, reject) => {
|
|
331
|
+
var fulfilled = (value) => {
|
|
332
|
+
try {
|
|
333
|
+
step(generator.next(value));
|
|
334
|
+
} catch (e) {
|
|
335
|
+
reject(e);
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
var rejected = (value) => {
|
|
339
|
+
try {
|
|
340
|
+
step(generator.throw(value));
|
|
341
|
+
} catch (e) {
|
|
342
|
+
reject(e);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
346
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
const useEnableAccountAddon = (params) => {
|
|
301
350
|
const { client } = useShipEngine();
|
|
302
|
-
return
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
351
|
+
return useMutation(__spreadProps$H(__spreadValues$I({}, params), {
|
|
352
|
+
mutationFn: (addonType) => __async$W(void 0, null, function* () {
|
|
353
|
+
const result = yield client.accountAddons.enable(addonType);
|
|
354
|
+
return result.data;
|
|
355
|
+
}),
|
|
356
|
+
mutationKey: ["useEnableAccountAddon"],
|
|
357
|
+
onError
|
|
307
358
|
}));
|
|
308
359
|
};
|
|
309
360
|
|
|
@@ -346,14 +397,14 @@ var __async$V = (__this, __arguments, generator) => {
|
|
|
346
397
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
347
398
|
});
|
|
348
399
|
};
|
|
349
|
-
const
|
|
400
|
+
const useDisableAccountAddon = (params) => {
|
|
350
401
|
const { client } = useShipEngine();
|
|
351
402
|
return useMutation(__spreadProps$G(__spreadValues$H({}, params), {
|
|
352
403
|
mutationFn: (addonType) => __async$V(void 0, null, function* () {
|
|
353
|
-
const result = yield client.accountAddons.
|
|
404
|
+
const result = yield client.accountAddons.disable(addonType);
|
|
354
405
|
return result.data;
|
|
355
406
|
}),
|
|
356
|
-
mutationKey: ["
|
|
407
|
+
mutationKey: ["useDisableAccountAddon"],
|
|
357
408
|
onError
|
|
358
409
|
}));
|
|
359
410
|
};
|
|
@@ -4185,4 +4236,4 @@ const useListUsers = (params) => {
|
|
|
4185
4236
|
}));
|
|
4186
4237
|
};
|
|
4187
4238
|
|
|
4188
|
-
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, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|
|
4239
|
+
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, useDeletePaymentMethod, useDeleteRateCard, useDeleteSellerApiKey, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDisableAccountAddon, useDownloadRateCard, useEditShippingRule, useEnableAccountAddon, useExportLabels, useExportShipments, useFundingSourcesAddFunds, useGetAccountBilling, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAuctanePayConfig, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetInvoiceAddress, useGetLabel, useGetPackageRatingGroupByCarrier, useGetPaymentAccount, useGetPaymentMethods, useGetRateCardById, useGetSalesOrder, useGetSalesOrderByExternalOrderId, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentByExternalId, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useIdentityVerification, useListAccountAddons, useListAccountFeatures, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListLabelsInfinite, useListOrderSources, useListOrderSourcesConnections, useListRateCards, useListSalesOrderShipments, useListSalesOrderShipmentsByExternalOrderId, useListSalesOrders, useListSandboxSellerIds, useListSellerApiKeys, useListServicePoints, useListShipments, useListShippingRules, useListUsers, useListWarehouses, useListWebhooks, useNotifySalesOrderShipped, useParseAddress, usePreviewTransaction, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useRequestStampsAccountUrls, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateInvoiceAddress, useUpdateOrderSource, useUpdatePaymentMethod, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useUpsertAccountBilling, useValidateAddresses, useVoidLabel };
|