@infrab4a/connect 0.17.0-beta.0 → 0.17.0-beta.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.
Files changed (84) hide show
  1. package/bundles/infrab4a-connect.umd.js +139 -187
  2. package/bundles/infrab4a-connect.umd.js.map +1 -1
  3. package/domain/catalog/repositories/category.repository.d.ts +1 -6
  4. package/esm2015/domain/catalog/repositories/category.repository.js +1 -1
  5. package/esm2015/infra/elasticsearch/indexes/products-index.js +2 -13
  6. package/esm2015/infra/firebase/auth/authentication-firebase-auth.service.js +6 -6
  7. package/esm2015/infra/firebase/auth/register-firebase-auth.service.js +4 -3
  8. package/esm2015/infra/firebase/auth/types/firebase-user-with-id.type.js +1 -1
  9. package/esm2015/infra/firebase/firestore/mixins/with-create-firestore.mixin.js +7 -5
  10. package/esm2015/infra/firebase/firestore/mixins/with-delete-firestore.mixin.js +3 -4
  11. package/esm2015/infra/firebase/firestore/mixins/with-find-firestore.mixin.js +31 -25
  12. package/esm2015/infra/firebase/firestore/mixins/with-firestore.mixin.js +4 -4
  13. package/esm2015/infra/firebase/firestore/mixins/with-get-firestore.mixin.js +4 -5
  14. package/esm2015/infra/firebase/firestore/mixins/with-helpers.mixin.js +1 -1
  15. package/esm2015/infra/firebase/firestore/mixins/with-sub-collection.mixin.js +1 -1
  16. package/esm2015/infra/firebase/firestore/mixins/with-update-firestore.mixin.js +9 -10
  17. package/esm2015/infra/firebase/firestore/repositories/catalog/category-firestore.repository.js +11 -19
  18. package/esm2015/infra/firebase/firestore/repositories/catalog/product-firestore.repository.js +1 -1
  19. package/esm2015/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.js +1 -1
  20. package/esm2015/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.js +1 -1
  21. package/esm2015/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.js +4 -4
  22. package/esm2015/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.js +1 -1
  23. package/esm2015/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.js +1 -1
  24. package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.js +1 -1
  25. package/esm2015/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.js +1 -1
  26. package/esm2015/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.js +1 -1
  27. package/esm2015/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.js +1 -1
  28. package/esm2015/infra/firebase/firestore/repositories/shopping/order-firestore.repository.js +1 -1
  29. package/esm2015/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.js +1 -1
  30. package/esm2015/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.js +1 -1
  31. package/esm2015/infra/firebase/firestore/repositories/users/lead-firestore.repository.js +1 -1
  32. package/esm2015/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.js +1 -1
  33. package/esm2015/infra/firebase/firestore/repositories/users/subscription-firestore.repository.js +1 -1
  34. package/esm2015/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.js +1 -1
  35. package/esm2015/infra/firebase/firestore/repositories/users/user-address-firestore.repository.js +1 -1
  36. package/esm2015/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.js +1 -1
  37. package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +4 -12
  38. package/esm2015/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.js +1 -1
  39. package/esm2015/infra/firebase/firestore/repositories/users/user-search-firestore.repository.js +1 -1
  40. package/esm2015/infra/firebase/firestore/types/firestore.helpers.type.js +1 -1
  41. package/esm2015/infra/firebase/firestore/types/firestore.repository.type.js +1 -1
  42. package/esm2015/utils/index.js +3 -2
  43. package/fesm2015/infrab4a-connect.js +72 -99
  44. package/fesm2015/infrab4a-connect.js.map +1 -1
  45. package/infra/elasticsearch/indexes/products-index.d.ts +0 -1
  46. package/infra/firebase/auth/authentication-firebase-auth.service.d.ts +2 -2
  47. package/infra/firebase/auth/register-firebase-auth.service.d.ts +2 -2
  48. package/infra/firebase/auth/types/firebase-user-with-id.type.d.ts +2 -1
  49. package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +4 -4
  50. package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +8 -8
  51. package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +3 -3
  52. package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +7 -7
  53. package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +2 -2
  54. package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +3 -3
  55. package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +1 -1
  56. package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +2 -2
  57. package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +3 -3
  58. package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +17 -22
  59. package/infra/firebase/firestore/repositories/catalog/product-firestore.repository.d.ts +16 -16
  60. package/infra/firebase/firestore/repositories/catalog/product-variant-firestore.repository.d.ts +18 -18
  61. package/infra/firebase/firestore/repositories/catalog/subscription-product-firestore.repository.d.ts +16 -16
  62. package/infra/firebase/firestore/repositories/shop-settings/home-firestore.repository.d.ts +14 -14
  63. package/infra/firebase/firestore/repositories/shop-settings/shop-menu-firestore.repository.d.ts +16 -16
  64. package/infra/firebase/firestore/repositories/shopping/buy-2-win-firestore.repository.d.ts +16 -16
  65. package/infra/firebase/firestore/repositories/shopping/checkout-firestore.repository.d.ts +16 -16
  66. package/infra/firebase/firestore/repositories/shopping/checkout-subscription-firestore.repository.d.ts +16 -16
  67. package/infra/firebase/firestore/repositories/shopping/coupon-firestore.repository.d.ts +14 -14
  68. package/infra/firebase/firestore/repositories/shopping/legacy-order-firestore.repository.d.ts +3 -3
  69. package/infra/firebase/firestore/repositories/shopping/order-firestore.repository.d.ts +16 -16
  70. package/infra/firebase/firestore/repositories/shopping/payment-firestore.repository.d.ts +16 -16
  71. package/infra/firebase/firestore/repositories/shopping/subscription-plan-firestore.repository.d.ts +16 -16
  72. package/infra/firebase/firestore/repositories/users/lead-firestore.repository.d.ts +16 -16
  73. package/infra/firebase/firestore/repositories/users/subscription-edition-firestore.repository.d.ts +18 -18
  74. package/infra/firebase/firestore/repositories/users/subscription-firestore.repository.d.ts +16 -16
  75. package/infra/firebase/firestore/repositories/users/subscription-payment-firestore.repository.d.ts +18 -18
  76. package/infra/firebase/firestore/repositories/users/user-address-firestore.repository.d.ts +18 -18
  77. package/infra/firebase/firestore/repositories/users/user-beauty-profile-firestore.repository.d.ts +18 -18
  78. package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +14 -14
  79. package/infra/firebase/firestore/repositories/users/user-payment-method-firestore.repository.d.ts +18 -18
  80. package/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +16 -16
  81. package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +1 -1
  82. package/infra/firebase/firestore/types/firestore.repository.type.d.ts +2 -2
  83. package/package.json +2 -2
  84. package/utils/index.d.ts +1 -1
