@infrab4a/connect 4.9.14-beta.0 → 4.10.0-beta.0

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
@@ -42,21 +42,6 @@ class BaseModel {
42
42
  }
43
43
  }
44
44
 
45
- exports.GenderDestination = void 0;
46
- (function (GenderDestination) {
47
- GenderDestination["FEMALE"] = "female";
48
- GenderDestination["MALE"] = "male";
49
- GenderDestination["UNISEX"] = "unisex";
50
- })(exports.GenderDestination || (exports.GenderDestination = {}));
51
-
52
- exports.Shops = void 0;
53
- (function (Shops) {
54
- Shops["MENSMARKET"] = "mensmarket";
55
- Shops["GLAMSHOP"] = "Glamshop";
56
- Shops["GLAMPOINTS"] = "Glampoints";
57
- Shops["ALL"] = "ALL";
58
- })(exports.Shops || (exports.Shops = {}));
59
-
60
45
  class Filter extends BaseModel {
61
46
  static get identifiersFields() {
62
47
  return ['id'];
@@ -71,21 +56,6 @@ class CategoryBase extends BaseModel {
71
56
  static get identifiersFields() {
72
57
  return ['id'];
73
58
  }
74
- get glamImages() {
75
- return this.images[exports.Shops.GLAMSHOP];
76
- }
77
- get mensImages() {
78
- return this.images[exports.Shops.MENSMARKET];
79
- }
80
- get glamMetadata() {
81
- return this.metadata.find((metadata) => metadata.shop === exports.Shops.GLAMSHOP);
82
- }
83
- get mensMetadata() {
84
- return this.metadata.find((metadata) => metadata.shop === exports.Shops.MENSMARKET);
85
- }
86
- getMostRelevantByShop(shop) {
87
- return this.mostRelevant[shop];
88
- }
89
59
  }
90
60
  tslib.__decorate([
91
61
  classTransformer.Type(() => CategoryBase),
@@ -194,6 +164,21 @@ tslib.__decorate([
194
164
  tslib.__metadata("design:type", Category)
195
165
  ], CategoryFilter.prototype, "category", void 0);
196
166
 
167
+ exports.GenderDestination = void 0;
168
+ (function (GenderDestination) {
169
+ GenderDestination["FEMALE"] = "female";
170
+ GenderDestination["MALE"] = "male";
171
+ GenderDestination["UNISEX"] = "unisex";
172
+ })(exports.GenderDestination || (exports.GenderDestination = {}));
173
+
174
+ exports.Shops = void 0;
175
+ (function (Shops) {
176
+ Shops["MENSMARKET"] = "mensmarket";
177
+ Shops["GLAMSHOP"] = "Glamshop";
178
+ Shops["GLAMPOINTS"] = "Glampoints";
179
+ Shops["ALL"] = "ALL";
180
+ })(exports.Shops || (exports.Shops = {}));
181
+
197
182
  class FilterOption extends BaseModel {
198
183
  static get identifiersFields() {
199
184
  return ['id'];
@@ -286,6 +271,17 @@ class CampaignHashtag extends BaseModel {
286
271
  }
287
272
  }
288
273
 
274
+ class BeautyProfile extends BaseModel {
275
+ toPlain() {
276
+ const plain = super.toPlain();
277
+ delete plain.id;
278
+ return plain;
279
+ }
280
+ static get identifiersFields() {
281
+ return ['id', 'userId'];
282
+ }
283
+ }
284
+
289
285
  exports.AccessoryImportances = void 0;
290
286
  (function (AccessoryImportances) {
291
287
  AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
@@ -462,6 +458,13 @@ exports.OfficePosition = void 0;
462
458
  OfficePosition["Director"] = "Diretor";
463
459
  })(exports.OfficePosition || (exports.OfficePosition = {}));
464
460
 
461
+ exports.PersonTypes = void 0;
462
+ (function (PersonTypes) {
463
+ PersonTypes["GLAMGIRL"] = "glamgirl";
464
+ PersonTypes["BFLU"] = "bflu";
465
+ PersonTypes["NONE"] = "none";
466
+ })(exports.PersonTypes || (exports.PersonTypes = {}));
467
+
465
468
  exports.ProductSpents = void 0;
466
469
  (function (ProductSpents) {
467
470
  ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
@@ -482,6 +485,12 @@ exports.UserType = void 0;
482
485
  UserType["Influencer"] = "Influencer";
483
486
  })(exports.UserType || (exports.UserType = {}));
484
487
 
488
+ class Lead extends BaseModel {
489
+ static get identifiersFields() {
490
+ return ['id'];
491
+ }
492
+ }
493
+
485
494
  class Edition extends BaseModel {
486
495
  static get identifiersFields() {
487
496
  return ['id', 'subscriptionId'];
@@ -1880,17 +1889,6 @@ class SubscriptionPlan extends BaseModel {
1880
1889
  }
1881
1890
  }
1882
1891
 
1883
- class BeautyProfile extends BaseModel {
1884
- toPlain() {
1885
- const plain = super.toPlain();
1886
- delete plain.id;
1887
- return plain;
1888
- }
1889
- static get identifiersFields() {
1890
- return ['id', 'userId'];
1891
- }
1892
- }
1893
-
1894
1892
  class User extends BaseModel {
1895
1893
  static toInstance(data) {
1896
1894
  const instance = super.toInstance(data);
@@ -2004,12 +2002,6 @@ class UserPaymentMethod extends BaseModel {
2004
2002
  }
2005
2003
  }
2006
2004
 
2007
- class Lead extends BaseModel {
2008
- static get identifiersFields() {
2009
- return ['id'];
2010
- }
2011
- }
2012
-
2013
2005
  class UnauthorizedError extends tsCustomError.CustomError {
2014
2006
  constructor(message) {
2015
2007
  super(message);
@@ -4706,7 +4698,6 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4706
4698
  'name',
4707
4699
  'description',
4708
4700
  'image',
4709
- { images: { columnName: 'images', type: HasuraGraphQLColumnType.Jsonb } },
4710
4701
  'published',
4711
4702
  'shop',
4712
4703
  { shops: { columnName: 'shops', type: HasuraGraphQLColumnType.Jsonb } },
@@ -4762,7 +4753,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4762
4753
  {
4763
4754
  metadata: {
4764
4755
  columnName: 'metadata',
4765
- fields: ['shop', 'title', 'description'],
4756
+ fields: ['title', 'description'],
4766
4757
  bindPersistData: (value) => ({
4767
4758
  metadata: { data: value },
4768
4759
  }),
@@ -4789,7 +4780,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4789
4780
  }
4790
4781
  async create(params) {
4791
4782
  const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
4792
- return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || [{ shop: null, description: null, title: null }] }));
4783
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || { description: null, title: null } }));
4793
4784
  }
4794
4785
  async get(identifiers) {
4795
4786
  var _a;
@@ -4980,35 +4971,22 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4980
4971
  return plainData.products;
4981
4972
  }
4982
4973
  async updateMetadata(categoryId, { metadata }) {
4983
- if (Array.isArray(metadata) && !metadata.length)
4984
- return [];
4985
- if (Array.isArray(metadata) && metadata.length) {
4986
- await this.mutation('delete_category_metadata', ['affected_rows'], {
4987
- where: {
4988
- type: 'category_metadata_bool_exp',
4989
- required: true,
4990
- value: { category_id: { _eq: categoryId } },
4991
- },
4992
- });
4993
- await this.mutation('insert_category_metadata', ['affected_rows'], {
4994
- objects: {
4995
- type: '[category_metadata_insert_input!]',
4996
- required: true,
4997
- value: metadata.map((m) => (Object.assign({ category_id: categoryId }, m))),
4998
- },
4999
- });
5000
- return metadata;
5001
- }
5002
- if ('action' in metadata && metadata.action === 'remove' && metadata.value.length) {
5003
- await this.mutation('delete_category_metadata', ['affected_rows'], {
5004
- where: {
5005
- type: 'category_metadata_bool_exp',
5006
- required: true,
5007
- value: { category_id: { _eq: categoryId } },
5008
- },
5009
- });
5010
- return [];
5011
- }
4974
+ const plainData = this.paramsToPlain({ metadata });
4975
+ if (!plainData.metadata)
4976
+ return null;
4977
+ await this.mutation('update_category_metadata_by_pk', ['category_id'], {
4978
+ pk_columns: {
4979
+ value: { category_id: categoryId },
4980
+ type: 'category_metadata_pk_columns_input',
4981
+ required: true,
4982
+ },
4983
+ _set: {
4984
+ value: lodash.omit(metadata, ['category_id']),
4985
+ type: 'category_metadata_set_input',
4986
+ required: true,
4987
+ },
4988
+ });
4989
+ return plainData.metadata;
5012
4990
  }
5013
4991
  async updateFilters(categoryId, { filters }) {
5014
4992
  if ('action' in filters && filters.action === 'remove' && filters.value.length) {
@@ -5950,11 +5928,14 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
5950
5928
  }
5951
5929
  }
5952
5930
 
5931
+ class WishlistHasuraGraphQL extends Wishlist {
5932
+ }
5933
+
5953
5934
  class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5954
5935
  constructor({ endpoint, authOptions, interceptors, }, categoryFilterRepository) {
5955
5936
  super({
5956
5937
  tableName: 'category',
5957
- model: Wishlist,
5938
+ model: WishlistHasuraGraphQL,
5958
5939
  endpoint,
5959
5940
  authOptions,
5960
5941
  interceptors,
@@ -6015,7 +5996,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6015
5996
  {
6016
5997
  metadata: {
6017
5998
  columnName: 'metadata',
6018
- fields: ['shop', 'title', 'description'],
5999
+ fields: ['title', 'description'],
6019
6000
  bindPersistData: (value) => ({
6020
6001
  metadata: { data: value },
6021
6002
  }),
@@ -6035,16 +6016,18 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6035
6016
  { personId: { columnName: 'person_id' } },
6036
6017
  { personName: { columnName: 'person_name' } },
6037
6018
  { personPhoto: { columnName: 'person_photo' } },
6019
+ { personType: { columnName: 'person_type' } },
6020
+ { personIsSubscriber: { columnName: 'person_is_subscriber' } },
6038
6021
  'theme',
6039
6022
  { bannerUrl: { columnName: 'banner_url' } },
6023
+ { personHasPhoto: { columnName: 'person_has_photo' } },
6040
6024
  ],
6041
6025
  });
6042
6026
  this.categoryFilterRepository = categoryFilterRepository;
6043
6027
  }
6044
6028
  async create(params) {
6045
- var _a;
6046
6029
  const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
6047
- 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 }] }));
6030
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || { description: data.description, title: data.name } }));
6048
6031
  }
