Skip to Content
Config SystemGenerated Configuration Reference

Generated Configuration Reference

Every declaration foir.config.ts is written against, emitted from the types the CLI checks it with.

This is the exhaustive list. The Configuration Reference beside it is the one to read first: it carries the worked examples and the explanation of what a model, a lookup or a quota rule is for, which a type declaration cannot hold. This page exists so the exhaustive half is never the half that falls behind.

A member marked optional may be omitted. A member marked destination may differ between the named projects one config declares; every other member must be identical between them.

FieldPlacement

Where a field is edited, as distinct from what it holds. Most fields are content — what the record SAYS — and belong on the editor’s main form. A field that says where the record sits or how it is handled reads as noise beside the prose, so settings moves it to the record’s Settings tab instead. Presentation only: nothing about validation, storage or the published schema changes with it.

type FieldPlacement = 'content' | 'settings'

SelectFieldConfig

MemberType
optionModelKeystringrequired
multiplebooleanoptional
optionsneveroptional
placementFieldPlacementoptional

EnumFieldOption

MemberType
labelstringrequired
valuestringrequired

EnumFieldConfig

enum is config-only: the storefront receives a typed string-literal union from inline {label, value} options. Variant overrides apply; locale overrides do not.

MemberType
optionsEnumFieldOption[]required
multiplebooleanoptional
defaultstring | string[]optional
placementFieldPlacementoptional

FieldGuardInput

Which sides of a field are guarded. A guarded side is read, or written, only by a holder of the grant that names the field: records:read:<model>.<field> or records:write:<model>.<field>, at a reach that covers the record. A grant on the model does not reach a guarded side, and one on every owner’s records of every model does. Give the field’s grants to the roles, keys and operations that read or write it. Omit for a field that follows its model.

MemberType
readbooleanoptional
writebooleanoptional

SelectFieldDefinitionInput

type SelectFieldDefinitionInput = BaseFieldDefinitionInput & { type: 'select'; config: SelectFieldConfig; }

EnumFieldDefinitionInput

type EnumFieldDefinitionInput = BaseFieldDefinitionInput & { type: 'enum'; config: EnumFieldConfig; }

FieldRelationshipInput

Relationship declaration on a reference field. composition makes records of this model OWNED BY their referenced parent — a single-valued foreign key with ON DELETE CASCADE: sharing and deletes (and later ownership) cascade parent → child. Only valid on a single (non-multiple) reference. association (the default) is a plain reference; the target keeps its own access + lifecycle. association_read is an association that ALSO lets whoever can read the referenced record read the referring one — read-only, one hop. hierarchy makes the field the model’s tree edge: foir answers path and ancestors by walking it, at most one per model and single-valued; its referenceTypes are unconstrained, since a parent need not share the child’s model. inverse names the reverse traversal (parent → children, e.g. a note’s blocks). The platform validates these at push (e.g. composition on a multiple reference is rejected).

MemberType
kind'composition' | 'association' | 'association_read' | 'hierarchy'required
inversestringoptional

ReferenceFieldConfig

MemberType
referenceTypesstring[]optionalModels this reference may target. Empty ⇒ any record-bearing model.
unionNamestringoptionalThe name of the GraphQL union a reference to two or more models returns. Omitted, the union is named from its models (page and product give PageProductRef), which moves when the models do and which a model key can land on. A name given here stays put. Only for two or more referenceTypes: a reference to one model returns that model’s own type, and the platform refuses a name with nothing to name. Two fields may give one name only over the same models.
multiplebooleanoptionalMany-valued reference. Composition is invalid when true.
relationshipFieldRelationshipInputoptional
placementFieldPlacementoptional

ReferenceFieldDefinitionInput

type ReferenceFieldDefinitionInput = BaseFieldDefinitionInput & { type: 'reference'; config?: ReferenceFieldConfig; }

FieldDefinitionInput

type FieldDefinitionInput = | SelectFieldDefinitionInput | EnumFieldDefinitionInput | ReferenceFieldDefinitionInput | GenericFieldDefinitionInput

LookupDefinitionInput

Lookup definition — declares one indexed access path on a model. keyBy is the ordered list of top-level scalar field keys that make up the lookup key. Single-field lookups are common; composites are first-class (e.g. ['fromHost', 'fromPath'] for a redirect model). name overrides the generated GraphQL query field name; omit it to use <typeLowerCamel>By<PascalCaseKeyFields>. Validation runs server-side via the platform’s config-write RPC — see RFC §Data model → Constraints. The CLI does no local validation here; the server’s structured error surfaces verbatim on failure.

MemberType
keyBystring[]required
namestringoptional

AccessInput

Per-model access policy: the unified resource-access primitive’s BROAD layer. Mirrors the console’s model “Owner” plane control and the platform models.v1.AccessConfig. Declared here, it is reconciled into the model’s config by foir push, and takes effect for the published channel when the model is published; omit access entirely for a project-owned model, whose default visibility follows the rule on defaultVisibility below.

MemberType
ownerPlane'user' | 'project' | 'organization'requiredWhich plane owns records of this model: - 'user': owned by a person: the one the write names as the owner, else the person who writes it. Per-owner RLS isolation, private response-cache, per-owner lookups. Required for a per-user singleton. - 'project' — no individual owner; records belong to the project. The platform default. - 'organization' — owned by one of the project’s ORGANIZATIONS (the tenants of a SaaS built on this project). Ownership, not containment: the row stays in the project plane, so the project credential finds every organization’s rows — which is how a multi-tenant app resolves <sub>.theapp.com to an org before it knows which org the request is for. Written by the project (never for a person), owner named by ownerId or by the org the caller acts in (X-Org-Id); singleton means one record per organization. Refused on a project with no organizations and on a shared (layered/group) model.
defaultVisibility'private' | 'public'optionalVisibility new records start at (the record descriptor modes): - 'private' — only the owner and explicit grants. - 'public' — readable by anyone with API access, including signed-in users on the public API. On a PROJECT-plane model, omitting this defaults to 'public' at CREATION — project content is meant to be read, and 'private' there does not mean what it looks like: a project record has no owner, so it stays readable by anonymous and server-side callers while being hidden from signed-in users. Set 'private' explicitly to opt a project model out. The default is applied by the platform, at the create path only. Omitting it on a model that already exists means “leave it alone” — it will not reset a visibility you changed in the console. Owned planes (user, organization) are always private (the platform rejects a public default there) regardless of this value.

ApplyConfigModelInput

MemberType
keystringrequired
namestringrequired
pluralNamestringoptional
pluralKeystringoptional
descriptionstringoptional
fieldsFieldDefinitionInput[]optional
configRecord<string, unknown>optional
accessAccessInputoptionalPer-model access policy (owner plane + default visibility). Reconciled into the model’s config by foir push, matching the console’s “Owner” plane control. Omit to leave the model at the platform default (project-owned).
lookupsLookupDefinitionInput[]optionalLookup definitions for this model. Server validates: existence / scalar-type / top-level-only / caps (4 lookups, 4 fields) / GraphQL field-name regex for name. See RFC §Data model (config surface).

QuotaRule

