Skip to content

lead-v0.5.0

Choose a tag to compare

@marcjulian marcjulian released this 04 Jun 09:12
· 29 commits to main since this release

Breaking changes

This release includes breaking changes for the database schema and hooks in the server plugin.

The database schema is updated as following:

  • email set to optional
  • userId added as optional and unique as relation to the user
  • emailVerified renamed to confirmed
  • verificationEmailSentAt renamed to confirmationSentAt

The lead plugin options where updated too

  • sendVerificationEmail renamed to sendConfirmationEmail - email as additional parameter as for user leads the userId is used
  • onEmailVerified renamed to onConfirmed

User-relation

A lead can now be either an email or connected to a user.

subscribe takes email as optional parameter, when the email is provided a lead is created with that email.
If the email is skipped, it checks for a valid user session and a lead is created for the user.

A lead, either email or user, needs to be confirmed.

Admin list endpoint

Adding a new option admin to enable a new list endpoint to fetch all leads. This endpoint checks if the admin plugin is available and verifies the user session to have one of the allowed roles.

Full Changelog: lead-v0.4.3...lead-v0.5.0