6049
6032
  async get(identifiers) {
6050
6033
  const data = await super.get(identifiers);
@@ -6099,7 +6082,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6099
6082
  throw new NotFoundError(`Wishlists from person ${personId} not found`);
6100
6083
  return data;
6101
6084
  }
6102
- getCategoryBySlug(slug, _shop) {
6085
+ async getCategoryBySlug(slug, _shop) {
6103
6086
  return this.getWishlistBySlug(slug);
6104
6087
  }
6105
6088
  async getCategoryByShop(shop) {
@@ -6117,6 +6100,9 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6117
6100
  });
6118
6101
  return data;
6119
6102
  }
6103
+ async findBfluOrGlamgirlWishlists(params, shops) {
6104
+ return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true, shops: { operator: exports.Where.LIKE, value: shops }, personType: { operator: exports.Where.IN, value: [exports.PersonTypes.BFLU, exports.PersonTypes.GLAMGIRL] } }), orderBy: Object.assign({ personHasPhoto: 'desc' }, lodash.omit(params.orderBy, ['personHasPhoto'])) }));
6105
+ }
6120
6106
  getCategoriesForHome(categoryIds, limit, gender) {
6121
6107
  return;
6122
6108
  }
@@ -6168,39 +6154,22 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6168
6154
  return plainData.products;
