From 7b3733d659dc28f689c1144f05051fd4d2d1921a Mon Sep 17 00:00:00 2001 From: Dean Date: Fri, 13 Jan 2023 09:20:55 +0000 Subject: [PATCH] Merge commit --- .../backend-core/src/events/publishers/user.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/backend-core/src/events/publishers/user.ts b/packages/backend-core/src/events/publishers/user.ts index 2c83b267d6..92bce35896 100644 --- a/packages/backend-core/src/events/publishers/user.ts +++ b/packages/backend-core/src/events/publishers/user.ts @@ -13,6 +13,7 @@ import { UserPermissionAssignedEvent, UserPermissionRemovedEvent, UserUpdatedEvent, + UserOnboardingEvent, } from "@budibase/types" export async function created(user: User, timestamp?: number) { @@ -36,6 +37,21 @@ export async function deleted(user: User) { await publishEvent(Event.USER_DELETED, properties) } +export async function onboardingComplete(user: User) { + const properties: UserOnboardingEvent = { + userId: user._id as string, + } + await publishEvent(Event.USER_ONBOARDING_COMPLETE, properties) +} + +export async function onboardingProgress(user: User, step?: string) { + const properties: UserOnboardingEvent = { + userId: user._id as string, + step, + } + await publishEvent(Event.USER_ONBOARDING_STEP, properties) +} + // PERMISSIONS export async function permissionAdminAssigned(user: User, timestamp?: number) {