@builder.io/plugin-sfcc-commerce-api 0.0.13 → 0.0.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/dist/plugin.system.js +15 -2
- package/dist/plugin.system.js.map +1 -1
- package/package.json +1 -1
package/dist/plugin.system.js
CHANGED
|
@@ -146880,7 +146880,7 @@ System.register(['@builder.io/sdk', '@emotion/core', '@material-ui/core', 'react
|
|
|
146880
146880
|
});
|
|
146881
146881
|
|
|
146882
146882
|
var name = "@builder.io/plugin-sfcc-commerce-api";
|
|
146883
|
-
var version = "0.0.
|
|
146883
|
+
var version = "0.0.15";
|
|
146884
146884
|
var description = "";
|
|
146885
146885
|
var keywords = [
|
|
146886
146886
|
];
|
|
@@ -147023,6 +147023,12 @@ System.register(['@builder.io/sdk', '@emotion/core', '@material-ui/core', 'react
|
|
|
147023
147023
|
throw error;
|
|
147024
147024
|
}
|
|
147025
147025
|
}
|
|
147026
|
+
async validateConfig() {
|
|
147027
|
+
const response = await this.request(`validate-config`);
|
|
147028
|
+
if (response.errors) {
|
|
147029
|
+
throw "We failed to authenticate your access to Salesforce Commerce Cloud B2C API. Please review all plugin fields and make sure they are correct.";
|
|
147030
|
+
}
|
|
147031
|
+
}
|
|
147026
147032
|
getProduct(id) {
|
|
147027
147033
|
if (basicCache.get(id)) {
|
|
147028
147034
|
return Promise.resolve(basicCache.get(id));
|
|
@@ -147119,7 +147125,14 @@ System.register(['@builder.io/sdk', '@emotion/core', '@material-ui/core', 'react
|
|
|
147119
147125
|
type: "string"
|
|
147120
147126
|
}
|
|
147121
147127
|
],
|
|
147122
|
-
ctaText: `Connect your Salesforce Commerce API
|
|
147128
|
+
ctaText: `Connect your Salesforce Commerce API`,
|
|
147129
|
+
onSave: async () => {
|
|
147130
|
+
appState.snackBar.display({
|
|
147131
|
+
message: "Validating Config Details..."
|
|
147132
|
+
});
|
|
147133
|
+
const api = new Api(appState.user.apiKey, pkg.name);
|
|
147134
|
+
await api.validateConfig();
|
|
147135
|
+
}
|
|
147123
147136
|
}, async (settings) => {
|
|
147124
147137
|
const api = new Api(appState.user.apiKey, pkg.name);
|
|
147125
147138
|
const einsteinId = settings.get("einsteinId");
|