@shipengine/js-api 0.2.0 → 0.3.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/client.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +3 -3
- package/package.json +1 -1
package/client.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export declare class ShipEngineAPI {
|
|
|
20
20
|
private client;
|
|
21
21
|
constructor(token: string, { baseURL, headers, getToken }: ShipEngineAPIConfig);
|
|
22
22
|
set token(token: string);
|
|
23
|
-
get addresses(): AddressesAPI;
|
|
24
23
|
get accountSettings(): AccountSettingsAPI;
|
|
24
|
+
get addresses(): AddressesAPI;
|
|
25
25
|
get carriers(): CarriersAPI;
|
|
26
26
|
get customPackages(): CustomPackagesAPI;
|
|
27
27
|
get insurance(): InsuranceAPI;
|
package/index.js
CHANGED
|
@@ -13,4 +13,4 @@ Caused by: `+tn(t))}return e}Q.prototype.trace=ne(10),Q.prototype.debug=ne(20),Q
|
|
|
13
13
|
`),o.push(e.err.stack)),n.apply(console,o)},r.getDefaultCss=function(){return St},r}(),de={},Ba={get exports(){return de},set exports(r){de=r}};(function(r){(function(e){var t=function(h,g,b){if(!d(g)||o(g)||c(g)||p(g)||f(g))return g;var S,O=0,k=0;if(u(g))for(S=[],k=g.length;O<k;O++)S.push(t(h,g[O],b));else{S={};for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(S[h(x,b)]=t(h,g[x],b))}return S},n=function(h,g){g=g||{};var b=g.separator||"_",S=g.split||/(?=[A-Z])/;return h.split(S).join(b)},a=function(h){return y(h)?h:(h=h.replace(/[\-_\s]+(.)?/g,function(g,b){return b?b.toUpperCase():""}),h.substr(0,1).toLowerCase()+h.substr(1))},i=function(h){var g=a(h);return g.substr(0,1).toUpperCase()+g.substr(1)},s=function(h,g){return n(h,g).toLowerCase()},l=Object.prototype.toString,f=function(h){return typeof h=="function"},d=function(h){return h===Object(h)},u=function(h){return l.call(h)=="[object Array]"},o=function(h){return l.call(h)=="[object Date]"},c=function(h){return l.call(h)=="[object RegExp]"},p=function(h){return l.call(h)=="[object Boolean]"},y=function(h){return h=h-0,h===h},v=function(h,g){var b=g&&"process"in g?g.process:g;return typeof b!="function"?h:function(S,O){return b(S,h,O)}},m={camelize:a,decamelize:s,pascalize:i,depascalize:s,camelizeKeys:function(h,g){return t(v(a,g),h)},decamelizeKeys:function(h,g){return t(v(s,g),h,g)},pascalizeKeys:function(h,g){return t(v(i,g),h)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};r.exports?r.exports=m:e.humps=m})(zt)})(Ba);var Ua=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;e[t]=a;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==a||s.enumerable!==!0)return!1}return!0},wt=typeof Symbol<"u"&&Symbol,Ma=Ua,za=function(){return typeof wt!="function"||typeof Symbol!="function"||typeof wt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ma()},La="Function.prototype.bind called on incompatible ",Ze=Array.prototype.slice,ja=Object.prototype.toString,qa="[object Function]",Wa=function(e){var t=this;if(typeof t!="function"||ja.call(t)!==qa)throw new TypeError(La+t);for(var n=Ze.call(arguments,1),a,i=function(){if(this instanceof a){var u=t.apply(this,n.concat(Ze.call(arguments)));return Object(u)===u?u:this}else return t.apply(e,n.concat(Ze.call(arguments)))},s=Math.max(0,t.length-n.length),l=[],f=0;f<s;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var d=function(){};d.prototype=t.prototype,a.prototype=new d,d.prototype=null}return a},Ha=Wa,zr=Function.prototype.bind||Ha,Va=zr,Ga=Va.call(Function.call,Object.prototype.hasOwnProperty),w,se=SyntaxError,an=Function,oe=TypeError,er=function(r){try{return an('"use strict"; return ('+r+").constructor;")()}catch{}},Z=Object.getOwnPropertyDescriptor;if(Z)try{Z({},"")}catch{Z=null}var rr=function(){throw new oe},Ja=Z?function(){try{return arguments.callee,rr}catch{try{return Z(arguments,"callee").get}catch{return rr}}}():rr,ae=za(),U=Object.getPrototypeOf||function(r){return r.__proto__},ie={},Ka=typeof Uint8Array>"u"?w:U(Uint8Array),ee={"%AggregateError%":typeof AggregateError>"u"?w:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?w:ArrayBuffer,"%ArrayIteratorPrototype%":ae?U([][Symbol.iterator]()):w,"%AsyncFromSyncIteratorPrototype%":w,"%AsyncFunction%":ie,"%AsyncGenerator%":ie,"%AsyncGeneratorFunction%":ie,"%AsyncIteratorPrototype%":ie,"%Atomics%":typeof Atomics>"u"?w:Atomics,"%BigInt%":typeof BigInt>"u"?w:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?w:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?w:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?w:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?w:Float32Array,"%Float64Array%":typeof Float64Array>"u"?w:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?w:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":ie,"%Int8Array%":typeof Int8Array>"u"?w:Int8Array,"%Int16Array%":typeof Int16Array>"u"?w:Int16Array,"%Int32Array%":typeof Int32Array>"u"?w:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ae?U(U([][Symbol.iterator]())):w,"%JSON%":typeof JSON=="object"?JSON:w,"%Map%":typeof Map>"u"?w:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ae?w:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?w:Promise,"%Proxy%":typeof Proxy>"u"?w:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?w:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?w:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ae?w:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?w:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ae?U(""[Symbol.iterator]()):w,"%Symbol%":ae?Symbol:w,"%SyntaxError%":se,"%ThrowTypeError%":Ja,"%TypedArray%":Ka,"%TypeError%":oe,"%Uint8Array%":typeof Uint8Array>"u"?w:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?w:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?w:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?w:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?w:WeakMap,"%WeakRef%":typeof WeakRef>"u"?w:WeakRef,"%WeakSet%":typeof WeakSet>"u"?w:WeakSet};try{null.error}catch(r){var Qa=U(U(r));ee["%Error.prototype%"]=Qa}var Xa=function r(e){var t;if(e==="%AsyncFunction%")t=er("async function () {}");else if(e==="%GeneratorFunction%")t=er("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=er("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=r("%AsyncGenerator%");a&&(t=U(a.prototype))}return ee[e]=t,t},bt={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ge=zr,Ie=Ga,Ya=ge.call(Function.call,Array.prototype.concat),Za=ge.call(Function.apply,Array.prototype.splice),Et=ge.call(Function.call,String.prototype.replace),Re=ge.call(Function.call,String.prototype.slice),ei=ge.call(Function.call,RegExp.prototype.exec),ri=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ti=/\\(\\)?/g,ni=function(e){var t=Re(e,0,1),n=Re(e,-1);if(t==="%"&&n!=="%")throw new se("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new se("invalid intrinsic syntax, expected opening `%`");var a=[];return Et(e,ri,function(i,s,l,f){a[a.length]=l?Et(f,ti,"$1"):s||i}),a},ai=function(e,t){var n=e,a;if(Ie(bt,n)&&(a=bt[n],n="%"+a[0]+"%"),Ie(ee,n)){var i=ee[n];if(i===ie&&(i=Xa(n)),typeof i>"u"&&!t)throw new oe("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new se("intrinsic "+e+" does not exist!")},Lr=function(e,t){if(typeof e!="string"||e.length===0)throw new oe("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new oe('"allowMissing" argument must be a boolean');if(ei(/^%?[^%]*%?$/,e)===null)throw new se("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ni(e),a=n.length>0?n[0]:"",i=ai("%"+a+"%",t),s=i.name,l=i.value,f=!1,d=i.alias;d&&(a=d[0],Za(n,Ya([0,1],d)));for(var u=1,o=!0;u<n.length;u+=1){var c=n[u],p=Re(c,0,1),y=Re(c,-1);if((p==='"'||p==="'"||p==="`"||y==='"'||y==="'"||y==="`")&&p!==y)throw new se("property names with quotes must have matching quotes");if((c==="constructor"||!o)&&(f=!0),a+="."+c,s="%"+a+"%",Ie(ee,s))l=ee[s];else if(l!=null){if(!(c in l)){if(!t)throw new oe("base intrinsic for "+e+" exists, but the property is not available.");return}if(Z&&u+1>=n.length){var v=Z(l,c);o=!!v,o&&"get"in v&&!("originalValue"in v.get)?l=v.get:l=l[c]}else o=Ie(l,c),l=l[c];o&&!f&&(ee[s]=l)}}return l},Sr={},ii={get exports(){return Sr},set exports(r){Sr=r}};(function(r){var e=zr,t=Lr,n=t("%Function.prototype.apply%"),a=t("%Function.prototype.call%"),i=t("%Reflect.apply%",!0)||e.call(a,n),s=t("%Object.getOwnPropertyDescriptor%",!0),l=t("%Object.defineProperty%",!0),f=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}r.exports=function(o){var c=i(e,a,arguments);if(s&&l){var p=s(c,"length");p.configurable&&l(c,"length",{value:1+f(0,o.length-(arguments.length-1))})}return c};var d=function(){return i(e,n,arguments)};l?l(r.exports,"apply",{value:d}):r.exports.apply=d})(ii);var on=Lr,sn=Sr,oi=sn(on("String.prototype.indexOf")),si=function(e,t){var n=on(e,!!t);return typeof n=="function"&&oi(e,".prototype.")>-1?sn(n):n};const ui={},li=Object.freeze(Object.defineProperty({__proto__:null,default:ui},Symbol.toStringTag,{value:"Module"})),fi=Nn(li);var jr=typeof Map=="function"&&Map.prototype,tr=Object.getOwnPropertyDescriptor&&jr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xe=jr&&tr&&typeof tr.get=="function"?tr.get:null,At=jr&&Map.prototype.forEach,qr=typeof Set=="function"&&Set.prototype,nr=Object.getOwnPropertyDescriptor&&qr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ce=qr&&nr&&typeof nr.get=="function"?nr.get:null,Ot=qr&&Set.prototype.forEach,ci=typeof WeakMap=="function"&&WeakMap.prototype,he=ci?WeakMap.prototype.has:null,pi=typeof WeakSet=="function"&&WeakSet.prototype,ye=pi?WeakSet.prototype.has:null,di=typeof WeakRef=="function"&&WeakRef.prototype,Pt=di?WeakRef.prototype.deref:null,hi=Boolean.prototype.valueOf,yi=Object.prototype.toString,vi=Function.prototype.toString,mi=String.prototype.match,Wr=String.prototype.slice,V=String.prototype.replace,gi=String.prototype.toUpperCase,It=String.prototype.toLowerCase,un=RegExp.prototype.test,Rt=Array.prototype.concat,M=Array.prototype.join,Si=Array.prototype.slice,xt=Math.floor,wr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ar=Object.getOwnPropertySymbols,br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="object",R=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ue||"symbol")?Symbol.toStringTag:null,ln=Object.prototype.propertyIsEnumerable,Ct=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Nt(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||un.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-xt(-r):xt(r);if(n!==r){var a=String(n),i=Wr.call(e,a.length+1);return V.call(a,t,"$&_")+"."+V.call(V.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return V.call(e,t,"$&_")}var Er=fi,$t=Er.custom,_t=cn($t)?$t:null,wi=function r(e,t,n,a){var i=t||{};if(H(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=H(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return dn(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return l?Nt(e,f):f}if(typeof e=="bigint"){var d=String(e)+"n";return l?Nt(e,d):d}var u=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof e=="object")return Ar(e)?"[Array]":"[Object]";var o=Ui(i,n);if(typeof a>"u")a=[];else if(pn(a,e)>=0)return"[Circular]";function c(D,T,j){if(T&&(a=Si.call(a),a.push(T)),j){var ce={depth:i.depth};return H(i,"quoteStyle")&&(ce.quoteStyle=i.quoteStyle),r(D,ce,n+1,a)}return r(D,i,n+1,a)}if(typeof e=="function"&&!Dt(e)){var p=Ci(e),y=Se(e,c);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(y.length>0?" { "+M.call(y,", ")+" }":"")}if(cn(e)){var v=ue?V.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):br.call(e);return typeof e=="object"&&!ue?pe(v):v}if(Fi(e)){for(var m="<"+It.call(String(e.nodeName)),h=e.attributes||[],g=0;g<h.length;g++)m+=" "+h[g].name+"="+fn(bi(h[g].value),"double",i);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+It.call(String(e.nodeName))+">",m}if(Ar(e)){if(e.length===0)return"[]";var b=Se(e,c);return o&&!Bi(b)?"["+Or(b,o)+"]":"[ "+M.call(b,", ")+" ]"}if(Ai(e)){var S=Se(e,c);return!("cause"in Error.prototype)&&"cause"in e&&!ln.call(e,"cause")?"{ ["+String(e)+"] "+M.call(Rt.call("[cause]: "+c(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+M.call(S,", ")+" }"}if(typeof e=="object"&&s){if(_t&&typeof e[_t]=="function"&&Er)return Er(e,{depth:u-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ni(e)){var O=[];return At&&At.call(e,function(D,T){O.push(c(T,e,!0)+" => "+c(D,e))}),Tt("Map",xe.call(e),O,o)}if(Di(e)){var k=[];return Ot&&Ot.call(e,function(D){k.push(c(D,e))}),Tt("Set",Ce.call(e),k,o)}if($i(e))return ir("WeakMap");if(Ti(e))return ir("WeakSet");if(_i(e))return ir("WeakRef");if(Pi(e))return pe(c(Number(e)));if(Ri(e))return pe(c(wr.call(e)));if(Ii(e))return pe(hi.call(e));if(Oi(e))return pe(c(String(e)));if(!Ei(e)&&!Dt(e)){var x=Se(e,c),W=Ct?Ct(e)===Object.prototype:e instanceof Object||e.constructor===Object,F=e instanceof Object?"":"null prototype",E=!W&&R&&Object(e)===e&&R in e?Wr.call(J(e),8,-1):F?"Object":"",C=W||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",N=C+(E||F?"["+M.call(Rt.call([],E||[],F||[]),": ")+"] ":"");return x.length===0?N+"{}":o?N+"{"+Or(x,o)+"}":N+"{ "+M.call(x,", ")+" }"}return String(e)};function fn(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function bi(r){return V.call(String(r),/"/g,""")}function Ar(r){return J(r)==="[object Array]"&&(!R||!(typeof r=="object"&&R in r))}function Ei(r){return J(r)==="[object Date]"&&(!R||!(typeof r=="object"&&R in r))}function Dt(r){return J(r)==="[object RegExp]"&&(!R||!(typeof r=="object"&&R in r))}function Ai(r){return J(r)==="[object Error]"&&(!R||!(typeof r=="object"&&R in r))}function Oi(r){return J(r)==="[object String]"&&(!R||!(typeof r=="object"&&R in r))}function Pi(r){return J(r)==="[object Number]"&&(!R||!(typeof r=="object"&&R in r))}function Ii(r){return J(r)==="[object Boolean]"&&(!R||!(typeof r=="object"&&R in r))}function cn(r){if(ue)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!br)return!1;try{return br.call(r),!0}catch{}return!1}function Ri(r){if(!r||typeof r!="object"||!wr)return!1;try{return wr.call(r),!0}catch{}return!1}var xi=Object.prototype.hasOwnProperty||function(r){return r in this};function H(r,e){return xi.call(r,e)}function J(r){return yi.call(r)}function Ci(r){if(r.name)return r.name;var e=mi.call(vi.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function pn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Ni(r){if(!xe||!r||typeof r!="object")return!1;try{xe.call(r);try{Ce.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function $i(r){if(!he||!r||typeof r!="object")return!1;try{he.call(r,he);try{ye.call(r,ye)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function _i(r){if(!Pt||!r||typeof r!="object")return!1;try{return Pt.call(r),!0}catch{}return!1}function Di(r){if(!Ce||!r||typeof r!="object")return!1;try{Ce.call(r);try{xe.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Ti(r){if(!ye||!r||typeof r!="object")return!1;try{ye.call(r,ye);try{he.call(r,he)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Fi(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function dn(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return dn(Wr.call(r,0,e.maxStringLength),e)+n}var a=V.call(V.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ki);return fn(a,"single",e)}function ki(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+gi.call(e.toString(16))}function pe(r){return"Object("+r+")"}function ir(r){return r+" { ? }"}function Tt(r,e,t,n){var a=n?Or(t,n):M.call(t,", ");return r+" ("+e+") {"+a+"}"}function Bi(r){for(var e=0;e<r.length;e++)if(pn(r[e],`
|
|
14
14
|
`)>=0)return!1;return!0}function Ui(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=M.call(Array(r.indent+1)," ");else return null;return{base:t,prev:M.call(Array(e+1),t)}}function Or(r,e){if(r.length===0)return"";var t=`
|
|
15
15
|
`+e.prev+e.base;return t+M.call(r,","+t)+`
|
|
16
|
-
`+e.prev}function Se(r,e){var t=Ar(r),n=[];if(t){n.length=r.length;for(var a=0;a<r.length;a++)n[a]=H(r,a)?e(r[a],r):""}var i=typeof ar=="function"?ar(r):[],s;if(ue){s={};for(var l=0;l<i.length;l++)s["$"+i[l]]=i[l]}for(var f in r)H(r,f)&&(t&&String(Number(f))===f&&f<r.length||ue&&s["$"+f]instanceof Symbol||(un.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r))));if(typeof ar=="function")for(var d=0;d<i.length;d++)ln.call(r,i[d])&&n.push("["+e(i[d])+"]: "+e(r[i[d]],r));return n}var Hr=Lr,fe=si,Mi=wi,zi=Hr("%TypeError%"),we=Hr("%WeakMap%",!0),be=Hr("%Map%",!0),Li=fe("WeakMap.prototype.get",!0),ji=fe("WeakMap.prototype.set",!0),qi=fe("WeakMap.prototype.has",!0),Wi=fe("Map.prototype.get",!0),Hi=fe("Map.prototype.set",!0),Vi=fe("Map.prototype.has",!0),Vr=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Gi=function(r,e){var t=Vr(r,e);return t&&t.value},Ji=function(r,e,t){var n=Vr(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Ki=function(r,e){return!!Vr(r,e)},Qi=function(){var e,t,n,a={assert:function(i){if(!a.has(i))throw new zi("Side channel does not contain "+Mi(i))},get:function(i){if(we&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Li(e,i)}else if(be){if(t)return Wi(t,i)}else if(n)return Gi(n,i)},has:function(i){if(we&&i&&(typeof i=="object"||typeof i=="function")){if(e)return qi(e,i)}else if(be){if(t)return Vi(t,i)}else if(n)return Ki(n,i);return!1},set:function(i,s){we&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new we),ji(e,i,s)):be?(t||(t=new be),Hi(t,i,s)):(n||(n={key:{},next:null}),Ji(n,i,s))}};return a},Xi=String.prototype.replace,Yi=/%20/g,or={RFC1738:"RFC1738",RFC3986:"RFC3986"},Gr={default:or.RFC3986,formatters:{RFC1738:function(r){return Xi.call(r,Yi,"+")},RFC3986:function(r){return String(r)}},RFC1738:or.RFC1738,RFC3986:or.RFC3986},Zi=Gr,sr=Object.prototype.hasOwnProperty,Y=Array.isArray,B=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),eo=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Y(n)){for(var a=[],i=0;i<n.length;++i)typeof n[i]<"u"&&a.push(n[i]);t.obj[t.prop]=a}}},hn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)typeof e[a]<"u"&&(n[a]=e[a]);return n},ro=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Y(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!sr.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return Y(e)&&!Y(t)&&(a=hn(e,n)),Y(e)&&Y(t)?(t.forEach(function(i,s){if(sr.call(e,s)){var l=e[s];l&&typeof l=="object"&&i&&typeof i=="object"?e[s]=r(l,i,n):e.push(i)}else e[s]=i}),e):Object.keys(t).reduce(function(i,s){var l=t[s];return sr.call(i,s)?i[s]=r(i[s],l,n):i[s]=l,i},a)},to=function(e,t){return Object.keys(t).reduce(function(n,a){return n[a]=t[a],n},e)},no=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},ao=function(e,t,n,a,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var l="",f=0;f<s.length;++f){var d=s.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===Zi.RFC1738&&(d===40||d===41)){l+=s.charAt(f);continue}if(d<128){l=l+B[d];continue}if(d<2048){l=l+(B[192|d>>6]+B[128|d&63]);continue}if(d<55296||d>=57344){l=l+(B[224|d>>12]+B[128|d>>6&63]+B[128|d&63]);continue}f+=1,d=65536+((d&1023)<<10|s.charCodeAt(f)&1023),l+=B[240|d>>18]+B[128|d>>12&63]+B[128|d>>6&63]+B[128|d&63]}return l},io=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],a=0;a<t.length;++a)for(var i=t[a],s=i.obj[i.prop],l=Object.keys(s),f=0;f<l.length;++f){var d=l[f],u=s[d];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(t.push({obj:s,prop:d}),n.push(u))}return eo(t),e},oo=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},so=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},uo=function(e,t){return[].concat(e,t)},lo=function(e,t){if(Y(e)){for(var n=[],a=0;a<e.length;a+=1)n.push(t(e[a]));return n}return t(e)},yn={arrayToObject:hn,assign:to,combine:uo,compact:io,decode:no,encode:ao,isBuffer:so,isRegExp:oo,maybeMap:lo,merge:ro},vn=Qi,Pr=yn,ve=Gr,fo=Object.prototype.hasOwnProperty,Ft={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},q=Array.isArray,co=String.prototype.split,po=Array.prototype.push,mn=function(r,e){po.apply(r,q(e)?e:[e])},ho=Date.prototype.toISOString,kt=ve.default,P={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Pr.encode,encodeValuesOnly:!1,format:kt,formatter:ve.formatters[kt],indices:!1,serializeDate:function(e){return ho.call(e)},skipNulls:!1,strictNullHandling:!1},yo=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ur={},vo=function r(e,t,n,a,i,s,l,f,d,u,o,c,p,y,v,m){for(var h=e,g=m,b=0,S=!1;(g=g.get(ur))!==void 0&&!S;){var O=g.get(e);if(b+=1,typeof O<"u"){if(O===b)throw new RangeError("Cyclic object value");S=!0}typeof g.get(ur)>"u"&&(b=0)}if(typeof f=="function"?h=f(t,h):h instanceof Date?h=o(h):n==="comma"&&q(h)&&(h=Pr.maybeMap(h,function(Te){return Te instanceof Date?o(Te):Te})),h===null){if(i)return l&&!y?l(t,P.encoder,v,"key",c):t;h=""}if(yo(h)||Pr.isBuffer(h)){if(l){var k=y?t:l(t,P.encoder,v,"key",c);if(n==="comma"&&y){for(var x=co.call(String(h),","),W="",F=0;F<x.length;++F)W+=(F===0?"":",")+p(l(x[F],P.encoder,v,"value",c));return[p(k)+(a&&q(h)&&x.length===1?"[]":"")+"="+W]}return[p(k)+"="+p(l(h,P.encoder,v,"value",c))]}return[p(t)+"="+p(String(h))]}var E=[];if(typeof h>"u")return E;var C;if(n==="comma"&&q(h))C=[{value:h.length>0?h.join(",")||null:void 0}];else if(q(f))C=f;else{var N=Object.keys(h);C=d?N.sort(d):N}for(var D=a&&q(h)&&h.length===1?t+"[]":t,T=0;T<C.length;++T){var j=C[T],ce=typeof j=="object"&&typeof j.value<"u"?j.value:h[j];if(!(s&&ce===null)){var Rn=q(h)?typeof n=="function"?n(D,j):D:D+(u?"."+j:"["+j+"]");m.set(e,b);var Jr=vn();Jr.set(ur,m),mn(E,r(ce,Rn,n,a,i,s,l,f,d,u,o,c,p,y,v,Jr))}}return E},mo=function(e){if(!e)return P;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||P.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ve.default;if(typeof e.format<"u"){if(!fo.call(ve.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var a=ve.formatters[n],i=P.filter;return(typeof e.filter=="function"||q(e.filter))&&(i=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:P.addQueryPrefix,allowDots:typeof e.allowDots>"u"?P.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:P.charsetSentinel,delimiter:typeof e.delimiter>"u"?P.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:P.encode,encoder:typeof e.encoder=="function"?e.encoder:P.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:P.encodeValuesOnly,filter:i,format:n,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:P.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:P.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:P.strictNullHandling}},go=function(r,e){var t=r,n=mo(e),a,i;typeof n.filter=="function"?(i=n.filter,t=i("",t)):q(n.filter)&&(i=n.filter,a=i);var s=[];if(typeof t!="object"||t===null)return"";var l;e&&e.arrayFormat in Ft?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=Ft[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=f==="comma"&&e&&e.commaRoundTrip;a||(a=Object.keys(t)),n.sort&&a.sort(n.sort);for(var u=vn(),o=0;o<a.length;++o){var c=a[o];n.skipNulls&&t[c]===null||mn(s,vo(t[c],c,f,d,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var p=s.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),p.length>0?y+p:""},le=yn,Ir=Object.prototype.hasOwnProperty,So=Array.isArray,A={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:le.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},wo=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},gn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},bo="utf8=%26%2310003%3B",Eo="utf8=%E2%9C%93",Ao=function(e,t){var n={},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=a.split(t.delimiter,i),l=-1,f,d=t.charset;if(t.charsetSentinel)for(f=0;f<s.length;++f)s[f].indexOf("utf8=")===0&&(s[f]===Eo?d="utf-8":s[f]===bo&&(d="iso-8859-1"),l=f,f=s.length);for(f=0;f<s.length;++f)if(f!==l){var u=s[f],o=u.indexOf("]="),c=o===-1?u.indexOf("="):o+1,p,y;c===-1?(p=t.decoder(u,A.decoder,d,"key"),y=t.strictNullHandling?null:""):(p=t.decoder(u.slice(0,c),A.decoder,d,"key"),y=le.maybeMap(gn(u.slice(c+1),t),function(v){return t.decoder(v,A.decoder,d,"value")})),y&&t.interpretNumericEntities&&d==="iso-8859-1"&&(y=wo(y)),u.indexOf("[]=")>-1&&(y=So(y)?[y]:y),Ir.call(n,p)?n[p]=le.combine(n[p],y):n[p]=y}return n},Oo=function(r,e,t,n){for(var a=n?e:gn(e,t),i=r.length-1;i>=0;--i){var s,l=r[i];if(l==="[]"&&t.parseArrays)s=[].concat(a);else{s=t.plainObjects?Object.create(null):{};var f=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(f,10);!t.parseArrays&&f===""?s={0:a}:!isNaN(d)&&l!==f&&String(d)===f&&d>=0&&t.parseArrays&&d<=t.arrayLimit?(s=[],s[d]=a):f!=="__proto__"&&(s[f]=a)}a=s}return a},Po=function(e,t,n,a){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,f=n.depth>0&&s.exec(i),d=f?i.slice(0,f.index):i,u=[];if(d){if(!n.plainObjects&&Ir.call(Object.prototype,d)&&!n.allowPrototypes)return;u.push(d)}for(var o=0;n.depth>0&&(f=l.exec(i))!==null&&o<n.depth;){if(o+=1,!n.plainObjects&&Ir.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(f[1])}return f&&u.push("["+i.slice(f.index)+"]"),Oo(u,t,n,a)}},Io=function(e){if(!e)return A;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?A.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?A.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:A.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:A.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:A.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:A.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:A.comma,decoder:typeof e.decoder=="function"?e.decoder:A.decoder,delimiter:typeof e.delimiter=="string"||le.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:A.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:A.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:A.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:A.strictNullHandling}},Ro=function(r,e){var t=Io(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ao(r,t):r,a=t.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var l=i[s],f=Po(l,n[l],t,typeof r=="string");a=le.merge(a,f,t)}return t.allowSparse===!0?a:le.compact(a)},xo=go,Co=Ro,No=Gr,$o={formats:No,parse:Co,stringify:xo};class Sn{constructor(e){this.client=e,this.list=()=>this.client.get("/v1/packages"),this.client=e}}class wn{constructor(e){this.client=e,this.get=t=>this.client.get(`/v1/insurance/${t}/balance`),this.client=e}}class bn{constructor(e){this.client=e,this.get=t=>this.client.get(`/v1/labels/${t}`),this.list=(t={})=>this.client.get("/v1/labels",{params:t}),this.createByRateId=(t,n)=>this.client.post(`/v1/labels/rates/${t}`,n),this.void=t=>this.client.put(`/v1/labels/${t}/void`),this.client=e}}class En{constructor(e){this.client=e,this.list=()=>this.client.get("/v-beta/order_sources"),this.get=t=>this.client.get(`/v-beta/order_sources/${t}`),this.refresh=t=>this.client.put(`/v-beta/order_sources/${t}/refresh`),this.client=e}}class An{constructor(e){this.client=e,this.calculateByShipmentId=(t,n)=>this.client.post("/v1/rates",{rateOptions:n,shipmentId:t}),this.client=e}}class On{constructor(e){this.client=e,this.list=(t={})=>this.client.post("/v-beta/shipments/list",t),this.get=t=>this.client.get(`/v-beta/shipments/${t}`),this.create=(t,n)=>this.client.post(`/v-beta/shipments/sales_order/${t}`,n),this.update=(t,n)=>this.client.put(`/v-beta/shipments/${t}`,n),this.client=e}}class Pn{constructor(e){this.client=e,this.list=(t={})=>this.client.get("/v-beta/sales_orders",{params:t}),this.get=t=>this.client.get(`/v-beta/sales_orders/${t}`),this.notifyShipped=(t,n)=>this.client.post(`/v-beta/sales_orders/${t}/notify`,n),this.client=e}}class In{constructor(e){this.client=e,this.list=()=>this.client.get("/v1/warehouses"),this.create=t=>this.client.post("/v1/warehouses",t),this.update=(t,n)=>this.client.put(`/v1/warehouses/${t}`,n),this.delete=t=>this.client.delete(`/v1/warehouses/${t}`),this.client=e}}const Bt=Fa({name:"shipengine-api",serializers:{...nn,req:r=>({headers:r.headers,method:r.method,url:r.url}),res:r=>({data:r.data,headers:r.config.headers,method:r.config.method,statusCode:r.status,url:r.config.url})},streams:[{stream:new ka}]}),_o=r=>!!r.errors&&Br(r.errors);class Do{constructor(e,{baseURL:t,headers:n,getToken:a}){const i=pr.create({baseURL:t,headers:{...n,Authorization:`Bearer ${e}`,"Content-Type":"application/json"},paramsSerializer:s=>$o.stringify(de.decamelizeKeys(s),{arrayFormat:"brackets"}),transformRequest:[s=>de.decamelizeKeys(s),s=>JSON.stringify(s)],transformResponse:[s=>{if(s)return JSON.parse(s)},s=>de.camelizeKeys(s)]});i.interceptors.response.use(s=>(Bt.info({req:s.config,res:s},"%s %s: %s %s",s.config.method?.toUpperCase(),s.config.url,s.status,s.statusText),s),async s=>{if(Bt.error({err:s,req:s.config,res:s.response},"%s %s: %s %s - %s",s.config?.method?.toUpperCase(),s.config?.url,s.response?.status,s.response?.statusText,s.message),s.response?.status===401){const l=await a(),f=s.config;return f&&(f.headers||={},f.headers.Authorization=`Bearer ${l}`),pr(f)}return s.response?.data?_o(s.response.data)?Promise.reject(s.response.data.errors.map(l=>z.fromObject(l))):Br(s.response.data)?Promise.reject(s.response.data.map(l=>z.fromObject(l))):Ur(s.response.data)?Promise.reject([z.fromObject(s.response.data)]):Promise.reject([new z(s.response.data)]):Promise.reject([new z(s.message)])}),this.client=i}set token(e){this.client.defaults.headers.common.Authorization=`Bearer ${e}`}get addresses(){return new Mt(this.client)}get accountSettings(){return new Ut(this.client)}get carriers(){return new rn(this.client)}get customPackages(){return new Sn(this.client)}get insurance(){return new wn(this.client)}get labels(){return new bn(this.client)}get orderSources(){return new En(this.client)}get rates(){return new An(this.client)}get salesOrderShipments(){return new On(this.client)}get salesOrders(){return new Pn(this.client)}get warehouses(){return new In(this.client)}}exports.AccountSettingsAPI=Ut;exports.AddressesAPI=Mt;exports.CarriersAPI=rn;exports.CodedError=z;exports.ConfirmationType=Cr;exports.CreditCardVendor=Rr;exports.Currency=xr;exports.CustomPackagesAPI=Sn;exports.CustomsContentsType=Nr;exports.CustomsNonDeliveryType=$r;exports.InsuranceAPI=wn;exports.InsuranceProviderType=_r;exports.LabelsAPI=bn;exports.OrderSourcesAPI=En;exports.RatesAPI=An;exports.SE=xn;exports.SalesOrderShipmentsAPI=On;exports.SalesOrdersAPI=Pn;exports.ShipEngineAPI=Do;exports.WarehousesAPI=In;exports.isCodedError=Ur;exports.isCodedErrors=Br;
|
|
16
|
+
`+e.prev}function Se(r,e){var t=Ar(r),n=[];if(t){n.length=r.length;for(var a=0;a<r.length;a++)n[a]=H(r,a)?e(r[a],r):""}var i=typeof ar=="function"?ar(r):[],s;if(ue){s={};for(var l=0;l<i.length;l++)s["$"+i[l]]=i[l]}for(var f in r)H(r,f)&&(t&&String(Number(f))===f&&f<r.length||ue&&s["$"+f]instanceof Symbol||(un.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r))));if(typeof ar=="function")for(var d=0;d<i.length;d++)ln.call(r,i[d])&&n.push("["+e(i[d])+"]: "+e(r[i[d]],r));return n}var Hr=Lr,fe=si,Mi=wi,zi=Hr("%TypeError%"),we=Hr("%WeakMap%",!0),be=Hr("%Map%",!0),Li=fe("WeakMap.prototype.get",!0),ji=fe("WeakMap.prototype.set",!0),qi=fe("WeakMap.prototype.has",!0),Wi=fe("Map.prototype.get",!0),Hi=fe("Map.prototype.set",!0),Vi=fe("Map.prototype.has",!0),Vr=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Gi=function(r,e){var t=Vr(r,e);return t&&t.value},Ji=function(r,e,t){var n=Vr(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Ki=function(r,e){return!!Vr(r,e)},Qi=function(){var e,t,n,a={assert:function(i){if(!a.has(i))throw new zi("Side channel does not contain "+Mi(i))},get:function(i){if(we&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Li(e,i)}else if(be){if(t)return Wi(t,i)}else if(n)return Gi(n,i)},has:function(i){if(we&&i&&(typeof i=="object"||typeof i=="function")){if(e)return qi(e,i)}else if(be){if(t)return Vi(t,i)}else if(n)return Ki(n,i);return!1},set:function(i,s){we&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new we),ji(e,i,s)):be?(t||(t=new be),Hi(t,i,s)):(n||(n={key:{},next:null}),Ji(n,i,s))}};return a},Xi=String.prototype.replace,Yi=/%20/g,or={RFC1738:"RFC1738",RFC3986:"RFC3986"},Gr={default:or.RFC3986,formatters:{RFC1738:function(r){return Xi.call(r,Yi,"+")},RFC3986:function(r){return String(r)}},RFC1738:or.RFC1738,RFC3986:or.RFC3986},Zi=Gr,sr=Object.prototype.hasOwnProperty,Y=Array.isArray,B=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),eo=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Y(n)){for(var a=[],i=0;i<n.length;++i)typeof n[i]<"u"&&a.push(n[i]);t.obj[t.prop]=a}}},hn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)typeof e[a]<"u"&&(n[a]=e[a]);return n},ro=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Y(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!sr.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var a=e;return Y(e)&&!Y(t)&&(a=hn(e,n)),Y(e)&&Y(t)?(t.forEach(function(i,s){if(sr.call(e,s)){var l=e[s];l&&typeof l=="object"&&i&&typeof i=="object"?e[s]=r(l,i,n):e.push(i)}else e[s]=i}),e):Object.keys(t).reduce(function(i,s){var l=t[s];return sr.call(i,s)?i[s]=r(i[s],l,n):i[s]=l,i},a)},to=function(e,t){return Object.keys(t).reduce(function(n,a){return n[a]=t[a],n},e)},no=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},ao=function(e,t,n,a,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var l="",f=0;f<s.length;++f){var d=s.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===Zi.RFC1738&&(d===40||d===41)){l+=s.charAt(f);continue}if(d<128){l=l+B[d];continue}if(d<2048){l=l+(B[192|d>>6]+B[128|d&63]);continue}if(d<55296||d>=57344){l=l+(B[224|d>>12]+B[128|d>>6&63]+B[128|d&63]);continue}f+=1,d=65536+((d&1023)<<10|s.charCodeAt(f)&1023),l+=B[240|d>>18]+B[128|d>>12&63]+B[128|d>>6&63]+B[128|d&63]}return l},io=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],a=0;a<t.length;++a)for(var i=t[a],s=i.obj[i.prop],l=Object.keys(s),f=0;f<l.length;++f){var d=l[f],u=s[d];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(t.push({obj:s,prop:d}),n.push(u))}return eo(t),e},oo=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},so=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},uo=function(e,t){return[].concat(e,t)},lo=function(e,t){if(Y(e)){for(var n=[],a=0;a<e.length;a+=1)n.push(t(e[a]));return n}return t(e)},yn={arrayToObject:hn,assign:to,combine:uo,compact:io,decode:no,encode:ao,isBuffer:so,isRegExp:oo,maybeMap:lo,merge:ro},vn=Qi,Pr=yn,ve=Gr,fo=Object.prototype.hasOwnProperty,Ft={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},q=Array.isArray,co=String.prototype.split,po=Array.prototype.push,mn=function(r,e){po.apply(r,q(e)?e:[e])},ho=Date.prototype.toISOString,kt=ve.default,P={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Pr.encode,encodeValuesOnly:!1,format:kt,formatter:ve.formatters[kt],indices:!1,serializeDate:function(e){return ho.call(e)},skipNulls:!1,strictNullHandling:!1},yo=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},ur={},vo=function r(e,t,n,a,i,s,l,f,d,u,o,c,p,y,v,m){for(var h=e,g=m,b=0,S=!1;(g=g.get(ur))!==void 0&&!S;){var O=g.get(e);if(b+=1,typeof O<"u"){if(O===b)throw new RangeError("Cyclic object value");S=!0}typeof g.get(ur)>"u"&&(b=0)}if(typeof f=="function"?h=f(t,h):h instanceof Date?h=o(h):n==="comma"&&q(h)&&(h=Pr.maybeMap(h,function(Te){return Te instanceof Date?o(Te):Te})),h===null){if(i)return l&&!y?l(t,P.encoder,v,"key",c):t;h=""}if(yo(h)||Pr.isBuffer(h)){if(l){var k=y?t:l(t,P.encoder,v,"key",c);if(n==="comma"&&y){for(var x=co.call(String(h),","),W="",F=0;F<x.length;++F)W+=(F===0?"":",")+p(l(x[F],P.encoder,v,"value",c));return[p(k)+(a&&q(h)&&x.length===1?"[]":"")+"="+W]}return[p(k)+"="+p(l(h,P.encoder,v,"value",c))]}return[p(t)+"="+p(String(h))]}var E=[];if(typeof h>"u")return E;var C;if(n==="comma"&&q(h))C=[{value:h.length>0?h.join(",")||null:void 0}];else if(q(f))C=f;else{var N=Object.keys(h);C=d?N.sort(d):N}for(var D=a&&q(h)&&h.length===1?t+"[]":t,T=0;T<C.length;++T){var j=C[T],ce=typeof j=="object"&&typeof j.value<"u"?j.value:h[j];if(!(s&&ce===null)){var Rn=q(h)?typeof n=="function"?n(D,j):D:D+(u?"."+j:"["+j+"]");m.set(e,b);var Jr=vn();Jr.set(ur,m),mn(E,r(ce,Rn,n,a,i,s,l,f,d,u,o,c,p,y,v,Jr))}}return E},mo=function(e){if(!e)return P;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||P.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ve.default;if(typeof e.format<"u"){if(!fo.call(ve.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var a=ve.formatters[n],i=P.filter;return(typeof e.filter=="function"||q(e.filter))&&(i=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:P.addQueryPrefix,allowDots:typeof e.allowDots>"u"?P.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:P.charsetSentinel,delimiter:typeof e.delimiter>"u"?P.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:P.encode,encoder:typeof e.encoder=="function"?e.encoder:P.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:P.encodeValuesOnly,filter:i,format:n,formatter:a,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:P.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:P.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:P.strictNullHandling}},go=function(r,e){var t=r,n=mo(e),a,i;typeof n.filter=="function"?(i=n.filter,t=i("",t)):q(n.filter)&&(i=n.filter,a=i);var s=[];if(typeof t!="object"||t===null)return"";var l;e&&e.arrayFormat in Ft?l=e.arrayFormat:e&&"indices"in e?l=e.indices?"indices":"repeat":l="indices";var f=Ft[l];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=f==="comma"&&e&&e.commaRoundTrip;a||(a=Object.keys(t)),n.sort&&a.sort(n.sort);for(var u=vn(),o=0;o<a.length;++o){var c=a[o];n.skipNulls&&t[c]===null||mn(s,vo(t[c],c,f,d,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var p=s.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),p.length>0?y+p:""},le=yn,Ir=Object.prototype.hasOwnProperty,So=Array.isArray,A={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:le.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},wo=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},gn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},bo="utf8=%26%2310003%3B",Eo="utf8=%E2%9C%93",Ao=function(e,t){var n={},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=a.split(t.delimiter,i),l=-1,f,d=t.charset;if(t.charsetSentinel)for(f=0;f<s.length;++f)s[f].indexOf("utf8=")===0&&(s[f]===Eo?d="utf-8":s[f]===bo&&(d="iso-8859-1"),l=f,f=s.length);for(f=0;f<s.length;++f)if(f!==l){var u=s[f],o=u.indexOf("]="),c=o===-1?u.indexOf("="):o+1,p,y;c===-1?(p=t.decoder(u,A.decoder,d,"key"),y=t.strictNullHandling?null:""):(p=t.decoder(u.slice(0,c),A.decoder,d,"key"),y=le.maybeMap(gn(u.slice(c+1),t),function(v){return t.decoder(v,A.decoder,d,"value")})),y&&t.interpretNumericEntities&&d==="iso-8859-1"&&(y=wo(y)),u.indexOf("[]=")>-1&&(y=So(y)?[y]:y),Ir.call(n,p)?n[p]=le.combine(n[p],y):n[p]=y}return n},Oo=function(r,e,t,n){for(var a=n?e:gn(e,t),i=r.length-1;i>=0;--i){var s,l=r[i];if(l==="[]"&&t.parseArrays)s=[].concat(a);else{s=t.plainObjects?Object.create(null):{};var f=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,d=parseInt(f,10);!t.parseArrays&&f===""?s={0:a}:!isNaN(d)&&l!==f&&String(d)===f&&d>=0&&t.parseArrays&&d<=t.arrayLimit?(s=[],s[d]=a):f!=="__proto__"&&(s[f]=a)}a=s}return a},Po=function(e,t,n,a){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,f=n.depth>0&&s.exec(i),d=f?i.slice(0,f.index):i,u=[];if(d){if(!n.plainObjects&&Ir.call(Object.prototype,d)&&!n.allowPrototypes)return;u.push(d)}for(var o=0;n.depth>0&&(f=l.exec(i))!==null&&o<n.depth;){if(o+=1,!n.plainObjects&&Ir.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(f[1])}return f&&u.push("["+i.slice(f.index)+"]"),Oo(u,t,n,a)}},Io=function(e){if(!e)return A;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?A.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?A.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:A.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:A.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:A.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:A.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:A.comma,decoder:typeof e.decoder=="function"?e.decoder:A.decoder,delimiter:typeof e.delimiter=="string"||le.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:A.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:A.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:A.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:A.strictNullHandling}},Ro=function(r,e){var t=Io(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ao(r,t):r,a=t.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var l=i[s],f=Po(l,n[l],t,typeof r=="string");a=le.merge(a,f,t)}return t.allowSparse===!0?a:le.compact(a)},xo=go,Co=Ro,No=Gr,$o={formats:No,parse:Co,stringify:xo};class Sn{constructor(e){this.client=e,this.list=()=>this.client.get("/v1/packages"),this.client=e}}class wn{constructor(e){this.client=e,this.get=t=>this.client.get(`/v1/insurance/${t}/balance`),this.client=e}}class bn{constructor(e){this.client=e,this.get=t=>this.client.get(`/v1/labels/${t}`),this.list=(t={})=>this.client.get("/v1/labels",{params:t}),this.createByRateId=(t,n)=>this.client.post(`/v1/labels/rates/${t}`,n),this.void=t=>this.client.put(`/v1/labels/${t}/void`),this.client=e}}class En{constructor(e){this.client=e,this.list=()=>this.client.get("/v-beta/order_sources"),this.get=t=>this.client.get(`/v-beta/order_sources/${t}`),this.refresh=t=>this.client.put(`/v-beta/order_sources/${t}/refresh`),this.client=e}}class An{constructor(e){this.client=e,this.calculateByShipmentId=(t,n)=>this.client.post("/v1/rates",{rateOptions:n,shipmentId:t}),this.client=e}}class On{constructor(e){this.client=e,this.list=(t={})=>this.client.post("/v-beta/shipments/list",t),this.get=t=>this.client.get(`/v-beta/shipments/${t}`),this.create=(t,n)=>this.client.post(`/v-beta/shipments/sales_order/${t}`,n),this.update=(t,n)=>this.client.put(`/v-beta/shipments/${t}`,n),this.client=e}}class Pn{constructor(e){this.client=e,this.list=(t={})=>this.client.get("/v-beta/sales_orders",{params:t}),this.get=t=>this.client.get(`/v-beta/sales_orders/${t}`),this.notifyShipped=(t,n)=>this.client.post(`/v-beta/sales_orders/${t}/notify`,n),this.client=e}}class In{constructor(e){this.client=e,this.list=()=>this.client.get("/v1/warehouses"),this.create=t=>this.client.post("/v1/warehouses",t),this.update=(t,n)=>this.client.put(`/v1/warehouses/${t}`,n),this.delete=t=>this.client.delete(`/v1/warehouses/${t}`),this.client=e}}const Bt=Fa({name:"shipengine-api",serializers:{...nn,req:r=>({headers:r.headers,method:r.method,url:r.url}),res:r=>({data:r.data,headers:r.config.headers,method:r.config.method,statusCode:r.status,url:r.config.url})},streams:[{stream:new ka}]}),_o=r=>!!r.errors&&Br(r.errors);class Do{constructor(e,{baseURL:t,headers:n,getToken:a}){const i=pr.create({baseURL:t,headers:{...n,Authorization:`Bearer ${e}`,"Content-Type":"application/json"},paramsSerializer:s=>$o.stringify(de.decamelizeKeys(s),{arrayFormat:"brackets"}),transformRequest:[s=>de.decamelizeKeys(s),s=>JSON.stringify(s)],transformResponse:[s=>{if(s)return JSON.parse(s)},s=>de.camelizeKeys(s)]});i.interceptors.response.use(s=>(Bt.info({req:s.config,res:s},"%s %s: %s %s",s.config.method?.toUpperCase(),s.config.url,s.status,s.statusText),s),async s=>{if(Bt.error({err:s,req:s.config,res:s.response},"%s %s: %s %s - %s",s.config?.method?.toUpperCase(),s.config?.url,s.response?.status,s.response?.statusText,s.message),s.response?.status===401){const l=await a(),f=s.config;return f&&(f.headers||={},f.headers.Authorization=`Bearer ${l}`),pr(f)}return s.response?.data?_o(s.response.data)?Promise.reject(s.response.data.errors.map(l=>z.fromObject(l))):Br(s.response.data)?Promise.reject(s.response.data.map(l=>z.fromObject(l))):Ur(s.response.data)?Promise.reject([z.fromObject(s.response.data)]):Promise.reject([new z(s.response.data)]):Promise.reject([new z(s.message)])}),this.client=i}set token(e){this.client.defaults.headers.common.Authorization=`Bearer ${e}`}get accountSettings(){return new Ut(this.client)}get addresses(){return new Mt(this.client)}get carriers(){return new rn(this.client)}get customPackages(){return new Sn(this.client)}get insurance(){return new wn(this.client)}get labels(){return new bn(this.client)}get orderSources(){return new En(this.client)}get rates(){return new An(this.client)}get salesOrderShipments(){return new On(this.client)}get salesOrders(){return new Pn(this.client)}get warehouses(){return new In(this.client)}}exports.AccountSettingsAPI=Ut;exports.AddressesAPI=Mt;exports.CarriersAPI=rn;exports.CodedError=z;exports.ConfirmationType=Cr;exports.CreditCardVendor=Rr;exports.Currency=xr;exports.CustomPackagesAPI=Sn;exports.CustomsContentsType=Nr;exports.CustomsNonDeliveryType=$r;exports.InsuranceAPI=wn;exports.InsuranceProviderType=_r;exports.LabelsAPI=bn;exports.OrderSourcesAPI=En;exports.RatesAPI=An;exports.SE=xn;exports.SalesOrderShipmentsAPI=On;exports.SalesOrdersAPI=Pn;exports.ShipEngineAPI=Do;exports.WarehousesAPI=In;exports.isCodedError=Ur;exports.isCodedErrors=Br;
|
package/index.mjs
CHANGED
|
@@ -2873,12 +2873,12 @@ class Do {
|
|
|
2873
2873
|
set token(e) {
|
|
2874
2874
|
this.client.defaults.headers.common.Authorization = `Bearer ${e}`;
|
|
2875
2875
|
}
|
|
2876
|
-
get addresses() {
|
|
2877
|
-
return new gn(this.client);
|
|
2878
|
-
}
|
|
2879
2876
|
get accountSettings() {
|
|
2880
2877
|
return new mn(this.client);
|
|
2881
2878
|
}
|
|
2879
|
+
get addresses() {
|
|
2880
|
+
return new gn(this.client);
|
|
2881
|
+
}
|
|
2882
2882
|
get carriers() {
|
|
2883
2883
|
return new Sa(this.client);
|
|
2884
2884
|
}
|