Merge commit

This commit is contained in:
Dean 2023-01-13 09:20:55 +00:00
parent 73fcbdbb6f
commit 7b3733d659
1 changed files with 16 additions and 0 deletions

View File

@ -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) {