6169
6155
  }
6170
6156
  async updateMetadata(categoryId, { metadata }) {
6171
- if (Array.isArray(metadata) && !metadata.length)
6172
- return [];
6173
- if (Array.isArray(metadata) && metadata.length) {
6174
- const metadataUpdated = [];
6175
- for (const data of metadata) {
6176
- const update = await this.mutation('update_category_metadata_by_pk', ['category_id', 'shop'], {
6177
- pk_columns: {
6178
- value: { category_id: categoryId, shop: data.shop },
6179
- type: 'category_metadata_pk_columns_input',
6180
- required: true,
6181
- },
6182
- _set: {
6183
- value: lodash.omit(data, ['category_id', 'shop']),
6184
- type: 'category_metadata_set_input',
6185
- required: true,
6186
- },
6187
- });
6188
- metadataUpdated.push(update);
6189
- }
6190
- return metadataUpdated;
6191
- }
6192
- if ('action' in metadata && metadata.action === 'remove' && metadata.value.length) {
6193
- for (let i = 0; i < metadata.value.length; i++) {
6194
- await this.mutation('delete_category_metadata', ['affected_rows'], {
6195
- where: {
6196
- type: 'category_metadata_bool_exp',
6197
- required: true,
6198
- value: { category_id: { _eq: categoryId }, shop: metadata.value[i].shop },
6199
- },
6200
- });
6201
- }
6202
- return [];
6203
- }
6157
+ const plainData = this.paramsToPlain({ metadata });
6158
+ if (!plainData.metadata)
6159
+ return;
6160
+ await this.mutation('update_category_metadata_by_pk', ['category_id'], {
6161
+ pk_columns: {
6162
+ value: { category_id: categoryId },
6163
+ type: 'category_metadata_pk_columns_input',
6164
+ required: true,
6165
+ },
6166
+ _set: {
6167
+ value: lodash.omit(metadata, ['category_id']),
6168
+ type: 'category_metadata_set_input',
6169
+ required: true,
6170
+ },
6171
+ });
6172
+ return plainData.metadata;
6204
6173
  }
6205
6174
  }
