In that setup, how do you write a test which acts against a mock version of your API client (a static function in your proposal?)
Run a copy of the server in a container, run client E2E tests against it.
The mock itself may simply be a new type defined in your test case.
You certainly would want to use an `interface` and that means you need an object. It could be an object that has no fields though and receives all data through its methods.
But it does go against the spirit of objects: You want to make use of `this` because you are in the land of nouns.