@@ -0,0 +1,16 @@
|
||||
import type { ResolvedRudderClientOptions } from '../client/RudderClientOptions.js';
|
||||
import type { EffectsCenter } from '../effects/EffectsCenter.js';
|
||||
|
||||
/**
|
||||
* RudderContext — the low-level surface every feature service depends on:
|
||||
* the HTTP transport, client options, and the effects bus.
|
||||
*
|
||||
* Built once by {@link RudderClient} and injected into each service. Services
|
||||
* depend on this narrow interface instead of on the client itself, so the
|
||||
* module graph stays acyclic (client → services → context, never back).
|
||||
*/
|
||||
export interface RudderContext {
|
||||
readonly options: ResolvedRudderClientOptions;
|
||||
readonly effects: EffectsCenter;
|
||||
request<TResponse>(method: string, path: string, body?: unknown): Promise<TResponse>;
|
||||
}
|
||||
Reference in New Issue
Block a user