Class: RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:70
Programmatically construct Riviere architecture graphs.
Thin facade preserving the flat public API while delegating to focused domain classes internally.
Methods
addApi()
addApi(
input):APIComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:131
Adds an API component to the graph.
Parameters
input
API component properties
Returns
APIComponent
The created API component
addCustom()
addCustom(
input):CustomComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:190
Adds a Custom component to the graph.
Parameters
input
Custom component properties
Returns
CustomComponent
The created Custom component
addDomain()
addDomain(
input):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:111
Adds a new domain to the graph.
Parameters
input
Domain name and description
Returns
void
addDomainOp()
addDomainOp(
input):DomainOpComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:151
Adds a DomainOp component to the graph.
Parameters
input
DomainOp component properties
Returns
DomainOpComponent
The created DomainOp component
addEvent()
addEvent(
input):EventComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:161
Adds an Event component to the graph.
Parameters
input
Event component properties
Returns
EventComponent
The created Event component
addEventHandler()
addEventHandler(
input):EventHandlerComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:171
Adds an EventHandler component to the graph.
Parameters
input
EventHandler component properties
Returns
EventHandlerComponent
The created EventHandler component
addSource()
addSource(
source):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:102
Adds an additional source repository to the graph.
Parameters
source
SourceInfo
Source repository information
Returns
void
addUI()
addUI(
input):UIComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:121
Adds a UI component to the graph.
Parameters
input
UI component properties
Returns
UIComponent
The created UI component
addUseCase()
addUseCase(
input):UseCaseComponent
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:141
Adds a UseCase component to the graph.
Parameters
input
UseCase component properties
Returns
UseCaseComponent
The created UseCase component
build()
build():
RiviereGraph
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:294
Validates and returns the completed graph.
Returns
RiviereGraph
Valid RiviereGraph object
defineCustomType()
defineCustomType(
input):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:180
Defines a custom component type for the graph.
Parameters
input
Custom type definition
Returns
void
enrichComponent()
enrichComponent(
id,enrichment):void
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:200
Enriches a DomainOp component with additional domain details.
Parameters
id
string
The component ID to enrich
enrichment
State changes and business rules to add
Returns
void
link()
link(
input):Link
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:221
Creates a link between two components in the graph.
Parameters
input
Link properties including source, target, and type
Returns
Link
The created link
linkExternal()
linkExternal(
input):ExternalLink
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:231
Creates a link from a component to an external system.
Parameters
input
External link properties including target system info
Returns
ExternalLink
The created external link
nearMatches()
nearMatches(
query,options?):NearMatchResult[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:211
Finds components similar to a query for error recovery.
Parameters
query
Search criteria including partial ID, name, type, or domain
options?
Optional matching thresholds and limits
Returns
Array of similar components with similarity scores
orphans()
orphans():
string[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:267
Returns IDs of components with no incoming or outgoing links.
Returns
string[]
Array of orphaned component IDs
query()
query():
RiviereQuery
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:276
Returns a RiviereQuery instance for the current graph state.
Returns
RiviereQuery
RiviereQuery instance for the current graph
serialize()
serialize():
string
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:285
Serializes the current graph state as a JSON string.
Returns
string
JSON string representation of the graph
stats()
stats():
BuilderStats
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:249
Returns statistics about the current graph state.
Returns
Counts of components by type, domains, and links
validate()
validate():
ValidationResult
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:258
Runs full validation on the graph.
Returns
ValidationResult
Validation result with valid flag and error details
warnings()
warnings():
BuilderWarning[]
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:240
Returns non-fatal issues found in the graph.
Returns
Array of warning objects with type and message
new()
staticnew(options):RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:93
Creates a new builder with initial configuration.
Parameters
options
Configuration including sources and domains
Returns
RiviereBuilder
A new RiviereBuilder instance
resume()
staticresume(graph):RiviereBuilder
Defined in: packages/riviere-builder/src/features/building/domain/builder-facade.ts:83
Restores a builder from a previously serialized graph.
Parameters
graph
RiviereGraph
A valid RiviereGraph to resume from
Returns
RiviereBuilder
A new RiviereBuilder with the graph state restored