@shipengine/alchemy 5.4.15 → 5.4.16
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/index.js +286 -178
- package/index.mjs +285 -179
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -10790,17 +10790,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10790
10790
|
return AccountBillingPlanChangeType2;
|
|
10791
10791
|
})(AccountBillingPlanChangeType || {});
|
|
10792
10792
|
|
|
10793
|
-
var __getOwnPropSymbols$
|
|
10794
|
-
var __hasOwnProp$
|
|
10795
|
-
var __propIsEnum$
|
|
10796
|
-
var __objRest$
|
|
10793
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
10794
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
10795
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
10796
|
+
var __objRest$g = (source, exclude) => {
|
|
10797
10797
|
var target = {};
|
|
10798
10798
|
for (var prop in source)
|
|
10799
|
-
if (__hasOwnProp$
|
|
10799
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10800
10800
|
target[prop] = source[prop];
|
|
10801
|
-
if (source != null && __getOwnPropSymbols$
|
|
10802
|
-
for (var prop of __getOwnPropSymbols$
|
|
10803
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10801
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
10802
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
10803
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
10804
10804
|
target[prop] = source[prop];
|
|
10805
10805
|
}
|
|
10806
10806
|
return target;
|
|
@@ -10814,7 +10814,7 @@ class CodedError {
|
|
|
10814
10814
|
this.message = message;
|
|
10815
10815
|
}
|
|
10816
10816
|
static fromObject(_a) {
|
|
10817
|
-
var _b = _a, { message } = _b, options = __objRest$
|
|
10817
|
+
var _b = _a, { message } = _b, options = __objRest$g(_b, ["message"]);
|
|
10818
10818
|
return new CodedError(message, options);
|
|
10819
10819
|
}
|
|
10820
10820
|
}
|
|
@@ -10922,17 +10922,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
10922
10922
|
RateCardStatus
|
|
10923
10923
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
10924
10924
|
|
|
10925
|
-
var __getOwnPropSymbols$
|
|
10926
|
-
var __hasOwnProp$
|
|
10927
|
-
var __propIsEnum$
|
|
10928
|
-
var __objRest$
|
|
10925
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
10926
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
10927
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
10928
|
+
var __objRest$f = (source, exclude) => {
|
|
10929
10929
|
var target = {};
|
|
10930
10930
|
for (var prop in source)
|
|
10931
|
-
if (__hasOwnProp$
|
|
10931
|
+
if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
10932
10932
|
target[prop] = source[prop];
|
|
10933
|
-
if (source != null && __getOwnPropSymbols$
|
|
10934
|
-
for (var prop of __getOwnPropSymbols$
|
|
10935
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
10933
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
10934
|
+
for (var prop of __getOwnPropSymbols$s(source)) {
|
|
10935
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
|
|
10936
10936
|
target[prop] = source[prop];
|
|
10937
10937
|
}
|
|
10938
10938
|
return target;
|
|
@@ -10964,7 +10964,7 @@ class AccountSettingsAPI {
|
|
|
10964
10964
|
* The `updateImage` method updates specific image data for a given image id.
|
|
10965
10965
|
*/
|
|
10966
10966
|
this.updateImage = (_a) => {
|
|
10967
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
10967
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$f(_b, ["labelImageId"]);
|
|
10968
10968
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
10969
10969
|
};
|
|
10970
10970
|
/**
|
|
@@ -13674,7 +13674,7 @@ var ipaddr = {
|
|
|
13674
13674
|
}).call(commonjsGlobal);
|
|
13675
13675
|
} (ipaddr));
|
|
13676
13676
|
|
|
13677
|
-
var __async$
|
|
13677
|
+
var __async$O = (__this, __arguments, generator) => {
|
|
13678
13678
|
return new Promise((resolve, reject) => {
|
|
13679
13679
|
var fulfilled = (value) => {
|
|
13680
13680
|
try {
|
|
@@ -13694,7 +13694,7 @@ var __async$N = (__this, __arguments, generator) => {
|
|
|
13694
13694
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
13695
13695
|
});
|
|
13696
13696
|
};
|
|
13697
|
-
const getEndUserIpAddress = () => __async$
|
|
13697
|
+
const getEndUserIpAddress = () => __async$O(void 0, null, function* () {
|
|
13698
13698
|
try {
|
|
13699
13699
|
const response = yield axios.get("https://api.ipify.org/?format=json");
|
|
13700
13700
|
if (response.data.ip && ipaddrExports.isValid(response.data.ip)) {
|
|
@@ -13706,38 +13706,38 @@ const getEndUserIpAddress = () => __async$N(void 0, null, function* () {
|
|
|
13706
13706
|
}
|
|
13707
13707
|
});
|
|
13708
13708
|
|
|
13709
|
-
var __defProp$
|
|
13710
|
-
var __defProps$
|
|
13711
|
-
var __getOwnPropDescs$
|
|
13712
|
-
var __getOwnPropSymbols$
|
|
13713
|
-
var __hasOwnProp$
|
|
13714
|
-
var __propIsEnum$
|
|
13715
|
-
var __defNormalProp$
|
|
13716
|
-
var __spreadValues$
|
|
13709
|
+
var __defProp$g = Object.defineProperty;
|
|
13710
|
+
var __defProps$b = Object.defineProperties;
|
|
13711
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
13712
|
+
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
|
|
13713
|
+
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
|
|
13714
|
+
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
|
|
13715
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13716
|
+
var __spreadValues$g = (a, b) => {
|
|
13717
13717
|
for (var prop in b || (b = {}))
|
|
13718
|
-
if (__hasOwnProp$
|
|
13719
|
-
__defNormalProp$
|
|
13720
|
-
if (__getOwnPropSymbols$
|
|
13721
|
-
for (var prop of __getOwnPropSymbols$
|
|
13722
|
-
if (__propIsEnum$
|
|
13723
|
-
__defNormalProp$
|
|
13718
|
+
if (__hasOwnProp$r.call(b, prop))
|
|
13719
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
13720
|
+
if (__getOwnPropSymbols$r)
|
|
13721
|
+
for (var prop of __getOwnPropSymbols$r(b)) {
|
|
13722
|
+
if (__propIsEnum$r.call(b, prop))
|
|
13723
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
13724
13724
|
}
|
|
13725
13725
|
return a;
|
|
13726
13726
|
};
|
|
13727
|
-
var __spreadProps$
|
|
13728
|
-
var __objRest$
|
|
13727
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
13728
|
+
var __objRest$e = (source, exclude) => {
|
|
13729
13729
|
var target = {};
|
|
13730
13730
|
for (var prop in source)
|
|
13731
|
-
if (__hasOwnProp$
|
|
13731
|
+
if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
13732
13732
|
target[prop] = source[prop];
|
|
13733
|
-
if (source != null && __getOwnPropSymbols$
|
|
13734
|
-
for (var prop of __getOwnPropSymbols$
|
|
13735
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
13733
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
13734
|
+
for (var prop of __getOwnPropSymbols$r(source)) {
|
|
13735
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
|
|
13736
13736
|
target[prop] = source[prop];
|
|
13737
13737
|
}
|
|
13738
13738
|
return target;
|
|
13739
13739
|
};
|
|
13740
|
-
var __async$
|
|
13740
|
+
var __async$N = (__this, __arguments, generator) => {
|
|
13741
13741
|
return new Promise((resolve, reject) => {
|
|
13742
13742
|
var fulfilled = (value) => {
|
|
13743
13743
|
try {
|
|
@@ -13775,12 +13775,12 @@ class CarriersAPI {
|
|
|
13775
13775
|
/**
|
|
13776
13776
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
13777
13777
|
*/
|
|
13778
|
-
this.connect = (_a) => __async$
|
|
13779
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest$
|
|
13778
|
+
this.connect = (_a) => __async$N(this, null, function* () {
|
|
13779
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$e(_b, ["carrierCode"]);
|
|
13780
13780
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
13781
13781
|
if (!endUserIpAddress)
|
|
13782
13782
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
13783
|
-
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$
|
|
13783
|
+
return yield this.client.post(`/v1/registration/${carrierCode}`, __spreadProps$b(__spreadValues$g({}, connection), {
|
|
13784
13784
|
endUserIpAddress
|
|
13785
13785
|
}));
|
|
13786
13786
|
});
|
|
@@ -13866,7 +13866,7 @@ class CarriersAPI {
|
|
|
13866
13866
|
}
|
|
13867
13867
|
}
|
|
13868
13868
|
|
|
13869
|
-
var __async$
|
|
13869
|
+
var __async$M = (__this, __arguments, generator) => {
|
|
13870
13870
|
return new Promise((resolve, reject) => {
|
|
13871
13871
|
var fulfilled = (value) => {
|
|
13872
13872
|
try {
|
|
@@ -13908,7 +13908,7 @@ class ConnectionsAPI {
|
|
|
13908
13908
|
/**
|
|
13909
13909
|
* The `connectCarrier` method connects a carrier to account.
|
|
13910
13910
|
*/
|
|
13911
|
-
this.connectCarrier = (carrierName, formData) => __async$
|
|
13911
|
+
this.connectCarrier = (carrierName, formData) => __async$M(this, null, function* () {
|
|
13912
13912
|
return yield this.client.post(
|
|
13913
13913
|
`/v1/connections/carriers/${carrierName}`,
|
|
13914
13914
|
formData,
|
|
@@ -16163,23 +16163,23 @@ class CustomPackagesAPI {
|
|
|
16163
16163
|
}
|
|
16164
16164
|
}
|
|
16165
16165
|
|
|
16166
|
-
var __defProp$
|
|
16167
|
-
var __getOwnPropSymbols$
|
|
16168
|
-
var __hasOwnProp$
|
|
16169
|
-
var __propIsEnum$
|
|
16170
|
-
var __defNormalProp$
|
|
16171
|
-
var __spreadValues$
|
|
16166
|
+
var __defProp$f = Object.defineProperty;
|
|
16167
|
+
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
|
|
16168
|
+
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
|
|
16169
|
+
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
|
|
16170
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16171
|
+
var __spreadValues$f = (a, b) => {
|
|
16172
16172
|
for (var prop in b || (b = {}))
|
|
16173
|
-
if (__hasOwnProp$
|
|
16174
|
-
__defNormalProp$
|
|
16175
|
-
if (__getOwnPropSymbols$
|
|
16176
|
-
for (var prop of __getOwnPropSymbols$
|
|
16177
|
-
if (__propIsEnum$
|
|
16178
|
-
__defNormalProp$
|
|
16173
|
+
if (__hasOwnProp$q.call(b, prop))
|
|
16174
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
16175
|
+
if (__getOwnPropSymbols$q)
|
|
16176
|
+
for (var prop of __getOwnPropSymbols$q(b)) {
|
|
16177
|
+
if (__propIsEnum$q.call(b, prop))
|
|
16178
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
16179
16179
|
}
|
|
16180
16180
|
return a;
|
|
16181
16181
|
};
|
|
16182
|
-
var __async$
|
|
16182
|
+
var __async$L = (__this, __arguments, generator) => {
|
|
16183
16183
|
return new Promise((resolve, reject) => {
|
|
16184
16184
|
var fulfilled = (value) => {
|
|
16185
16185
|
try {
|
|
@@ -16218,12 +16218,12 @@ class FundingSourcesAPI {
|
|
|
16218
16218
|
* The `create` method creates a new funding source for a given user. This requires
|
|
16219
16219
|
* payment information to be collected from the user.
|
|
16220
16220
|
*/
|
|
16221
|
-
this.create = (createFundingSource) => __async$
|
|
16221
|
+
this.create = (createFundingSource) => __async$L(this, null, function* () {
|
|
16222
16222
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16223
16223
|
if (!endUserIpAddress) {
|
|
16224
16224
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16225
16225
|
}
|
|
16226
|
-
return yield this.client.post("/v1/funding_sources", __spreadValues$
|
|
16226
|
+
return yield this.client.post("/v1/funding_sources", __spreadValues$f({
|
|
16227
16227
|
endUserIpAddress
|
|
16228
16228
|
}, createFundingSource));
|
|
16229
16229
|
});
|
|
@@ -16232,7 +16232,7 @@ class FundingSourcesAPI {
|
|
|
16232
16232
|
* user to update the billing address or payment information associated with the
|
|
16233
16233
|
* funding source.
|
|
16234
16234
|
*/
|
|
16235
|
-
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$
|
|
16235
|
+
this.update = (billingInfo, creditCardInfo, fundingSourceId) => __async$L(this, null, function* () {
|
|
16236
16236
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16237
16237
|
if (!endUserIpAddress) {
|
|
16238
16238
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -16250,19 +16250,19 @@ class FundingSourcesAPI {
|
|
|
16250
16250
|
* The `registerCarrier` method registers a carrier account and associates
|
|
16251
16251
|
* it with a given funding source.
|
|
16252
16252
|
*/
|
|
16253
|
-
this.registerCarrier = (carrier) => __async$
|
|
16253
|
+
this.registerCarrier = (carrier) => __async$L(this, null, function* () {
|
|
16254
16254
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
16255
16255
|
if (!endUserIpAddress) {
|
|
16256
16256
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
16257
16257
|
}
|
|
16258
|
-
return yield this.client.post("/v1/registration/funding_source", __spreadValues$
|
|
16258
|
+
return yield this.client.post("/v1/registration/funding_source", __spreadValues$f({
|
|
16259
16259
|
endUserIpAddress
|
|
16260
16260
|
}, carrier));
|
|
16261
16261
|
});
|
|
16262
16262
|
/**
|
|
16263
16263
|
* The `addFunds` method allows you to add funds to a funding source.
|
|
16264
16264
|
*/
|
|
16265
|
-
this.addFunds = (amount, fundingSourceId) => __async$
|
|
16265
|
+
this.addFunds = (amount, fundingSourceId) => __async$L(this, null, function* () {
|
|
16266
16266
|
return yield this.client.put(
|
|
16267
16267
|
`/v1/funding_sources/${fundingSourceId}/add_funds`,
|
|
16268
16268
|
amount
|
|
@@ -16272,7 +16272,7 @@ class FundingSourcesAPI {
|
|
|
16272
16272
|
* The `metadata` method returns seller-specific requirements for creating funding sources
|
|
16273
16273
|
* and attaching carriers
|
|
16274
16274
|
*/
|
|
16275
|
-
this.metadata = () => __async$
|
|
16275
|
+
this.metadata = () => __async$L(this, null, function* () {
|
|
16276
16276
|
return yield this.client.get("/v1/funding_sources/metadata");
|
|
16277
16277
|
});
|
|
16278
16278
|
/**
|
|
@@ -16460,19 +16460,19 @@ class RateCardsAPI {
|
|
|
16460
16460
|
}
|
|
16461
16461
|
}
|
|
16462
16462
|
|
|
16463
|
-
var __defProp$
|
|
16464
|
-
var __getOwnPropSymbols$
|
|
16465
|
-
var __hasOwnProp$
|
|
16466
|
-
var __propIsEnum$
|
|
16467
|
-
var __defNormalProp$
|
|
16468
|
-
var __spreadValues$
|
|
16463
|
+
var __defProp$e = Object.defineProperty;
|
|
16464
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
16465
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
16466
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
16467
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16468
|
+
var __spreadValues$e = (a, b) => {
|
|
16469
16469
|
for (var prop in b || (b = {}))
|
|
16470
|
-
if (__hasOwnProp$
|
|
16471
|
-
__defNormalProp$
|
|
16472
|
-
if (__getOwnPropSymbols$
|
|
16473
|
-
for (var prop of __getOwnPropSymbols$
|
|
16474
|
-
if (__propIsEnum$
|
|
16475
|
-
__defNormalProp$
|
|
16470
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
16471
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
16472
|
+
if (__getOwnPropSymbols$p)
|
|
16473
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
16474
|
+
if (__propIsEnum$p.call(b, prop))
|
|
16475
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
16476
16476
|
}
|
|
16477
16477
|
return a;
|
|
16478
16478
|
};
|
|
@@ -16494,7 +16494,7 @@ class RatesAPI {
|
|
|
16494
16494
|
* method.
|
|
16495
16495
|
*/
|
|
16496
16496
|
this.estimate = (params) => {
|
|
16497
|
-
return this.client.post("/v1/rates/estimate", __spreadValues$
|
|
16497
|
+
return this.client.post("/v1/rates/estimate", __spreadValues$e({}, params));
|
|
16498
16498
|
};
|
|
16499
16499
|
this.client = client;
|
|
16500
16500
|
}
|
|
@@ -16592,19 +16592,19 @@ class SellersAPI {
|
|
|
16592
16592
|
}
|
|
16593
16593
|
}
|
|
16594
16594
|
|
|
16595
|
-
var __defProp$
|
|
16596
|
-
var __getOwnPropSymbols$
|
|
16597
|
-
var __hasOwnProp$
|
|
16598
|
-
var __propIsEnum$
|
|
16599
|
-
var __defNormalProp$
|
|
16600
|
-
var __spreadValues$
|
|
16595
|
+
var __defProp$d = Object.defineProperty;
|
|
16596
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
16597
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
16598
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
16599
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16600
|
+
var __spreadValues$d = (a, b) => {
|
|
16601
16601
|
for (var prop in b || (b = {}))
|
|
16602
|
-
if (__hasOwnProp$
|
|
16603
|
-
__defNormalProp$
|
|
16604
|
-
if (__getOwnPropSymbols$
|
|
16605
|
-
for (var prop of __getOwnPropSymbols$
|
|
16606
|
-
if (__propIsEnum$
|
|
16607
|
-
__defNormalProp$
|
|
16602
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
16603
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
16604
|
+
if (__getOwnPropSymbols$o)
|
|
16605
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
16606
|
+
if (__propIsEnum$o.call(b, prop))
|
|
16607
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
16608
16608
|
}
|
|
16609
16609
|
return a;
|
|
16610
16610
|
};
|
|
@@ -16616,7 +16616,7 @@ class ServicePointsAPI {
|
|
|
16616
16616
|
* Either an address, coordinates, or an address query
|
|
16617
16617
|
*/
|
|
16618
16618
|
this.list = (options) => {
|
|
16619
|
-
return this.client.post("/v1/service_points/list", __spreadValues$
|
|
16619
|
+
return this.client.post("/v1/service_points/list", __spreadValues$d({}, options));
|
|
16620
16620
|
};
|
|
16621
16621
|
/**
|
|
16622
16622
|
* Get a specific service point by its carrier code, country code, and id
|
|
@@ -16634,7 +16634,7 @@ class ServicePointsAPI {
|
|
|
16634
16634
|
}
|
|
16635
16635
|
}
|
|
16636
16636
|
|
|
16637
|
-
var __async$
|
|
16637
|
+
var __async$K = (__this, __arguments, generator) => {
|
|
16638
16638
|
return new Promise((resolve, reject) => {
|
|
16639
16639
|
var fulfilled = (value) => {
|
|
16640
16640
|
try {
|
|
@@ -16677,7 +16677,7 @@ class ShipmentsAPI {
|
|
|
16677
16677
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
16678
16678
|
* items passed into this method.
|
|
16679
16679
|
*/
|
|
16680
|
-
this.create = (...shipments) => __async$
|
|
16680
|
+
this.create = (...shipments) => __async$K(this, null, function* () {
|
|
16681
16681
|
return this.client.post("/v1/shipments", {
|
|
16682
16682
|
shipments
|
|
16683
16683
|
});
|
|
@@ -34043,26 +34043,26 @@ class WebhooksAPI {
|
|
|
34043
34043
|
}
|
|
34044
34044
|
}
|
|
34045
34045
|
|
|
34046
|
-
var __defProp$
|
|
34047
|
-
var __defProps$
|
|
34048
|
-
var __getOwnPropDescs$
|
|
34049
|
-
var __getOwnPropSymbols$
|
|
34050
|
-
var __hasOwnProp$
|
|
34051
|
-
var __propIsEnum$
|
|
34052
|
-
var __defNormalProp$
|
|
34053
|
-
var __spreadValues$
|
|
34046
|
+
var __defProp$c = Object.defineProperty;
|
|
34047
|
+
var __defProps$a = Object.defineProperties;
|
|
34048
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
34049
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
34050
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
34051
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
34052
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34053
|
+
var __spreadValues$c = (a, b) => {
|
|
34054
34054
|
for (var prop in b || (b = {}))
|
|
34055
|
-
if (__hasOwnProp$
|
|
34056
|
-
__defNormalProp$
|
|
34057
|
-
if (__getOwnPropSymbols$
|
|
34058
|
-
for (var prop of __getOwnPropSymbols$
|
|
34059
|
-
if (__propIsEnum$
|
|
34060
|
-
__defNormalProp$
|
|
34055
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
34056
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
34057
|
+
if (__getOwnPropSymbols$n)
|
|
34058
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
34059
|
+
if (__propIsEnum$n.call(b, prop))
|
|
34060
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
34061
34061
|
}
|
|
34062
34062
|
return a;
|
|
34063
34063
|
};
|
|
34064
|
-
var __spreadProps$
|
|
34065
|
-
var __async$
|
|
34064
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
34065
|
+
var __async$J = (__this, __arguments, generator) => {
|
|
34066
34066
|
return new Promise((resolve, reject) => {
|
|
34067
34067
|
var fulfilled = (value) => {
|
|
34068
34068
|
try {
|
|
@@ -34085,7 +34085,7 @@ var __async$I = (__this, __arguments, generator) => {
|
|
|
34085
34085
|
const logger$1 = E({
|
|
34086
34086
|
level: process.env.NODE_ENV === "production" ? "fatal" : "info",
|
|
34087
34087
|
name: "shipengine-api",
|
|
34088
|
-
serializers: __spreadProps$
|
|
34088
|
+
serializers: __spreadProps$a(__spreadValues$c({}, k), {
|
|
34089
34089
|
req: (req) => ({
|
|
34090
34090
|
headers: req.headers,
|
|
34091
34091
|
method: req.method,
|
|
@@ -34109,7 +34109,7 @@ class ShipEngineAPI {
|
|
|
34109
34109
|
constructor(token, { baseURL, headers, getToken, onApiError }) {
|
|
34110
34110
|
const client = axios.create({
|
|
34111
34111
|
baseURL,
|
|
34112
|
-
headers: __spreadProps$
|
|
34112
|
+
headers: __spreadProps$a(__spreadValues$c({}, headers), {
|
|
34113
34113
|
"Content-Type": "application/json"
|
|
34114
34114
|
}),
|
|
34115
34115
|
paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
@@ -34156,7 +34156,7 @@ class ShipEngineAPI {
|
|
|
34156
34156
|
);
|
|
34157
34157
|
return res;
|
|
34158
34158
|
},
|
|
34159
|
-
(err) => __async$
|
|
34159
|
+
(err) => __async$J(this, null, function* () {
|
|
34160
34160
|
var _a, _b, _c, _d, _e;
|
|
34161
34161
|
logger$1.error(
|
|
34162
34162
|
{ err, req: err.config, res: err.response },
|
|
@@ -34438,25 +34438,25 @@ const delay = (ms) => new Promise((resolve) => {
|
|
|
34438
34438
|
|
|
34439
34439
|
const onError = (_errors) => _default();
|
|
34440
34440
|
|
|
34441
|
-
var __defProp$
|
|
34442
|
-
var __defProps$
|
|
34443
|
-
var __getOwnPropDescs$
|
|
34444
|
-
var __getOwnPropSymbols$
|
|
34445
|
-
var __hasOwnProp$
|
|
34446
|
-
var __propIsEnum$
|
|
34447
|
-
var __defNormalProp$
|
|
34448
|
-
var __spreadValues$
|
|
34441
|
+
var __defProp$b = Object.defineProperty;
|
|
34442
|
+
var __defProps$9 = Object.defineProperties;
|
|
34443
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
34444
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
34445
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
34446
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
34447
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
34448
|
+
var __spreadValues$b = (a, b) => {
|
|
34449
34449
|
for (var prop in b || (b = {}))
|
|
34450
|
-
if (__hasOwnProp$
|
|
34451
|
-
__defNormalProp$
|
|
34452
|
-
if (__getOwnPropSymbols$
|
|
34453
|
-
for (var prop of __getOwnPropSymbols$
|
|
34454
|
-
if (__propIsEnum$
|
|
34455
|
-
__defNormalProp$
|
|
34450
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
34451
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
34452
|
+
if (__getOwnPropSymbols$m)
|
|
34453
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
34454
|
+
if (__propIsEnum$m.call(b, prop))
|
|
34455
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
34456
34456
|
}
|
|
34457
34457
|
return a;
|
|
34458
34458
|
};
|
|
34459
|
-
var __spreadProps$
|
|
34459
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
34460
34460
|
const streams = [];
|
|
34461
34461
|
if (process.env.NODE_ENV === "production") {
|
|
34462
34462
|
streams.push({
|
|
@@ -34465,7 +34465,7 @@ if (process.env.NODE_ENV === "production") {
|
|
|
34465
34465
|
}
|
|
34466
34466
|
const logger = E({
|
|
34467
34467
|
name: "shipengine",
|
|
34468
|
-
serializers: __spreadProps$
|
|
34468
|
+
serializers: __spreadProps$9(__spreadValues$b({}, k), {
|
|
34469
34469
|
req: (req) => ({
|
|
34470
34470
|
headers: req.headers,
|
|
34471
34471
|
method: req.method,
|
|
@@ -34490,7 +34490,7 @@ const retryUntil = (callbackFn, retries = 10, timeoutBetweenAttempts = 1e3) => P
|
|
|
34490
34490
|
throw error;
|
|
34491
34491
|
});
|
|
34492
34492
|
|
|
34493
|
-
var __async$
|
|
34493
|
+
var __async$I = (__this, __arguments, generator) => {
|
|
34494
34494
|
return new Promise((resolve, reject) => {
|
|
34495
34495
|
var fulfilled = (value) => {
|
|
34496
34496
|
try {
|
|
@@ -34513,7 +34513,7 @@ var __async$H = (__this, __arguments, generator) => {
|
|
|
34513
34513
|
const useCreateAccountImage = () => {
|
|
34514
34514
|
const { client } = useShipEngine();
|
|
34515
34515
|
return useMutation({
|
|
34516
|
-
mutationFn: (data) => __async$
|
|
34516
|
+
mutationFn: (data) => __async$I(void 0, null, function* () {
|
|
34517
34517
|
const result = yield client.accountSettings.createImage(data);
|
|
34518
34518
|
return result.data;
|
|
34519
34519
|
}),
|
|
@@ -34522,7 +34522,7 @@ const useCreateAccountImage = () => {
|
|
|
34522
34522
|
});
|
|
34523
34523
|
};
|
|
34524
34524
|
|
|
34525
|
-
var __async$
|
|
34525
|
+
var __async$H = (__this, __arguments, generator) => {
|
|
34526
34526
|
return new Promise((resolve, reject) => {
|
|
34527
34527
|
var fulfilled = (value) => {
|
|
34528
34528
|
try {
|
|
@@ -34545,7 +34545,7 @@ var __async$G = (__this, __arguments, generator) => {
|
|
|
34545
34545
|
const useDeleteAccountImage = () => {
|
|
34546
34546
|
const { client } = useShipEngine();
|
|
34547
34547
|
return useMutation({
|
|
34548
|
-
mutationFn: (labelImageId) => __async$
|
|
34548
|
+
mutationFn: (labelImageId) => __async$H(void 0, null, function* () {
|
|
34549
34549
|
const result = yield client.accountSettings.deleteImage(labelImageId);
|
|
34550
34550
|
return result.data;
|
|
34551
34551
|
}),
|
|
@@ -34574,7 +34574,7 @@ const useGetAccountSettings = () => {
|
|
|
34574
34574
|
});
|
|
34575
34575
|
};
|
|
34576
34576
|
|
|
34577
|
-
var __async$
|
|
34577
|
+
var __async$G = (__this, __arguments, generator) => {
|
|
34578
34578
|
return new Promise((resolve, reject) => {
|
|
34579
34579
|
var fulfilled = (value) => {
|
|
34580
34580
|
try {
|
|
@@ -34597,7 +34597,7 @@ var __async$F = (__this, __arguments, generator) => {
|
|
|
34597
34597
|
const useUpdateAccountImage = () => {
|
|
34598
34598
|
const { client } = useShipEngine();
|
|
34599
34599
|
return useMutation({
|
|
34600
|
-
mutationFn: (data) => __async$
|
|
34600
|
+
mutationFn: (data) => __async$G(void 0, null, function* () {
|
|
34601
34601
|
const result = yield client.accountSettings.updateImage(data);
|
|
34602
34602
|
return result.data;
|
|
34603
34603
|
}),
|
|
@@ -34606,7 +34606,7 @@ const useUpdateAccountImage = () => {
|
|
|
34606
34606
|
});
|
|
34607
34607
|
};
|
|
34608
34608
|
|
|
34609
|
-
var __async$
|
|
34609
|
+
var __async$F = (__this, __arguments, generator) => {
|
|
34610
34610
|
return new Promise((resolve, reject) => {
|
|
34611
34611
|
var fulfilled = (value) => {
|
|
34612
34612
|
try {
|
|
@@ -34629,7 +34629,7 @@ var __async$E = (__this, __arguments, generator) => {
|
|
|
34629
34629
|
const useUpdateAccountSettings = () => {
|
|
34630
34630
|
const { client } = useShipEngine();
|
|
34631
34631
|
return useMutation({
|
|
34632
|
-
mutationFn: (settings) => __async$
|
|
34632
|
+
mutationFn: (settings) => __async$F(void 0, null, function* () {
|
|
34633
34633
|
const result = yield client.accountSettings.update(settings);
|
|
34634
34634
|
return result.data;
|
|
34635
34635
|
}),
|
|
@@ -34638,7 +34638,7 @@ const useUpdateAccountSettings = () => {
|
|
|
34638
34638
|
});
|
|
34639
34639
|
};
|
|
34640
34640
|
|
|
34641
|
-
var __async$
|
|
34641
|
+
var __async$E = (__this, __arguments, generator) => {
|
|
34642
34642
|
return new Promise((resolve, reject) => {
|
|
34643
34643
|
var fulfilled = (value) => {
|
|
34644
34644
|
try {
|
|
@@ -34661,7 +34661,7 @@ var __async$D = (__this, __arguments, generator) => {
|
|
|
34661
34661
|
const useParseAddress = () => {
|
|
34662
34662
|
const { client } = useShipEngine();
|
|
34663
34663
|
return useMutation({
|
|
34664
|
-
mutationFn: (_0) => __async$
|
|
34664
|
+
mutationFn: (_0) => __async$E(void 0, [_0], function* ({ address, text }) {
|
|
34665
34665
|
const result = yield client.addresses.parse(text, address);
|
|
34666
34666
|
return result.data;
|
|
34667
34667
|
}),
|
|
@@ -34670,7 +34670,7 @@ const useParseAddress = () => {
|
|
|
34670
34670
|
});
|
|
34671
34671
|
};
|
|
34672
34672
|
|
|
34673
|
-
var __async$
|
|
34673
|
+
var __async$D = (__this, __arguments, generator) => {
|
|
34674
34674
|
return new Promise((resolve, reject) => {
|
|
34675
34675
|
var fulfilled = (value) => {
|
|
34676
34676
|
try {
|
|
@@ -34693,7 +34693,7 @@ var __async$C = (__this, __arguments, generator) => {
|
|
|
34693
34693
|
const useValidateAddresses = () => {
|
|
34694
34694
|
const { client } = useShipEngine();
|
|
34695
34695
|
return useMutation({
|
|
34696
|
-
mutationFn: (addresses) => __async$
|
|
34696
|
+
mutationFn: (addresses) => __async$D(void 0, null, function* () {
|
|
34697
34697
|
const result = yield client.addresses.validate(addresses);
|
|
34698
34698
|
return result.data;
|
|
34699
34699
|
}),
|
|
@@ -34702,7 +34702,7 @@ const useValidateAddresses = () => {
|
|
|
34702
34702
|
});
|
|
34703
34703
|
};
|
|
34704
34704
|
|
|
34705
|
-
var __async$
|
|
34705
|
+
var __async$C = (__this, __arguments, generator) => {
|
|
34706
34706
|
return new Promise((resolve, reject) => {
|
|
34707
34707
|
var fulfilled = (value) => {
|
|
34708
34708
|
try {
|
|
@@ -34725,7 +34725,7 @@ var __async$B = (__this, __arguments, generator) => {
|
|
|
34725
34725
|
const useAddFunds = () => {
|
|
34726
34726
|
const { client } = useShipEngine();
|
|
34727
34727
|
return useMutation({
|
|
34728
|
-
mutationFn: (_0) => __async$
|
|
34728
|
+
mutationFn: (_0) => __async$C(void 0, [_0], function* ({ carrierId, funds }) {
|
|
34729
34729
|
const result = yield client.carriers.addFunds(carrierId, funds);
|
|
34730
34730
|
return result.data;
|
|
34731
34731
|
}),
|
|
@@ -34734,7 +34734,7 @@ const useAddFunds = () => {
|
|
|
34734
34734
|
});
|
|
34735
34735
|
};
|
|
34736
34736
|
|
|
34737
|
-
var __async$
|
|
34737
|
+
var __async$B = (__this, __arguments, generator) => {
|
|
34738
34738
|
return new Promise((resolve, reject) => {
|
|
34739
34739
|
var fulfilled = (value) => {
|
|
34740
34740
|
try {
|
|
@@ -34757,7 +34757,7 @@ var __async$A = (__this, __arguments, generator) => {
|
|
|
34757
34757
|
const useConnectCarrier = () => {
|
|
34758
34758
|
const { client } = useShipEngine();
|
|
34759
34759
|
return useMutation({
|
|
34760
|
-
mutationFn: (params) => __async$
|
|
34760
|
+
mutationFn: (params) => __async$B(void 0, null, function* () {
|
|
34761
34761
|
const result = yield client.carriers.connect(params);
|
|
34762
34762
|
return result.data;
|
|
34763
34763
|
}),
|
|
@@ -34876,22 +34876,22 @@ const useListCarriers = () => {
|
|
|
34876
34876
|
});
|
|
34877
34877
|
};
|
|
34878
34878
|
|
|
34879
|
-
var __getOwnPropSymbols$
|
|
34880
|
-
var __hasOwnProp$
|
|
34881
|
-
var __propIsEnum$
|
|
34882
|
-
var __objRest$
|
|
34879
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
34880
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
34881
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
34882
|
+
var __objRest$d = (source, exclude) => {
|
|
34883
34883
|
var target = {};
|
|
34884
34884
|
for (var prop in source)
|
|
34885
|
-
if (__hasOwnProp$
|
|
34885
|
+
if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34886
34886
|
target[prop] = source[prop];
|
|
34887
|
-
if (source != null && __getOwnPropSymbols$
|
|
34888
|
-
for (var prop of __getOwnPropSymbols$
|
|
34889
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34887
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
34888
|
+
for (var prop of __getOwnPropSymbols$l(source)) {
|
|
34889
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
|
|
34890
34890
|
target[prop] = source[prop];
|
|
34891
34891
|
}
|
|
34892
34892
|
return target;
|
|
34893
34893
|
};
|
|
34894
|
-
var __async$
|
|
34894
|
+
var __async$A = (__this, __arguments, generator) => {
|
|
34895
34895
|
return new Promise((resolve, reject) => {
|
|
34896
34896
|
var fulfilled = (value) => {
|
|
34897
34897
|
try {
|
|
@@ -34915,8 +34915,8 @@ const useUpdateAutoFunding = () => {
|
|
|
34915
34915
|
const { client } = useShipEngine();
|
|
34916
34916
|
const queryClient = useQueryClient();
|
|
34917
34917
|
return useMutation({
|
|
34918
|
-
mutationFn: (_a) => __async$
|
|
34919
|
-
var _b = _a, { carrierId } = _b, options = __objRest$
|
|
34918
|
+
mutationFn: (_a) => __async$A(void 0, null, function* () {
|
|
34919
|
+
var _b = _a, { carrierId } = _b, options = __objRest$d(_b, ["carrierId"]);
|
|
34920
34920
|
const result = yield client.carriers.updateAutoFunding(carrierId, options);
|
|
34921
34921
|
return result.data;
|
|
34922
34922
|
}),
|
|
@@ -34945,7 +34945,7 @@ const useGetZonesByCarrier = (carrierId) => {
|
|
|
34945
34945
|
});
|
|
34946
34946
|
};
|
|
34947
34947
|
|
|
34948
|
-
var __async$
|
|
34948
|
+
var __async$z = (__this, __arguments, generator) => {
|
|
34949
34949
|
return new Promise((resolve, reject) => {
|
|
34950
34950
|
var fulfilled = (value) => {
|
|
34951
34951
|
try {
|
|
@@ -34968,7 +34968,7 @@ var __async$y = (__this, __arguments, generator) => {
|
|
|
34968
34968
|
const useDeleteCarrier = () => {
|
|
34969
34969
|
const { client } = useShipEngine();
|
|
34970
34970
|
return useMutation({
|
|
34971
|
-
mutationFn: (carrierId) => __async$
|
|
34971
|
+
mutationFn: (carrierId) => __async$z(void 0, null, function* () {
|
|
34972
34972
|
const result = yield client.carriers.delete(carrierId);
|
|
34973
34973
|
return result.data;
|
|
34974
34974
|
}),
|
|
@@ -34977,24 +34977,24 @@ const useDeleteCarrier = () => {
|
|
|
34977
34977
|
});
|
|
34978
34978
|
};
|
|
34979
34979
|
|
|
34980
|
-
var __getOwnPropSymbols$
|
|
34981
|
-
var __hasOwnProp$
|
|
34982
|
-
var __propIsEnum$
|
|
34983
|
-
var __objRest$
|
|
34980
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
34981
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
34982
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
34983
|
+
var __objRest$c = (source, exclude) => {
|
|
34984
34984
|
var target = {};
|
|
34985
34985
|
for (var prop in source)
|
|
34986
|
-
if (__hasOwnProp$
|
|
34986
|
+
if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
34987
34987
|
target[prop] = source[prop];
|
|
34988
|
-
if (source != null && __getOwnPropSymbols$
|
|
34989
|
-
for (var prop of __getOwnPropSymbols$
|
|
34990
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
34988
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
34989
|
+
for (var prop of __getOwnPropSymbols$k(source)) {
|
|
34990
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
|
|
34991
34991
|
target[prop] = source[prop];
|
|
34992
34992
|
}
|
|
34993
34993
|
return target;
|
|
34994
34994
|
};
|
|
34995
34995
|
const useGetCarrierConnectionForm = (_params) => {
|
|
34996
34996
|
const { client } = useShipEngine();
|
|
34997
|
-
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$
|
|
34997
|
+
const _a = _params || {}, { carrierName, enabled = true } = _a, params = __objRest$c(_a, ["carrierName", "enabled"]);
|
|
34998
34998
|
return useQuery({
|
|
34999
34999
|
enabled,
|
|
35000
35000
|
onError,
|
|
@@ -35004,24 +35004,24 @@ const useGetCarrierConnectionForm = (_params) => {
|
|
|
35004
35004
|
});
|
|
35005
35005
|
};
|
|
35006
35006
|
|
|
35007
|
-
var __getOwnPropSymbols$
|
|
35008
|
-
var __hasOwnProp$
|
|
35009
|
-
var __propIsEnum$
|
|
35010
|
-
var __objRest$
|
|
35007
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
35008
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
35009
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
35010
|
+
var __objRest$b = (source, exclude) => {
|
|
35011
35011
|
var target = {};
|
|
35012
35012
|
for (var prop in source)
|
|
35013
|
-
if (__hasOwnProp$
|
|
35013
|
+
if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35014
35014
|
target[prop] = source[prop];
|
|
35015
|
-
if (source != null && __getOwnPropSymbols$
|
|
35016
|
-
for (var prop of __getOwnPropSymbols$
|
|
35017
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
35015
|
+
if (source != null && __getOwnPropSymbols$j)
|
|
35016
|
+
for (var prop of __getOwnPropSymbols$j(source)) {
|
|
35017
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
|
|
35018
35018
|
target[prop] = source[prop];
|
|
35019
35019
|
}
|
|
35020
35020
|
return target;
|
|
35021
35021
|
};
|
|
35022
35022
|
const useListCarrierConnections = (_params) => {
|
|
35023
35023
|
const { client } = useShipEngine();
|
|
35024
|
-
const _a = _params || {}, { enabled = true } = _a, params = __objRest$
|
|
35024
|
+
const _a = _params || {}, { enabled = true } = _a, params = __objRest$b(_a, ["enabled"]);
|
|
35025
35025
|
return useQuery({
|
|
35026
35026
|
enabled,
|
|
35027
35027
|
onError,
|
|
@@ -35031,7 +35031,7 @@ const useListCarrierConnections = (_params) => {
|
|
|
35031
35031
|
});
|
|
35032
35032
|
};
|
|
35033
35033
|
|
|
35034
|
-
var __async$
|
|
35034
|
+
var __async$y = (__this, __arguments, generator) => {
|
|
35035
35035
|
return new Promise((resolve, reject) => {
|
|
35036
35036
|
var fulfilled = (value) => {
|
|
35037
35037
|
try {
|
|
@@ -35054,7 +35054,7 @@ var __async$x = (__this, __arguments, generator) => {
|
|
|
35054
35054
|
const useConnectCarrierAccount = () => {
|
|
35055
35055
|
const { client } = useShipEngine();
|
|
35056
35056
|
return useMutation({
|
|
35057
|
-
mutationFn: (_0) => __async$
|
|
35057
|
+
mutationFn: (_0) => __async$y(void 0, [_0], function* ({ carrierName, formData }) {
|
|
35058
35058
|
const result = yield client.connections.connectCarrier(carrierName, formData);
|
|
35059
35059
|
return result.data;
|
|
35060
35060
|
}),
|
|
@@ -35074,6 +35074,112 @@ const useCarrierConnectionsServicesList = (carrierCode) => {
|
|
|
35074
35074
|
});
|
|
35075
35075
|
};
|
|
35076
35076
|
|
|
35077
|
+
var __defProp$a = Object.defineProperty;
|
|
35078
|
+
var __defProps$8 = Object.defineProperties;
|
|
35079
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
35080
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
35081
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
35082
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
35083
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35084
|
+
var __spreadValues$a = (a, b) => {
|
|
35085
|
+
for (var prop in b || (b = {}))
|
|
35086
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
35087
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
35088
|
+
if (__getOwnPropSymbols$i)
|
|
35089
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
35090
|
+
if (__propIsEnum$i.call(b, prop))
|
|
35091
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
35092
|
+
}
|
|
35093
|
+
return a;
|
|
35094
|
+
};
|
|
35095
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
35096
|
+
var __objRest$a = (source, exclude) => {
|
|
35097
|
+
var target = {};
|
|
35098
|
+
for (var prop in source)
|
|
35099
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35100
|
+
target[prop] = source[prop];
|
|
35101
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
35102
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
35103
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
35104
|
+
target[prop] = source[prop];
|
|
35105
|
+
}
|
|
35106
|
+
return target;
|
|
35107
|
+
};
|
|
35108
|
+
const useGetConnectionsCarrierSettings = (_a) => {
|
|
35109
|
+
var _b = _a, {
|
|
35110
|
+
queryFnParams
|
|
35111
|
+
} = _b, params = __objRest$a(_b, [
|
|
35112
|
+
"queryFnParams"
|
|
35113
|
+
]);
|
|
35114
|
+
const { client } = useShipEngine();
|
|
35115
|
+
const { carrierName, carrierCode } = queryFnParams;
|
|
35116
|
+
return useQuery(__spreadProps$8(__spreadValues$a({}, params), {
|
|
35117
|
+
onError,
|
|
35118
|
+
queryFn: () => client.connections.getCarrierSettings(carrierName, carrierCode),
|
|
35119
|
+
queryKey: ["useGetConnectionsCarrierSettings", carrierName, carrierCode],
|
|
35120
|
+
select: (result) => result.data
|
|
35121
|
+
}));
|
|
35122
|
+
};
|
|
35123
|
+
|
|
35124
|
+
var __defProp$9 = Object.defineProperty;
|
|
35125
|
+
var __defProps$7 = Object.defineProperties;
|
|
35126
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
35127
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
35128
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
35129
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
35130
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35131
|
+
var __spreadValues$9 = (a, b) => {
|
|
35132
|
+
for (var prop in b || (b = {}))
|
|
35133
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
35134
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
35135
|
+
if (__getOwnPropSymbols$h)
|
|
35136
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
35137
|
+
if (__propIsEnum$h.call(b, prop))
|
|
35138
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
35139
|
+
}
|
|
35140
|
+
return a;
|
|
35141
|
+
};
|
|
35142
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
35143
|
+
var __async$x = (__this, __arguments, generator) => {
|
|
35144
|
+
return new Promise((resolve, reject) => {
|
|
35145
|
+
var fulfilled = (value) => {
|
|
35146
|
+
try {
|
|
35147
|
+
step(generator.next(value));
|
|
35148
|
+
} catch (e) {
|
|
35149
|
+
reject(e);
|
|
35150
|
+
}
|
|
35151
|
+
};
|
|
35152
|
+
var rejected = (value) => {
|
|
35153
|
+
try {
|
|
35154
|
+
step(generator.throw(value));
|
|
35155
|
+
} catch (e) {
|
|
35156
|
+
reject(e);
|
|
35157
|
+
}
|
|
35158
|
+
};
|
|
35159
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35160
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35161
|
+
});
|
|
35162
|
+
};
|
|
35163
|
+
const useUpdateConnectionsCarrierSettings = (params) => {
|
|
35164
|
+
const { client } = useShipEngine();
|
|
35165
|
+
return useMutation(__spreadProps$7(__spreadValues$9({}, params), {
|
|
35166
|
+
mutationFn: (_0) => __async$x(void 0, [_0], function* ({
|
|
35167
|
+
carrierName,
|
|
35168
|
+
carrierCode,
|
|
35169
|
+
formData
|
|
35170
|
+
}) {
|
|
35171
|
+
const result = yield client.connections.updateCarrierSettings(
|
|
35172
|
+
carrierName,
|
|
35173
|
+
carrierCode,
|
|
35174
|
+
formData
|
|
35175
|
+
);
|
|
35176
|
+
return result.data;
|
|
35177
|
+
}),
|
|
35178
|
+
mutationKey: ["useUpdateConnectionsCarrierSettings"],
|
|
35179
|
+
onError
|
|
35180
|
+
}));
|
|
35181
|
+
};
|
|
35182
|
+
|
|
35077
35183
|
const useListCustomPackageTypes = () => {
|
|
35078
35184
|
const { client } = useShipEngine();
|
|
35079
35185
|
return useQuery({
|
|
@@ -37934,4 +38040,4 @@ const alchemy = {
|
|
|
37934
38040
|
createElement
|
|
37935
38041
|
};
|
|
37936
38042
|
|
|
37937
|
-
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|
|
38043
|
+
export { AccountSettingsAPI, AddressesAPI, AlchemyContext, AlchemyProvider, AlchemyTestProvider, CarriersAPI, CodedError, ConfirmationType, ConnectionsAPI, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, Element, ErrorBoundary, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, MetadataCapability, MetadataRequirement, MetadataSatisfyingFormTypes, OrderSourcesAPI, RateCardStatus, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, SellersAPI, ServicePointsAPI, ShipEngine, ShipEngineAPI, ShipEngineContext, ShipmentsAPI, ShippingRulesAPI, ThemesAPI, WarehousesAPI, WebhooksAPI, alchemy, alchemy as default, delay, getEmotionCache, getEndUserIpAddress, isCodedError, isCodedErrors, isDataCodedErrors, isInvalidTokenError, logger, onError, parseError, retryUntil, useAddFunds, useAddInsuranceFunds, useAddSandboxCarriers, useAlchemy, useCalculateRates, useCarrierConnectionsServicesList, useConnectCarrier, useConnectCarrierAccount, useCreateAccountImage, useCreateFundingSource, useCreateLabel, useCreateRateCard, useCreateSalesOrderShipment, useCreateSandboxSeller, useCreateShipment, useCreateShippingRule, useCreateWarehouse, useCreateWebhook, useDeactivateOrderSource, useDeleteAccountImage, useDeleteCarrier, useDeleteRateCard, useDeleteShippingRule, useDeleteWarehouse, useDeleteWebhook, useDownloadRateCard, useEditShippingRule, useFundingSourcesAddFunds, useGetAccountBillingPlan, useGetAccountImages, useGetAccountSettings, useGetAutoFundingConfiguration, useGetCarrierById, useGetCarrierConnectionForm, useGetConnectionsCarrierSettings, useGetCountriesByCarrier, useGetCurrenciesByCarrier, useGetFundingSourceById, useGetFundingSourceMetadata, useGetFundingSourceTransactions, useGetHereToken, useGetInsuranceAccount, useGetInsuranceFundingSourceAcceptedTerms, useGetLabel, useGetPackageRatingGroupByCarrier, useGetRateCardById, useGetSalesOrder, useGetSalesOrderShipment, useGetServicePoint, useGetServicesByCarrier, useGetShipment, useGetShipmentRates, useGetShippingRuleById, useGetShippingRuleConditionsOptions, useGetThemeById, useGetZonesByCarrier, useI18n, useListCarrierConnections, useListCarriers, useListCustomPackageTypes, useListFundingSources, useListLabels, useListOrderSources, useListRateCards, useListSalesOrderShipments, useListSalesOrders, useListSandboxSellerIds, useListServicePoints, useListShipments, useListShippingRules, useListWarehouses, useListWebhooks, useLoadIcons, useNotifySalesOrderShipped, useParseAddress, usePublishRateCard, useRatesEstimate, useRefreshOrderSource, useRefreshOrderSourceAsync, useRegisterCarrier, useShipEngine, useUpdateAccountBillingPlan, useUpdateAccountImage, useUpdateAccountSettings, useUpdateAutoFunding, useUpdateConnectionsCarrierSettings, useUpdateFundingSource, useUpdateRateCard, useUpdateSalesOrderShipment, useUpdateWarehouse, useUpdateWebhook, useUploadRateCard, useValidateAddresses, useVoidLabel };
|