@punks/backend-entity-manager 0.0.53 → 0.0.55

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
@@ -90,7 +90,7 @@ exports.SortDirection = void 0;
90
90
  const PLATFORM_EVENT_NAMESPACE = "platform";
91
91
  const PlatformEvents = {
92
92
  Messaging: {
93
- EmailSent: `${PLATFORM_EVENT_NAMESPACE}.messaging:email.sent`,
93
+ EmailSent: `${PLATFORM_EVENT_NAMESPACE}:messaging.emailSent`,
94
94
  },
95
95
  };
96
96
 
@@ -233,11 +233,11 @@ class OperationTokenMismatchError extends AuthenticationError {
233
233
 
234
234
  const AUTHENTICATION_EVENTS_NAMESPACE = "authentication";
235
235
  const AuthenticationEvents = {
236
- UserLogin: `${AUTHENTICATION_EVENTS_NAMESPACE}.user.login`,
237
- UserRegistrationStarted: `${AUTHENTICATION_EVENTS_NAMESPACE}.user.registrationStarted`,
238
- UserRegistrationCompleted: `${AUTHENTICATION_EVENTS_NAMESPACE}.user.registrationCompleted`,
239
- UserPasswordResetStarted: `${AUTHENTICATION_EVENTS_NAMESPACE}.user.passwordResetStarted`,
240
- UserPasswordResetCompleted: `${AUTHENTICATION_EVENTS_NAMESPACE}.user.passwordResetCompleted`,
236
+ UserLogin: `${AUTHENTICATION_EVENTS_NAMESPACE}:user.login`,
237
+ UserRegistrationStarted: `${AUTHENTICATION_EVENTS_NAMESPACE}:user.registrationStarted`,
238
+ UserRegistrationCompleted: `${AUTHENTICATION_EVENTS_NAMESPACE}:user.registrationCompleted`,
239
+ UserPasswordResetStarted: `${AUTHENTICATION_EVENTS_NAMESPACE}:user.passwordResetStarted`,
240
+ UserPasswordResetCompleted: `${AUTHENTICATION_EVENTS_NAMESPACE}:user.passwordResetCompleted`,
241
241
  };
242
242
 
243
243
  /******************************************************************************
@@ -18964,6 +18964,25 @@ exports.EventsService = __decorate([
18964
18964
  __metadata("design:paramtypes", [exports.EntityManagerRegistry])
18965
18965
  ], exports.EventsService);
18966
18966
 
18967
+ exports.TrackingService = class TrackingService {
18968
+ constructor(registry) {
18969
+ this.registry = registry;
18970
+ }
18971
+ async trackEvent(event) {
18972
+ await this.tracker.track(event);
18973
+ }
18974
+ get tracker() {
18975
+ return this.registry
18976
+ .getContainer()
18977
+ .getEntitiesServicesLocator()
18978
+ .resolveEventsTracker();
18979
+ }
18980
+ };
18981
+ exports.TrackingService = __decorate([
18982
+ common.Injectable(),
18983
+ __metadata("design:paramtypes", [exports.EntityManagerRegistry])
18984
+ ], exports.TrackingService);
18985
+
18967
18986
  let AuthenticationServicesResolver = class AuthenticationServicesResolver {
18968
18987
  registerUsersService(usersService) {
18969
18988
  this.usersService = usersService;
@@ -19518,6 +19537,7 @@ const Services = [
19518
19537
  exports.EntityManagerService,
19519
19538
  exports.EmailService,
19520
19539
  exports.EventsService,
19540
+ exports.TrackingService,
19521
19541
  ];
19522
19542
 
19523
19543
  const IoC = [exports.EntityManagerRegistry];