6206
6175
  tslib.__decorate([
@@ -6220,7 +6189,13 @@ tslib.__decorate([
6220
6189
  tslib.__metadata("design:type", Function),
6221
6190
  tslib.__metadata("design:paramtypes", [String]),
6222
6191
  tslib.__metadata("design:returntype", Promise)
6223
- ], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
6192
+ ], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
6193
+ tslib.__decorate([
6194
+ Log(),
6195
+ tslib.__metadata("design:type", Function),
6196
+ tslib.__metadata("design:paramtypes", [Object, Array]),
6197
+ tslib.__metadata("design:returntype", Promise)
6198
+ ], WishlistHasuraGraphQLRepository.prototype, "findBfluOrGlamgirlWishlists", null);
6224
6199
 
6225
6200
  Object.defineProperty(exports, 'add', {
6226
6201
  enumerable: true,
package/index.esm.js CHANGED
@@ -36,21 +36,6 @@ class BaseModel {
36
36
  }
37
37
  }
38
38
 
39
- var GenderDestination;
40
- (function (GenderDestination) {
41
- GenderDestination["FEMALE"] = "female";
42
- GenderDestination["MALE"] = "male";
43
- GenderDestination["UNISEX"] = "unisex";
44
- })(GenderDestination || (GenderDestination = {}));
45
-
46
- var Shops;
47
- (function (Shops) {
48
- Shops["MENSMARKET"] = "mensmarket";
49
- Shops["GLAMSHOP"] = "Glamshop";
50
- Shops["GLAMPOINTS"] = "Glampoints";
51
- Shops["ALL"] = "ALL";
52
- })(Shops || (Shops = {}));
53
-
54
39
  class Filter extends BaseModel {
55
40
  static get identifiersFields() {
56
41
  return ['id'];
@@ -65,21 +50,6 @@ class CategoryBase extends BaseModel {
65
50
  static get identifiersFields() {
66
51
  return ['id'];
67
52
  }
68
- get glamImages() {
69
- return this.images[Shops.GLAMSHOP];
70
- }
71
- get mensImages() {
72
- return this.images[Shops.MENSMARKET];
73
- }
74
- get glamMetadata() {
75
- return this.metadata.find((metadata) => metadata.shop === Shops.GLAMSHOP);
76
- }
77
- get mensMetadata() {
78
- return this.metadata.find((metadata) => metadata.shop === Shops.MENSMARKET);
79
- }
80
- getMostRelevantByShop(shop) {
81
- return this.mostRelevant[shop];
82
- }
83
53
  }
84
54
  __decorate([
85
55
  Type(() => CategoryBase),
@@ -188,6 +158,21 @@ __decorate([
188
158
  __metadata("design:type", Category)
189
159
  ], CategoryFilter.prototype, "category", void 0);
190
160
 
161
+ var GenderDestination;
162
+ (function (GenderDestination) {
163
+ GenderDestination["FEMALE"] = "female";
164
+ GenderDestination["MALE"] = "male";
165
+ GenderDestination["UNISEX"] = "unisex";
166
+ })(GenderDestination || (GenderDestination = {}));
167
+
168
+ var Shops;
169
+ (function (Shops) {
170
+ Shops["MENSMARKET"] = "mensmarket";
171
+ Shops["GLAMSHOP"] = "Glamshop";
172
+ Shops["GLAMPOINTS"] = "Glampoints";
173
+ Shops["ALL"] = "ALL";
174
+ })(Shops || (Shops = {}));
175
+
191
176
  class FilterOption extends BaseModel {
192
177
  static get identifiersFields() {
193
178
  return ['id'];
@@ -280,6 +265,17 @@ class CampaignHashtag extends BaseModel {
280
265
  }
281
266
  }
282
267
 
268
+ class BeautyProfile extends BaseModel {
269
+ toPlain() {
270
+ const plain = super.toPlain();
271
+ delete plain.id;
272
+ return plain;
273
+ }
274
+ static get identifiersFields() {
275
+ return ['id', 'userId'];
276
+ }
277
+ }
278
+
283
279
  var AccessoryImportances;
284
280
  (function (AccessoryImportances) {
285
281
  AccessoryImportances["NOT_INTERESTED"] = "N\u00E3o tenho interesse";
@@ -456,6 +452,13 @@ var OfficePosition;
456
452
  OfficePosition["Director"] = "Diretor";
457
453
  })(OfficePosition || (OfficePosition = {}));
458
454
 
455
+ var PersonTypes;
456
+ (function (PersonTypes) {
457
+ PersonTypes["GLAMGIRL"] = "glamgirl";
458
+ PersonTypes["BFLU"] = "bflu";
459
+ PersonTypes["NONE"] = "none";
460
+ })(PersonTypes || (PersonTypes = {}));
461
+
459
462
  var ProductSpents;
460
463
  (function (ProductSpents) {
461
464
  ProductSpents["UNTIL_50"] = "At\u00E9 R$50";
@@ -476,6 +479,12 @@ var UserType;
476
479
  UserType["Influencer"] = "Influencer";
477
480
  })(UserType || (UserType = {}));
478
481
 
482
+ class Lead extends BaseModel {
483
+ static get identifiersFields() {
484
+ return ['id'];
485
+ }
486
+ }
487
+
479
488
  class Edition extends BaseModel {
480
489
  static get identifiersFields() {
481
490
  return ['id', 'subscriptionId'];
@@ -1874,17 +1883,6 @@ class SubscriptionPlan extends BaseModel {
1874
1883
  }
1875
1884
  }
1876
1885
 
1877
- class BeautyProfile extends BaseModel {
1878
- toPlain() {
1879
- const plain = super.toPlain();
1880
- delete plain.id;
1881
- return plain;
1882
- }
1883
- static get identifiersFields() {
1884
- return ['id', 'userId'];
1885
- }
1886
- }
1887
-
1888
1886
  class User extends BaseModel {
1889
1887
  static toInstance(data) {
1890
1888
  const instance = super.toInstance(data);
@@ -1998,12 +1996,6 @@ class UserPaymentMethod extends BaseModel {
1998
1996
  }
1999
1997
  }
2000
1998
 
2001
- class Lead extends BaseModel {
2002
- static get identifiersFields() {
2003
- return ['id'];
2004
- }
2005
- }
2006
-
2007
1999
  class UnauthorizedError extends CustomError {
2008
2000
  constructor(message) {
2009
2001
  super(message);
@@ -4700,7 +4692,6 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4700
4692
  'name',
4701
4693
  'description',
4702
4694
  'image',
4703
- { images: { columnName: 'images', type: HasuraGraphQLColumnType.Jsonb } },
4704
4695
  'published',
4705
4696
  'shop',
4706
4697
  { shops: { columnName: 'shops', type: HasuraGraphQLColumnType.Jsonb } },
@@ -4756,7 +4747,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4756
4747
  {
4757
4748
  metadata: {
4758
4749
  columnName: 'metadata',
4759
- fields: ['shop', 'title', 'description'],
4750
+ fields: ['title', 'description'],
4760
4751
  bindPersistData: (value) => ({
4761
4752
  metadata: { data: value },
4762
4753
  }),
@@ -4783,7 +4774,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4783
4774
  }
4784
4775
  async create(params) {
4785
4776
  const { metadata } = params, data = __rest(params, ["metadata"]);
4786
- return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || [{ shop: null, description: null, title: null }] }));
4777
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || { description: null, title: null } }));
4787
4778
  }
4788
4779
  async get(identifiers) {
4789
4780
  var _a;
@@ -4974,35 +4965,22 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4974
4965
  return plainData.products;
4975
4966
  }
4976
4967
  async updateMetadata(categoryId, { metadata }) {
4977
- if (Array.isArray(metadata) && !metadata.length)
4978
- return [];
4979
- if (Array.isArray(metadata) && metadata.length) {
4980
- await this.mutation('delete_category_metadata', ['affected_rows'], {
4981
- where: {
4982
- type: 'category_metadata_bool_exp',
4983
- required: true,
4984
- value: { category_id: { _eq: categoryId } },
4985
- },
4986
- });
4987
- await this.mutation('insert_category_metadata', ['affected_rows'], {
4988
- objects: {
4989
- type: '[category_metadata_insert_input!]',
4990
- required: true,
4991
- value: metadata.map((m) => (Object.assign({ category_id: categoryId }, m))),
4992
- },
4993
- });
4994
- return metadata;
4995
- }
4996
- if ('action' in metadata && metadata.action === 'remove' && metadata.value.length) {
4997
- await this.mutation('delete_category_metadata', ['affected_rows'], {
4998
- where: {
4999
- type: 'category_metadata_bool_exp',
5000
- required: true,
5001
- value: { category_id: { _eq: categoryId } },
5002
- },
5003
- });
5004
- return [];
5005
- }
4968
+ const plainData = this.paramsToPlain({ metadata });
4969
+ if (!plainData.metadata)
4970
+ return null;
4971
+ await this.mutation('update_category_metadata_by_pk', ['category_id'], {
4972
+ pk_columns: {
4973
+ value: { category_id: categoryId },
4974
+ type: 'category_metadata_pk_columns_input',
4975
+ required: true,
4976
+ },
4977
+ _set: {
4978
+ value: omit(metadata, ['category_id']),
4979
+ type: 'category_metadata_set_input',
4980
+ required: true,
4981
+ },
4982
+ });
4983
+ return plainData.metadata;
5006
4984
  }
5007
4985
  async updateFilters(categoryId, { filters }) {
5008
4986
  if ('action' in filters && filters.action === 'remove' && filters.value.length) {
@@ -5944,11 +5922,14 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
5944
5922
  }
5945
5923
  }
5946
5924
 
5925
+ class WishlistHasuraGraphQL extends Wishlist {
5926
+ }
5927
+
5947
5928
  class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
5948
5929
  constructor({ endpoint, authOptions, interceptors, }, categoryFilterRepository) {
5949
5930
  super({
5950
5931
  tableName: 'category',
5951
- model: Wishlist,
5932
+ model: WishlistHasuraGraphQL,
5952
5933
  endpoint,
5953
5934
  authOptions,
5954
5935
  interceptors,
@@ -6009,7 +5990,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6009
5990
  {
6010
5991
  metadata: {
6011
5992
  columnName: 'metadata',
6012
- fields: ['shop', 'title', 'description'],
5993
+ fields: ['title', 'description'],
6013
5994
  bindPersistData: (value) => ({
6014
5995
  metadata: { data: value },
6015
5996
  }),
@@ -6029,16 +6010,18 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6029
6010
  { personId: { columnName: 'person_id' } },
6030
6011
  { personName: { columnName: 'person_name' } },
6031
6012
  { personPhoto: { columnName: 'person_photo' } },
6013
+ { personType: { columnName: 'person_type' } },
6014
+ { personIsSubscriber: { columnName: 'person_is_subscriber' } },
6032
6015
  'theme',
6033
6016
  { bannerUrl: { columnName: 'banner_url' } },
6017
+ { personHasPhoto: { columnName: 'person_has_photo' } },
6034
6018
  ],
6035
6019
  });
6036
6020
  this.categoryFilterRepository = categoryFilterRepository;
6037
6021
  }
6038
6022
  async create(params) {
6039
- var _a;
6040
6023
  const { metadata } = params, data = __rest(params, ["metadata"]);
6041
- 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 }] }));
6024
+ return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || { description: data.description, title: data.name } }));
6042
6025
  }
