chore: Rename all event keys to uppercase (#7787)
* chore: Rename all event keys to uppercase * fix: Remove main entity from event builder
This commit is contained in:
@@ -175,7 +175,7 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
expect(eventBusSpy).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.invite_updated,
|
||||
eventName: UserEvents.INVITE_UPDATED,
|
||||
}),
|
||||
])
|
||||
})
|
||||
@@ -192,7 +192,7 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
expect(eventBusSpy).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.invite_token_generated,
|
||||
eventName: UserEvents.INVITE_TOKEN_GENERATED,
|
||||
}),
|
||||
])
|
||||
})
|
||||
@@ -221,19 +221,19 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
expect(eventBusSpy).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.invite_created,
|
||||
eventName: UserEvents.INVITE_CREATED,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
data: { id: "2" },
|
||||
eventName: UserEvents.invite_created,
|
||||
eventName: UserEvents.INVITE_CREATED,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.invite_token_generated,
|
||||
eventName: UserEvents.INVITE_TOKEN_GENERATED,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
data: { id: "2" },
|
||||
eventName: UserEvents.invite_token_generated,
|
||||
eventName: UserEvents.INVITE_TOKEN_GENERATED,
|
||||
}),
|
||||
])
|
||||
})
|
||||
|
||||
@@ -188,7 +188,7 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
expect(eventBusSpy).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.updated,
|
||||
eventName: UserEvents.USER_UPDATED,
|
||||
}),
|
||||
])
|
||||
})
|
||||
@@ -218,11 +218,11 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
expect(eventBusSpy).toHaveBeenCalledWith([
|
||||
expect.objectContaining({
|
||||
data: { id: "1" },
|
||||
eventName: UserEvents.created,
|
||||
eventName: UserEvents.USER_CREATED,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
data: { id: "2" },
|
||||
eventName: UserEvents.created,
|
||||
eventName: UserEvents.USER_CREATED,
|
||||
}),
|
||||
])
|
||||
})
|
||||
|
||||
@@ -115,7 +115,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
invites.map((invite) => ({
|
||||
eventName: UserEvents.invite_token_generated,
|
||||
eventName: UserEvents.INVITE_TOKEN_GENERATED,
|
||||
source: this.constructor.name,
|
||||
action: "token_generated",
|
||||
object: "invite",
|
||||
@@ -198,7 +198,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
users.map((user) => ({
|
||||
eventName: UserEvents.created,
|
||||
eventName: UserEvents.USER_CREATED,
|
||||
source: this.constructor.name,
|
||||
action: CommonEvents.CREATED,
|
||||
object: "user",
|
||||
@@ -238,7 +238,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
updatedUsers.map((user) => ({
|
||||
eventName: UserEvents.updated,
|
||||
eventName: UserEvents.USER_UPDATED,
|
||||
source: this.constructor.name,
|
||||
action: CommonEvents.UPDATED,
|
||||
object: "user",
|
||||
@@ -278,7 +278,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
invites.map((invite) => ({
|
||||
eventName: UserEvents.invite_created,
|
||||
eventName: UserEvents.INVITE_CREATED,
|
||||
source: this.constructor.name,
|
||||
action: CommonEvents.CREATED,
|
||||
object: "invite",
|
||||
@@ -289,7 +289,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
invites.map((invite) => ({
|
||||
eventName: UserEvents.invite_token_generated,
|
||||
eventName: UserEvents.INVITE_TOKEN_GENERATED,
|
||||
source: this.constructor.name,
|
||||
action: "token_generated",
|
||||
object: "invite",
|
||||
@@ -360,7 +360,7 @@ export default class UserModuleService
|
||||
|
||||
sharedContext.messageAggregator?.saveRawMessageData(
|
||||
serializedInvites.map((invite) => ({
|
||||
eventName: UserEvents.invite_updated,
|
||||
eventName: UserEvents.INVITE_UPDATED,
|
||||
source: this.constructor.name,
|
||||
action: CommonEvents.UPDATED,
|
||||
object: "invite",
|
||||
|
||||
Reference in New Issue
Block a user