@thefittingroom/sdk 1.3.1 → 1.4.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/esm/api/requests.d.ts +1 -1
- package/dist/esm/api/responses.d.ts +1 -1
- package/dist/esm/api/shop.d.ts +1 -0
- package/dist/esm/index.js +9 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +2 -2
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/esm/api/shop.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare class TfrShop {
|
|
|
18
18
|
getStyleByBrandStyleId(brandStyleId: string): Promise<types.FirestoreStyleCategory>;
|
|
19
19
|
private getColorwaySizeAssets;
|
|
20
20
|
getStyle(styleId: number): Promise<types.FirestoreStyleCategory>;
|
|
21
|
+
getMeasurementLocationName(location: string): string;
|
|
21
22
|
private getGetTaxonomy;
|
|
22
23
|
private getMeasurementLocations;
|
|
23
24
|
private fetchMeasurementLocations;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* thefittingroom v1.
|
|
2
|
+
* thefittingroom v1.4.1 (2024-07-24T23:18:17.347Z)
|
|
3
3
|
* Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
// Code generated by tygo. DO NOT EDIT.
|
|
@@ -25426,8 +25426,8 @@ class TfrShop {
|
|
|
25426
25426
|
if (!taxonomy)
|
|
25427
25427
|
throw new Error('Taxonomy not found for style garment category id');
|
|
25428
25428
|
const filteredLocations = !filledLocations.length
|
|
25429
|
-
? taxonomy.
|
|
25430
|
-
: taxonomy.
|
|
25429
|
+
? taxonomy.measurement_locations.female
|
|
25430
|
+
: taxonomy.measurement_locations.female.filter((location) => filledLocations.includes(location));
|
|
25431
25431
|
return filteredLocations.map((location) => {
|
|
25432
25432
|
return this.measurementLocations.has(location) ? this.measurementLocations.get(location) : location;
|
|
25433
25433
|
});
|
|
@@ -25443,8 +25443,8 @@ class TfrShop {
|
|
|
25443
25443
|
if (!taxonomy)
|
|
25444
25444
|
throw new Error('Taxonomy not found for style garment category id');
|
|
25445
25445
|
const filteredLocations = !filledLocations.length
|
|
25446
|
-
? taxonomy.
|
|
25447
|
-
: taxonomy.
|
|
25446
|
+
? taxonomy.measurement_locations.female
|
|
25447
|
+
: taxonomy.measurement_locations.female.filter((location) => filledLocations.includes(location));
|
|
25448
25448
|
return filteredLocations.map((location) => {
|
|
25449
25449
|
return this.measurementLocations.has(location) ? this.measurementLocations.get(location) : location;
|
|
25450
25450
|
});
|
|
@@ -25489,6 +25489,9 @@ class TfrShop {
|
|
|
25489
25489
|
return getFirebaseError(error);
|
|
25490
25490
|
}
|
|
25491
25491
|
}
|
|
25492
|
+
getMeasurementLocationName(location) {
|
|
25493
|
+
return this.measurementLocations.has(location) ? this.measurementLocations.get(location) : location;
|
|
25494
|
+
}
|
|
25492
25495
|
async getGetTaxonomy(styleId) {
|
|
25493
25496
|
try {
|
|
25494
25497
|
const doc = await this.firebase.getDoc('style_garment_categories', String(styleId));
|
|
@@ -25506,7 +25509,7 @@ class TfrShop {
|
|
|
25506
25509
|
}
|
|
25507
25510
|
async fetchMeasurementLocations() {
|
|
25508
25511
|
try {
|
|
25509
|
-
const docs = await this.firebase.getDocs('
|
|
25512
|
+
const docs = await this.firebase.getDocs('measurement_locations', []);
|
|
25510
25513
|
return docs.docs.map((doc) => doc.data());
|
|
25511
25514
|
}
|
|
25512
25515
|
catch (error) {
|