@infrab4a/connect 2.0.9 → 2.0.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/bundles/infrab4a-connect.umd.js +67 -93
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/product.d.ts +1 -0
- package/esm2015/domain/catalog/models/product.js +1 -1
- package/esm2015/infra/elasticsearch/indexes/products-index.js +2 -1
- package/esm2015/infra/firebase/firestore/repositories/users/index.js +6 -7
- package/esm2015/infra/firebase/firestore/repositories/users/user-firestore.repository.js +4 -6
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +3 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +2 -1
- package/fesm2015/infrab4a-connect.js +52 -64
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/firebase/firestore/repositories/users/index.d.ts +5 -6
- package/infra/firebase/firestore/repositories/users/user-firestore.repository.d.ts +1 -3
- package/package.json +1 -1
- package/esm2015/infra/firebase/firestore/models/user-search.js +0 -7
- package/esm2015/infra/firebase/firestore/repositories/users/user-search-firestore.repository.js +0 -12
- package/infra/firebase/firestore/models/user-search.d.ts +0 -9
- package/infra/firebase/firestore/repositories/users/user-search-firestore.repository.d.ts +0 -9
|
@@ -1116,6 +1116,7 @@ class ProductsIndex {
|
|
|
1116
1116
|
'weight',
|
|
1117
1117
|
'tags',
|
|
1118
1118
|
'hasVariants',
|
|
1119
|
+
'type'
|
|
1119
1120
|
];
|
|
1120
1121
|
const { hits } = yield this.adapter.query('products/_search', Object.assign({ _source: fields, query: {
|
|
1121
1122
|
bool: {
|
|
@@ -1428,6 +1429,26 @@ const withCrudFirestore = (MixinBase) => {
|
|
|
1428
1429
|
};
|
|
1429
1430
|
};
|
|
1430
1431
|
|
|
1432
|
+
class LeadFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
1433
|
+
constructor(firestore) {
|
|
1434
|
+
super();
|
|
1435
|
+
this.firestore = firestore;
|
|
1436
|
+
this.collectionName = 'leads';
|
|
1437
|
+
this.model = Lead;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
class SubscriptionEditionFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription) {
|
|
1442
|
+
constructor(firestore, parentRepository) {
|
|
1443
|
+
super();
|
|
1444
|
+
this.firestore = firestore;
|
|
1445
|
+
this.parentRepository = parentRepository;
|
|
1446
|
+
this.collectionName = 'editions';
|
|
1447
|
+
this.parentIdField = 'subscriptionId';
|
|
1448
|
+
this.model = Edition;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1431
1452
|
class SubscriptionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
1432
1453
|
constructor(firestore) {
|
|
1433
1454
|
super();
|
|
@@ -1437,26 +1458,43 @@ class SubscriptionFirestoreRepository extends withCrudFirestore(withHelpers(with
|
|
|
1437
1458
|
}
|
|
1438
1459
|
}
|
|
1439
1460
|
|
|
1440
|
-
class
|
|
1441
|
-
|
|
1442
|
-
|
|
1461
|
+
class SubscriptionPaymentFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription) {
|
|
1462
|
+
constructor(firestore, parentRepository) {
|
|
1463
|
+
super();
|
|
1464
|
+
this.firestore = firestore;
|
|
1465
|
+
this.parentRepository = parentRepository;
|
|
1466
|
+
this.collectionName = 'payments';
|
|
1467
|
+
this.parentIdField = 'subscriptionId';
|
|
1468
|
+
this.model = SubscriptionPayment;
|
|
1443
1469
|
}
|
|
1444
1470
|
}
|
|
1445
1471
|
|
|
1446
|
-
class
|
|
1447
|
-
constructor(firestore) {
|
|
1472
|
+
class UserAddressFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User) {
|
|
1473
|
+
constructor(firestore, parentRepository) {
|
|
1448
1474
|
super();
|
|
1449
1475
|
this.firestore = firestore;
|
|
1450
|
-
this.
|
|
1451
|
-
this.
|
|
1476
|
+
this.parentRepository = parentRepository;
|
|
1477
|
+
this.collectionName = 'address';
|
|
1478
|
+
this.parentIdField = 'userId';
|
|
1479
|
+
this.model = UserAddress;
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
class UserBeautyProfileFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User) {
|
|
1484
|
+
constructor(firestore, parentRepository) {
|
|
1485
|
+
super();
|
|
1486
|
+
this.firestore = firestore;
|
|
1487
|
+
this.parentRepository = parentRepository;
|
|
1488
|
+
this.collectionName = 'CX';
|
|
1489
|
+
this.parentIdField = 'userId';
|
|
1490
|
+
this.model = BeautyProfile;
|
|
1452
1491
|
}
|
|
1453
1492
|
}
|
|
1454
1493
|
|
|
1455
1494
|
class UserFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
1456
|
-
constructor(firestore
|
|
1495
|
+
constructor(firestore) {
|
|
1457
1496
|
super();
|
|
1458
1497
|
this.firestore = firestore;
|
|
1459
|
-
this.userSearchFirestoreRepository = userSearchFirestoreRepository;
|
|
1460
1498
|
this.collectionName = 'users';
|
|
1461
1499
|
this.model = User;
|
|
1462
1500
|
}
|
|
@@ -1473,7 +1511,7 @@ class UserFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
|
|
|
1473
1511
|
}
|
|
1474
1512
|
checkIfExistsByField(field, value) {
|
|
1475
1513
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1476
|
-
const result = yield this.
|
|
1514
|
+
const result = yield this.find({ filters: { [field]: value } });
|
|
1477
1515
|
return result.count > 0;
|
|
1478
1516
|
});
|
|
1479
1517
|
}
|
|
@@ -1517,39 +1555,6 @@ class UserFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
|
|
|
1517
1555
|
}
|
|
1518
1556
|
}
|
|
1519
1557
|
|
|
1520
|
-
class SubscriptionEditionFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription) {
|
|
1521
|
-
constructor(firestore, parentRepository) {
|
|
1522
|
-
super();
|
|
1523
|
-
this.firestore = firestore;
|
|
1524
|
-
this.parentRepository = parentRepository;
|
|
1525
|
-
this.collectionName = 'editions';
|
|
1526
|
-
this.parentIdField = 'subscriptionId';
|
|
1527
|
-
this.model = Edition;
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
class UserBeautyProfileFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User) {
|
|
1532
|
-
constructor(firestore, parentRepository) {
|
|
1533
|
-
super();
|
|
1534
|
-
this.firestore = firestore;
|
|
1535
|
-
this.parentRepository = parentRepository;
|
|
1536
|
-
this.collectionName = 'CX';
|
|
1537
|
-
this.parentIdField = 'userId';
|
|
1538
|
-
this.model = BeautyProfile;
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
class UserAddressFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User) {
|
|
1543
|
-
constructor(firestore, parentRepository) {
|
|
1544
|
-
super();
|
|
1545
|
-
this.firestore = firestore;
|
|
1546
|
-
this.parentRepository = parentRepository;
|
|
1547
|
-
this.collectionName = 'address';
|
|
1548
|
-
this.parentIdField = 'userId';
|
|
1549
|
-
this.model = UserAddress;
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
1558
|
class UserPaymentMethodFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User) {
|
|
1554
1559
|
constructor(firestore, parentRepository) {
|
|
1555
1560
|
super();
|
|
@@ -1561,26 +1566,6 @@ class UserPaymentMethodFirestoreRepository extends withSubCollection(withCrudFir
|
|
|
1561
1566
|
}
|
|
1562
1567
|
}
|
|
1563
1568
|
|
|
1564
|
-
class SubscriptionPaymentFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription) {
|
|
1565
|
-
constructor(firestore, parentRepository) {
|
|
1566
|
-
super();
|
|
1567
|
-
this.firestore = firestore;
|
|
1568
|
-
this.parentRepository = parentRepository;
|
|
1569
|
-
this.collectionName = 'payments';
|
|
1570
|
-
this.parentIdField = 'subscriptionId';
|
|
1571
|
-
this.model = SubscriptionPayment;
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
class LeadFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
1576
|
-
constructor(firestore) {
|
|
1577
|
-
super();
|
|
1578
|
-
this.firestore = firestore;
|
|
1579
|
-
this.collectionName = 'leads';
|
|
1580
|
-
this.model = Lead;
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
1569
|
class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
1585
1570
|
constructor(firestore) {
|
|
1586
1571
|
super();
|
|
@@ -2585,6 +2570,8 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
2585
2570
|
'sku',
|
|
2586
2571
|
'rate',
|
|
2587
2572
|
'tags',
|
|
2573
|
+
'type',
|
|
2574
|
+
'shoppingCount',
|
|
2588
2575
|
] }, ((options === null || options === void 0 ? void 0 : options.limit) ? { limits: { limit: options === null || options === void 0 ? void 0 : options.limit } } : {})));
|
|
2589
2576
|
products.push(...productsData);
|
|
2590
2577
|
return products;
|
|
@@ -2728,6 +2715,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
2728
2715
|
from: (value) => value.aggregate.avg.rate,
|
|
2729
2716
|
},
|
|
2730
2717
|
},
|
|
2718
|
+
{ shoppingCount: { columnName: 'shopping_count' } },
|
|
2731
2719
|
];
|
|
2732
2720
|
this.fields = [
|
|
2733
2721
|
...commonFields,
|
|
@@ -3155,5 +3143,5 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
3155
3143
|
* Generated bundle index. Do not edit.
|
|
3156
3144
|
*/
|
|
3157
3145
|
|
|
3158
|
-
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, FilterType, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, 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,
|
|
3146
|
+
export { AccessoryImportances, Address, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, Buy2Win, Buy2WinFirestoreRepository, Category, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, Coupon, CouponFirestoreRepository, CouponSubtypes, CouponTypes, DuplicatedResultsError, Edition, EditionStatus, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, FilterType, FragranceImportances, GenderDestination, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, NotFoundError, OfficePosition, Order, OrderFirestoreRepository, OrderStatus, Payment, PaymentFirestoreRepository, PaymentType, Product, ProductFirestoreRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, 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, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, WeakPasswordError, Where, isUUID, parseDateTime, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
3159
3147
|
//# sourceMappingURL=infrab4a-connect.js.map
|