MemberType
segmentKeystringoptionalSegment key to target (empty string or omitted = default/fallback).
pointsnumberrequiredMax requests allowed in the window (0 = unlimited).
durationnumberrequiredWindow duration in seconds (3600=1hr, 86400=1day, 604800=7day, 2592000=30day).
scope'user' | 'actor' | 'tenant'requiredWhose counter a run is charged to: user, the person the run is for; actor, whoever started it; or tenant, the workspace.
conditionRecord<string, unknown>optionalOptional rule expression condition.
expiresAtstringoptionalOptional expiry — rule is ignored after this date (ISO 8601).
messagestringoptionalCustom message returned when this rule’s quota is exhausted (e.g., upgrade CTA).
failClosedbooleanoptionalRefuse the caller when this rule cannot be evaluated, instead of letting them through. Defaults to false, which is the behaviour every rule had before this field existed: if the meter is unreadable the request is allowed. Set it on a rule that protects something expensive, where serving an unmetered request costs more than refusing a legitimate one. It does not cover every failure. A rule whose own counter is unreadable refuses; a failure to load the rules at all has no rule to consult and still allows.

ApplyConfigOperationInput

MemberType
keystringrequired
namestringrequired
descriptionstringoptional
iconstringoptional
categorystringoptional
endpointstringoptional, destinationHTTP endpoint URL that the platform calls when this operation is triggered.
isActivebooleanoptional
timeoutMsnumberoptional
inputSchemaRecord<string, unknown>optional
outputSchemaRecord<string, unknown>optional
quotas{ rules: QuotaRule[] }optionalUsage quota rules (rate limits per user, actor or tenant).
retryPolicyRecord<string, unknown>optionalRetry policy for failed executions.
allowedPermissionsstring[]optionalPermissions a console user must hold to execute this operation. CONJUNCTIVE: the caller must hold EVERY permission listed, so adding one always narrows who may execute. Omit or pass [] for no gate. Each entry is a permission as the role editor names it, with its reach where it has one, e.g. ['records:write.all', 'models:write']. An entry that is not a permission a console role can hold is refused when the config is pushed. Replaced allowedRoles, which named role KEYS. Role keys are yours to choose, so renaming a role silently changed who could execute.
preconditionPreconditionoptionalPrecondition that must be met before execution (e.g., segment membership).
mode'sync' | 'async'optionalExecution mode the operation supports. sync is a direct call: the platform calls the endpoint and returns its answer to the caller, bounded by the operation’s timeoutMs, and the answer is the result. async dispatches with 202-ack semantics: the extension returns 202 immediately and calls back via the typed GraphQL mutation when work completes. Use async for work nobody waits on, or that runs longer than a caller can. There is only one flavour of async on the platform: the callback-based handshake. Every ASYNC dispatch carries a scoped callback token and the platform tracks the execution to terminal state. Default: sync. The CLI maps this to supportsAsync on the platform Operation row; the operation can still be called in SYNC mode at runtime when callers want a blocking call.
callbackTtlSecondsnumberoptionalHow long the platform waits for a callback before marking the execution timed_out and (per retry policy) re-queueing or sending to DLQ. Omit for the platform default of 24h. Clamped to [5m, 7d]. Only meaningful when mode === 'async'.
callbackTimeoutRetryPolicy{ maxRetries?: number }optionalRetry policy applied specifically when the callback times out. Distinct from retryPolicy, which governs HTTP dispatch failures (network, 5xx). Splitting these lets users retry dispatch failures aggressively while being conservative about callback timeouts — re-running an hour-long job that timed out because the upstream was slow tends to burn another hour and hit the same slowness. Shape mirrors retryPolicy ({ maxRetries }). Falls back to retryPolicy when unset, then to the watchdog default (3). Set { maxRetries: 0 } to opt out of retry on timeout entirely.
grantsstring[]optionalWhat the operation may do when its endpoint calls back into Foir, as grants in the permission catalogue’s names. Its dispatch token carries them, and so does the token for its callback window: nothing more. A record permission names its model: records:read:<model_key>, records:write:<model_key>, records:create:<model_key>, records:delete:<model_key>, records:publish:<model_key>. The write changes a record that is there and the create makes one, so an operation that does both declares both. List every model the operation touches. Ownership, records:attribute:<model_key> (or records:attribute for every model), lets the operation name the user a record belongs to when it creates one (create<Model>(input, ownerId)) and hand a record to another user (set<Model>Owner). It is held only by an operation: no API key of any type can be minted with it. The rest are written as the catalogue writes them: embeddings:read, embeddings:write, files:read, files:write, users:create (create a user, such as the buyer at a guest checkout), users:read.named (read one user the operation names, by id or by their exact email address), users:read.all (that, and the list), notifications:write.named (notify the project’s users; an operation acting for a user notifies that user alone, and one at an organisation reaches only its users), status:write, and secrets:read. A grant an operation may not declare is refused at push, by name. The whole list is at https://docs.foir.dev/api/operation-permissions . operations:complete is added to a callback token by the platform, so never declare it here. Omitting grants (or passing an empty array) mints a token that carries nothing, which suits an operation whose endpoint never calls back.
readOnlybooleanoptionalThe operation changes nothing. An agent calls a read-only operation without an approval, so it may declare only grants that read: a push that marks an operation read-only and gives it a write is refused. Declared, never read from kind: a query may still write.
kind'mutation' | 'query' | 'field'optionalHow the operation surfaces in the public GraphQL schema and how it is dispatched. mutation (default) is the existing behaviour: an executeXxx root mutation dispatched via the worker queue. query registers a root Query field resolved synchronously in-process. field attaches a resolver field to attachedToModel, batched per request. QUERY/FIELD operations are the new “resolver” kind and use requestTemplate / responseTransform to call an upstream endpoint. A mutation with a requestTemplate is a pass-through write, called SYNC.
attachedToModelstringoptionalModel key the resolver field attaches to. Required (and only meaningful) when kind === 'field'.
parentFieldsstring[]optionalFields of the attachedToModel record sent to the resolver, where the request template reads them as {{parent.X}}. Only the fields named here are sent. FIELD only.
cacheControl{ scope: 'PUBLIC' | 'PRIVATE' | 'NO_CACHE'; maxAge?: number }optionalCache-control for QUERY / FIELD resolver results. scope selects the cache audience; maxAge is the freshness window in seconds.
secretBindingsArray<{ name: string; secretRef: string }>optionalMaps {{secret.NAME}} placeholders in the request template to PROJECT-owned secrets. The dispatcher resolves plaintext at call time; it is never stored on the operation row.
requestTemplate{ method?: string; pathTemplate?: string; query?: Record<string, string>; headers?: Record<string, string>; bodyTemplate?: string; batchCapable?: boolean; }optionalThe request Foir makes to a third-party host itself, for QUERY / FIELD operations and for a mutation called SYNC (a pass-through write, which cannot run ASYNC or from a hook). Template variables {{input.X}}, {{parent.X}}, {{secret.NAME}}, {{context.X}} are filled in at call time, each escaped for where it stands; {{context.idempotencyKey}} is the key the caller sent. The host is sent only what the template writes: no Foir token. Set batchCapable to send one upstream request for the whole deduped input set.
responseTransformstringoptionaljq-style transform applied to the upstream response before it is returned to the caller: a QUERY / FIELD operation’s, or a templated mutation’s.

