On this page
Names and aliases reference
Look up declaration naming and compatibility aliases.
Before you begin: Declarations reference.
FRL Names and Aliases
Function calls name their source: use $fn.helperName() for a theme helper, $admin.canEdit("shipments") for an admin helper, and str.trim(value) for a string helper. Only native language helpers such as must() use bare calls. A bare helperName() or canEdit() does not call a theme-defined function and is rejected. This applies in schema options, permissions, hooks, endpoints, jobs, and helper bodies.
User-defined FRL names use one rule across functions, function parameters, post types, schema fields, endpoints, and $secret config keys: start with a letter or _, then use letters, numbers, or _.
Underscore is allowed. Hyphen is not allowed in names because - is the subtraction operator. Use aliases for UI text that needs spaces, punctuation, title case, or other presentation wording. Alias text is not limited by the naming rule; quote it with "...", '...', or `...` when it contains punctuation or should be preserved exactly.
Rule input (JSON)
Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.
Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.
Aliases are UI metadata only. They do not rename the post type, field, endpoint, route path, config key, stored data, permission path, or query path. Alias keys are postType, postType.field, endpoint.<name>, $secret.<key>. The schema keyword itself cannot be aliased.
FRL keeps names strict on purpose:
| Rule | Why it helps |
|---|---|
| One identifier shape | The same naming rule works everywhere, so code, FQL paths, permissions, and admin labels do not drift. |
| Aliases are separate | Human labels can change without breaking stored data, route names, or theme JavaScript. |
| Duplicate declarations are rejected | Functions, post types, endpoints, profile rules, payment events, and endpoint dedupe rules cannot be declared twice. |
| Duplicate fields are rejected | A schema cannot quietly define the same field twice. |
| Duplicate object keys are rejected | Rule objects and schema rule objects cannot hide one value behind another value with the same key. |
| Reserved object names are rejected | Do not use __proto__, prototype, or constructor as function names, fields, params, object keys, or path properties. |
Use snake_case or camelCase for FRL names, then use as "Readable label" whenever humans will see the name.
Continue with Actions and endpoints reference.