Your use of the onReady() function is incorrect. See $w.onReady() :: a guide for the perplexed .
Your function should not be using the onReady() function and would look something like this:
export function InputFirstName_keyPress_1(event) {
const results = SearchDatatbase ('IncallBookingDatabase',event.key);
console.log("results :" ,results.items[0].firstName);
}
Screen elements cannot be accessed from Public files using the $w context selector since a Public file does not have a page context. The following code that you posted will not work:
//Public BackOffice.js//
export function SearchDatatbase (dataBaseName,keypress){
let searchKey= $w('#InputFirstName').value; // invalid use of $w
Instead, you can pass the searchKey to the SearchDatatbase() function.