trilium
    Preparing search index...
    api: Api = ...

    The code api global variable allows access to the backend script API, which is documented in Api.