move events to the API package


Signed-off-by: Sleaker <sleaker@gmail.com>