@@ -9,4 +9,4 @@ export class UserSearchFirestoreRepository extends withCrudFirestore(withHelpers
9
9
  this.model = UserSearch;
10
10
  }
11
11
  }
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1zZWFyY2gtZmlyZXN0b3JlLnJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9pbmZyYS9maXJlYmFzZS9maXJlc3RvcmUvcmVwb3NpdG9yaWVzL3VzZXJzL3VzZXItc2VhcmNoLWZpcmVzdG9yZS5yZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTS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5lY3Qvc3JjL2luZnJhL2ZpcmViYXNlL2ZpcmVzdG9yZS90eXBlcy9maXJlc3RvcmUucmVwb3NpdG9yeS50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb2xsZWN0aW9uUmVmZXJlbmNlLCBGaXJlc3RvcmUgfSBmcm9tICdmaXJlYmFzZS9maXJlc3RvcmUnXG5cbmltcG9ydCB7IEJhc2VNb2RlbEJ1aWxkZXIsIEJhc2VNb2RlbFdpdGhJZGVudGlmaWVyIH0gZnJvbSAnLi4vLi4vLi4vLi4vZG9tYWluJ1xuXG5leHBvcnQgdHlwZSBGaXJlc3RvcmVSZXBvc2l0b3J5PE1vZGVsIGV4dGVuZHMgQmFzZU1vZGVsV2l0aElkZW50aWZpZXI8TW9kZWw+PiA9IHtcbiAgcmVhZG9ubHkgZmlyZXN0b3JlPzogRmlyZXN0b3JlXG4gIGNvbGxlY3Rpb25OYW1lOiBzdHJpbmdcbiAgbW9kZWw6IEJhc2VNb2RlbEJ1aWxkZXI8TW9kZWw+XG4gIGNvbGxlY3Rpb24ocGF0aD86IHN0cmluZyk6IENvbGxlY3Rpb25SZWZlcmVuY2U8TW9kZWw+XG59XG4iXX0=
@@ -1,6 +1,7 @@
1
1
  import { add, sub } from 'date-fns';
