@infrab4a/connect 4.10.1-beta.1 → 4.10.1-beta.3

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.cjs.js CHANGED
@@ -72,10 +72,26 @@ class CategoryBase extends BaseModel {
72
72
  return ['id'];
73
73
  }
74
74
  get glamImages() {
75
- return this.images[exports.Shops.GLAMSHOP];
75
+ return this.images && this.images[exports.Shops.GLAMSHOP]
76
+ ? this.images[exports.Shops.GLAMSHOP]
77
+ : {
78
+ [exports.Shops.GLAMSHOP]: {
79
+ brandBanner: null,
80
+ brandBannerMobile: null,
81
+ image: null,
82
+ },
83
+ };
76
84
  }
77
85
  get mensImages() {
78
- return this.images[exports.Shops.MENSMARKET];
86
+ return this.images && this.images[exports.Shops.MENSMARKET]
87
+ ? this.images[exports.Shops.MENSMARKET]
88
+ : {
89
+ [exports.Shops.MENSMARKET]: {
90
+ brandBanner: null,
91
+ brandBannerMobile: null,
92
+ image: null,
93
+ },
94
+ };
79
95
  }
80
96
  get glamMetadata() {
81
97
  return this.metadata.find((metadata) => metadata.shop === exports.Shops.GLAMSHOP);
@@ -4795,10 +4811,21 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4795
4811
  this.categoryFilterRepository = categoryFilterRepository;
4796
4812
  }
4797
4813
  async create(params) {
4798
- const { mostRelevant, metadata } = params, data = tslib.__rest(params, ["mostRelevant", "metadata"]);
4814
+ const { images, mostRelevant, metadata } = params, data = tslib.__rest(params, ["images", "mostRelevant", "metadata"]);
4799
4815
  return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || [{ shop: null, description: null, title: null }], mostRelevant: mostRelevant || {
4800
4816
  [exports.Shops.GLAMSHOP]: null,
4801
4817
  [exports.Shops.MENSMARKET]: null,
4818
+ }, images: images || {
4819
+ [exports.Shops.GLAMSHOP]: {
4820
+ brandBanner: null,
4821
+ brandBannerMobile: null,
4822
+ image: null,
4823
+ },
4824
+ [exports.Shops.MENSMARKET]: {
4825
+ brandBanner: null,
4826
+ brandBannerMobile: null,
4827
+ image: null,
4828
+ },
4802
4829
  } }));
4803
4830
  }
4804
4831
  async get(identifiers) {
@@ -6059,8 +6086,22 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6059
6086
  }
6060
6087
  async create(params) {
6061
6088
  var _a;
6062
- const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
6063
- return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || [{ shop: (_a = data.shop) !== null && _a !== void 0 ? _a : null, description: data.description, title: data.name }] }));
6089
+ const { images, mostRelevant, metadata } = params, data = tslib.__rest(params, ["images", "mostRelevant", "metadata"]);
6090
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || [{ shop: (_a = data.shop) !== null && _a !== void 0 ? _a : null, description: data.description, title: data.name }], mostRelevant: mostRelevant || {
6091
+ [exports.Shops.GLAMSHOP]: null,
6092
+ [exports.Shops.MENSMARKET]: null,
6093
+ }, images: images || {
6094
+ [exports.Shops.GLAMSHOP]: {
6095
+ brandBanner: null,
6096
+ brandBannerMobile: null,
6097
+ image: null,
6098
+ },
6099
+ [exports.Shops.MENSMARKET]: {
6100
+ brandBanner: null,
6101
+ brandBannerMobile: null,
6102
+ image: null,
6103
+ },
6104
+ } }));
6064
6105
  }
