@punks/backend-entity-manager 0.0.147 → 0.0.149

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/dist/cjs/index.js CHANGED
@@ -2321,7 +2321,6 @@ class NestEntityManager {
2321
2321
  class NestEntitySerializer extends EntitySerializer {
2322
2322
  constructor(entityName, registry) {
2323
2323
  super(entityName);
2324
- // this.services = registry.resolveEntityServicesCollection(entityName)
2325
2324
  }
2326
2325
  }
2327
2326
 
@@ -20525,7 +20524,7 @@ let UserRegistrationHandler = class UserRegistrationHandler {
20525
20524
  passwordHash,
20526
20525
  passwordUpdateTimestamp: new Date(),
20527
20526
  });
20528
- await this.sendRegistrationEmail(user, input.callback, input.languageId);
20527
+ await this.sendRegistrationEmail(user, input.callback, input.languageCode);
20529
20528
  this.logger.debug(`User already exists but not verified. Sending new verification email: ${input.email} - ${input.userName}`, { user });
20530
20529
  return {
20531
20530
  success: true,
@@ -20538,7 +20537,7 @@ let UserRegistrationHandler = class UserRegistrationHandler {
20538
20537
  passwordHash,
20539
20538
  passwordUpdateTimestamp: new Date(),
20540
20539
  });
20541
- await this.sendRegistrationEmail(newUser, input.callback, input.languageId);
20540
+ await this.sendRegistrationEmail(newUser, input.callback, input.languageCode);
20542
20541
  this.logger.debug(`New user created: ${input.email} - ${input.userName}`, {
20543
20542
  user: newUser,
20544
20543
  });
@@ -21596,7 +21595,7 @@ exports.EntityManagerInitializer = EntityManagerInitializer_1 = class EntityMana
21596
21595
  const collection = new EmailTemplatesCollection();
21597
21596
  for (const emailTemplate of emailTemplates) {
21598
21597
  collection.registerTemplate(emailTemplate.meta.templateId, emailTemplate.discoveredClass.instance);
21599
- this.logger.log(`Entity manager email template ${emailTemplate.discoveredClass.name} registered 📧`);
21598
+ this.logger.log(`Entity manager email template ${emailTemplate.meta.templateId}: ${emailTemplate.discoveredClass.name} registered 📧`);
21600
21599
  }
21601
21600
  this.registry
21602
21601
  .getContainer()
@@ -22079,6 +22078,22 @@ class QueryBuilderBase {
22079
22078
  }
22080
22079
 
22081
22080
  class QueryClauseBuilder {
22081
+ enumFilter(filter) {
22082
+ const clauses = [];
22083
+ if (!!filter?.in) {
22084
+ clauses.push(typeorm.In(filter.in));
22085
+ }
22086
+ if (!!filter?.eq) {
22087
+ clauses.push(typeorm.Equal(filter.eq));
22088
+ }
22089
+ if (!!filter?.ne) {
22090
+ clauses.push(typeorm.Not(typeorm.Equal(filter.ne)));
22091
+ }
22092
+ if (!!filter?.notIn) {
22093
+ clauses.push(typeorm.Not(typeorm.In(filter.notIn)));
22094
+ }
22095
+ return typeorm.And(...clauses);
22096
+ }
22082
22097
  stringFilter(filter) {
22083
22098
  const clauses = [];
22084
22099
  if (!!filter?.gte) {