@shipengine/alchemy 6.0.25 → 6.0.26
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 +16 -2
- package/index.mjs +16 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10982,7 +10982,7 @@ class AccountSettingsAPI {
|
|
|
10982
10982
|
/**
|
|
10983
10983
|
* The `update` method updates specific account settings for a given user.
|
|
10984
10984
|
*
|
|
10985
|
-
* @params Partial<ShipEngineAccountSettings
|
|
10985
|
+
* @params `Partial<ShipEngineAccountSettings>` The account settings to update.
|
|
10986
10986
|
*/
|
|
10987
10987
|
this.update = (settings) => {
|
|
10988
10988
|
return this.client.put("/v1/account/settings", settings);
|
|
@@ -13746,7 +13746,21 @@ const camelizeKeys = (obj) => {
|
|
|
13746
13746
|
const newObj = {};
|
|
13747
13747
|
for (const key in obj) {
|
|
13748
13748
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
13749
|
-
|
|
13749
|
+
let newKey = "";
|
|
13750
|
+
let capitalizeNext = false;
|
|
13751
|
+
for (let i = 0; i < key.length; i++) {
|
|
13752
|
+
const char = key[i];
|
|
13753
|
+
if (i === 0) {
|
|
13754
|
+
newKey += char.toLowerCase();
|
|
13755
|
+
} else if (char === "_") {
|
|
13756
|
+
capitalizeNext = true;
|
|
13757
|
+
} else if (capitalizeNext) {
|
|
13758
|
+
newKey += char.toLowerCase() === char ? char.toUpperCase() : char;
|
|
13759
|
+
capitalizeNext = false;
|
|
13760
|
+
} else {
|
|
13761
|
+
newKey += char;
|
|
13762
|
+
}
|
|
13763
|
+
}
|
|
13750
13764
|
newObj[newKey] = camelizeKeys(obj[key]);
|
|
13751
13765
|
}
|
|
13752
13766
|
}
|
package/index.mjs
CHANGED
|
@@ -10960,7 +10960,7 @@ class AccountSettingsAPI {
|
|
|
10960
10960
|
/**
|
|
10961
10961
|
* The `update` method updates specific account settings for a given user.
|
|
10962
10962
|
*
|
|
10963
|
-
* @params Partial<ShipEngineAccountSettings
|
|
10963
|
+
* @params `Partial<ShipEngineAccountSettings>` The account settings to update.
|
|
10964
10964
|
*/
|
|
10965
10965
|
this.update = (settings) => {
|
|
10966
10966
|
return this.client.put("/v1/account/settings", settings);
|
|
@@ -13724,7 +13724,21 @@ const camelizeKeys = (obj) => {
|
|
|
13724
13724
|
const newObj = {};
|
|
13725
13725
|
for (const key in obj) {
|
|
13726
13726
|
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
13727
|
-
|
|
13727
|
+
let newKey = "";
|
|
13728
|
+
let capitalizeNext = false;
|
|
13729
|
+
for (let i = 0; i < key.length; i++) {
|
|
13730
|
+
const char = key[i];
|
|
13731
|
+
if (i === 0) {
|
|
13732
|
+
newKey += char.toLowerCase();
|
|
13733
|
+
} else if (char === "_") {
|
|
13734
|
+
capitalizeNext = true;
|
|
13735
|
+
} else if (capitalizeNext) {
|
|
13736
|
+
newKey += char.toLowerCase() === char ? char.toUpperCase() : char;
|
|
13737
|
+
capitalizeNext = false;
|
|
13738
|
+
} else {
|
|
13739
|
+
newKey += char;
|
|
13740
|
+
}
|
|
13741
|
+
}
|
|
13728
13742
|
newObj[newKey] = camelizeKeys(obj[key]);
|
|
13729
13743
|
}
|
|
13730
13744
|
}
|