6043
6026
  async get(identifiers) {
6044
6027
  const data = await super.get(identifiers);
@@ -6093,7 +6076,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6093
6076
  throw new NotFoundError(`Wishlists from person ${personId} not found`);
6094
6077
  return data;
6095
6078
  }
6096
- getCategoryBySlug(slug, _shop) {
6079
+ async getCategoryBySlug(slug, _shop) {
6097
6080
  return this.getWishlistBySlug(slug);
6098
6081
  }
6099
6082
  async getCategoryByShop(shop) {
@@ -6111,6 +6094,9 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6111
6094
  });
6112
6095
  return data;
6113
6096
  }
6097
+ async findBfluOrGlamgirlWishlists(params, shops) {
6098
+ return this.find(Object.assign(Object.assign({}, params), { filters: Object.assign(Object.assign({}, params.filters), { published: true, shops: { operator: Where.LIKE, value: shops }, personType: { operator: Where.IN, value: [PersonTypes.BFLU, PersonTypes.GLAMGIRL] } }), orderBy: Object.assign({ personHasPhoto: 'desc' }, omit(params.orderBy, ['personHasPhoto'])) }));
6099
+ }
6114
6100
  getCategoriesForHome(categoryIds, limit, gender) {
6115
6101
  return;
6116
6102
  }
