Skip to content

MantleApplication

Defined in: types.ts:341

batch(calls, params?, options?): Promise<BatchResult[]>

Defined in: types.ts:352

Dispatch many service calls concurrently (Promise.allSettled semantics) and return one BatchResult per call, in input order. Each call runs the target service’s full hook pipeline — batch is not a way to bypass authentication or validation. params (headers, user, provider — typically the outer HTTP request’s) is inherited by every call and merged with the call’s own params.query. One call failing does not fail the batch; there is no cross-call atomicity.

BatchCall[]

ServiceParams

BatchDispatchOptions

Promise<BatchResult[]>


channel(name): MantleChannel

Defined in: types.ts:360

string | string[]

MantleChannel


configure(plugin): this

Defined in: types.ts:353

MantlePlugin

this


emit(event, …args): void

Defined in: types.ts:359

string

…unknown[]

void


get<T>(key): T

Defined in: types.ts:355

T = unknown

string

T


off(event, listener): this

Defined in: types.ts:358

string

(…args) => void

this


on(event, listener): this

Defined in: types.ts:357

string

(…args) => void

this


publish<T>(publisher): this

Defined in: types.ts:361

T = unknown

ChannelPublisher<T>

this


service<T>(path): ServiceHandle<T>

Defined in: types.ts:343

T = unknown

string

ServiceHandle<T>


set(key, value): this

Defined in: types.ts:354

string

unknown

this


teardown(): Promise<void>

Defined in: types.ts:356

Promise<void>


use<T>(path, service, options?): this

Defined in: types.ts:342

T = unknown

string

Partial<Service<T>>

ServiceOptions

this