@platform/cell.client
Version:
A strongly typed HTTP client for operating with a CellOS service end-point.
24 lines (23 loc) • 651 B
JavaScript
import { HttpClient } from '../Client.http';
import { saveMonitor, typesystem } from '../Client.typesystem';
import { TypeSystem } from '../common';
let Client = (() => {
class Client {
static http(input) {
return Client.Http.create(input);
}
static env(env) {
return typesystem({
http: env.host,
event$: env.event$,
cache: env.cache,
});
}
}
Client.Http = HttpClient;
Client.TypeSystem = TypeSystem;
Client.saveMonitor = saveMonitor;
Client.typesystem = typesystem;
return Client;
})();
export { Client };