@@ -6162,39 +6148,22 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6162
6148
  return plainData.products;
6163
6149
  }
6164
6150
  async updateMetadata(categoryId, { metadata }) {
6165
- if (Array.isArray(metadata) && !metadata.length)
6166
- return [];
6167
- if (Array.isArray(metadata) && metadata.length) {
6168
- const metadataUpdated = [];
6169
- for (const data of metadata) {
6170
- const update = await this.mutation('update_category_metadata_by_pk', ['category_id', 'shop'], {
6171
- pk_columns: {
6172
- value: { category_id: categoryId, shop: data.shop },
6173
- type: 'category_metadata_pk_columns_input',
6174
- required: true,
6175
- },
6176
- _set: {
6177
- value: omit(data, ['category_id', 'shop']),
6178
- type: 'category_metadata_set_input',
6179
- required: true,
6180
- },
6181
- });
6182
- metadataUpdated.push(update);
6183
- }
6184
- return metadataUpdated;
6185
- }
6186
- if ('action' in metadata && metadata.action === 'remove' && metadata.value.length) {
6187
- for (let i = 0; i < metadata.value.length; i++) {
6188
- await this.mutation('delete_category_metadata', ['affected_rows'], {
6189
- where: {
6190
- type: 'category_metadata_bool_exp',
6191
- required: true,
6192
- value: { category_id: { _eq: categoryId }, shop: metadata.value[i].shop },
6193
- },
6194
- });
6195
- }
6196
- return [];
6197
- }
6151
+ const plainData = this.paramsToPlain({ metadata });
6152
+ if (!plainData.metadata)
6153
+ return;
6154
+ await this.mutation('update_category_metadata_by_pk', ['category_id'], {
6155
+ pk_columns: {
6156
+ value: { category_id: categoryId },
6157
+ type: 'category_metadata_pk_columns_input',
6158
+ required: true,
6159
+ },
6160
+ _set: {
6161
+ value: omit(metadata, ['category_id']),
6162
+ type: 'category_metadata_set_input',
6163
+ required: true,
6164
+ },
6165
+ });
6166
+ return plainData.metadata;
6198
6167
  }
6199
6168
  }