6065
6106
  async get(identifiers) {
6066
6107
  const data = await super.get(identifiers);
package/index.esm.js CHANGED
@@ -66,10 +66,26 @@ class CategoryBase extends BaseModel {
66
66
  return ['id'];
67
67
  }
68
68
  get glamImages() {
69
- return this.images[Shops.GLAMSHOP];
69
+ return this.images && this.images[Shops.GLAMSHOP]
70
+ ? this.images[Shops.GLAMSHOP]
71
+ : {
72
+ [Shops.GLAMSHOP]: {
73
+ brandBanner: null,
74
+ brandBannerMobile: null,
75
+ image: null,
76
+ },
77
+ };
70
78
  }
71
79
  get mensImages() {
72
- return this.images[Shops.MENSMARKET];
80
+ return this.images && this.images[Shops.MENSMARKET]
81
+ ? this.images[Shops.MENSMARKET]
82
+ : {
83
+ [Shops.MENSMARKET]: {
84
+ brandBanner: null,
85
+ brandBannerMobile: null,
86
+ image: null,
87
+ },
88
+ };
73
89
  }
74
90
  get glamMetadata() {
75
91
  return this.metadata.find((metadata) => metadata.shop === Shops.GLAMSHOP);
@@ -4789,10 +4805,21 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4789
4805
  this.categoryFilterRepository = categoryFilterRepository;
4790
4806
  }
4791
4807
  async create(params) {
4792
- const { mostRelevant, metadata } = params, data = __rest(params, ["mostRelevant", "metadata"]);
4808
+ const { images, mostRelevant, metadata } = params, data = __rest(params, ["images", "mostRelevant", "metadata"]);
4793
4809
  return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || [{ shop: null, description: null, title: null }], mostRelevant: mostRelevant || {
4794
4810
  [Shops.GLAMSHOP]: null,
4795
4811
  [Shops.MENSMARKET]: null,
4812
+ }, images: images || {
4813
+ [Shops.GLAMSHOP]: {
4814
+ brandBanner: null,
4815
+ brandBannerMobile: null,
4816
+ image: null,
4817
+ },
4818
+ [Shops.MENSMARKET]: {
4819
+ brandBanner: null,
4820
+ brandBannerMobile: null,
4821
+ image: null,
4822
+ },
4796
4823
  } }));
4797
4824
  }
4798
4825
  async get(identifiers) {
@@ -6053,8 +6080,22 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6053
6080
  }
6054
6081
  async create(params) {
6055
6082
  var _a;
6056
- const { metadata } = params, data = __rest(params, ["metadata"]);
6057
- return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || [{ shop: (_a = data.shop) !== null && _a !== void 0 ? _a : null, description: data.description, title: data.name }] }));
6083
+ const { images, mostRelevant, metadata } = params, data = __rest(params, ["images", "mostRelevant", "metadata"]);
6084
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || [{ shop: (_a = data.shop) !== null && _a !== void 0 ? _a : null, description: data.description, title: data.name }], mostRelevant: mostRelevant || {
6085
+ [Shops.GLAMSHOP]: null,
6086
+ [Shops.MENSMARKET]: null,
6087
+ }, images: images || {
6088
+ [Shops.GLAMSHOP]: {
6089
+ brandBanner: null,
6090
+ brandBannerMobile: null,
6091
+ image: null,
6092
+ },
6093
+ [Shops.MENSMARKET]: {
6094
+ brandBanner: null,
6095
+ brandBannerMobile: null,
6096
+ image: null,
6097
+ },
6098
+ } }));
6058
6099
  }
6059
6100
  async get(identifiers) {
6060
6101
  const data = await super.get(identifiers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.10.1-beta.1",
3
+ "version": "4.10.1-beta.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -35,11 +35,15 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
35
35
  image: string;
36
36
  brandBanner: string;
37
37
  brandBannerMobile: string;
38
+ } | {
39
+ Glamshop: CategoryImages;
38
40
  };
39
41
  get mensImages(): {
40
42
  image: string;
41
43
  brandBanner: string;
42
44
  brandBannerMobile: string;
45
+ } | {
46
+ mensmarket: CategoryImages;
43
47
  };
44
48
  get glamMetadata(): CategoryMetadata;
45
49
  get mensMetadata(): CategoryMetadata;