@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
|
@@ -1774,6 +1774,7 @@
|
|
|
1774
1774
|
'weight',
|
|
1775
1775
|
'tags',
|
|
1776
1776
|
'hasVariants',
|
|
1777
|
+
'type'
|
|
1777
1778
|
];
|
|
1778
1779
|
return [4 /*yield*/, this.adapter.query('products/_search', Object.assign({ _source: fields, query: {
|
|
1779
1780
|
bool: {
|
|
@@ -2235,6 +2236,32 @@
|
|
|
2235
2236
|
}(withUpdateFirestore(withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))))));
|
|
2236
2237
|
};
|
|
2237
2238
|
|
|
2239
|
+
var LeadFirestoreRepository = /** @class */ (function (_super) {
|
|
2240
|
+
__extends(LeadFirestoreRepository, _super);
|
|
2241
|
+
function LeadFirestoreRepository(firestore) {
|
|
2242
|
+
var _this = _super.call(this) || this;
|
|
2243
|
+
_this.firestore = firestore;
|
|
2244
|
+
_this.collectionName = 'leads';
|
|
2245
|
+
_this.model = Lead;
|
|
2246
|
+
return _this;
|
|
2247
|
+
}
|
|
2248
|
+
return LeadFirestoreRepository;
|
|
2249
|
+
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
2250
|
+
|
|
2251
|
+
var SubscriptionEditionFirestoreRepository = /** @class */ (function (_super) {
|
|
2252
|
+
__extends(SubscriptionEditionFirestoreRepository, _super);
|
|
2253
|
+
function SubscriptionEditionFirestoreRepository(firestore, parentRepository) {
|
|
2254
|
+
var _this = _super.call(this) || this;
|
|
2255
|
+
_this.firestore = firestore;
|
|
2256
|
+
_this.parentRepository = parentRepository;
|
|
2257
|
+
_this.collectionName = 'editions';
|
|
2258
|
+
_this.parentIdField = 'subscriptionId';
|
|
2259
|
+
_this.model = Edition;
|
|
2260
|
+
return _this;
|
|
2261
|
+
}
|
|
2262
|
+
return SubscriptionEditionFirestoreRepository;
|
|
2263
|
+
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
|
|
2264
|
+
|
|
2238
2265
|
var SubscriptionFirestoreRepository = /** @class */ (function (_super) {
|
|
2239
2266
|
__extends(SubscriptionFirestoreRepository, _super);
|
|
2240
2267
|
function SubscriptionFirestoreRepository(firestore) {
|
|
@@ -2247,40 +2274,53 @@
|
|
|
2247
2274
|
return SubscriptionFirestoreRepository;
|
|
2248
2275
|
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
2249
2276
|
|
|
2250
|
-
var
|
|
2251
|
-
__extends(
|
|
2252
|
-
function
|
|
2253
|
-
|
|
2277
|
+
var SubscriptionPaymentFirestoreRepository = /** @class */ (function (_super) {
|
|
2278
|
+
__extends(SubscriptionPaymentFirestoreRepository, _super);
|
|
2279
|
+
function SubscriptionPaymentFirestoreRepository(firestore, parentRepository) {
|
|
2280
|
+
var _this = _super.call(this) || this;
|
|
2281
|
+
_this.firestore = firestore;
|
|
2282
|
+
_this.parentRepository = parentRepository;
|
|
2283
|
+
_this.collectionName = 'payments';
|
|
2284
|
+
_this.parentIdField = 'subscriptionId';
|
|
2285
|
+
_this.model = SubscriptionPayment;
|
|
2286
|
+
return _this;
|
|
2254
2287
|
}
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2288
|
+
return SubscriptionPaymentFirestoreRepository;
|
|
2289
|
+
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
|
|
2290
|
+
|
|
2291
|
+
var UserAddressFirestoreRepository = /** @class */ (function (_super) {
|
|
2292
|
+
__extends(UserAddressFirestoreRepository, _super);
|
|
2293
|
+
function UserAddressFirestoreRepository(firestore, parentRepository) {
|
|
2294
|
+
var _this = _super.call(this) || this;
|
|
2295
|
+
_this.firestore = firestore;
|
|
2296
|
+
_this.parentRepository = parentRepository;
|
|
2297
|
+
_this.collectionName = 'address';
|
|
2298
|
+
_this.parentIdField = 'userId';
|
|
2299
|
+
_this.model = UserAddress;
|
|
2300
|
+
return _this;
|
|
2301
|
+
}
|
|
2302
|
+
return UserAddressFirestoreRepository;
|
|
2303
|
+
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
|
|
2264
2304
|
|
|
2265
|
-
var
|
|
2266
|
-
__extends(
|
|
2267
|
-
function
|
|
2305
|
+
var UserBeautyProfileFirestoreRepository = /** @class */ (function (_super) {
|
|
2306
|
+
__extends(UserBeautyProfileFirestoreRepository, _super);
|
|
2307
|
+
function UserBeautyProfileFirestoreRepository(firestore, parentRepository) {
|
|
2268
2308
|
var _this = _super.call(this) || this;
|
|
2269
2309
|
_this.firestore = firestore;
|
|
2270
|
-
_this.
|
|
2271
|
-
_this.
|
|
2310
|
+
_this.parentRepository = parentRepository;
|
|
2311
|
+
_this.collectionName = 'CX';
|
|
2312
|
+
_this.parentIdField = 'userId';
|
|
2313
|
+
_this.model = BeautyProfile;
|
|
2272
2314
|
return _this;
|
|
2273
2315
|
}
|
|
2274
|
-
return
|
|
2275
|
-
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
2316
|
+
return UserBeautyProfileFirestoreRepository;
|
|
2317
|
+
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
|
|
2276
2318
|
|
|
2277
2319
|
var UserFirestoreRepository = /** @class */ (function (_super_1) {
|
|
2278
2320
|
__extends(UserFirestoreRepository, _super_1);
|
|
2279
|
-
function UserFirestoreRepository(firestore
|
|
2280
|
-
if (userSearchFirestoreRepository === void 0) { userSearchFirestoreRepository = new UserSearchFirestoreRepository(firestore); }
|
|
2321
|
+
function UserFirestoreRepository(firestore) {
|
|
2281
2322
|
var _this = _super_1.call(this) || this;
|
|
2282
2323
|
_this.firestore = firestore;
|
|
2283
|
-
_this.userSearchFirestoreRepository = userSearchFirestoreRepository;
|
|
2284
2324
|
_this.collectionName = 'users';
|
|
2285
2325
|
_this.model = User;
|
|
2286
2326
|
return _this;
|
|
@@ -2315,7 +2355,7 @@
|
|
|
2315
2355
|
var _a;
|
|
2316
2356
|
return __generator(this, function (_b) {
|
|
2317
2357
|
switch (_b.label) {
|
|
2318
|
-
case 0: return [4 /*yield*/, this.
|
|
2358
|
+
case 0: return [4 /*yield*/, this.find({ filters: (_a = {}, _a[field] = value, _a) })];
|
|
2319
2359
|
case 1:
|
|
2320
2360
|
result = _b.sent();
|
|
2321
2361
|
return [2 /*return*/, result.count > 0];
|
|
@@ -2378,48 +2418,6 @@
|
|
|
2378
2418
|
return UserFirestoreRepository;
|
|
2379
2419
|
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
2380
2420
|
|
|
2381
|
-
var SubscriptionEditionFirestoreRepository = /** @class */ (function (_super) {
|
|
2382
|
-
__extends(SubscriptionEditionFirestoreRepository, _super);
|
|
2383
|
-
function SubscriptionEditionFirestoreRepository(firestore, parentRepository) {
|
|
2384
|
-
var _this = _super.call(this) || this;
|
|
2385
|
-
_this.firestore = firestore;
|
|
2386
|
-
_this.parentRepository = parentRepository;
|
|
2387
|
-
_this.collectionName = 'editions';
|
|
2388
|
-
_this.parentIdField = 'subscriptionId';
|
|
2389
|
-
_this.model = Edition;
|
|
2390
|
-
return _this;
|
|
2391
|
-
}
|
|
2392
|
-
return SubscriptionEditionFirestoreRepository;
|
|
2393
|
-
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
|
|
2394
|
-
|
|
2395
|
-
var UserBeautyProfileFirestoreRepository = /** @class */ (function (_super) {
|
|
2396
|
-
__extends(UserBeautyProfileFirestoreRepository, _super);
|
|
2397
|
-
function UserBeautyProfileFirestoreRepository(firestore, parentRepository) {
|
|
2398
|
-
var _this = _super.call(this) || this;
|
|
2399
|
-
_this.firestore = firestore;
|
|
2400
|
-
_this.parentRepository = parentRepository;
|
|
2401
|
-
_this.collectionName = 'CX';
|
|
2402
|
-
_this.parentIdField = 'userId';
|
|
2403
|
-
_this.model = BeautyProfile;
|
|
2404
|
-
return _this;
|
|
2405
|
-
}
|
|
2406
|
-
return UserBeautyProfileFirestoreRepository;
|
|
2407
|
-
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
|
|
2408
|
-
|
|
2409
|
-
var UserAddressFirestoreRepository = /** @class */ (function (_super) {
|
|
2410
|
-
__extends(UserAddressFirestoreRepository, _super);
|
|
2411
|
-
function UserAddressFirestoreRepository(firestore, parentRepository) {
|
|
2412
|
-
var _this = _super.call(this) || this;
|
|
2413
|
-
_this.firestore = firestore;
|
|
2414
|
-
_this.parentRepository = parentRepository;
|
|
2415
|
-
_this.collectionName = 'address';
|
|
2416
|
-
_this.parentIdField = 'userId';
|
|
2417
|
-
_this.model = UserAddress;
|
|
2418
|
-
return _this;
|
|
2419
|
-
}
|
|
2420
|
-
return UserAddressFirestoreRepository;
|
|
2421
|
-
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
|
|
2422
|
-
|
|
2423
2421
|
var UserPaymentMethodFirestoreRepository = /** @class */ (function (_super) {
|
|
2424
2422
|
__extends(UserPaymentMethodFirestoreRepository, _super);
|
|
2425
2423
|
function UserPaymentMethodFirestoreRepository(firestore, parentRepository) {
|
|
@@ -2434,32 +2432,6 @@
|
|
|
2434
2432
|
return UserPaymentMethodFirestoreRepository;
|
|
2435
2433
|
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
|
|
2436
2434
|
|
|
2437
|
-
var SubscriptionPaymentFirestoreRepository = /** @class */ (function (_super) {
|
|
2438
|
-
__extends(SubscriptionPaymentFirestoreRepository, _super);
|
|
2439
|
-
function SubscriptionPaymentFirestoreRepository(firestore, parentRepository) {
|
|
2440
|
-
var _this = _super.call(this) || this;
|
|
2441
|
-
_this.firestore = firestore;
|
|
2442
|
-
_this.parentRepository = parentRepository;
|
|
2443
|
-
_this.collectionName = 'payments';
|
|
2444
|
-
_this.parentIdField = 'subscriptionId';
|
|
2445
|
-
_this.model = SubscriptionPayment;
|
|
2446
|
-
return _this;
|
|
2447
|
-
}
|
|
2448
|
-
return SubscriptionPaymentFirestoreRepository;
|
|
2449
|
-
}(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
|
|
2450
|
-
|
|
2451
|
-
var LeadFirestoreRepository = /** @class */ (function (_super) {
|
|
2452
|
-
__extends(LeadFirestoreRepository, _super);
|
|
2453
|
-
function LeadFirestoreRepository(firestore) {
|
|
2454
|
-
var _this = _super.call(this) || this;
|
|
2455
|
-
_this.firestore = firestore;
|
|
2456
|
-
_this.collectionName = 'leads';
|
|
2457
|
-
_this.model = Lead;
|
|
2458
|
-
return _this;
|
|
2459
|
-
}
|
|
2460
|
-
return LeadFirestoreRepository;
|
|
2461
|
-
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
2462
|
-
|
|
2463
2435
|
var CategoryFirestoreRepository = /** @class */ (function (_super) {
|
|
2464
2436
|
__extends(CategoryFirestoreRepository, _super);
|
|
2465
2437
|
function CategoryFirestoreRepository(firestore) {
|
|
@@ -3845,6 +3817,8 @@
|
|
|
3845
3817
|
'sku',
|
|
3846
3818
|
'rate',
|
|
3847
3819
|
'tags',
|
|
3820
|
+
'type',
|
|
3821
|
+
'shoppingCount',
|
|
3848
3822
|
] }, ((options === null || options === void 0 ? void 0 : options.limit) ? { limits: { limit: options === null || options === void 0 ? void 0 : options.limit } } : {})))];
|
|
3849
3823
|
case 1:
|
|
3850
3824
|
productsData = (_d.sent()).data;
|
|
@@ -4021,6 +3995,7 @@
|
|
|
4021
3995
|
from: function (value) { return value.aggregate.avg.rate; },
|
|
4022
3996
|
},
|
|
4023
3997
|
},
|
|
3998
|
+
{ shoppingCount: { columnName: 'shopping_count' } },
|
|
4024
3999
|
];
|
|
4025
4000
|
_this.fields = __spreadArray(__spreadArray([], __read(commonFields)), [
|
|
4026
4001
|
{
|
|
@@ -4846,7 +4821,6 @@
|
|
|
4846
4821
|
exports.UserFirestoreRepository = UserFirestoreRepository;
|
|
4847
4822
|
exports.UserPaymentMethod = UserPaymentMethod;
|
|
4848
4823
|
exports.UserPaymentMethodFirestoreRepository = UserPaymentMethodFirestoreRepository;
|
|
4849
|
-
exports.UserSearchFirestoreRepository = UserSearchFirestoreRepository;
|
|
4850
4824
|
exports.Variant = Variant;
|
|
4851
4825
|
exports.VariantHasuraGraphQL = VariantHasuraGraphQL;
|
|
4852
4826
|
exports.VariantHasuraGraphQLRepository = VariantHasuraGraphQLRepository;
|