Events

All events are published to AWS EventBridge (no RabbitMQ). Source: "user-service". Bus: EVENT_BUS_NAME env var.
Published via fastify.publishEvent({ type, data }) from @equinox/event-bridge-implementation plugin.


External Events (EventBridge — Published)

Event Type Source File Trigger Key Data Fields
usersCreated user.service.ts User creation success instanceId, identifier, email, username, firstName, lastName, type, status, createdAt, updatedAt, searchEnabled
userCreationFailed user.service.ts User creation failure instanceId, userCount, error, searchEnabled
userUpdated user.service.ts User profile update instanceId, storeId, identifier, email, username, firstName, lastName, type, status, updatedFields, searchEnabled
userUpdateFailed user.service.ts User update failure instanceId, storeId, id, errorCode, error, searchEnabled
userDeleted user.service.ts User deletion success instanceId, identifier, email, username, phone, type, status, searchEnabled
userDeletionFailed user.service.ts User deletion failure instanceId, userId, error, searchEnabled
userInvited admin.service.ts Admin invites user invitee data
user.roles.assigned admin.service.ts Roles assigned to user user + role data
userDeleted admin.service.ts Admin deletes user user data
instanceCreated instance.service.ts Instance creation success instance data
instanceCreationFailed instance.service.ts Instance creation failure error data
instancePropertiesUpdated instance.service.ts Instance property patch instance + diff data
consentHardDeleted consent.service.ts Consent template hard deleted instanceId, consentId, name, status, deletionType:"HARD"
consentSoftDeleted consent.service.ts Consent template soft deleted instanceId, consentId, name, status, deletionType:"SOFT", cascadedUserConsents
consentDeletionFailed consent.service.ts Consent deletion failure instanceId, consentId, error
listCreated list.service.ts List creation instanceId, list data
listUpdated list.service.ts List update list data
listDeleted list.service.ts List deletion list data
listItemCreated list.service.ts List item creation item data
listItemUpdated list.service.ts List item update item data
listItemDeleted list.service.ts List item deletion item data
guestListsMerged list.service.ts Guest-to-registered list migration merge summary
listShared list.service.ts List shared via email list + recipients data
payment.profile.created paymentProfile.service.ts Payment profile created profile data + timestamp
payment.profile.updated paymentProfile.service.ts Payment profile updated profile data + timestamp
payment.profile.disabled paymentProfile.service.ts Payment profile disabled profile data + timestamp
payment.profile.deleted paymentProfile.service.ts Payment profile deleted profile data + timestamp
userservice/addresses/create address.service.ts Address created instanceId, identifier, address data
userservice/addresses/create/failed address.service.ts Address creation failed instanceId, identifier, error
user.useraddressdeleted address.service.ts Address deleted instanceId, identifier, addressId
userservice/address/delete/failed address.service.ts Address deletion failed instanceId, identifier, addressId, error
userservice/addresses/update address.service.ts Address updated instanceId, identifier, address data
userservice/addresses/update/failed address.service.ts Address update failed instanceId, identifier, error

Note: The 6 address events above are defined in src/service/address.service.ts using fastify.eventPublisher which is not registered in the production Fastify plugin setup. These events are currently dead code — they will not fire in production until fastify.eventPublisher is wired up in app.ts.

EventBridge Envelope Structure

{
  "source": "user-service",
  "detail-type": "<eventType>",
  "detail": {
    "type": "<eventType>",
    "data": { "<eventPayload>" }
  },
  "eventBusName": "<EVENT_BUS_NAME>"
}

Consumed Events (Inbound)

Inbound events arrive via the EventBridge Lambda handler (/src/handler/eventbridge.handler.ts).

Detail Type Source Handler Action
app.* (e.g., app.enabled, app.disabled, app.config.updated) marketplace-service Marketplace event handler — updates installed connector configurations
role.created eq-authservices Creates Cognito IAM group for the new role
role.deleted eq-authservices Deletes Cognito IAM group for the deleted role
Any domain event (except app.* and role.*) user-service (self-emitted) createAsyncDispatchEventBridgeHandler routes all domain events (not just usersCreated/userUpdated) to sendNotification via the notification connector. Every mutation event also triggers Typesense re-indexing into eq-9-{instanceId}-user.

6.3 Payload Models (Key Events)

All events are wrapped in the EventBridge envelope shown in 6.1. The data field below is the detail.data payload.

usersCreated

Field Type Description
instanceId string Tenant ID
identifier string User UUID or Cognito UserSub
email string User email
username string Username
firstName string First name
lastName string Last name
type number 1=REGISTER, 2=GUEST, 3=SUBSCRIBE, 4=ADMIN
status string ACTIVE / NOT_ACTIVATED
createdAt string ISO timestamp
updatedAt string ISO timestamp
searchEnabled boolean Whether Typesense indexing is enabled

userUpdated

Field Type Description
instanceId string Tenant ID
storeId string Store identifier
identifier string User UUID or Cognito UserSub
email string User email
username string Username
firstName string First name
lastName string Last name
type number User type
status string User status
updatedFields string[] List of field names that changed
searchEnabled boolean Whether Typesense indexing is enabled

instancePropertiesUpdated

Field Type Description
instanceId string Tenant ID
name string Instance name
businessId number Tenant numeric ID
properties object Full updated properties object
updatedAt string ISO timestamp

payment.profile.created / payment.profile.updated / payment.profile.disabled / payment.profile.deleted

Field Type Description
instanceId string Tenant ID
identifier string User identifier
type string Payment type (CREDIT_CARD, etc.)
paymentToken string Tokenized payment method reference
cardBrand string Card brand
last4 string Last 4 digits
isDefault boolean Default payment method flag
timestamp string ISO timestamp of the event

app.enabled / app.disabled / app.config.updated (Inbound — marketplace events)

Field Type Description
instanceId string Tenant ID
appId string Marketplace app ID
capability string IAM / NOTIFICATION / PAYMENT / ADDRESS_VALIDATION
config object App configuration (connector-specific)
storeId string Store scope

Revision History
2026-08-04 | JP – Created the page and added the content.