Small fetch-based client used by every @appneurox/<service>-sdk and @appneurox/<brand>-sdk.
It has no runtime dependencies and works in Node 18+, browsers, React Native and edge runtimes.
import { createServiceClient } from '@appneurox/sdk-core';
// Standalone microservice
const tls = createServiceClient('tls-service', 'https://tls-service.appneurox.com', { token });
// Same module through a brand API (modular monolith mounts it under /tls-service)
const viaBrand = createServiceClient('tls-service', 'https://tls-service.appneurox.com',
{ monolithUrl: 'https://hostlyup-api.appneurox.com', token, tenantId });
await viaBrand.metadata();
await viaBrand.execute('certificate.issue', { hostname: 'shop.example.com' });
Failed requests throw ApiError with status, code and requestId from the server's
{ error: { code, message, requestId } } envelope. createHostClient({ baseUrl }) reads
/health/{live|ready|business}, /version and, on a modular monolith, /modules.