Especially for small or internal projects, where you create both the backend and the frontend code, this is all you need to create a web app.
If a sherpa API lives at https://www.sherpadoc.org/example/ (try it!), just add "sherpa.js" to load the library: https://www.sherpadoc.org/example/sherpa.js. It exports an object "example" and contains all exported functions and a field "_sherpa" with basic information about this sherpa API. The functions can be called and will return a "thenable": An object on which you can call ".then()" to register a success and error handler.
On error, you error handler will be called with an error object. This object contains a field "code" (a string, to be used in your error handler, the API documentation will explain which errors can happen), and a field "message" (human-readable, for display to the end-user).
Note: Thenable are not full promises. Not all browsers support promises natively. However, you can easily turn sherpa's thenable into promises (or something similar): Set the variable "_wrapThenable" on the sherpa API object to a function that takes a thenable as parameter, and that returns a promise(-like) object of your choosing. For example, your function could return "new Promise(thenable)", or if you use angularjs, you can add a line "example._wrapThenable = $q;".
Sherpa documentation now contains type information about parameters/return values of API functions. You can use this type information to generate a typescript library that exports those functions along with their types. This lets you typesafely use a sherpa API. Sherpats is the tool that reads sherpadoc and writes a typescript module.
sherpats < example.json > example.ts
Want to consume a sherpa API from another language? Have a look at the list of sherpa implementations.