Glossary
Terms shared by every Arc implementation are defined once in the Arc glossary. This page adds the TypeScript names for them, and the terms only Arc for TypeScript has.
Commands
Section titled “Commands”- Command: a class decorated
@command()whose instancehandle()method carries out an intent. See Model-bound commands. handle(): the command’s method that decides and returns a response, events, operations, or nothing.provide(): an optional command method that runs after validation, beforehandle(), to load datahandle()needs; its return value ishandle()’s first argument.- Command key: the value that identifies what a command acts on, from
@key(),getKey(), or with Chronicle,getEventSourceId(). See Command context. - Command context: the command, its resolved key, request identity, and values, available to handlers through
commandContext(). See Command context. - Outcome: a value created by
response(...),rejected(...), ordenied(...)that ends a command with a response, a 400, or a 403. See Command outcomes. tuple(...): a return value that carries several values fromhandle(), at most one of which becomes the response.- Response value handler: a
CommandResponseValueHandlerthat consumes a returned value on the server, such as a Chronicle event. See Response value handlers. - Command operation: a returned
CommandOperationthat Arc executes and, after a known failure, compensates. See Command operations.
Queries
Section titled “Queries”- Read model: a class decorated
@readModel()whose static@query(...)methods are queries. See Model-bound queries. - Parameter descriptor:
argument(name, Type),service(token), orqueryOptions()in@query(...), telling Arc where each query parameter comes from. - Observable query: a query declared
@query({ observable: true }, ...)that returns an RxJS observable or an async iterable, served as a snapshot, server-sent events, or WebSocket frames. See Observable queries. queryPage(items, total, sorting?): the result a query returns when its data source has already cut the page. See Paging and sorting.- Read-model interceptor: a
@readModelInterceptor()class that transforms each read-model instance before it is encoded. See Intercept read models.
Types and validation
Section titled “Types and validation”- Field: a property declared with Fundamentals
@field(Type). Only declared fields are bound, validated, encoded, stored, and generated. See Concepts. - Concept: a class extending Fundamentals
ConceptAs<T>withstatic readonly valueType, wrapping one primitive domain value. See Concepts. - Validator: a class extending
CommandValidator,QueryValidator,ConceptValidator, orModelValidator, decorated@validator(Target), with rules declared byruleFor. See Command validation. - Allowed severity: the highest validation severity that does not block a command; over HTTP it is capped at Warning. See Validation severity filtering.
Services and hosting
Section titled “Services and hosting”- Application builder: the builder from
ArcApplication.createBuilder()where you add or discover artifacts, register services, and attach integrations beforebuild(). See Dependency injection. - Discovery:
builder.discover(folderUrl), which imports a folder and registers every exported, decorated artifact. - Service token: a class, or a
serviceToken<T>(name), that identifies a service in Arc’s container. - Generated metadata: the file
arc-proxygeneratorwrites so that a bare@query()orhandle()can infer its arguments and services. See Generated artifact metadata. ArcServer: the built pipeline that executes commands and queries; hosts andexecuteCommand,performQuery, andopenObservableQueryuse it. See Calling commands from code.- Host adapter:
cratisArcfrom@cratis/arc.express,@cratis/arc.fastify, or@cratis/arc.hono, which serves an Arc application inside that framework. See Host adapters. - Execution context: the tenant, principal, correlation ID, allowed severity, and cancellation signal of one request or direct call.
- Authentication handler: an ordered handler that turns a request into a principal, such as
jwtBearer(). See Authentication. - Identity details provider: an
@identityDetailsProvider()class whose result/.cratis/mereturns. See Identity.
Client
Section titled “Client”- Proxy: a generated TypeScript class for one command or query that the published
@cratis/arcclient executes. See Proxy generation. arc-proxygenerator: the CLI that reads decorated TypeScript source and writes proxies and generated metadata.
Chronicle
Section titled “Chronicle”- Returned event: an
@eventType()instance returned fromhandle(), which the integration appends. See Returning events. - Batch: the returned events of an outer command and its nested commands, appended together after the outer command succeeds. See Transactional commands.
- Concurrency scope: the expected tail of an event source, set by
{ concurrency: true },eventsWithConcurrencyScopes, or an aggregate. See Concurrency. - Subject: the compliance identity recorded on an appended event, from
getSubject(),@subject(),@eventSubject, or the event source ID. See Subject. - Aggregate root: a class extending
AggregateRoot, bound withcommandAggregate(Type), rehydrated from the command key’s events. See Aggregates. - Command read model: a read model loaded for the command’s key with
commandReadModel(Type)orreadModelForValidation(Type). See Read models in commands. - Reactor command: an Arc command returned from a Chronicle reactor and executed through the command pipeline. See Returning commands from a reactor.
Storage
Section titled “Storage”- Collection token:
mongoCollection(Type), the service token for the current tenant’s MongoDB collection. See Get started with MongoDB. - Naming policy: the
MongoNamingPolicythat decides stored property and collection names. See Naming policies. - Read handle:
drizzleReadModel(Type), a read-only SQL handle for queries;drizzleDatabase()is the writable counterpart for commands. See Get started with SQL. - Column codec: a conversion such as
guidCodecorconceptCodec, wrapped inpgColumn,mysqlColumn, orsqliteColumn. See Column types.