6200
6169
  __decorate([
@@ -6214,6 +6183,12 @@ __decorate([
6214
6183
  __metadata("design:type", Function),
6215
6184
  __metadata("design:paramtypes", [String]),
6216
6185
  __metadata("design:returntype", Promise)
6217
- ], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
6186
+ ], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
6187
+ __decorate([
6188
+ Log(),
6189
+ __metadata("design:type", Function),
6190
+ __metadata("design:paramtypes", [Object, Array]),
6191
+ __metadata("design:returntype", Promise)
6192
+ ], WishlistHasuraGraphQLRepository.prototype, "findBfluOrGlamgirlWishlists", null);
6218
6193
 
6219
- export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, Logger, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Plans, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductReviews, ProductReviewsHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, is, isDebuggable, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
6194
+ export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, Logger, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, PersonTypes, Plans, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductReviews, ProductReviewsHasuraGraphQLRepository, ProductSpents, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RoundProductPricesHelper, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, is, isDebuggable, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.9.14-beta.0",
3
+ "version": "4.10.0-beta.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -13,7 +13,7 @@
13
13
  "class-transformer": "^0.5.1",
14
14
  "date-fns": "^2.28.0",
15
15
  "debug": "^4.3.4",
16
- "firebase": "^9.23.0",
16
+ "firebase": "^9.22.0",
17
17
  "gql-query-builder": "3.7.0",
18
18
  "lodash": "^4.17.21",
19
19
  "reflect-metadata": "^0.1.13",
@@ -1,7 +1,7 @@
1
1
  import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic/model';
2
2
  import { Shops } from './enums';
3
3
  import { Filter } from './filter';
4
- import { CategoryCondition, CategoryImages, CategoryMetadata, CategoryMostRelevant } from './types';
4
+ import { CategoryCondition, CategoryMetadata } from './types';
5
5
  export declare class CategoryBase<ChildCategory extends ModelBaseStructure<ChildCategory, Identifiers> = ModelBaseStructure<any, any>, Identifiers = ChildCategory['identifiersFields']> extends BaseModel<ChildCategory, Identifiers> {
6
6
  id: string;
7
7
  brandCategory: boolean;
@@ -9,7 +9,6 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
9
9
  name: string;
10
10
  slug: string;
11
11
  image?: string;
12
- images?: CategoryImages;
13
12
  brandCategoryBanner?: string;
14
13
  brandCategoryBannerMobile?: string;
15
14
  description: string;
@@ -20,28 +19,15 @@ export declare class CategoryBase<ChildCategory extends ModelBaseStructure<Child
20
19
  shop?: Shops;
21
20
  shops?: string[];
22
21
  published: boolean;
23
- metadata: CategoryMetadata[];
22
+ metadata: CategoryMetadata;
24
23
  isCollection?: boolean;
25
24
  isWishlist?: boolean;
26
25
  reference?: string;
27
26
  parentId?: number;
28
27
  theme?: string;
29
28
  bannerUrl?: string;
30
- mostRelevant?: CategoryMostRelevant;
29
+ mostRelevant?: string[];
31
30
  parent?: CategoryBase;
32
31
  filters?: Filter[];
33
32
  static get identifiersFields(): GenericIdentifier[];
34
- get glamImages(): {
35
- image: string;
36
- brandBanner: string;
37
- brandBannerMobile: string;
38
- };
39
- get mensImages(): {
40
- image: string;
41
- brandBanner: string;
42
- brandBannerMobile: string;
43
- };
44
- get glamMetadata(): CategoryMetadata;
45
- get mensMetadata(): CategoryMetadata;
46
- getMostRelevantByShop(shop: Shops): string[];
47
33
  }
@@ -1,6 +1,4 @@
1
- import { Shops } from '../enums';
2
1
  export type CategoryMetadata = {
3
- shop: Shops;
4
2
  title?: string;
5
3
  description?: string;
6
4
  };
@@ -1,7 +1,5 @@
1
1
  export * from './category-condition.type';
2
- export * from './category-images.type';
3
2
  export * from './category-metadata.type';
4
- export * from './category-most-relevant.type';
5
3
  export * from './category-product';
6
4
  export * from './product-evaluation.type';
7
5
  export * from './product-gender.type';
@@ -1,8 +1,11 @@
1
1
  import { GenericIdentifier } from '../../generic/model';
2
+ import { PersonType } from '../../users';
2
3
  import { Category } from './category';
3
4
  export declare class Wishlist extends Category {
4
5
  personId?: string;
5
6
  personName?: string;
6
7
  personPhoto?: string;
8
+ personType?: PersonType;
9
+ personIsSubscriber?: boolean;
7
10
  static get identifiersFields(): GenericIdentifier[];
8
11
  }
@@ -1,6 +1,9 @@
1
1
  import { CategoryRepository } from '.';
2
+ import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
3
+ import { Shops } from '../models';
2
4
  import { Wishlist } from '../models/wishlist';
3
5
  export interface WishlistRepository extends CategoryRepository {
4
6
  getWishlistBySlug(slug: string): Promise<Wishlist>;
5
7
  getWishlistByPerson(personId: string): Promise<Wishlist[]>;
8
+ findBfluOrGlamgirlWishlists(params: FindRepositoryParams<Wishlist>, shops: Shops[]): Promise<RepositoryFindResult<Wishlist>>;
6
9
  }
@@ -16,5 +16,6 @@ export * from './hair-problems.enum';
16
16
  export * from './hair-strands.enum';
17
17
  export * from './hair-types.enum';
18
18
  export * from './office-position.enum';
19
+ export * from './person-types.enum';
19
20
  export * from './product-spents.enum';
20
21
  export * from './user-type.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum PersonTypes {
2
+ GLAMGIRL = "glamgirl",
3
+ BFLU = "bflu",
4
+ NONE = "none"
5
+ }
@@ -1,7 +1,8 @@
1
+ export * from './beauty-profile';
1
2
  export * from './enums';
3
+ export * from './lead';
2
4
  export * from './subscription';
5
+ export * from './types';
3
6
  export * from './user';
4
- export * from './beauty-profile';
5
7
  export * from './user-address';
6
8
  export * from './user-payment-method';
7
- export * from './lead';
@@ -0,0 +1 @@
1
+ export * from './person.type';
@@ -0,0 +1,2 @@
1
+ import { PersonTypes } from '../enums';
2
+ export type PersonType = `${PersonTypes}`;
@@ -0,0 +1,4 @@
1
+ import { Wishlist } from '../../../domain';
2
+ export declare class WishlistHasuraGraphQL extends Wishlist {
3
+ personHasPhoto?: boolean;
4
+ }
@@ -1,20 +1,22 @@
1
1
  import { Category, CreateRepositoryParams, FindRepositoryParams, GetRepositoryParams, Product, RepositoryFindResult, Shops, UpdateRepositoryParams, Wishlist, WishlistRepository } from '../../../../domain';
2
2
  import { HasuraConstructorParams } from '../../mixins';
3
+ import { WishlistHasuraGraphQL } from '../../models/wishlist-hasura-graphql';
3
4
  import { CategoryFilterHasuraGraphQLRepository } from './category-filter-hasura-graphql.repository';
4
- declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<Wishlist> & import("../../../../domain").CrudRepository<Wishlist, import("../../../../domain").CrudParams<Wishlist>> & import("../../../../domain").UpdateRepository<Wishlist, import("../../../../domain").RepositoryUpdateParams<Wishlist>> & {
5
- paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<Wishlist>): Partial<Wishlist>;
6
- }, [HasuraConstructorParams<Wishlist> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
5
+ declare const WishlistHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<WishlistHasuraGraphQL> & import("../../../../domain").CrudRepository<WishlistHasuraGraphQL, import("../../../../domain").CrudParams<WishlistHasuraGraphQL>> & import("../../../../domain").UpdateRepository<WishlistHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>> & {
6
+ paramsToPlain(params: import("../../../../domain").RepositoryUpdateParams<WishlistHasuraGraphQL>): Partial<WishlistHasuraGraphQL>;
7
+ }, [HasuraConstructorParams<WishlistHasuraGraphQL> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
7
8
  export declare class WishlistHasuraGraphQLRepository extends WishlistHasuraGraphQLRepository_base implements WishlistRepository {
8
9
  private readonly categoryFilterRepository;
9
10
  constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Wishlist>, 'endpoint' | 'authOptions' | 'interceptors'>, categoryFilterRepository: CategoryFilterHasuraGraphQLRepository);
10
- create(params: CreateRepositoryParams<Wishlist>): Promise<Wishlist>;
11
- get(identifiers: GetRepositoryParams<Wishlist>): Promise<Wishlist>;
12
- find(params?: FindRepositoryParams<Wishlist>): Promise<RepositoryFindResult<Wishlist>>;
13
- update(params: UpdateRepositoryParams<Wishlist>): Promise<Wishlist>;
14
- getWishlistBySlug(slug: string): Promise<Wishlist>;
15
- getWishlistByPerson(personId: string): Promise<Wishlist[]>;
11
+ create(params: CreateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
12
+ get(identifiers: GetRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
13
+ find(params?: FindRepositoryParams<WishlistHasuraGraphQL>): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
14
+ update(params: UpdateRepositoryParams<WishlistHasuraGraphQL>): Promise<WishlistHasuraGraphQL>;
15
+ getWishlistBySlug(slug: string): Promise<WishlistHasuraGraphQL>;
16
+ getWishlistByPerson(personId: string): Promise<WishlistHasuraGraphQL[]>;
16
17
  getCategoryBySlug(slug: string, _shop: Shops): Promise<Wishlist>;
17
18
  getCategoryByShop(shop: string): Promise<any>;
19
+ findBfluOrGlamgirlWishlists(params: FindRepositoryParams<WishlistHasuraGraphQL>, shops: Shops[]): Promise<RepositoryFindResult<WishlistHasuraGraphQL>>;
18
20
  getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): any;
19
21
  mountCategory(category: Category, options?: {
20
22
  limit?: number;
@@ -1,8 +0,0 @@
1
- import { Shops } from '../enums';
2
- export type CategoryImages = {
3
- [shop in Shops]?: {
4
- image: string;
5
- brandBanner: string;
6
- brandBannerMobile: string;
7
- };
8
- };
@@ -1,4 +0,0 @@
1
- import { Shops } from '../enums';
2
- export type CategoryMostRelevant = {
3
- [shop in Shops]?: string[];
4
- };