2
- import { chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set } from 'lodash';
2
+ import lodash from 'lodash';
3
+ const { chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set } = lodash;
3
4
  export { add, chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set, sub };
4
5
  export * from './mixins';
5
6
  export * from './types';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L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V0LCBpc0RhdGUsIGlzRW1wdHksIGlzTmlsLCBpc051bWJlciwgaXNPYmplY3QsIGlzU3RyaW5nLCBwaWNrLCBzZXQsIHN1YiB9XG5leHBvcnQgKiBmcm9tICcuL21peGlucydcbmV4cG9ydCAqIGZyb20gJy4vdHlwZXMnXG4iXX0=
@@ -2,12 +2,11 @@ import 'reflect-metadata';
2
2
  import { plainToClass, classToPlain, Expose, Type } from 'class-transformer';
3
3
  import { __decorate, __metadata, __awaiter } from 'tslib';
4
4
  export { add, sub } from 'date-fns';
5
- import { isNil, isNumber, isString, isDate, set, isObject, isEmpty } from 'lodash';
6
- export { chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set } from 'lodash';
5
+ import lodash from 'lodash';
7
6
  import { Md5 } from 'ts-md5';
8
7
  import axios from 'axios';
9
- import firebase from 'firebase';
10
- import firebase$1 from 'firebase/app';
8
+ import { collection, Timestamp, getDoc, doc, where, orderBy, getDocs, query, startAfter, startAt, limit, addDoc, setDoc, deleteField, arrayUnion, arrayRemove, deleteDoc } from 'firebase/firestore';
9
+ import { signInWithEmailAndPassword, signInWithPopup, GoogleAuthProvider, signInAnonymously, sendPasswordResetEmail, createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
11
10
 
12
11
  class BaseModel {
13
12
  constructor(args) {
@@ -459,6 +458,8 @@ class Base {
459
458
  }
460
459
  }
461
460
 
461
+ const { chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set } = lodash;
462
+
462
463
  var CouponTypes;
463
464
  (function (CouponTypes) {
464
465
  CouponTypes[CouponTypes["FINANCIAL"] = 1] = "FINANCIAL";
@@ -1025,7 +1026,7 @@ class ProductsIndex {
1025
1026
  [publishedField]: true,
1026
1027
  },
1027
1028
  },
1028
- ...(options.hasStock && !options.stock
1029
+ ...(options.hasStock
1029
1030
  ? [
1030
1031
  {
1031
1032
  range: {
@@ -1036,17 +1037,6 @@ class ProductsIndex {
1036
1037
  },
1037
1038
  ]
1038
1039
  : []),
1039
- ...(options.stock
1040
- ? [
1041
- {
1042
- range: {
1043
- 'stock.quantity': {
1044
- gte: options.stock,
1045
- },
1046
- },
1047
- },
1048
- ]
1049
- : []),
1050
1040
  ],
1051
1041
  },
1052
1042
  } }, (options.size ? { size: options.size } : {})));
@@ -1061,7 +1051,7 @@ const withFirestore = (MixinBase) => {
1061
1051
  super(args);
1062
1052
  }
1063
1053
  collection(path) {
1064
- return this.firestore.collection(path || this.collectionName).withConverter(this.buildModelInstance());
1054
+ return collection(this.firestore, path || this.collectionName).withConverter(this.buildModelInstance());
1065
1055
  }