ApplyConfigContextDimensionInput

A context dimension — the home for segments. sourceType: 'segment' carries an evaluationRules RuleExpression (evaluated fresh at request time into segment.<key>); sourceType: 'model' designates a user-context source model via sourceModelKey; sourceType: 'request' is a value the application sends in the contexts argument of a read, one of the records of the model sourceModelKey names. Reconciled config-scoped by foir push (owned via config_id): dimensions this config declares are created / updated, and config-owned dimensions dropped from the config are deleted.

MemberType
keystringrequired
namestringrequired
descriptionstringoptional
sourceTypestringrequired‘segment’ (rule-based) | ‘model’ (user-context source) | ‘request’ (a value sent with the read) | custom.
evaluationRulesRecord<string, unknown>optionalSegment rule (sourceType ‘segment’) — a RuleExpression object.
sourceModelKeystringoptionalThe model the dimension is backed by. For sourceType ‘model’, a user-owned singleton. For sourceType ‘request’, a model whose records belong to the project as a whole: each record’s natural key is one value.
defaultRecordKeystringoptional

ApplyConfigLocaleInput

A project locale. Natural key is the locale code (e.g. “en-GB”). Reconciled by foir push — declared locales are created / updated. Locales are also console-editable and carry no config ownership, so a push never DELETES a locale it did not declare (create/update only).

MemberType
localestringrequiredBCP-47 locale code, immutable after create (e.g. “en”, “fr-CA”).
displayNamestringrequired
nativeNamestringoptional
isDefaultbooleanoptional
isActivebooleanoptional
isRtlbooleanoptional
fallbackLocalestringoptionalLocale code to fall back to when a translation is missing.

ApplyConfigVariantCatalogEntryInput

A variant-catalog entry — a named targeting definition. Natural key is key. Reconciled by foir push (create/update only, same rationale as locales).

MemberType
keystringrequired
namestringrequired
descriptionstringoptional
targetingRulesRecord<string, unknown>optionalRuleExpression object evaluated to decide whether this variant applies.
prioritynumberoptional
isDefaultbooleanoptional
isActivebooleanoptional

ApplyConfigEmailCopyInput

One transactional email’s wording, keyed by the action that sends it. actionKey names a send path — email.project.welcome, or a notification hook’s own key. The platform refuses one it does not recognise, because a row written under a typo is read by nothing and looks applied. Reconciled by foir push, create/update only: a workspace override is tenant-level and inherited by every project, so two projects in one workspace can name the same row and an omission must not delete what the other declares. Remove an override in the console.

MemberType
actionKeystringrequiredThe send path this wording belongs to.
localestringoptionalBCP-47 locale. Defaults to en.
scope'project' | 'workspace'optionalproject (default) or workspace, which every project inherits.
subjectstringoptional
headingstringoptional
bodystringoptional
footerstringoptional
ctasArray<{ label: string; url: string }>optional

ApplyConfigScheduleInput

MemberType
keystringoptionalUnique key for this schedule. Defaults to operationKey if not provided.
namestringoptionalDisplay name. Defaults to key if not provided.
descriptionstringoptional
operationKeystringrequired
cronstringrequired
timezonestringoptional
enabledbooleanoptional
each'organization'optionalWhat one fire starts a run for. Left out, a fire starts one run, at the project’s own level. 'organization' starts one run in each active organization of the project, at every depth: each run is started in that organization, is confined to it, and holds what the operation declares. An organization that is suspended or scheduled for deletion gets no run. The operation must be one of the project’s own, not an app’s.

ApplyConfigAuthProviderInput

MemberType
keystringrequired
namestringrequired
typestringrequired
configRecord<string, unknown>optional
enabledbooleanoptional
isDefaultbooleanoptional
prioritynumberoptional

ApplyConfigAuthClientLoginMethods

Per-client login methods. All fields optional: a missing key is enabled. Lets a project’s storefront opt to only Sign in with Shopify (disable password/OTP + don’t list Apple) without touching the project-level provider catalogue.

MemberType
passwordbooleanoptionalShow email & password sign-in on this auth client’s hosted sign-in? Defaults to true. Only narrows the project capability — can’t enable a method the project (passwordEnabled) has turned off.
otpbooleanoptionalShow one-time code sign-in on this auth client’s hosted sign-in? Defaults to true. Only narrows the project capability (otpEnabled).
disabledProvidersstring[]optionalProvider keys to HIDE on this auth client’s login page. Empty/missing = show every provider configured at the project level. List a key (e.g. “google”) to omit it from this auth client only.

An app’s logo: exactly one of file or url, with alt text. A push refuses any other shape, naming the field.

MemberType
filestringoptional, destinationOne of the project’s public images, by its file id. Name this or url.
urlstringoptional, destinationAn https address, shown as given. Name this or file.
altstringrequiredWhat the logo shows, for a person who cannot see it.

ApplyConfigAuthClientInput

