@infrab4a/connect 2.0.9 → 2.0.10

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.
@@ -2235,6 +2235,32 @@
2235
2235
  }(withUpdateFirestore(withGetFirestore(withFindFirestore(withDeleteFirestore(withCreateFirestore(MixinBase)))))));
2236
2236
  };
2237
2237
 
2238
+ var LeadFirestoreRepository = /** @class */ (function (_super) {
2239
+ __extends(LeadFirestoreRepository, _super);
2240
+ function LeadFirestoreRepository(firestore) {
2241
+ var _this = _super.call(this) || this;
2242
+ _this.firestore = firestore;
2243
+ _this.collectionName = 'leads';
2244
+ _this.model = Lead;
2245
+ return _this;
2246
+ }
2247
+ return LeadFirestoreRepository;
2248
+ }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2249
+
2250
+ var SubscriptionEditionFirestoreRepository = /** @class */ (function (_super) {
2251
+ __extends(SubscriptionEditionFirestoreRepository, _super);
2252
+ function SubscriptionEditionFirestoreRepository(firestore, parentRepository) {
2253
+ var _this = _super.call(this) || this;
2254
+ _this.firestore = firestore;
2255
+ _this.parentRepository = parentRepository;
2256
+ _this.collectionName = 'editions';
2257
+ _this.parentIdField = 'subscriptionId';
2258
+ _this.model = Edition;
2259
+ return _this;
2260
+ }
2261
+ return SubscriptionEditionFirestoreRepository;
2262
+ }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
2263
+
2238
2264
  var SubscriptionFirestoreRepository = /** @class */ (function (_super) {
2239
2265
  __extends(SubscriptionFirestoreRepository, _super);
2240
2266
  function SubscriptionFirestoreRepository(firestore) {
@@ -2247,40 +2273,53 @@
2247
2273
  return SubscriptionFirestoreRepository;
2248
2274
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2249
2275
 
2250
- var UserSearch = /** @class */ (function (_super) {
2251
- __extends(UserSearch, _super);
2252
- function UserSearch() {
2253
- return _super !== null && _super.apply(this, arguments) || this;
2276
+ var SubscriptionPaymentFirestoreRepository = /** @class */ (function (_super) {
2277
+ __extends(SubscriptionPaymentFirestoreRepository, _super);
2278
+ function SubscriptionPaymentFirestoreRepository(firestore, parentRepository) {
2279
+ var _this = _super.call(this) || this;
2280
+ _this.firestore = firestore;
2281
+ _this.parentRepository = parentRepository;
2282
+ _this.collectionName = 'payments';
2283
+ _this.parentIdField = 'subscriptionId';
2284
+ _this.model = SubscriptionPayment;
2285
+ return _this;
2254
2286
  }
2255
- Object.defineProperty(UserSearch, "identifiersFields", {
2256
- get: function () {
2257
- return ['id'];
2258
- },
2259
- enumerable: false,
2260
- configurable: true
2261
- });
2262
- return UserSearch;
2263
- }(BaseModel));
2287
+ return SubscriptionPaymentFirestoreRepository;
2288
+ }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), Subscription)));
2289
+
2290
+ var UserAddressFirestoreRepository = /** @class */ (function (_super) {
2291
+ __extends(UserAddressFirestoreRepository, _super);
2292
+ function UserAddressFirestoreRepository(firestore, parentRepository) {
2293
+ var _this = _super.call(this) || this;
2294
+ _this.firestore = firestore;
2295
+ _this.parentRepository = parentRepository;
2296
+ _this.collectionName = 'address';
2297
+ _this.parentIdField = 'userId';
2298
+ _this.model = UserAddress;
2299
+ return _this;
2300
+ }
2301
+ return UserAddressFirestoreRepository;
2302
+ }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2264
2303
 
2265
- var UserSearchFirestoreRepository = /** @class */ (function (_super) {
2266
- __extends(UserSearchFirestoreRepository, _super);
2267
- function UserSearchFirestoreRepository(firestore) {
2304
+ var UserBeautyProfileFirestoreRepository = /** @class */ (function (_super) {
2305
+ __extends(UserBeautyProfileFirestoreRepository, _super);
2306
+ function UserBeautyProfileFirestoreRepository(firestore, parentRepository) {
2268
2307
  var _this = _super.call(this) || this;
2269
2308
  _this.firestore = firestore;
2270
- _this.collectionName = 'userSearch';
2271
- _this.model = UserSearch;
2309
+ _this.parentRepository = parentRepository;
2310
+ _this.collectionName = 'CX';
2311
+ _this.parentIdField = 'userId';
2312
+ _this.model = BeautyProfile;
2272
2313
  return _this;
2273
2314
  }
2274
- return UserSearchFirestoreRepository;
2275
- }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2315
+ return UserBeautyProfileFirestoreRepository;
2316
+ }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2276
2317
 
2277
2318
  var UserFirestoreRepository = /** @class */ (function (_super_1) {
2278
2319
  __extends(UserFirestoreRepository, _super_1);
2279
- function UserFirestoreRepository(firestore, userSearchFirestoreRepository) {
2280
- if (userSearchFirestoreRepository === void 0) { userSearchFirestoreRepository = new UserSearchFirestoreRepository(firestore); }
2320
+ function UserFirestoreRepository(firestore) {
2281
2321
  var _this = _super_1.call(this) || this;
2282
2322
  _this.firestore = firestore;
2283
- _this.userSearchFirestoreRepository = userSearchFirestoreRepository;
2284
2323
  _this.collectionName = 'users';
2285
2324
  _this.model = User;
2286
2325
  return _this;
@@ -2315,7 +2354,7 @@
2315
2354
  var _a;
2316
2355
  return __generator(this, function (_b) {
2317
2356
  switch (_b.label) {
2318
- case 0: return [4 /*yield*/, this.userSearchFirestoreRepository.find((_a = {}, _a[field] = { operator: exports.Where.EQUALS, value: value }, _a))];
2357
+ case 0: return [4 /*yield*/, this.find({ filters: (_a = {}, _a[field] = value, _a) })];
2319
2358
  case 1:
2320
2359
  result = _b.sent();
2321
2360
  return [2 /*return*/, result.count > 0];
@@ -2378,48 +2417,6 @@
2378
2417
  return UserFirestoreRepository;
2379
2418
  }(withCrudFirestore(withHelpers(withFirestore(Base)))));
2380
2419
 
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
2420
  var UserPaymentMethodFirestoreRepository = /** @class */ (function (_super) {
2424
2421
  __extends(UserPaymentMethodFirestoreRepository, _super);
2425
2422
  function UserPaymentMethodFirestoreRepository(firestore, parentRepository) {
@@ -2434,32 +2431,6 @@
2434
2431
  return UserPaymentMethodFirestoreRepository;
2435
2432
  }(withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base))), User)));
2436
2433
 
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
2434
  var CategoryFirestoreRepository = /** @class */ (function (_super) {
2464
2435
  __extends(CategoryFirestoreRepository, _super);
2465
2436
  function CategoryFirestoreRepository(firestore) {
@@ -4846,7 +4817,6 @@
4846
4817
  exports.UserFirestoreRepository = UserFirestoreRepository;
4847
4818
  exports.UserPaymentMethod = UserPaymentMethod;
4848
4819
  exports.UserPaymentMethodFirestoreRepository = UserPaymentMethodFirestoreRepository;
4849
- exports.UserSearchFirestoreRepository = UserSearchFirestoreRepository;
4850
4820
  exports.Variant = Variant;
4851
4821
  exports.VariantHasuraGraphQL = VariantHasuraGraphQL;
4852
4822
  exports.VariantHasuraGraphQLRepository = VariantHasuraGraphQLRepository;