@spiffcommerce/core 26.23.0 → 26.23.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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13833,14 +13833,14 @@ class qo {
|
|
|
13833
13833
|
getProducts() {
|
|
13834
13834
|
if (!this.collection.productCollectionProducts)
|
|
13835
13835
|
throw new Error("Failed to find products on collection. Ensure you fetch them first!");
|
|
13836
|
-
return this.collection.productCollectionProducts.map((t) => new se(t));
|
|
13836
|
+
return this.collection.productCollectionProducts.filter((t) => !!t.product).map((t) => new se(t));
|
|
13837
13837
|
}
|
|
13838
13838
|
/**
|
|
13839
13839
|
* A list of products in this collections with useful helpers for interacting with them.
|
|
13840
13840
|
*/
|
|
13841
13841
|
async fetchProducts(t) {
|
|
13842
13842
|
if (this.fullFetched)
|
|
13843
|
-
return this.collection.productCollectionProducts.map((a) => new se(a));
|
|
13843
|
+
return this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
|
|
13844
13844
|
const e = await b.getShadowGraphqlClient().query({
|
|
13845
13845
|
query: Ms,
|
|
13846
13846
|
variables: {
|
|
@@ -13849,7 +13849,7 @@ class qo {
|
|
|
13849
13849
|
},
|
|
13850
13850
|
errorPolicy: "all"
|
|
13851
13851
|
});
|
|
13852
|
-
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.map((a) => new se(a));
|
|
13852
|
+
return t || (this.fullFetched = !0), this.collection.productCollectionProducts = e.data.productCollections[0].productCollectionProducts || [], this.collection.productCollectionProducts.filter((a) => !!a.product).map((a) => new se(a));
|
|
13853
13853
|
}
|
|
13854
13854
|
/**
|
|
13855
13855
|
* Returns a list of collections products matching the associated metafield filters.
|
|
@@ -13905,7 +13905,7 @@ class qo {
|
|
|
13905
13905
|
errorPolicy: "all"
|
|
13906
13906
|
});
|
|
13907
13907
|
return {
|
|
13908
|
-
items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.map((u) => new se(u))) || [],
|
|
13908
|
+
items: ((l = (o = (s = n == null ? void 0 : n.data) == null ? void 0 : s.productCollections) == null ? void 0 : o[0].productCollectionProductsFeed) == null ? void 0 : l.items.filter((u) => !!u.product).map((u) => new se(u))) || [],
|
|
13909
13909
|
total: ((A = (d = (c = n == null ? void 0 : n.data) == null ? void 0 : c.productCollections) == null ? void 0 : d[0].productCollectionProductsFeed) == null ? void 0 : A.total) ?? 0
|
|
13910
13910
|
};
|
|
13911
13911
|
}
|
|
@@ -15218,7 +15218,7 @@ class kc {
|
|
|
15218
15218
|
} catch (a) {
|
|
15219
15219
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15220
15220
|
}
|
|
15221
|
-
}, this.options = t, this.options.applicationKey && xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.
|
|
15221
|
+
}, this.options = t, this.options.applicationKey && xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.23.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15222
15222
|
}
|
|
15223
15223
|
configure(t) {
|
|
15224
15224
|
wt.setHubUrl(t.hubUrl), wt.setServerUrl(t.serverUrl), wt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && kr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|