[#468] added record auth verification, password reset and email change request event hooks

This commit is contained in:
Gani Georgiev
2022-12-03 14:50:02 +02:00
parent 02f72638b8
commit 604009bd10
22 changed files with 1013 additions and 142 deletions
+54 -24
View File
@@ -99,7 +99,7 @@ type SettingsUpdateEvent struct {
}
// -------------------------------------------------------------------
// Record API events data
// Record CRUD API events data
// -------------------------------------------------------------------
type RecordsListEvent struct {
@@ -129,6 +129,59 @@ type RecordDeleteEvent struct {
Record *models.Record
}
// -------------------------------------------------------------------
// Auth Record API events data
// -------------------------------------------------------------------
type RecordAuthEvent struct {
HttpContext echo.Context
Record *models.Record
Token string
Meta any
}
type RecordRequestPasswordResetEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordConfirmPasswordResetEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordRequestVerificationEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordConfirmVerificationEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordRequestEmailChangeEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordConfirmEmailChangeEvent struct {
HttpContext echo.Context
Record *models.Record
}
type RecordListExternalAuthsEvent struct {
HttpContext echo.Context
Record *models.Record
ExternalAuths []*models.ExternalAuth
}
type RecordUnlinkExternalAuthEvent struct {
HttpContext echo.Context
Record *models.Record
ExternalAuth *models.ExternalAuth
}
// -------------------------------------------------------------------
// Admin API events data
// -------------------------------------------------------------------
@@ -165,29 +218,6 @@ type AdminAuthEvent struct {
Token string
}
// -------------------------------------------------------------------
// Auth Record API events data
// -------------------------------------------------------------------
type RecordAuthEvent struct {
HttpContext echo.Context
Record *models.Record
Token string
Meta any
}
type RecordListExternalAuthsEvent struct {
HttpContext echo.Context
Record *models.Record
ExternalAuths []*models.ExternalAuth
}
type RecordUnlinkExternalAuthEvent struct {
HttpContext echo.Context
Record *models.Record
ExternalAuth *models.ExternalAuth
}
// -------------------------------------------------------------------
// Collection API events data
// -------------------------------------------------------------------