MemberType
clientIdstringrequiredPublic auth client slug, unique per project (e.g. acme-storefront).
namestringrequiredDisplay name shown on the hosted sign-in.
redirectUrisstring[]required, destinationAllow-listed redirect URIs the platform will 302 to with the code, e.g. ['https://app.eide.clothing/auth/callback']. Matched EXACTLY, including the path and query, so each deployment is listed in full. Wildcards are rejected rather than stored: a pattern would match only its own literal text, which reads like an allow-list entry and covers nothing. https, except on a loopback host (http://127.0.0.1:8976/callback) where a CLI or native app cannot hold a certificate. No fragment, no userinfo.
grantsstring[]requiredThe most a sign-in through this app may carry of what the person’s roles give them, in the permission catalogue’s names: the same names a user role is declared with (https://docs.foir.dev/api/role-permissions ). The list gives nobody anything. A person holds what their roles give, and the list decides how much of it a token minted for this app carries. So it may hold a wildcard, which a role may not: ['*'] is an app that is not narrowed, and 'records:*' carries whatever its users hold over records. An entry covers its narrower forms: operations:execute here covers a person’s operations:execute:checkout. Required, and nothing is read into an absence: [] is an app whose sign-ins carry nothing of what its users’ roles give. A sign-in may ask for less with scope, in the same names.
firstPartybooleanoptionalWhether this app is the project’s own. A sign-in through the project’s own app asks nobody to agree to it. Through any other app, each user is shown what it asks to carry for them and agrees to it once, and the token carries no more than they agreed. Leave it off for an app someone else runs.
loginMethodsApplyConfigAuthClientLoginMethodsoptionalPer-client login method filter. Combines with the project- level user auth settings (project may have password OFF entirely; an auth client can’t override-up, only override-down).
customDomainsstring[]optional, destinationWhite-label custom login domains for this auth client, e.g. ['login.eide.clothing']. foir push registers each (creating a pending row + a DNS-TXT challenge) and prunes any not listed. Verification is a separate step — add the CNAME + _foir-challenge TXT records the push output prints, then verify.
postLoginUrlstringoptional, destinationWhere a bare custom-domain (front-door) login lands after Foir sets the first-party session cookie — the app’s landing, not an OAuth callback. Empty falls back to the redirect URI.
initiateLoginUristringoptional, destinationAn address in your app that starts its sign-in (OIDC’s initiate_login_uri). When someone accepts an invitation or resets their password on Foir’s hosted pages, they are sent here with iss, login_hint and target_link_uri, and your app signs them in as usual. Absent, they finish on the hosted page. https, or http on localhost.
orgIdstringoptional, destinationThe organization of the project this app signs people in to, by its id, or '' for the whole project. Binding it elsewhere ends what it issued under its old binding: its people’s consents, the sessions signed in through it and its refresh tokens. Leave it out to keep the app where it is.
promptsForOrganizationbooleanoptionalWhether a sign-in through this app, naming no organization, asks somebody who may enter more than one place (the project, and the organizations they are a member of or may join) which organization they are going to. Somebody with exactly one organization goes straight there. The ID token says where (org_id). An app of the whole project only; off unless it says so, for an app whose people act across organizations at once.
logoApplyConfigAuthClientLogooptionalThe app’s logo, shown with its name to a person asked to agree to it and in the lists of apps they have authorised, so they can see whose app is asking. Exactly one of file (one of the project’s public images, by id) or url (an https address), with alt. Leave it out for none.
homepageUrlstringoptional, destinationThe app’s homepage, an https address. The consent screen links the app’s name to it as the party asking.
confidentialbooleanoptionalWhether the app is confidential: a server that keeps a client secret, such as a tool with a generic OpenID Connect login. It authenticates with one of its secrets when it trades a code, refreshes and revokes, so it may leave PKCE out. A config never carries a secret: make one with foir auth-clients secrets create or in the console. Leave it out for a public app (a browser or a device), which proves each sign-in by PKCE.
allowedOriginsstring[]optional, destinationBrowser origins allowed to exchange the first-party session cookie for an access token — i.e. the origins your SPA runs on, e.g. ['https://app.eide.clothing']. Exact origins: scheme + host + optional port, https only, no wildcards and no paths. This is the WHOLE allowlist for the credentialed session endpoints, matched exactly the way redirectUris are. List none and the SPA session does not work — there is no domain-wide default, deliberately: one would grant every origin on your domain, including a subdomain takeover or anything serving user content there. Absent leaves the list untouched; [] clears it. It is only meaningful alongside a verified customDomains entry (the cookie is only ever issued on one).
loginPageLoginPageConfigoptionalThis app’s own sign-in page: only what differs from the page of the level it signs people in to. It is the project’s, as the app is. See {@link LoginPageConfig}.

ApplyConfigPlacementInput

MemberType
typestringrequired
urlstringrequired, destination
allowedOriginstringoptional, destination
heightnumberoptional
tabNamestringoptional
hideContentTabbooleanoptional
modelKeysstring[]optional

ApplyConfigHookInput

MemberType
keystringoptionalUnique key for this hook.
namestringoptionalDisplay name.
descriptionstringoptionalDescription of what this hook does.
eventstringrequiredLifecycle event that triggers this hook.
operationKeystringoptionalKey of the operation to execute.
filterRecord<string, unknown>optionalFilter to scope the hook (e.g., { modelKey: 'redirect' }).
isActivebooleanoptionalWhether the hook is active. Defaults to true.

ApplyConfigApiKeyInput

MemberType
namestringrequiredName for this API key (e.g. “Tilly iOS”, “Tilly CRM sync”).
kind'publishable' | 'server' | 'admin'requiredWhat the key is for. You choose it, and the platform holds the key to what that kind may hold and give: - 'publishable' sits in a web page or an app, where anyone can read it. It gives a visitor only what is safe to give everyone. - 'server' is held by the server that renders your pages. It is a publishable key that may also say who and where its visitor is (visitors:forward), and it never goes to a browser. - 'admin' is a machine’s own: a sync job, a pipeline, a tool. It does what it holds, gives nobody anything, and nobody signs in through it. It expires. A key’s kind never changes. A config that declares another kind for a key that already exists is refused: declare a new key under a new name.
envVarstringrequiredEnvironment variable name to write the key to in .env (e.g. “FOIR_PUBLIC_KEY”).
grantsstring[]requiredWhat the key holds, in the permission catalogue’s names (e.g. [“records:read”, “records:write”]): for a publishable or a server key the most a signed-in user may do through it, and for an admin key what it does. An admin key may hold [”*”]. Declared for every key. Nothing is filled in, so a key declared without it would be minted holding nothing, and a push refuses one. A push changes it on the existing key in place: the key keeps its id and its secret, and the new list is live the moment the push writes it.
baselineGrantsstring[]optionalWhat a publishable or a server key gives whoever comes through it, in the same names: a visitor with no sign-in, and a signed-in user beneath their role. An admin key gives nobody anything, and one declared with this list is refused. NOTHING IS FILLED IN. A key declared without this list gives a visitor nothing, whatever it holds: a publishable key holding records:read and no list here is a key no visitor can read with. Name each read a visitor needs. A visitor may also be given one model to submit into (records:create:<model>) and one operation to run (operations:execute:<operation>), each naming something this config declares. Declared, the list is the key’s whole second list and a push sets it in place. Left out, a push leaves what the key gives as it is.
expiresInstringoptionalAn admin key only: how long it lives from the push that makes it, in days (e.g. “90d”, which is what it is given when nothing is said, up to “365d”). A publishable or a server key never expires, and one declared with this is refused. It is read when the key is made. A push never renews a key that exists: renew it with foir api-keys renew, so that a key is kept alive by somebody deciding to and not by a pipeline that happens to run.
allowedModelsstring[]optionalThe models whose records the key reads (e.g. [“tilly_note”, “tilly_block”]). A key that names none, and does not declare allModels, reads no model’s records. It keeps everything else it holds.
allModelsbooleanoptionalThe key reads the records of every model, those added later among them. Declared beside allowedModels, it is refused.
allowedFileTypesstring[]optionalRestrict file uploads: a MIME type (“image/png”), a whole type (“image/*”), or IMAGE, VIDEO, FILE.
orgstringoptionalConfine the key to one ORGANISATION of this project, by id — the same value foir api-keys create --confine-to-org takes. An organisation is identified by a minted id, the way a project and a tenant are. A confined key reads and writes only that organisation’s rows plus the project-shared tier, and the confinement travels on the credential rather than on any request, so nothing downstream can widen it. It is also part of the key’s IDENTITY here, not just its configuration. Two organisations may each have a key named “Storefront”, so the reconciler matches on name AND organisation; a manifest that declared one and omitted this field would be matched against the other one’s key and rotate it. Set on CREATE only, like configId beside it: a key’s organisation cannot be changed afterwards, and a manifest that moved one would be asking for a credential to change which tenant it belongs to.

ApplyConfigUserRoleInput

A role declared in foir.config.ts and reconciled by foir push. The role’s grants are what a user who holds it may do once signed in: their access token carries them. Roles are matched by key within the project: a declared key that already exists is updated in place, and a new key is created. A role on the platform that the config leaves out is left as it is, never disabled. Without a role, a signed-in user may do only what the key gives everyone who comes through it (its baselineGrants). Anything a user may do beyond that comes from a role they hold.

MemberType
keystringrequiredStable key, unique per project (e.g. “default”, “member”).
namestringrequiredHuman-readable name (e.g. “Default User”).
grantsstring[]requiredWhat the role gives users who hold it, as grants in the permission catalogue’s names: records:read:<model>, records:write:<model>, records:create:<model>, operations:execute, files:read and the rest of the list at https://docs.foir.dev/api/role-permissions . Each grant stands for itself. Changing a record and creating one are two grants, so a role that should do both lists records:write:<model> and records:create:<model>. A guarded field is given by the grants that name it, records:read:<model>.<field> and records:write:<model>.<field>. operations:execute runs every operation the key exposes; operations:execute:<operation_key> runs that one alone, so a role can let every user check out and keep rebooking for the users whose role gives it. A push naming an operation the project does not have is refused, by name. A push puts on a role only what the person pushing holds themselves.
isDefaultbooleanoptionalWhen true, every user in the project inherits this role with no per-user assignment. An app’s baseline user grant should be a single isDefault: true role. Defaults to false.

AppMappingDeclined

Saying “I do not want this one” about a source or sink the manifest marks optional. EXPLICIT, BECAUSE SILENCE IS THE WRONG DEFAULT HERE. An optional source left out of the config could be a decision or an oversight, and the two have opposite consequences: one is a project that does not want its users synced, the other is a project that thinks they are and is wrong. So an optional source that is neither mapped nor declined is refused at push, with both spellings named. Nothing is submitted for a declined one, so the platform drops the operations that would have carried it and grants no capability for it. sources: { product: { toModel: ‘product’, naturalKey: ‘shopifyId’, fields: { … } }, user: false, // this project does not sync users }

type AppMappingDeclined = false

AppSourceMappingInput

Source-type mapping entry for an app install. Maps a manifest-declared source type onto a project model. See docs/platform/apps.md §Mapping step.

MemberType
toModelstringrequired
naturalKeystringrequired
fieldsRecord<string, string>required
mode'sync' | 'reference'optionalHow the install holds this source, when the app offers to read it live: 'reference' reads the host’s fields live and stores the record and its key; 'sync' keeps a copy. Omit it to leave the choice alone: a new install reads live wherever the app offers it, and a push never moves an existing install’s choice unless it names one.

AppSinkMappingInput

Sink-contract mapping entry for an app install.

MemberType
toModelstringrequired
naturalKeystringrequired
fieldsRecord<string, string>required

AppPlacementFieldChoiceInput

Placement field choice for TARGET_FIELD placements with field_selected_at_install=true. Keyed by placement.key.

MemberType
modelstringrequired
fieldstringrequired

AppInput

Per-project app installation declared in foir.config.ts under apps.<name>. Platform state is reconciled against this at foir push time; the manifest is fetched from source each push.

MemberType
sourcestringrequiredhttps URL to the manifest JSON.
settingsRecord<string, unknown>optional, destinationOpaque settings forwarded to the app’s middleware.
userSignInstring | falseoptionalThe user sign-in this install pairs with the app, for an app whose own system has users: the key of one of the project’s OAuth or OIDC user sign-ins, declared under authProviders. Every identity the app names is resolved through it. false pairs none. Leave it out to leave the install’s pairing alone: a push never removes a pairing it was not told about.
mappings{ sources?: Record<string, AppSourceMappingInput | AppMappingDeclined>; sinks?: Record<string, AppSinkMappingInput | AppMappingDeclined>; placementFields?: Record<string, AppPlacementFieldChoiceInput>; }optional

ApplyConfigProjectSettingsInput

Project-level settings applied by foir push, in the same server-side transaction as every other family, and read via GetProject at pull time. Branding fields are empty-string-as-clear on the platform side: '' clears the column, undefined leaves it untouched.

MemberType
displayNamestringoptionalDisplay name in the project’s own emails and portal headers.
logoUrlstringoptionalPublic URL of the project logo (rendered in user emails).
primaryColorstringoptionalHex color used as accent in the project’s own emails.
fromNamestringoptional, destination“From” name on outbound user emails.
replyTostringoptional, destination“Reply-To” address on outbound user emails.
supportEmailstringoptional, destinationSupport email surfaced in email footers.
appBaseUrlstringoptional, destinationPublic base URL of the consumer-facing app (storefront, portal, internal tool, …). Reset / verify / invitation links in user emails are built from this — required before the platform will mint user-email links.
termsUrlstringoptional, destinationThe terms and privacy addresses every sign-in page links to in its footer, https. Blank or absent links to none. An organisation may set its own, and inherits these where it does not.
privacyUrlstringoptional, destination
welcomeEmailEnabledbooleanoptionalWhether the platform sends a welcome email on user registration. Default true. Disable for invite-style flows.
signupModeSignupModeNameoptionalSelf-serve user signup mode. Default public. restricted accepts only invited emails, waitlist queues signups for approval, closed disables self-serve signup entirely.
signupRestrictionsSignupRestrictionsInputoptionalEmail hygiene + allow/block restrictions applied to public-mode signups. blockSubaddresses requires the canonical inbox form (rejects subaddress tags, Gmail dots, and the googlemail alias domain). An allowlist, when non-empty, is exclusive and beats the blocklist. List patterns: exact user@domain.com, whole domain (domain.com), wildcard subdomains (*.domain.com).
passwordEnabledbooleanoptionalWhether email/password sign-in is exposed. Default true. Disable for a passwordless project (one-time codes or single sign-on only).
otpEnabledbooleanoptionalWhether email one-time-code sign-in is exposed. Default false.
organizationSignupEnabledbooleanoptionalWhether a signed-in user may register an organization of their own through createOrganization naming themselves as its founder. Default false. Needs organizationSignupRole to name the role the founder is given, or the platform refuses every registration.
organizationSignupRolestringoptionalThe key of the role a self-registered organization’s founder holds in it (a role of this project, e.g. 'user'). No default.
organizationAssignableRolesstring[]optionalThe roles an organization’s own staffer may hand out, by key. THE CEILING ON WHAT AN ORGANIZATION CAN BECOME, set by the party that is not inside it. An organization’s staffer may add a member with a role only if the PROJECT declared that role assignable, which is why this is manifest-shaped and lives under project settings rather than anywhere an organization can reach. TRI-STATE, and the empty array is the point: omit it to leave the stored list alone, give a non-empty array to set it, and give an EMPTY array to take the capability away from every organization in the project. A bare “send nothing to clear” could not tell the last two apart. Every key must name a live role of this project. The platform refuses the whole list rather than dropping an entry it cannot resolve, because a list that quietly lost one is a capability a user believes they granted and did not.
organizationUsers'joined' | 'everyone'optionalWhere somebody who comes in at an organization stands, for one that chooses nothing of its own: 'joined' (the default), at that organization, so they are its people and become another’s by joining it; or 'everyone', where the organization’s pool is kept, which is the project for one sharing the project’s pool, so they stand at every organization that shares it. A member of the project stands at every such organization either way. Changing it moves nobody.
organizationOwnPoolbooleanoptionalWhether a new organization at the top of the project signs its people in to a pool of its own when whoever makes it does not say. Default false: it shares the project’s. One made beneath another shares its parent’s pool unless asked otherwise.
locksAccountsAfterFailedSignInsbooleanoptionalWhether ten wrong passwords for an address in an hour lock it from anywhere for an hour, not only from the IP they came from. Default false: a stranger who knows an address can’t lock its owner out.
organizationJoining'invitation' | 'open' | 'request'optionalWho may join an organization without an invitation, for one that chooses nothing of its own: 'invitation' (the default), only by invitation or staff adding them; 'open', someone who can already sign in at its page and is not a member joins by signing in there; or 'request', signing in there asks to join and its staff approve or decline. Nobody from another organization’s sign-in can join this way.
anonymousNotesEnabledbooleanoptionalWhether the project takes a note from a visitor who is not signed in, through writeNote or <FoirFeedback>. Default false. A visitor also needs a publishable key that gives them notes:create. Turning it off refuses the next visitor’s note at once.
noteScreenshotsEnabledbooleanoptionalWhether a signed-in user’s note may carry a screenshot, which <FoirFeedback> offers to capture. Default true.
sitesSiteInput[]optionalThe project’s own websites. The whole list: a push replaces the project’s sites with it ([] removes them all), and leaving the key out leaves them alone. A site is matched to the project’s by its origin, so a push that changes a site’s name or switch changes that site.

SiteInput

One of the project’s websites, as authored in config-as-code.

MemberType
originstringrequired, destinationIts exact origin, such as https://www.example.com: https, a host and an optional port, no path.
namestringoptionalWhat to call it. Default: its host.
allowEditingbooleanoptionalWhether the site may frame the console’s field editor, so somebody signed in edits a field in place on it. Default false. A site that may frame a signed-in editor may also trick someone into clicking it, so allow it only on a site you control.

SignupModeName

Self-serve signup mode, as authored in config-as-code.

type SignupModeName = 'public' | 'restricted' | 'waitlist' | 'closed'

SignupRestrictionsInput

Email hygiene + allow/block restrictions, as authored in config-as-code.

MemberType
blockSubaddressesbooleanoptional
blockDisposablebooleanoptional
allowliststring[]optional
blockliststring[]optional

ApplyConfigProjectInput

Project pin + declarative settings. The pin (id / tenantId) is a guard against pushing one folder’s config into another folder’s project; the settings are applied by the push, on the server, with the rest of the config.

MemberType
idstringrequired, destinationProject id this folder is bound to.
tenantIdstringrequired, destinationTenant id of the bound project.
namestringoptional, destinationOptional human-friendly name for diff readability.
settingsApplyConfigProjectSettingsInputoptionalProject-level settings reconciled by foir push. Omit to leave the platform settings untouched. foir pull populates this block from the live project state so the local config can be version-controlled.

ApplyConfigDesignTokensInput

W3C Design Tokens Format Module document. The CLI applies this verbatim — references like “{font.size.display1}” are preserved on disk so renames in one place propagate to consumers. The platform’s resolver runs at write time and rejects cycles or unknown references. See foir-docs/content/platform/design-tokens.md for the full shape.

MemberType
colorRecord<string, unknown>optional
font{ family?: Record<string, unknown>; weight?: Record<string, unknown>; size?: Record<string, unknown>; lineHeight?: Record<string, unknown>; letterSpacing?: Record<string, unknown>; }optional
typographyRecord<string, unknown>optional

ApplyConfigInput

A whole config manifest: every family foir push reconciles, plus the config’s own identity and the project pin. ⚠️ NO INDEX SIGNATURE, deliberately, and it used to have one. [key: string]: unknown made every top-level key legal, so a block spelled organisations instead of organizations — or one from a release this CLI does not have — type-checked, serialised, was accepted by the server’s equally tolerant parse and applied by nothing. Both sides agreed. Nothing errored. The block did nothing, for as long as nobody looked. Without the signature, TypeScript’s excess-property check refuses the literal at the point somebody writes it, which is the cheapest place this can possibly be caught. The server reports what it did not recognise as well, because a type check is only one of the two sides and a manifest can reach it from a hand-written JSON, an older CLI, or a generator. ───────────────────────────────────────────────────────────────────────────── WHAT A PUSH DOES TO ORGANISATIONS A PUSH NEVER CREATES, MOVES, SUSPENDS OR DELETES AN ORGANISATION. Stated on the server too, beside the parser that would have to grow a family for it (organisationPushRule in the configs handler), because a rule held in one repository is a rule the other can contradict. Organisation POLICY is manifest-shaped and belongs here: whether self-serve sign-up is on, which role a founder is given, which roles an organisation may assign. Organisation INSTANCES are management state, like a user or a credential’s last use — created by a user, by a user signing up, or by a provisioning call, and suspended or deleted by deliberate acts with their own confirmations and their own audit trail. The reason it has to be said rather than assumed is this file’s own prune rule: a family a manifest OMITS is a family whose resources this config owns and no longer wants. Apply that to organisations and a founder who pushed a config without an organisations block would lose a live tenant — every row, every user, every credential — because a file did not mention it.

MemberType
keystringrequired
namestringrequired
configTypestringoptional
forcebooleanoptional
descriptionstringoptionalFree text on the config row, for a reader rather than for the platform. Nothing resolves against it.
directionstringoptionalWhich way content moves for this config: 'READ' (the default), 'write', 'bidirectional'. Recorded on the config row. A STRING. It was undeclared here until the manifest’s top level gained a type at all, and one config in this repository had been sending the number 1 — which made the SERVER’S metadata decode fail outright, so that manifest’s name, description and configType fell through to defaults on every push. One key of the wrong type, every metadata field silently dropped, nothing reported anywhere.
connectionDomainstringoptionalThe domain a connector-shaped config talks to. Recorded on the row.
operationBaseUrlstringoptional, destinationBase URL prepended to relative operation endpoints.
projectApplyConfigProjectInputoptionalProject pin + declarative project-level settings. The pin guards against cross-folder mis-pushes; the settings (when present) are applied to the platform alongside the model / operation reconcile.
modelsApplyConfigModelInput[]optional
operationsApplyConfigOperationInput[]optional
contextDimensionsApplyConfigContextDimensionInput[]optional
localesApplyConfigLocaleInput[]optionalProject locales, reconciled by foir push (create/update only).
variantCatalogApplyConfigVariantCatalogEntryInput[]optionalVariant-catalog entries, reconciled by foir push (create/update only).
schedulesApplyConfigScheduleInput[]optional
hooksApplyConfigHookInput[]optional
authProvidersApplyConfigAuthProviderInput[]optional
authClientsApplyConfigAuthClientInput[]optional
placementsApplyConfigPlacementInput[]optional
apiKeysApplyConfigApiKeyInput[]optional
userRolesApplyConfigUserRoleInput[]optionalUser RBAC roles, reconciled by foir push. Declare an isDefault: true role to grant every user the write/execute scopes their tokens need — without one, users get read-only tokens after the Model B auth change.
appsRecord<string, AppInput>optionalPer-project app declarations, keyed by app name.
designTokensApplyConfigDesignTokensInputoptionalW3C-formatted design tokens document for this project. Reconciled by foir push — the document is applied verbatim to the draft channel. Add --publish to promote draft → published in the same push.
loginPageLoginPageConfigoptionalThe project’s default sign-in page. Each field set here overrides Foir’s default; a field left out is inherited. An app’s own page goes on its authClients entry. A config belongs to the project, so an organisation keeps its page with foir login-page instead. Saved as a draft, released with everything else (--publish). See {@link LoginPageConfig}.
emailCopyApplyConfigEmailCopyInput[]optionalTransactional email wording, reconciled by foir push (create/update only — see ApplyConfigEmailCopyInput for why it never prunes).
projectEmailApplyConfigProjectEmailInputoptionalThe project’s bring-your-own transactional email sender: fromEmail and a resendKeySecretRef. REF ONLY — the raw key is never in the committed manifest; it is written out of band with foir secrets put and this references the resulting vault ref. Omitted leaves the sender unchanged.
agentsApplyConfigAgentInput[]optionalThe project’s agents, reconciled by foir push: created, updated, and deleted when this config owns one it no longer declares.
briefApplyConfigBriefInputoptionalThe project brief. Written when it changes, never deleted by a push.

AgentToolInput

One tool an agent may use: one of Fóir’s verbs, one of the project’s operations, one tool of a remote MCP server registered on the agent, or another agent as a child. A tool the caller’s own role does not grant is not offered to their run.

type AgentToolInput = ( | { verb: string; models?: string[]; } | { operation: string } | { mcpServer: string; mcpTool: string } | { agent: string } ) & { unattended?: boolean; }

AgentMcpServerInput

A remote MCP server registered on an agent, called over HTTP.

MemberType
namestringrequired
urlstringrequired, destinationThe server’s address. It must be public: a private address is refused.
credential'none' | 'project' | 'perUser'optionalWhose credential the server is called with: none, the project’s (a vault secret named by secretRef), or each person’s own account, connected by them in the app.
secretRefstringoptional
oauth{ authorizationUrl?: string; tokenUrl?: string; clientId?: string; clientSecretRef?: string; scopes?: string[]; }optional
tools{ name: string; description?: string; inputSchema?: Record<string, unknown>; readOnly?: boolean; allowed?: boolean; }[]requiredThe tools of the server an agent may use, pinned as discovered. A tool not marked readOnly waits for an approval unless it is marked allowed.
timeoutMsnumberoptional

ApplyConfigAgentInput

An agent: instructions, a model, the tools it may use, and its limits. It runs as whoever calls it, with that caller’s permissions, and an act it cannot draft waits for an approval. Saved as a draft and released with everything else (--publish).

MemberType
keystringrequiredLowercase letters, digits and _, starting with a letter. It is the agent’s name everywhere: in the data API, in a key’s grants (agents:execute:<key>) and in the console.
namestringrequired
descriptionstringoptional
instructionsstringoptional
model| { tier: 'fast' | 'balanced' | 'best' } | { provider: 'anthropic' | 'openai'; model: string; secretRef: string; monthlyCapUsd: number; }optionalA tier of Fóir’s (fast, balanced or best), run on AI credits, or the project’s own provider key with a monthly spend cap in dollars.
toolsAgentToolInput[]optional
mcpServersAgentMcpServerInput[]optional
limits{ maxCreditsPerRun?: number; maxSteps?: number; maxMessageChars?: number; maxTurns?: number; maxDepth?: number; quotas?: { rules: QuotaRule[] }; }optional
retentionDaysnumberoptionalHow long a thread with the agent is kept after its last message.
refusalRules{ key: string; when: Record<string, unknown>; message: string }[]optionalThe project’s own rules a public conversation is held to.
notifyOthersUnheldbooleanoptionalLet the agent notify people other than its caller without an approval.
teamApprovesbooleanoptionalHand every held act to the team, never to the caller.
outputSchemaRecord<string, unknown>optionalThe JSON Schema a run’s answer is held to, describing an object. A run ends with a value that fits it, read as the run’s output, rather than with prose.
dataParts{ name: string; description?: string; schema: Record<string, unknown> }[]optionalData the agent may send an app’s own components as it answers. Each is held to its JSON Schema and reaches the app as a data-<name> part.
pageToolsbooleanoptionalThe agent may use the tools the caller’s page offers with a message. The page defines them, in foirChatTransport’s pageTools; the model calls one, and the run waits for the page to say what it did.
history| { keep: 'everything' } | { keep: 'answers' } | { keep: 'recent'; turns: number } | { keep: 'compact'; afterTokens: number; recentTurns?: number }optionalHow the agent’s conversations carry their earlier turns to the model. Unset, or everything, they go in full, with every tool call and its result: right where a later turn acts on what an earlier one found. answers sends each earlier turn as its question and its answer. recent sends the last turns in full and those before as answers. compact writes the earlier turns into a summary once they pass about afterTokens tokens, keeping the last recentTurns word for word; the summary is written on the fast tier, charged to the run that writes it, and used again until the turns after it pass the size in turn.

ApplyConfigBriefInput

The project brief: house rules every declared agent is given ahead of its own instructions, and that an agent connecting as a person reads.

MemberType
textstringrequired
modelRulesRecord<string, string>optionalRules for particular models, by model key.

ApplyConfigProjectEmailInput

The project’s own email sender, as authored in config-as-code.

MemberType
fromEmailstringoptional, destination
resendKeySecretRefstringoptional, destinationA vault ref, never a key. foir secrets put mints one.

DestinationValue

One value a named project supplies for a destination: a URL, an address, a list of them, or an app’s settings.

type DestinationValue = string | string[] | Record<string, unknown>

DestinationValues

A named project’s destinations, under the names the manifest reads them by.

type DestinationValues = Record<string, DestinationValue>

NamedProjectInput

One named project: an ordinary project this config pushes to when selected with --project <name> or FOIR_PROJECT=<name>. The platform never learns that two named projects are related. What makes them one config is that the CLI resolves the manifest once per project and refuses a push when any two differ in a field that is not a destination.

MemberType
idstringrequiredThe project’s id.
tenantIdstringrequiredThe id of the project’s tenant.
namestringoptionalA human-friendly name for output.
envFilestringrequiredThe file this project’s minted keys and signing secrets are written to, relative to the config. Two named projects may not share one.
apiUrlstringoptionalThe control plane this project lives on. Omit for the production control plane. A command pointed anywhere else, or holding a session minted anywhere else, is refused unless it passes --allow-control-plane-mismatch.
destinationsDrequiredThe values that may differ between named projects: endpoints, redirect URIs, origins, sender addresses and the like. The manifest reads them from the project it is resolved for. Every named project supplies the same names.

SelectedNamedProject

What the manifest function is given: the project it is resolved for.

MemberType
namestringrequiredThe name this project is declared under in projects.
destinationsDrequired

NamedProjectManifest

The manifest a named-projects config resolves to, for one project. The same shape as a single-project manifest, less the pin: a named project’s id, tenantId and name come from its entry in projects, so project here carries only its settings.

MemberType
project{ settings?: ApplyConfigProjectSettingsInput }optional

FoirProjectsConfig

A config that declares several full projects by name. manifest is called once per declared project, with that project’s destinations. Only destinations may differ between the results: a push refuses, before anything is sent, when two resolved manifests differ in any other field, and names the field and both values.

MemberType
projectsRecord<string, NamedProjectInput<D>>required
manifest( project: SelectedNamedProject<D> ) => NamedProjectManifest | Promise<NamedProjectManifest>required

SecretOwnerKind

type SecretOwnerKind = 'project' | 'app'

SecretDeclaration

One declared secret. label is the human-readable handle the reconciler uses to look the secret up in the vault — no opaque ref is committed. ownerId is required for app-owned secrets and ignored for project-owned ones.

MemberType
ownerKindSecretOwnerKindrequired
ownerIdstringoptional
labelstringrequired

FoirSecretsConfig

Shape of a foir.secrets.ts default export.

MemberType
secretsSecretDeclaration[]required

LoginPageConfig

A sign-in page: what the hosted sign-in shows around Foir’s own form. Each top-level field is taken from the first of these that sets it: the app’s own page, the organisation the sign-in is for and each one above it, the project’s, then Foir’s default (the centred page with nothing around the form). Lists are replaced whole, never merged. Colours, the font and the corner radius name design tokens, never values, so the sign-in matches what an app built on the same tokens shows. No raw HTML anywhere: a project that wants full control writes its own sign-in page on the public API.

MemberType
layout| 'centred' | { split: { side?: 'left' | 'right'; width?: 'half' | 'fortySixty'; onPhones?: 'band' | 'hide' } } | { fullBleed: { card?: 'centre' | 'left' | 'right'; scrim?: 'soft' | 'medium' | 'strong' } }optional'centred' (Foir’s default), a split panel, or a full-bleed background.
media{ colour?: LoginPageColour; image?: LoginPageImage; slideshow?: { images: LoginPageImage[]; autoplay?: boolean }; video?: LoginPageVideo; }optionalThe split panel or the full-bleed background: a colour, and at most one of an image, a slideshow or a video. A video here plays as a loop, muted.
contentLoginPageItem[]optionalWhat sits beside the form and over the media, in order. [] shows nothing.
pageColourLoginPageColouroptionalThe colour behind the form.
fontstringoptionalA fontFamily design token, e.g. 'font.family.body'.
radiusstringoptionalA radius design token, e.g. 'radius.md'.

LoginPageColour

A colour by design token: one for light, one for dark (falls back to light).

MemberType
lightstringrequired
darkstringoptional

LoginPageText

A string per locale, e.g. { en: 'Welcome back', fr: 'Bon retour' }.

type LoginPageText = Record<string, string>

LoginPageProse

Text per locale: a string (one paragraph), a list of passages, or a prose flow ({ v: 1, entries: [...] }) for marks, links and lists.

type LoginPageProse = Record< string, | string | Array<{ kind?: 'paragraph' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'quote'; token?: string; text: string }> | { v: 1; entries: unknown[] } >

LoginPageImage

One use of an image: exactly one of a Foir file (file: a public image of the project’s own files or of the page’s own level, served in sized versions) or an https address (url, shown as given, never fetched by Foir), with alt text in the default locale.

type LoginPageImage = ({ file: string; url?: never } | { url: string; file?: never }) & { alt: LoginPageText; caption?: LoginPageText; focalPoint?: { x: number; y: number }; crop?: { x: number; y: number; width: number; height: number }; }

LoginPageVideo

One use of a video: exactly one of a Foir file (file: a public MP4 or WebM of the project’s own files or of the page’s own level) or an https address of an MP4 or WebM (url, played as given, never fetched by Foir), with alt text in the default locale. A video has no crop.

type LoginPageVideo = ({ file: string; url?: never } | { url: string; file?: never }) & { alt: LoginPageText; caption?: LoginPageText; focalPoint?: { x: number; y: number }; poster?: { file: string; url?: never } | { url: string; file?: never }; playback?: 'loop' | 'controls'; }

LoginPageState

The states the sign-in page opens in.

type LoginPageState = 'signIn' | 'signUp' | 'waitlist' | 'waitlistJoined' | 'inviteOnly' | 'closed'

LoginPageItem

One piece of content: exactly one of heading, text, image, gallery or video.

type LoginPageItem = ( | { heading: LoginPageText } | { text: LoginPageProse } | { image: LoginPageImage } | { gallery: { images: LoginPageImage[] } } | { video: LoginPageVideo } ) & { states?: LoginPageState[]; region?: 'besideForm' | 'overMedia'; }

Destinations

A config that declares named projects resolves its manifest once per project, and only these fields may differ between the results. A push that finds any other difference refuses before anything is sent, and names the field and both values. The same fields are left out of the manifest hash a push records, so two projects holding one commit hold one hash.

They are marked in the contract, as the destination option on configs/v1/manifest.proto, and this list is generated from the marks: adding a destination is one option on one field.

FieldDeclared on
operationBaseUrlApplyConfigInput
project.idApplyConfigProjectInput
project.tenantIdApplyConfigProjectInput
project.nameApplyConfigProjectInput
project.settings.fromNameApplyConfigProjectSettingsInput
project.settings.replyToApplyConfigProjectSettingsInput
project.settings.supportEmailApplyConfigProjectSettingsInput
project.settings.appBaseUrlApplyConfigProjectSettingsInput
project.settings.termsUrlApplyConfigProjectSettingsInput
project.settings.privacyUrlApplyConfigProjectSettingsInput
project.settings.sites[].originSiteInput
operations[].endpointApplyConfigOperationInput
authClients[].redirectUrisApplyConfigAuthClientInput
authClients[].customDomainsApplyConfigAuthClientInput
authClients[].postLoginUrlApplyConfigAuthClientInput
authClients[].allowedOriginsApplyConfigAuthClientInput
authClients[].initiateLoginUriApplyConfigAuthClientInput
authClients[].orgIdApplyConfigAuthClientInput
authClients[].logo.fileApplyConfigAuthClientLogo
authClients[].logo.urlApplyConfigAuthClientLogo
authClients[].homepageUrlApplyConfigAuthClientInput
placements[].urlApplyConfigPlacementInput
placements[].allowedOriginApplyConfigPlacementInput
apps.*.settingsAppInput
emailCopy[].ctas[].urlApplyConfigEmailCopyInput
projectEmail.fromEmailApplyConfigProjectEmailInput
projectEmail.resendKeySecretRefApplyConfigProjectEmailInput
agents[].mcpServers[].urlAgentMcpServerInput
agents[].mcpServers[].oauth.authorizationUrlAgentMcpServerInput
agents[].mcpServers[].oauth.tokenUrlAgentMcpServerInput
agents[].mcpServers[].oauth.clientIdAgentMcpServerInput
Last updated on