-
- 概览
-
- 概览
- std/build
- std/build/billing
- std/build/billing/rate-card
- std/build/collection
- std/build/collection/record-label
- std/build/collection/system-fields
- std/build/date
- std/build/error
- std/build/finance
- std/build/finance/currency
- std/build/i18n
- std/build/i18n/catalog
- std/build/i18n/locale
- std/build/json
- std/build/rate-limit
- std/build/reckon
- std/build/reckon/cel.server
- std/build/reckon/definition
- std/build/reckon/deps
- std/build/reckon/hash
- std/build/reckon/ops
- std/build/reckon/register.server
- std/build/reckon/replay
- std/build/reckon/runtime.server
- std/build/secret
- std/build/string
- std/build/tree
std/build/reckon/cel.server
std/build/reckon/cel.server
Type Aliases
CustomOp
type CustomOp = object;Defined in: apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:23
Custom op registered via the engine's public extension API.
Properties
ReckonEnvironment
type ReckonEnvironment = object;Defined in: apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:9
A compiled CEL environment bound to a specific computation definition.
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
allRefs |
readonly |
Map<string, Set<string>> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:16 |
auditRef |
readonly |
AuditRef |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:19 |
compiled |
readonly |
Map<string, ConfirmationProps> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:18 |
definitionHash |
readonly |
string |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:17 |
exprDeps |
readonly |
Map<string, Set<string>> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:15 |
exprOrder |
readonly |
string[] |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:14 |
exprs |
readonly |
Record<string, string> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:12 |
id |
readonly |
string |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:10 |
outputs |
readonly |
ReadonlyArray<string> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:11 |
scopeRef |
readonly |
ScopeRef |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:20 |
tables |
readonly |
Record<string, InlinedTable> |
apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:13 |
Functions
createEnvironment()
function createEnvironment(def, customOps?): ReckonEnvironment;Defined in: apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:35
Create a Reckon environment for a computation definition.
Parses all exprs, extracts dependencies via AST walk, topo-sorts, and registers all ops (scalar + table-aware + fold) with audit/scope side channels.
Parameters
| Parameter | Type | Description |
|---|---|---|
def |
{ components?: { [key: string]: object; }; dependsOn?: readonly string[]; exprs: { [key: string]: string; }; id: string; outputs: readonly string[]; tables: { [key: string]: | { kind: "flat"; rows: readonly object[]; } | { kind: "tier"; rows: readonly object[]; } | { kind: "progressive"; rows: readonly object[]; } | { dimensions: readonly object[]; kind: "matrix"; rows: readonly object[]; }; }; } |
- |
def.components? |
{ [key: string]: object; } |
Optional mapping from output expr ids to payslip component metadata. |
def.dependsOn? |
readonly string[] |
Other computation definition ids whose outputs feed into this one's inputs. |
def.exprs? |
{ [key: string]: string; } |
Named CEL expressions. Each expr can reference inputs, other exprs, and registered ops. |
def.id? |
string |
Unique identifier for this definition. |
def.outputs? |
readonly string[] |
Which expr names are exposed as outputs. |
def.tables? |
{ [key: string]: | { kind: "flat"; rows: readonly object[]; } | { kind: "tier"; rows: readonly object[]; } | { kind: "progressive"; rows: readonly object[]; } | { dimensions: readonly object[]; kind: "matrix"; rows: readonly object[]; }; } |
Inlined rate/classification tables, keyed by name. Referenced in exprs via string literals. |
customOps? |
CustomOp[] |
- |
Returns
Throws
on parse errors or dependency cycles
validateDefinition()
function validateDefinition(def, customOps?):
| {
definitionHash: string;
ok: true;
order: readonly string[];
}
| {
errors: readonly object[];
ok: false;
};Defined in: apps/website/.api-docs-entry/std/build/reckon/cel.server.d.ts:44
Validate a computation definition without executing it.
Checks:
- All exprs parse as valid CEL
- No dependency cycles
- All declared outputs exist as exprs
Parameters
| Parameter | Type | Description |
|---|---|---|
def |
{ components?: { [key: string]: object; }; dependsOn?: readonly string[]; exprs: { [key: string]: string; }; id: string; outputs: readonly string[]; tables: { [key: string]: | { kind: "flat"; rows: readonly object[]; } | { kind: "tier"; rows: readonly object[]; } | { kind: "progressive"; rows: readonly object[]; } | { dimensions: readonly object[]; kind: "matrix"; rows: readonly object[]; }; }; } |
- |
def.components? |
{ [key: string]: object; } |
Optional mapping from output expr ids to payslip component metadata. |
def.dependsOn? |
readonly string[] |
Other computation definition ids whose outputs feed into this one's inputs. |
def.exprs? |
{ [key: string]: string; } |
Named CEL expressions. Each expr can reference inputs, other exprs, and registered ops. |
def.id? |
string |
Unique identifier for this definition. |
def.outputs? |
readonly string[] |
Which expr names are exposed as outputs. |
def.tables? |
{ [key: string]: | { kind: "flat"; rows: readonly object[]; } | { kind: "tier"; rows: readonly object[]; } | { kind: "progressive"; rows: readonly object[]; } | { dimensions: readonly object[]; kind: "matrix"; rows: readonly object[]; }; } |
Inlined rate/classification tables, keyed by name. Referenced in exprs via string literals. |
customOps? |
CustomOp[] |
- |
Returns
| {
definitionHash: string;
ok: true;
order: readonly string[];
}
| {
errors: readonly object[];
ok: false;
}