1066
1056
  buildModelInstance() {
1067
1057
  return {
@@ -1069,7 +1059,7 @@ const withFirestore = (MixinBase) => {
1069
1059
  fromFirestore: (snap) => {
1070
1060
  const data = snap.data();
1071
1061
  Object.keys(data).forEach((key) => {
1072
- if (data[key] instanceof firebase.firestore.Timestamp) {
1062
+ if (data[key] instanceof Timestamp) {
1073
1063
  data[key] = data[key].toDate();
1074
1064
  }
1075
1065
  });
@@ -1100,10 +1090,8 @@ const withGetFirestore = (MixinBase) => {
1100
1090
  return class GetFirestore extends MixinBase {
1101
1091
  get(identifiers) {
1102
1092
  return __awaiter(this, void 0, void 0, function* () {
1103
- const doc = yield this.collection(this.buildCollectionPathForGet(identifiers))
1104
- .doc(Object.values(identifiers).shift().toString())
1105
- .get();
1106
- const data = doc.data();
1093
+ const docRef = yield getDoc(doc(yield this.collection(this.buildCollectionPathForGet(identifiers)), Object.values(identifiers).shift().toString()));
1094
+ const data = docRef.data();
1107
1095
  if (isNil(data))
1108
1096
  throw new NotFoundError(`Document ${JSON.stringify(identifiers)} not found`);
1109
1097
  return data;
@@ -1128,10 +1116,13 @@ const withFindFirestore = (MixinBase) => {
1128
1116
  return class FindFirestore extends MixinBase {
1129
1117
  constructor() {
1130
1118
  super(...arguments);
1131
- this.makeFirestoreWhere = (queryReference, filter) => Object.keys(filter).reduce((query, fieldName) => this.buildWhereSentence(query, fieldName, filter[fieldName]), queryReference);
1132
- this.buildWhereSentence = (queryReference, fieldName, options) => {
1119
+ this.makeFirestoreWhere = (filter) => Object.keys(filter).reduce((queries, fieldName) => [
1120
+ ...queries,
1121
+ ...this.buildWhereSentence(fieldName, filter[fieldName]),
1122
+ ], []);
1123
+ this.buildWhereSentence = (fieldName, options) => {
1133
1124
  if (this.isSubCollection(this) && fieldName === this.parentIdField)
1134
- return queryReference;
1125
+ [];
1135
1126
  const value = (options === null || options === void 0 ? void 0 : options.value) || options;
1136
1127
  const object = {};
1137
1128
  set(object, fieldName, value);
@@ -1141,30 +1132,33 @@ const withFindFirestore = (MixinBase) => {
1141
1132
  : Object.keys(plainInstance).find((key) => plainInstance[key]);
1142
1133
  if ((options === null || options === void 0 ? void 0 : options.operator) === Where.LIKE) {
1143
1134
  if (Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1144
- return queryReference.where(firestoreFieldName, 'array-contains-any', options.value);
1145
- queryReference = queryReference.where(firestoreFieldName, '>=', options.value);
1146
- queryReference = queryReference.where(firestoreFieldName, '<=', `${options.value}~`);
1147
- return queryReference;
1135
+ return [where(firestoreFieldName, 'array-contains-any', options.value)];
1136
+ return [where(firestoreFieldName, '>=', options.value), where(firestoreFieldName, '<=', `${options.value}~`)];
1148
1137
  }
1149
1138
  if ((options === null || options === void 0 ? void 0 : options.operator) === Where.IN && Array.isArray(options === null || options === void 0 ? void 0 : options.value))
1150
- return queryReference.where(firestoreFieldName, 'array-contains', options.value);
1139
+ return [where(firestoreFieldName, 'array-contains', options.value)];
1151
1140
  if (isObject(options) && isNil(options === null || options === void 0 ? void 0 : options.operator) && isNil(options === null || options === void 0 ? void 0 : options.value)) {
1152
- return Object.keys(options).reduce((queryReferenceWithWhere, key) => this.buildWhereSentence(queryReferenceWithWhere, `${fieldName}.${key}`, options[key]), queryReference);
1141
+ return Object.keys(options).reduce((queries, key) => [...queries, ...this.buildWhereSentence(`${fieldName.toString()}.${key}`, options[key])], []);
1153
1142
  }
1154
- return queryReference.where(firestoreFieldName, (options === null || options === void 0 ? void 0 : options.operator) || '==', (options === null || options === void 0 ? void 0 : options.value) || options);
1143
+ return [where(firestoreFieldName, (options === null || options === void 0 ? void 0 : options.operator) || '==', (options === null || options === void 0 ? void 0 : options.value) || options)];
1155
1144
  };
1156
1145
  }
1157
- find(filters, limits, orderBy) {
1146
+ find(filters, limitList, orderByList) {
1158
1147
  return __awaiter(this, void 0, void 0, function* () {
1159
- let query = this.collection(this.buildCollectionPathForFind(filters));
1160
- filters === null || filters === void 0 ? void 0 : filters.forEach((filterer) => (query = this.makeFirestoreWhere(query, filterer)));
1161
- orderBy === null || orderBy === void 0 ? void 0 : orderBy.forEach((orderer) => Object.keys(orderer).forEach((fieldName) => (query = query.orderBy(fieldName, orderer[fieldName]))));
1162
- query = yield this.defineLimits(query, filters, limits);
1163
- const docs = yield query.get();
1148
+ const collection = this.collection(this.buildCollectionPathForFind(filters));
1149
+ const queries = (filters === null || filters === void 0 ? void 0 : filters.reduce((queriesBuilded, filterer) => [...queriesBuilded, ...this.makeFirestoreWhere(filterer)], [])) ||
1150
+ [];
1151
+ const ordination = (orderByList === null || orderByList === void 0 ? void 0 : orderByList.reduce((ordinationBuilded, sort) => [
1152
+ ...ordinationBuilded,
1153
+ ...Object.keys(sort).map((fieldName) => orderBy(fieldName, sort[fieldName])),
1154
+ ], [])) || [];
1155
+ const limits = yield this.defineLimits(filters, limitList);
1156
+ const queryArgumments = [...queries, ...ordination, ...limits];
1157
+ const docs = yield getDocs(query(collection, ...queryArgumments));
1164
1158
  const data = docs.docs.map((doc) => doc.data());
1165
1159
  return {
1166
1160
  data,
1167
- count: this.calculateCount(data, limits),
1161
+ count: this.calculateCount(data, limitList),
1168
1162
  };
1169
1163
  });
1170
1164
  }
@@ -1176,19 +1170,18 @@ const withFindFirestore = (MixinBase) => {
1176
1170
  const parentId = getValueFromFilter((_a = filters.find((groupFilter) => Boolean(getValueFromFilter(groupFilter[parentIdField])))) === null || _a === void 0 ? void 0 : _a[parentIdField]);
1177
1171
  return `${this.parentRepository.collectionName}/${parentId}/${this.collectionName}`;
1178
1172
  }
1179
- defineLimits(query, filters, limits) {
1173
+ defineLimits(filters, limits) {
1180
1174
  return __awaiter(this, void 0, void 0, function* () {
1175
+ const queries = [];
1181
1176
  if (limits === null || limits === void 0 ? void 0 : limits.offset) {
1182
1177
  if (limits.offset instanceof this.model)
1183
- query = query.startAfter(yield this.collection(this.buildCollectionPathForFind(filters))
1184
- .doc(limits.offset[limits.offset.identifierFields().shift()])
1185
- .get());
1178
+ queries.push(startAfter(yield getDoc(doc(this.collection(this.buildCollectionPathForFind(filters)), limits.offset[limits.offset.identifierFields().shift()]))));
1186
1179
  else if (isNumber(limits.offset) || isString(limits.offset))
1187
- query = query.startAt(limits.offset);
1180
+ queries.push(startAt(limits.offset));
1188
1181
  }
1189
1182
  if (limits === null || limits === void 0 ? void 0 : limits.limit)
1190
- query = query.limit(limits.limit);
1191
- return query;
1183
+ queries.push(limit(limits.limit));
1184
+ return queries;
1192
1185
  });
1193
1186
  }
1194
1187
  calculateCount(data, limits) {
@@ -1206,7 +1199,7 @@ const withCreateFirestore = (MixinBase) => {
1206
1199
  create(data) {
1207
1200
  return __awaiter(this, void 0, void 0, function* () {
1208
1201
  const docRef = yield this.save(this.model.toInstance(data));
1209
- const doc = yield docRef.get();
1202
+ const doc = yield getDoc(docRef);
1210
1203
  return doc.data();
1211
1204
  });
1212
1205
  }
@@ -1215,10 +1208,11 @@ const withCreateFirestore = (MixinBase) => {
1215
1208
  return __awaiter(this, void 0, void 0, function* () {
1216
1209
  const id = (_a = data[data.identifierFields().shift()]) === null || _a === void 0 ? void 0 : _a.toString();
1217
1210
  const collectionPath = this.buildCollectionPathForAdd(data);
1211
+ const collection = this.collection(collectionPath);
1218
1212
  if (isEmpty(id))
1219
- return this.collection(collectionPath).add(data);
1220
- const docRef = this.collection(collectionPath).doc(id);
1221
- yield docRef.set(data);
1213
+ return addDoc(collection, data);
1214
+ const docRef = doc(collection, id);
1215
+ yield setDoc(docRef, data);
1222
1216
  return docRef;
1223
1217
  });
1224
1218
  }
@@ -1233,16 +1227,15 @@ const withCreateFirestore = (MixinBase) => {
1233
1227
  const withUpdateFirestore = (MixinBase) => {
1234
1228
  const getValueFromParams = (params, field) => { var _a; return (isNil((_a = params[field]) === null || _a === void 0 ? void 0 : _a.value) ? params[field] : params[field].value) || null; };
1235
1229
  const getValueByAction = (options) => {
1236
- const fieldValues = firebase.firestore.FieldValue;
1237
1230
  if (isNil(options.action))
1238
1231
  return options;
1239
1232
  if (options.action === UpdateOptionActions.REMOVE_FIELD)
1240
- return fieldValues.delete();
1233
+ return deleteField();
1241
1234
  if (Array.isArray(options.value)) {
1242
1235
  if (options.action === UpdateOptionActions.MERGE)
1243
- return fieldValues.arrayUnion(...options.value);
1236
+ return arrayUnion(...options.value);
1244
1237
  if (options.action === UpdateOptionActions.REMOVE)
1245
- return fieldValues.arrayRemove(...options.value);
1238
+ return arrayRemove(...options.value);
1246
1239
  }
1247
1240
  return options.value;
1248
1241
  };
@@ -1251,10 +1244,10 @@ const withUpdateFirestore = (MixinBase) => {
1251
1244
  return __awaiter(this, void 0, void 0, function* () {
1252
1245
  const model = new this.model();
1253
1246
  const keyField = model.identifierFields().shift();
1254
- const docRef = this.collection(this.buildCollectionPathForUpdate(data)).doc(getValueFromParams(data, keyField).toString());
1255
- yield docRef.set(this.paramsToPlain(data), { merge: true });
1256
- const doc = yield docRef.get();
1257
- return doc.data();
1247
+ const docRef = doc(this.collection(this.buildCollectionPathForUpdate(data)), getValueFromParams(data, keyField).toString());
1248
+ yield setDoc(docRef, this.paramsToPlain(data), { merge: true });
1249
+ const docData = yield getDoc(docRef);
1250
+ return docData.data();
1258
1251
  });
1259
1252
  }
1260
1253
  buildCollectionPathForUpdate(identifiers) {
@@ -1275,9 +1268,7 @@ const withDeleteFirestore = (MixinBase) => {
1275
1268
  return class DeleteFirestore extends MixinBase {
1276
1269
  delete(identifiers) {
1277
1270
  return __awaiter(this, void 0, void 0, function* () {
1278
- yield this.collection(this.buildCollectionPathForRemove(identifiers))
1279
- .doc(Object.values(identifiers).shift().toString())
1280
- .delete();
1271
+ yield deleteDoc(doc(this.collection(this.buildCollectionPathForRemove(identifiers)), Object.values(identifiers).shift().toString()));
1281
1272
  });
1282
1273
  }
1283
1274
  buildCollectionPathForRemove(identifiers) {
@@ -1366,22 +1357,13 @@ class UserFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
1366
1357
  }
1367
1358
  getBeautyProfile(userId) {
1368
1359
  return __awaiter(this, void 0, void 0, function* () {
1369
- const beautyProfile = yield this.collection()
1370
- .doc(userId)
1371
- .collection('CX')
1372
- .withConverter(this.buildBeautyProfileModelInstance())
1373
- .doc('beautyProfile')
1374
- .get();
1360
+ const beautyProfile = yield getDoc(doc(this.collection(`${this.collectionName}/${userId}/CX`).withConverter(this.buildBeautyProfileModelInstance()), 'beautyProfile'));
1375
1361
  return beautyProfile.data();
1376
1362
  });
1377
1363
  }
1378
1364
  checkIfIsSubscriber(userId) {
1379
1365
  return __awaiter(this, void 0, void 0, function* () {
1380
- const docs = yield this.firestore
1381
- .collection('subscription')
1382
- .where('user.id', '==', userId)
1383
- .where('status', '==', 'active')
1384
- .get();
1366
+ const docs = yield getDocs(query(this.collection('subscription'), where('user.id', '==', userId), where('status', '==', 'active')));
1385
1367
  return !!docs && !!docs.size;
1386
1368
  });
1387
1369
  }
@@ -1466,33 +1448,25 @@ class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFire
1466
1448
  this.model = Category;
1467
1449
  }
1468
1450
  getCategoryBySlug(slug, shop) {
1469
- return this.collection(this.collectionName)
1470
- .where('slug', '==', slug)
1471
- .where('shop', '==', shop)
1472
- .where('published', '==', true)
1473
- .get()
1474
- .then((snap) => {
1475
- if (snap.size > 1)
1451
+ return __awaiter(this, void 0, void 0, function* () {
1452
+ const categoryDocs = yield getDocs(query(this.collection(this.collectionName), where('slug', '==', slug), where('shop', '==', shop), where('published', '==', true)));
1453
+ if (categoryDocs.size > 1)
1476
1454
  throw new DuplicatedResultsError('Query returned duplicated values');
1477
- if (snap.empty)
1455
+ if (categoryDocs.empty)
1478
1456
  throw new NotFoundError(`Document with slug ${slug} not found`);
1479
- return snap.docs[0].data();
1480
- })
1481
- .catch((error) => error);
1457
+ return categoryDocs.docs[0].data();
1458
+ });
1482
1459
  }
1483
- getCategoriesForHome(categoryIds, { limit, stock } = {}) {
1460
+ getCategoriesForHome(categoryIds, limit = 4) {
1484
1461
  return __awaiter(this, void 0, void 0, function* () {
1485
- const categorySnap = yield this.collection(this.collectionName)
1486
- .where('id', 'in', categoryIds.filter(Boolean))
1487
- .where('published', '==', true)
1488
- .get();
1462
+ const categorySnap = yield getDocs(query(this.collection(this.collectionName), where('id', 'in', categoryIds.filter(Boolean)), where('published', '==', true)));
1489
1463
  if (categorySnap.empty)
1490
1464
  throw new NotFoundError('Categories not found');
1491
1465
  const categories = categorySnap.docs.map((doc) => doc.data());
1492
1466
  const homeSections = yield Promise.all(categories.map((category) => __awaiter(this, void 0, void 0, function* () {
1493
1467
  return ({
1494
1468
  category,
1495
- products: yield this.mountCategory(category, { limit, stock, hasStock: true }),
1469
+ products: yield this.mountCategory(category, { limit, hasStock: true }),
1496
1470
  });
1497
1471
  })));
1498
1472
  return homeSections;
@@ -1505,7 +1479,6 @@ class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFire
1505
1479
  return this.productsIndex.findById(category.products, {
1506
1480
  hasStock: options === null || options === void 0 ? void 0 : options.hasStock,
1507
1481
  size: options === null || options === void 0 ? void 0 : options.limit,
1508
- stock: options.stock,
1509
1482
  shop: category.shop,
1510
1483
  });
1511
1484
  });
@@ -1663,9 +1636,9 @@ class HomeFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
1663
1636
  home.data.data.featuredProducts = home.data.data.featuredProducts.map(this.plainToHomeCategoryGroup);
1664
1637
  home.data.data.verticalProducts = home.data.data.verticalProducts.map(this.plainToHomeCategoryGroup);
1665
1638
  home.data.createdAt =
1666
- home.data.createdAt instanceof firebase.firestore.Timestamp ? home.data.createdAt.toDate() : home.data.createdAt;
1639
+ home.data.createdAt instanceof Timestamp ? home.data.createdAt.toDate() : home.data.createdAt;
1667
1640
  home.data.expiresAt =
1668
- home.data.expiresAt instanceof firebase.firestore.Timestamp ? home.data.expiresAt.toDate() : home.data.expiresAt;
1641
+ home.data.expiresAt instanceof Timestamp ? home.data.expiresAt.toDate() : home.data.expiresAt;
1669
1642
  }
1670
1643
  return home;
1671
1644
  };
@@ -1706,7 +1679,7 @@ class AuthenticationFirebaseAuthService {
1706
1679
  }
1707
1680
  signInWithEmailAndPassword(data) {
1708
1681
  return __awaiter(this, void 0, void 0, function* () {
1709
- const credentials = yield this.firebaseAuth.signInWithEmailAndPassword(data.email, data.password);
1682
+ const credentials = yield signInWithEmailAndPassword(this.firebaseAuth, data.email, data.password);
1710
1683
  const user = credentials.user;
1711
1684
  return {
1712
1685
  id: user.uid,
@@ -1719,7 +1692,7 @@ class AuthenticationFirebaseAuthService {
1719
1692
  }
1720
1693
  signInWithGoogle() {
1721
1694
  return __awaiter(this, void 0, void 0, function* () {
1722
- const credentials = yield this.firebaseAuth.signInWithPopup(new firebase$1.auth.GoogleAuthProvider());
1695
+ const credentials = yield signInWithPopup(this.firebaseAuth, new GoogleAuthProvider());
1723
1696
  const user = credentials.user;
1724
1697
  return {
1725
1698
  id: user.uid,
@@ -1737,7 +1710,7 @@ class AuthenticationFirebaseAuthService {
1737
1710
  }
1738
1711
  signInAnonymously() {
1739
1712
  return __awaiter(this, void 0, void 0, function* () {
1740
- const auth = yield this.firebaseAuth.signInAnonymously();
1713
+ const auth = yield signInAnonymously(this.firebaseAuth);
1741
1714
  const user = auth.user;
1742
1715
  user.id = auth.user.uid;
1743
1716
  return user;
@@ -1745,7 +1718,7 @@ class AuthenticationFirebaseAuthService {
1745
1718
  }
1746
1719
  sendPasswordResetEmail(email) {
1747
1720
  return __awaiter(this, void 0, void 0, function* () {
1748
- return this.firebaseAuth.sendPasswordResetEmail(email);
1721
+ return sendPasswordResetEmail(this.firebaseAuth, email);
1749
1722
  });
1750
1723
  }
1751
1724
  }
@@ -1757,9 +1730,9 @@ class RegisterFirebaseAuthService {
1757
1730
  register(params) {
1758
1731
  return __awaiter(this, void 0, void 0, function* () {
1759
1732
  try {
1760
- const auth = yield this.firebaseAuth.createUserWithEmailAndPassword(params.email, params.password);
1733
+ const auth = yield createUserWithEmailAndPassword(this.firebaseAuth, params.email, params.password);
1761
1734
  const user = auth.user;
1762
- user.sendEmailVerification();
1735
+ yield sendEmailVerification(user);
1763
1736
  user.id = auth.user.uid;
1764
1737
  return user;
1765
1738
  }
@@ -1778,5 +1751,5 @@ class RegisterFirebaseAuthService {
1778
1751
  * Generated bundle index. Do not edit.
1779
1752
  */
1780
1753
 
1781
- export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, FilterType, FinancialCoupon, FragranceImportances, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductSpents, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, Register, RegisterFirebaseAuthService, RequiredArgumentError, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, UnauthorizedError, UpdateOptionActions, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserSearchFirestoreRepository, UserType, Variant, WeakPasswordError, Where, withCreateFirestore, withCrudFirestore, withDeleteFirestore, withFindFirestore, withFirestore, withGetFirestore, withHelpers, withSubCollection, withUpdateFirestore };
1754
+ export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, FilterType, FinancialCoupon, FragranceImportances, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductSpents, ProductVariantFirestoreRepository, ProductsIndex, QuestionsFilters, RecoveryPassword, Register, RegisterFirebaseAuthService, RequiredArgumentError, ShippingMethod, ShopMenu, ShopMenuFirestoreRepository, Shops, SignInMethods, SignOut, Status, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, UnauthorizedError, UpdateOptionActions, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserSearchFirestoreRepository, UserType, Variant, WeakPasswordError, Where, chunk, get, isDate, isEmpty, isNil, isNumber, isObject, isString, pick, set, withCreateFirestore, withCrudFirestore, withDeleteFirestore, withFindFirestore, withFirestore, withGetFirestore, withHelpers, withSubCollection, withUpdateFirestore };
1782
1755
  //# sourceMappingURL=infrab4a-connect.js.map