@thefittingroom/sdk 1.1.10 → 1.1.12

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/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * thefittingroom v1.1.10 (2024-06-20T18:11:48.643Z)
2
+ * thefittingroom v1.1.12 (2024-06-20T18:22:43.617Z)
3
3
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
4
4
  */
5
5
  // Code generated by tygo. DO NOT EDIT.
@@ -22979,9 +22979,12 @@ class TfrShop {
22979
22979
  });
22980
22980
  }
22981
22981
  async getStyleByBrandStyleId(brandStyleId) {
22982
+ var _a, _b;
22982
22983
  try {
22983
- const querySnapshot = await this.firebase.getDocs('styles', [rl('brand_style_id', '==', brandStyleId)]);
22984
- return querySnapshot.docs[0].data();
22984
+ const constraints = [rl('brand_id', '==', this.brandId)];
22985
+ constraints.push(rl('brand_style_id', '==', brandStyleId));
22986
+ const querySnapshot = await this.firebase.getDocs('styles', constraints);
22987
+ return (_b = (_a = querySnapshot.docs) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.data();
22985
22988
  }
22986
22989
  catch (error) {
22987
22990
  return getFirebaseError(error);