@shipengine/alchemy 2.1.0 → 2.1.1
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 +17 -3
- package/index.mjs +17 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7719,7 +7719,7 @@ class RateCardsAPI {
|
|
|
7719
7719
|
formData.append("file", file);
|
|
7720
7720
|
return this.client.put(`/v1/rate_cards/${rateCardId}/rates/upload`, formData, {
|
|
7721
7721
|
headers: {
|
|
7722
|
-
|
|
7722
|
+
"Content-Type": "multipart/form-data"
|
|
7723
7723
|
}
|
|
7724
7724
|
});
|
|
7725
7725
|
};
|
|
@@ -7911,7 +7911,20 @@ class ShipEngineAPI {
|
|
|
7911
7911
|
"Content-Type": "application/json"
|
|
7912
7912
|
}),
|
|
7913
7913
|
paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
7914
|
-
transformRequest: [
|
|
7914
|
+
transformRequest: [
|
|
7915
|
+
(data) => {
|
|
7916
|
+
if (data && !(data instanceof FormData))
|
|
7917
|
+
return humpsExports.decamelizeKeys(data);
|
|
7918
|
+
else
|
|
7919
|
+
return data;
|
|
7920
|
+
},
|
|
7921
|
+
(data) => {
|
|
7922
|
+
if (data && !(data instanceof FormData))
|
|
7923
|
+
return JSON.stringify(data);
|
|
7924
|
+
else
|
|
7925
|
+
return data;
|
|
7926
|
+
}
|
|
7927
|
+
],
|
|
7915
7928
|
transformResponse: [
|
|
7916
7929
|
(data) => {
|
|
7917
7930
|
if (data && !(data instanceof Blob))
|
|
@@ -9355,7 +9368,8 @@ const useUploadRateCard = () => {
|
|
|
9355
9368
|
const { client } = useShipEngine();
|
|
9356
9369
|
return reactQuery.useMutation({
|
|
9357
9370
|
mutationFn: (_0) => __async$5(void 0, [_0], function* ({ rateCardId, file }) {
|
|
9358
|
-
|
|
9371
|
+
const result = yield client.rateCards.upload(rateCardId, file);
|
|
9372
|
+
return result.data;
|
|
9359
9373
|
}),
|
|
9360
9374
|
mutationKey: ["useUploadRateCard"],
|
|
9361
9375
|
onError
|
package/index.mjs
CHANGED
|
@@ -7697,7 +7697,7 @@ class RateCardsAPI {
|
|
|
7697
7697
|
formData.append("file", file);
|
|
7698
7698
|
return this.client.put(`/v1/rate_cards/${rateCardId}/rates/upload`, formData, {
|
|
7699
7699
|
headers: {
|
|
7700
|
-
|
|
7700
|
+
"Content-Type": "multipart/form-data"
|
|
7701
7701
|
}
|
|
7702
7702
|
});
|
|
7703
7703
|
};
|
|
@@ -7889,7 +7889,20 @@ class ShipEngineAPI {
|
|
|
7889
7889
|
"Content-Type": "application/json"
|
|
7890
7890
|
}),
|
|
7891
7891
|
paramsSerializer: (params) => lib.stringify(humpsExports.decamelizeKeys(params), { arrayFormat: "brackets" }),
|
|
7892
|
-
transformRequest: [
|
|
7892
|
+
transformRequest: [
|
|
7893
|
+
(data) => {
|
|
7894
|
+
if (data && !(data instanceof FormData))
|
|
7895
|
+
return humpsExports.decamelizeKeys(data);
|
|
7896
|
+
else
|
|
7897
|
+
return data;
|
|
7898
|
+
},
|
|
7899
|
+
(data) => {
|
|
7900
|
+
if (data && !(data instanceof FormData))
|
|
7901
|
+
return JSON.stringify(data);
|
|
7902
|
+
else
|
|
7903
|
+
return data;
|
|
7904
|
+
}
|
|
7905
|
+
],
|
|
7893
7906
|
transformResponse: [
|
|
7894
7907
|
(data) => {
|
|
7895
7908
|
if (data && !(data instanceof Blob))
|
|
@@ -9333,7 +9346,8 @@ const useUploadRateCard = () => {
|
|
|
9333
9346
|
const { client } = useShipEngine();
|
|
9334
9347
|
return useMutation({
|
|
9335
9348
|
mutationFn: (_0) => __async$5(void 0, [_0], function* ({ rateCardId, file }) {
|
|
9336
|
-
|
|
9349
|
+
const result = yield client.rateCards.upload(rateCardId, file);
|
|
9350
|
+
return result.data;
|
|
9337
9351
|
}),
|
|
9338
9352
|
mutationKey: ["useUploadRateCard"],
|
|
9339
9353
|
onError
|