basalt / activity/src / ActivityOptions
Interface: ActivityOptions
Defined in: activity/src/index.ts:143
Properties
onRuleError?
> optional onRuleError?: (error, rule) => void
Defined in: activity/src/index.ts:172
Called when a rule throws. Default: a warning on the console.
A rule never rethrows. HookBus propagates to the emitter, which is right for an audit trail — a fact you failed to record must not be reported as recorded — and wrong for a readable feed: a history line that cannot be written must not fail the case closure that produced it.
Parameters
error
unknown
rule
Returns
void
rules?
> optional rules?: ActivityRule<string>[]
Defined in: activity/src/index.ts:163
Rules turning domain events into feed lines.
store?
> optional store?: ActivityStore
Defined in: activity/src/index.ts:144
tenantScoped?
> optional tenantScoped?: boolean | "required"
Defined in: activity/src/index.ts:161
Scope queries to ctx().tenant automatically. Default: true.
true(default): auto-scope when a tenant is in context — the context tenant always wins over a caller-suppliedquery.tenantId(it cannot widen the scope); with NO tenant in context an explicitquery.tenantIdis honoured, otherwise the query runs unscoped (fail-open, historical behavior).'required': fail-closed via @basaltkit/tenancy'srequireTenantId— the context tenant always wins (a caller-suppliedquery.tenantIdcannot widen the scope), an explicitquery.tenantIdis honoured when no tenant is in context, and otherwise the query THROWSTenantRequiredErrorinstead of silently returning every tenant's records. Recommended for tenant-facing apps.false: never auto-scope.