Flowable App engine - how to create app definition?

Hi all, I have flowable integrated into my springboot project. I want to create a flowable app through the app engine in my code. Using this deployment method

val deployment = appRepositoryService.createDeployment()
                .name(" app Test")
                .key("test")
                .category("cat1")
                .addZipInputStream(inputStream)
                .deploy()

It was successfully deployed but it did not create an app definition. My question is how I can create an app definition / publish an app through my code (code is written in kotlin/java).