import { A as FIELD_TYPES, B as MediaRef, C as ColorField, D as EntityRef, E as EntityId, F as FieldType$1, G as ResolvedFieldGroup, H as RelRef, I as FieldValue, J as TextAreaField, K as ScalarValue, L as FieldValueMap, M as FieldDefinition$1, N as FieldGroup$1, O as EntityType, P as FieldOrigin, R as LocationRule$1, S as BooleanField, T as EmailField, U as RelRefResolver, V as NumberField, W as RelationshipField, X as UrlField, Y as TextField, Z as isMultipleCapable, _ as legacyFieldToFinalDefinition, a as MigratedFieldValueNode, b as Actor, c as fieldDefinitionRefsForPlan, d as fieldsRecursiveEavReverseMigrationSql, f as parseLegacyMultipleValueJson, g as legacyFieldGroupToFinalDefinition, h as FieldDefinitionReference, i as FieldsRecursiveEavMigrationPlan, j as Facet, k as FIELD_KEY_RE, l as fieldPath, m as snapshotFlatFieldsCorpus, n as FIELDS_RECURSIVE_EAV_MIGRATION_ID, o as canonicalFieldsMigrationHash, p as planFieldsRecursiveEavMigration, q as SelectField, r as FieldsMigrationCorpusCheckpoint, s as escapeFieldPathSegment, t as fieldsMigrationSql, u as fieldsRecursiveEavForwardMigrationSql, v as materializeLegacyFieldDefinitionVersion, w as DateField, x as BaseField, y as referencedFieldDefinitionVersions, z as MediaField } from "./migrate-MjEVIYio.js";
import { $ as StoredBlockDocument, A as FlexibleLayout, B as LocationValue, C as FieldsDefinitionKind, Ct as fieldsMigrationWriteJournal, D as FieldsSchema, Dt as parseFieldDefinition, E as FieldsMigrationPhase, Et as isFieldDefinitionVersionError, F as ImageMediaSettings, G as OptionsPageDefinitionSnapshot, H as MediaSettings, I as LinkSettings, J as RelationshipSettings, K as PasswordSettings, L as LocationOperator, M as GallerySettings, N as GroupSettings, O as FieldsTransaction, Ot as parseFieldDefinitionVersion, P as IconSettings, R as LocationRule, S as FieldValueNodeRow, St as fieldsMigrationCheckpoints, T as FieldsMigrationAdapter, Tt as fieldsSchema, U as NormalizedFieldsRegistryRecord, V as MapSettings, W as NumberSettings, X as RichTextSettings, Y as RepeaterSettings, Z as SafePattern, _ as FieldGroup, _t as fieldRevisions, a as ColorSettings, at as UserSettings, b as FieldStorageValue, bt as fieldsImportJournal, c as DateSettings, ct as fieldBlockDefinitionVersions, d as EntitySettings, dt as fieldDefinitionVersions, et as TaxonomySettings, f as FieldBlockDefinitionSnapshot, ft as fieldGroupDefinitions, g as FieldDefinitionVersionErrorCode, gt as fieldReusableBlocks, h as FieldDefinitionVersionError, ht as fieldOptionsDefinitions, i as CloneSettings, it as UrlSettings, j as FlexibleSettings, k as FlatFieldValue, kt as parseFieldGroupDefinition, l as DateTimeSettings, lt as fieldBlockDefinitions, m as FieldDefinitionVersion, mt as fieldOptionsDefinitionVersions, n as BooleanSettings, nt as TextareaSettings, o as ConditionalRule, p as FieldDefinition, pt as fieldGroups, r as ChoiceSettings, rt as TimeSettings, s as ConditionalRuleGroups, st as canonicalFieldGroupHash, t as AnyFieldDefinition, tt as TextSettings, u as EmbedSettings, ut as fieldBlockDocuments, v as FieldKey, vt as fieldValueNodes, w as FieldsDefinitionOrigin, wt as fieldsOperationReceipts, x as FieldType, xt as fieldsImportStaging, y as FieldPath, yt as fieldValues, z as LocationRuleGroups } from "./schema-CqVMVK32.js";
import { SQLWrapper } from "drizzle-orm";
import { Querier, TransactionIdentity, TransactionalDatabase } from "@platform-modules/db";
import { D1BatchItem, D1Client, D1PreparedContribution } from "@platform-modules/db/sqlite/d1";
//#region src/errors.d.ts
declare class FieldValidationError extends Error {
  readonly field: string;
  readonly detail: string;
  readonly name = "FieldValidationError";
  constructor(field: string, detail: string);
}
declare class FieldGroupConflictError extends Error {
  readonly key: string;
  readonly detail: string;
  readonly name = "FieldGroupConflictError";
  constructor(key: string, detail: string);
}
declare class FieldAuthorizationError extends Error {
  readonly actorId: string;
  readonly action: string;
  readonly name = "FieldAuthorizationError";
  constructor(actorId: string, action: string);
}
declare class FieldStoreError extends Error {
  readonly detail: string;
  readonly name = "FieldStoreError";
  constructor(detail: string);
}
declare const isFieldValidationError: (e: unknown) => e is FieldValidationError;
declare const isFieldGroupConflictError: (e: unknown) => e is FieldGroupConflictError;
declare const isFieldAuthorizationError: (e: unknown) => e is FieldAuthorizationError;
declare const isFieldStoreError: (e: unknown) => e is FieldStoreError;
//#endregion
//#region src/authz.d.ts
declare function assertCanEditFields(actor: Actor): void;
declare function assertCanManageGroups(actor: Actor): void;
//#endregion
//#region src/validate.d.ts
/** Pure, validator-agnostic. Throws FieldValidationError on first offending field.
 *  Does NOT check relationship existence (that is setEntityValues' optional async resolver, §6). */
declare function validateValues(group: ResolvedFieldGroup, values: FieldValueMap): void;
//#endregion
//#region src/registry.d.ts
type CodeFieldGroup = FieldGroup$1 & {
  readonly origin: 'code';
};
type ScalarInfer<F extends FieldDefinition$1> = F extends {
  type: 'text' | 'textarea' | 'color' | 'url' | 'email';
} ? string : F extends {
  type: 'number';
} ? number : F extends {
  type: 'boolean';
} ? boolean : F extends {
  type: 'date';
} ? Date : F extends {
  type: 'media';
} ? MediaRef : F extends {
  type: 'relationship';
} ? RelRef : F extends {
  type: 'select';
} ? string : never;
type FieldValueInfer<F extends FieldDefinition$1> = F extends {
  multiple: true;
} ? ScalarInfer<F>[] : ScalarInfer<F>;
type InferValues<G extends CodeFieldGroup> = { [F in G['fields'][number] as F['key']]: FieldValueInfer<F>; };
declare function defineFieldGroup(group: FieldGroup$1): CodeFieldGroup;
declare function assertNoCrossGroupFieldKeyConflict(groups: ResolvedFieldGroup[]): void;
declare function assertNoCodeKeyShadow(dbKey: string, entityType: EntityType, codeGroups: CodeFieldGroup[] | undefined): void;
declare function resolveGroups(db: Querier<FieldsSchema>, opts: {
  entityType: EntityType;
  subType?: string;
  codeGroups?: CodeFieldGroup[];
}): Promise<ResolvedFieldGroup[]>;
declare function typedValues<G extends CodeFieldGroup>(group: G, map: FieldValueMap): InferValues<G>;
//#endregion
//#region src/store.d.ts
type FieldsAdapterKind = "d1" | "postgres";
/** Dialect-neutral flat-corpus reader, backed by the DB callback `execute()` seam. */
interface FieldsFlatCorpusReader {
  readonly adapter: FieldsAdapterKind;
  execute<Row extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper): Promise<readonly Row[]>;
}
type FieldsStoreErrorCode = "invalid-flat-row" | "unsupported-adapter" | "transaction-capability";
/** Typed structural error for flat reads and composite transaction capability checks. */
declare class FieldsStoreContractError extends Error {
  readonly code: FieldsStoreErrorCode;
  readonly detail: string;
  readonly field?: string | undefined;
  readonly name = "FieldsStoreContractError";
  constructor(code: FieldsStoreErrorCode, detail: string, field?: string | undefined);
}
declare function isFieldsStoreContractError(error: unknown): error is FieldsStoreContractError;
/**
 * Reads the current flat EAV corpus without interpreting definitions or
 * converting it to recursive nodes. The output preserves each typed lane for
 * the migration's later count/hash/value comparison.
 */
declare function readFlatFieldValues(reader: FieldsFlatCorpusReader): Promise<readonly FlatFieldValue[]>;
/** Require the same callback-minted identity supplied by a parent composite. */
declare function assertFieldsTransactionIdentity(tx: FieldsTransaction, expectedIdentity: TransactionIdentity): void;
declare function getEntityValues(db: Querier<FieldsSchema>, ref: EntityRef, opts: {
  entityType: string;
  subType?: string;
  codeGroups?: CodeFieldGroup[];
}): Promise<FieldValueMap>;
declare function setEntityValues(db: TransactionalDatabase<FieldsSchema>, actor: Actor, input: {
  ref: EntityRef;
  groupId: string;
  values: FieldValueMap;
  resolved: ResolvedFieldGroup;
  resolveRef?: RelRefResolver;
}): Promise<void>;
/**
 * Host-cascade op: removes ALL field values for an entity (call on parent-entity delete, spec §8.1).
 * Takes NO `Actor` and runs NO capability check by design — so the HOST MUST gate BOTH capability
 * AND object-level ownership BEFORE calling this. The engine never knows who owns `entityId`
 * (no owner column; spec §5). Never assume the engine authorizes this delete.
 */
declare function deleteEntityValues(db: Querier<FieldsSchema>, ref: EntityRef): Promise<void>;
declare function createGroup(db: Querier<FieldsSchema>, actor: Actor, group: FieldGroup$1, codeGroups?: CodeFieldGroup[]): Promise<ResolvedFieldGroup>;
declare function updateGroup(db: Querier<FieldsSchema>, actor: Actor, id: string, patch: Partial<FieldGroup$1>, codeGroups?: CodeFieldGroup[]): Promise<ResolvedFieldGroup>;
declare function deleteGroup(db: Querier<FieldsSchema>, actor: Actor, id: string): Promise<void>;
declare function listGroups(db: Querier<FieldsSchema>, opts: {
  entityType?: string;
  subType?: string;
}): Promise<ResolvedFieldGroup[]>;
//#endregion
//#region src/definitions.d.ts
type FieldDefinitionIntegrityErrorCode = 'definition-not-found' | 'definition-corrupt';
declare class FieldDefinitionIntegrityError extends Error {
  readonly code: FieldDefinitionIntegrityErrorCode;
  readonly groupKey: string;
  readonly revision: number;
  readonly detail: string;
  readonly name = "FieldDefinitionIntegrityError";
  constructor(code: FieldDefinitionIntegrityErrorCode, groupKey: string, revision: number, detail: string);
}
declare function isFieldDefinitionIntegrityError(error: unknown): error is FieldDefinitionIntegrityError;
interface FieldsDefinitionReader {
  execute(query: SQLWrapper): Promise<unknown>;
}
declare function resolveFieldDefinitionVersion(db: FieldsDefinitionReader, groupKey: string, revision: number): Promise<FieldDefinitionVersion>;
//#endregion
//#region src/query.d.ts
/**
 * Returns a capped candidate entity-id set for cross-module faceting (spec §5.4).
 * `capped: true` is a correctness boundary — the candidate set is intermediate; when
 * capped, the host MUST NOT present the intersected result as authoritative (degrade
 * explicitly). The cap is a v1 expedient; high-cardinality push-down is deferred.
 *
 * All facet/entity inputs are bound as query parameters (NOT string-interpolated):
 * facet values are user-facing (storefront filters, §8.2) → a trust boundary, so the
 * SQL is built from drizzle `sql` fragments with `${}` parameter placeholders only.
 */
declare function queryEntities(db: Querier<FieldsSchema>, q: {
  entityType: EntityType;
  facets: Facet[];
  limit?: number;
}): Promise<{
  entityIds: EntityId[];
  capped: boolean;
}>;
type FieldPredicate = {
  readonly op: 'eq' | 'neq';
  readonly path: FieldPath;
  readonly value: string | number | boolean | null;
} | {
  readonly op: 'in' | 'notIn';
  readonly path: FieldPath;
  readonly values: readonly (string | number | boolean)[];
} | {
  readonly op: 'gt' | 'gte' | 'lt' | 'lte';
  readonly path: FieldPath;
  readonly value: number | string;
} | {
  readonly op: 'contains';
  readonly path: FieldPath;
  readonly value: string;
} | {
  readonly op: 'and' | 'or';
  readonly children: readonly FieldPredicate[];
} | {
  readonly op: 'not';
  readonly child: FieldPredicate;
};
interface FieldsEntityQuery<T> {
  readonly entityTypes: readonly string[];
  readonly predicate: FieldPredicate;
  readonly orderBy?: {
    readonly path: FieldPath;
    readonly direction: 'asc' | 'desc';
    readonly nulls?: 'first' | 'last';
  };
  readonly page: number;
  readonly pageSize: number;
  readonly projection?: T;
}
interface FieldsAuthorizedQueryScope {
  readonly policyVersion: string;
  applyTo<T>(query: FieldsEntityQuery<T>): FieldsEntityQuery<T>;
}
interface FieldsEntityQueryAdapter<T> {
  query(input: FieldsEntityQuery<T>, authorizedScope: FieldsAuthorizedQueryScope): Promise<{
    items: T[];
    totalItems: number;
  }>;
}
type QueryFieldDefinition = AnyFieldDefinition;
declare function resolveQueryFieldPath(groups: readonly FieldGroup[], path: FieldPath): QueryFieldDefinition;
declare function validateFieldsEntityQuery<T>(input: FieldsEntityQuery<T>, groups: readonly FieldGroup[]): FieldsEntityQuery<T>;
declare function queryFieldEntities<T>(adapter: FieldsEntityQueryAdapter<T>, input: FieldsEntityQuery<T>, groups: readonly FieldGroup[], authorizedScope: FieldsAuthorizedQueryScope): Promise<{
  items: readonly T[];
  totalItems: number;
}>;
//#endregion
//#region src/types.d.ts
interface DefinitionLimits {
  maxBytes: number;
  maxDepth: number;
  maxChildren: number;
}
interface ValueLimits {
  maxBytes: number;
  maxDepth: number;
  maxNodes: number;
}
interface FieldHeadlessSchema {
  type: string;
  nullable: boolean;
  readOnly?: boolean;
  constraints: Readonly<Record<string, unknown>>;
}
type RevisionFieldValue = FieldStorageValue | {
  configured: boolean;
};
declare const sanitizedFieldHtmlBrand: unique symbol;
interface SanitizedFieldHtml {
  readonly html: string;
  readonly [sanitizedFieldHtmlBrand]: true;
}
type FieldPresentation<T> = {
  readonly kind: 'text';
  readonly value: string;
} | {
  readonly kind: 'structured';
  readonly value: T;
} | {
  readonly kind: 'sanitizedHtml';
  readonly value: SanitizedFieldHtml;
};
interface FieldsPrincipal {
  readonly id: string;
  readonly capabilities: ReadonlySet<string>;
  readonly system?: boolean;
}
type FieldsAction = 'read' | 'write' | 'delete' | 'manageDefinitions' | 'migrateDefinitions' | 'readTarget' | 'writeReverseTarget';
interface FieldsAuthorizedQueryScopeLike {
  readonly policyVersion: string;
  applyTo<T>(query: T): T;
}
interface FieldsAuthorization {
  assert(principal: FieldsPrincipal, action: FieldsAction, ref: {
    entityType: string;
    entityId: string;
  }): Promise<void> | void;
  assertDefinitionMigration(principal: FieldsPrincipal, entityTypes: readonly string[]): Promise<{
    policyVersion: string;
  }> | {
    policyVersion: string;
  };
  authorizedQueryScope?(principal: FieldsPrincipal, action: 'read', entityTypes: readonly string[]): FieldsAuthorizedQueryScopeLike;
}
interface FieldsContext {
  readonly sanitizer?: {
    sanitizeHtml(input: string): Promise<string> | string;
  };
  readonly fieldTypeRegistry?: FieldTypeRegistry;
  readonly cloneResolver?: {
    resolve(definition: AnyFieldDefinition): readonly AnyFieldDefinition[];
  };
  readonly principal?: FieldsPrincipal;
  readonly authorization?: unknown;
}
interface AuthorizedFieldsContext extends FieldsContext {
  readonly principal: FieldsPrincipal;
  readonly authorization: FieldsAuthorization;
}
interface ResolvedAnyFieldDefinition {
  readonly key: FieldKey;
  readonly name: string;
  readonly label: string;
  readonly type: string;
  readonly settings: unknown;
  readonly required?: boolean;
  readonly readOnly?: boolean;
}
interface RuntimeFieldTypeDescriptor {
  readonly type: string;
  readonly contractVersion: string;
  readonly schemaHash: string;
  readonly codecHash: string;
  parseDefinition(input: unknown, limits: DefinitionLimits): ResolvedAnyFieldDefinition;
  parseValue(input: unknown, settings: unknown, limits: ValueLimits): unknown;
  parseWrite(input: unknown, settings: unknown, limits: ValueLimits): unknown;
  serialize(value: unknown, settings: unknown): FieldStorageValue;
  deserialize(value: FieldStorageValue, settings: unknown): unknown;
  format(value: unknown, settings: unknown, context: FieldsContext): Promise<FieldPresentation<unknown>> | FieldPresentation<unknown>;
  schema(settings: unknown): FieldHeadlessSchema;
  redactForRevision(value: unknown, settings: unknown): RevisionFieldValue | 'omit';
}
interface CustomFieldTypeDescriptor<K extends string, S, V, W = V, F = V> extends RuntimeFieldTypeDescriptor {
  readonly type: K;
  readonly contract?: {
    readonly settings: S;
    readonly value: V;
    readonly write: W;
    readonly formatted: F;
  };
}
declare const customFieldDefinitionBrand: unique symbol;
interface TypedCustomFieldDefinition<K extends string = string, S = unknown, V = unknown, W = V, F = V> {
  readonly key: FieldKey;
  readonly name: string;
  readonly label: string;
  readonly type: K;
  readonly settings: S;
  readonly required?: boolean;
  readonly readOnly?: boolean;
  readonly [customFieldDefinitionBrand]: true;
  readonly customContract?: {
    readonly value: V;
    readonly write: W;
    readonly formatted: F;
  };
}
type ResolvedFieldDefinition = AnyFieldDefinition | TypedCustomFieldDefinition;
interface FieldTypeRegistry {
  readonly version: string;
  readonly builtInTypes: ReadonlySet<FieldType>;
  has(type: string): boolean;
  resolve(type: string): RuntimeFieldTypeDescriptor | undefined;
  parseDefinition(input: unknown, limits: DefinitionLimits): ResolvedAnyFieldDefinition;
}
declare const FIELD_DEFINITION_LIMITS: DefinitionLimits;
declare const FIELD_VALUE_LIMITS: ValueLimits;
declare function createFieldTypeRegistry(input?: {
  extensions?: readonly RuntimeFieldTypeDescriptor[];
}): FieldTypeRegistry;
declare function defineCustomField<K extends string, S, V, W, F>(descriptor: CustomFieldTypeDescriptor<K, S, V, W, F>, definition: Omit<TypedCustomFieldDefinition<K, S, V, W, F>, typeof customFieldDefinitionBrand | 'customContract'>): TypedCustomFieldDefinition<K, S, V, W, F>;
declare function isSanitizedFieldHtml(value: unknown): value is SanitizedFieldHtml;
declare function sanitizeFieldHtml(input: string, context: FieldsContext): Promise<SanitizedFieldHtml>;
declare function assertSerializableFieldPresentation(value: unknown): FieldPresentation<unknown>;
//#endregion
//#region src/values.d.ts
interface MediaFieldRef<K extends 'image' | 'file' = 'image' | 'file'> {
  readonly id: string;
  readonly kind: K;
  readonly mimeType?: string;
}
interface EntityFieldRef {
  readonly entityType: string;
  readonly id: string;
}
interface TermFieldRef {
  readonly taxonomy: string;
  readonly id: string;
}
interface UserFieldRef {
  readonly id: string;
}
interface MapValue {
  readonly latitude: number;
  readonly longitude: number;
  readonly address?: string;
  readonly zoom?: number;
  readonly metadata?: Readonly<Record<string, string>>;
}
interface LinkValue {
  readonly url: string;
  readonly title: string;
  readonly target?: '_self' | '_blank';
}
type PasswordWrite = {
  readonly operation: 'set';
  readonly value: string;
} | {
  readonly operation: 'clear';
} | {
  readonly operation: 'unchanged';
};
interface PasswordRead {
  readonly configured: boolean;
}
type FieldValueMap$1 = Readonly<Record<string, unknown>>;
interface RepeaterRow {
  readonly rowId: string;
  readonly values: FieldValueMap$1;
}
interface FlexibleRow {
  readonly rowId: string;
  readonly layoutKey: string;
  readonly values: FieldValueMap$1;
}
interface FieldValueAuthorization {
  assertTarget(ref: EntityFieldRef, action: 'readTarget' | 'writeReverseTarget'): Promise<void> | void;
}
interface FieldMediaMetadata {
  readonly mimeType: string;
  readonly bytes: number;
  readonly width?: number;
  readonly height?: number;
}
interface FieldMediaMetadataResolver {
  resolve(ref: MediaFieldRef): Promise<FieldMediaMetadata | undefined>;
}
interface FieldProjectionResolvers {
  media(ref: MediaFieldRef, projection: 'id' | 'url'): Promise<string>;
  entity(ref: EntityFieldRef, projection: 'id' | 'object'): Promise<string | Readonly<Record<string, unknown>>>;
  term(ref: TermFieldRef, projection: 'id' | 'object'): Promise<string | Readonly<Record<string, unknown>>>;
  user(ref: UserFieldRef, projection: 'id' | 'object'): Promise<string | Readonly<Record<string, unknown>>>;
}
interface CloneDefinitionResolver {
  resolve(definition: FieldDefinition<'clone'>): readonly AnyFieldDefinition[];
}
interface FieldValueContext extends FieldsContext {
  readonly authorization?: FieldValueAuthorization;
  readonly mediaMetadata?: FieldMediaMetadataResolver;
  readonly cloneResolver?: CloneDefinitionResolver;
}
declare function validateFieldValue(definition: ResolvedFieldDefinition, input: unknown, registry: FieldTypeRegistry, context?: FieldValueContext, limits?: ValueLimits): Promise<unknown>;
declare function formatFieldValue(definition: ResolvedFieldDefinition, value: unknown, registry: FieldTypeRegistry, resolvers: FieldProjectionResolvers, context?: FieldValueContext): Promise<FieldPresentation<unknown>>;
declare function serializeFieldValue(definition: ResolvedFieldDefinition, value: unknown, registry: FieldTypeRegistry): FieldStorageValue;
declare function deserializeFieldValue(definition: ResolvedFieldDefinition, value: FieldStorageValue, registry: FieldTypeRegistry): unknown;
declare function redactFieldValueForRevision(definition: ResolvedFieldDefinition, value: unknown, registry: FieldTypeRegistry): RevisionFieldValue | 'omit';
declare function repeaterRows(value: readonly RepeaterRow[]): IterableIterator<RepeaterRow>;
declare function flexibleRows(value: readonly FlexibleRow[], layoutKey?: string): IterableIterator<FlexibleRow>;
interface EncodeFieldNodesOptions {
  entityType: string;
  entityId: string;
  definitionRevision: number;
  nodeIdForPath(path: string): string;
  cloneResolver?: CloneDefinitionResolver;
}
declare function encodeFieldValueNodes(group: FieldGroup, values: FieldValueMap$1, options: EncodeFieldNodesOptions): readonly FieldValueNodeRow[];
declare function isCanonicalFieldValuePath(path: string): boolean;
interface DecodeFieldNodesOptions {
  definitionRevision: number;
  cloneResolver?: CloneDefinitionResolver;
}
declare function decodeFieldValueNodes(group: FieldGroup, nodes: readonly FieldValueNodeRow[], options: DecodeFieldNodesOptions): FieldValueMap$1;
declare function authorizeRelationshipReplacement(definition: ResolvedFieldDefinition, before: readonly EntityFieldRef[], after: readonly EntityFieldRef[], authorization: FieldValueAuthorization): Promise<void>;
//#endregion
//#region src/location.d.ts
interface LocationContext {
  entityType: string;
  subType?: string;
  entityId?: string;
  status?: string;
  template?: string;
  parentId?: string;
  taxonomy?: Readonly<Record<string, readonly string[]>>;
  format?: string;
  authorId?: string;
  actorRoles?: readonly string[];
  surface?: 'entry' | 'term' | 'user' | 'comment' | 'media' | 'menu' | 'widget' | 'options' | 'block';
  blockType?: string;
  route?: string;
  optionsPage?: string;
}
interface LocationParameterResolver {
  readonly parameter: string;
  resolve(context: LocationContext): Promise<LocationValue | undefined> | LocationValue | undefined;
}
interface LocationResolverRegistry {
  readonly version: string;
  evaluate(rules: LocationRuleGroups, context: LocationContext): Promise<boolean>;
}
declare const BUILTIN_LOCATION_RESOLVERS: readonly LocationParameterResolver[];
declare function createLocationResolverRegistry(input?: {
  builtIns?: readonly LocationParameterResolver[];
  extensions?: readonly LocationParameterResolver[];
}): LocationResolverRegistry;
//#endregion
//#region src/conditional.d.ts
declare function resolveConditionalPath(values: unknown, path: FieldPath): readonly unknown[];
declare function evaluateConditionalRule(rule: ConditionalRule, values: unknown): boolean;
declare function evaluateConditionalLogic(groups: ConditionalRuleGroups | undefined, values: unknown): boolean;
declare function validateConditionalDependencies(fields: readonly AnyFieldDefinition[]): void;
//#endregion
//#region src/blocks.d.ts
type BlockAttributeValue = string | number | boolean | null | readonly BlockAttributeValue[];
interface BlockFieldGroupValue {
  readonly groupKey: string;
  readonly definitionRevision: number;
  readonly values: FieldValueMap$1;
}
interface InlineBlockNode {
  readonly kind: 'inline';
  readonly id: string;
  readonly type: string;
  readonly blockDefinitionRevision: number;
  readonly fieldGroups: readonly BlockFieldGroupValue[];
  readonly attributes?: Readonly<Record<string, BlockAttributeValue>>;
  readonly children?: readonly BlockNode[];
}
interface ReusableBlockNode {
  readonly kind: 'reusable';
  readonly id: string;
  readonly reusableId: string;
}
type BlockNode = InlineBlockNode | ReusableBlockNode;
interface BlockDocument {
  readonly version: 1;
  readonly roots: readonly BlockNode[];
}
interface FieldBlockDefinition extends Omit<FieldBlockDefinitionSnapshot, 'template'> {
  readonly template?: readonly BlockNode[];
}
interface CodeFieldBlock extends FieldBlockDefinition {
  readonly origin: 'code';
}
interface ResolvedFieldBlock extends FieldBlockDefinition {
  readonly origin: 'code' | 'db';
  readonly version: number;
  readonly active: boolean;
  readonly shadowedDbVersion?: number;
}
interface FieldBlockDefinitionVersion {
  readonly blockKey: string;
  readonly revision: number;
  readonly canonicalHash: string;
  readonly definition: FieldBlockDefinition;
  readonly createdAt: Date;
  readonly origin: 'code' | 'db' | 'import';
}
interface FieldBlockDefinitionResolver {
  resolve(blockKey: string, revision: number): Promise<FieldBlockDefinitionVersion | null>;
}
interface ResolvedFieldBlockRegistry {
  readonly version: string;
  readonly blocks: ReadonlyMap<string, ResolvedFieldBlock>;
  readonly definitions: FieldBlockDefinitionResolver;
}
interface FieldBlockDefinitionImpact {
  readonly token: string;
  readonly blockKey: string;
  readonly expectedVersion: number;
  readonly authorizationPolicyVersion: string;
  readonly documentCorpusVersion: string;
  readonly documentCorpusHash: string;
  readonly affectedDocuments: number;
  readonly affectedDefinitionVersions: number;
  readonly incompatibilities: readonly string[];
}
type FieldBlockDefinitionPatch = Partial<Omit<FieldBlockDefinition, 'key'>>;
type FieldBlockChangeStrategy = {
  readonly kind: 'reject';
} | {
  readonly kind: 'retainUnknown';
} | {
  readonly kind: 'mapDefinition';
  readonly replacementKey: string;
} | {
  readonly kind: 'purgeWithBackup';
  readonly backupId: string;
};
interface BlockPolicy {
  readonly maxBytes: number;
  readonly maxNodes: number;
  readonly maxDepth: number;
  readonly maxChildren: number;
  readonly maxAttributeBytes: number;
  readonly allowUnknownPreserved?: boolean;
}
interface ReusableBlockResolver {
  resolve(id: string, context: FieldsContext): Promise<{
    document: BlockDocument;
    version: number;
  } | null>;
}
interface BlockRenderer<R> {
  render(node: ValidatedInlineBlockNode, definition: FieldBlockDefinitionVersion, context: FieldsContext): Promise<R> | R;
}
interface CurrentBlockDocument {
  readonly ref: EntityRef;
  readonly document: BlockDocument;
  readonly version: FieldsValueVersion;
  readonly definitionVersions: Readonly<Record<string, number>>;
}
interface BlockDocumentMutationOptions {
  readonly expectedVersion: FieldsValueVersion;
  readonly operationId: string;
  readonly expectedTransactionIdentity: TransactionIdentity;
  readonly parentRevisionId: string;
}
declare const EMPTY_BLOCK_DOCUMENT_VERSION: FieldsValueVersion;
declare const validatedBlockNodeBrand: unique symbol;
declare const validatedBlockDocumentBrand: unique symbol;
declare const validatedRegistryVersion: unique symbol;
interface ValidatedInlineBlockNode extends Omit<InlineBlockNode, 'children'> {
  readonly children?: readonly ValidatedBlockNode[];
  readonly [validatedBlockNodeBrand]: true;
}
interface ValidatedReusableBlockNode extends ReusableBlockNode {
  readonly [validatedBlockNodeBrand]: true;
}
type ValidatedBlockNode = ValidatedInlineBlockNode | ValidatedReusableBlockNode;
interface ValidatedBlockDocument extends Omit<BlockDocument, 'roots'> {
  readonly roots: readonly ValidatedBlockNode[];
  readonly [validatedBlockDocumentBrand]: true;
  readonly [validatedRegistryVersion]: string;
}
declare function defineFieldBlock(definition: FieldBlockDefinition): CodeFieldBlock;
declare function resolveFieldBlocks(db: FieldsReader, input?: {
  codeBlocks?: readonly CodeFieldBlock[];
}): Promise<ResolvedFieldBlockRegistry>;
declare function createFieldBlock(tx: FieldsTransaction, definition: FieldBlockDefinition, context: FieldsContext, input: {
  codeBlocks?: readonly CodeFieldBlock[];
  operationId: string;
}): Promise<ResolvedFieldBlock>;
declare const DEFAULT_BLOCK_POLICY: BlockPolicy;
declare function validateBlockDocument(document: BlockDocument, registry: ResolvedFieldBlockRegistry, resolver: ReusableBlockResolver, context: FieldsContext, policy: BlockPolicy): Promise<ValidatedBlockDocument>;
declare function parseBlockDocument(input: string, policy: BlockPolicy): BlockDocument;
declare function serializeBlockDocument(document: ValidatedBlockDocument): string;
declare function validateBlockPublication(document: ValidatedBlockDocument, registry: ResolvedFieldBlockRegistry, resolver: ReusableBlockResolver, context: FieldsContext, policy: BlockPolicy): Promise<void>;
declare function renderBlockDocument<R>(document: ValidatedBlockDocument, registry: ResolvedFieldBlockRegistry, resolver: ReusableBlockResolver, renderer: BlockRenderer<R>, context: FieldsContext): Promise<R[]>;
declare function getBlockDocument(db: FieldsReader, ref: EntityRef, context: FieldsContext): Promise<CurrentBlockDocument | null>;
declare function setBlockDocument(tx: FieldsTransaction, ref: EntityRef, document: ValidatedBlockDocument, mutation: BlockDocumentMutationOptions, registry: ResolvedFieldBlockRegistry, context: FieldsContext): Promise<CurrentBlockDocument>;
declare function deleteBlockDocument(tx: FieldsTransaction, ref: EntityRef, mutation: BlockDocumentMutationOptions, context: FieldsContext): Promise<void>;
declare function createReusableBlockResolver(db: FieldsReader): ReusableBlockResolver;
declare function previewFieldBlockChange(db: FieldsReader, context: FieldsContext, input: {
  key: string;
  expectedVersion: number;
  patch?: FieldBlockDefinitionPatch;
  deactivate?: boolean;
  delete?: boolean;
  strategy: FieldBlockChangeStrategy;
}): Promise<FieldBlockDefinitionImpact>;
declare function applyFieldBlockChange(tx: FieldsTransaction, context: FieldsContext, input: {
  impactToken: string;
  operationId: string;
  strategy: FieldBlockChangeStrategy;
}, options: {
  codeBlocks?: readonly CodeFieldBlock[];
  destructive?: FieldsDestructiveDependencies;
}): Promise<ResolvedFieldBlock | null>;
//#endregion
//#region src/definition-lifecycle.d.ts
type FieldsLifecycleErrorCode = 'validation' | 'access-denied' | 'not-found' | 'stale-version' | 'operation-conflict' | 'integrity' | 'capability-unavailable' | 'transaction-capability' | 'backup-invalid' | 'corpus-drift';
declare class FieldsLifecycleError extends Error {
  readonly code: FieldsLifecycleErrorCode;
  readonly detail: string;
  readonly field?: string | undefined;
  readonly name = "FieldsLifecycleError";
  constructor(code: FieldsLifecycleErrorCode, detail: string, field?: string | undefined);
}
interface FieldsDefinitionEvent {
  readonly id: string;
  readonly version: 1;
  readonly kind: 'codeRegistryReconciled';
  readonly operationId: string;
  readonly principalId: string;
  readonly fromVersion: string;
  readonly toVersion: string;
  readonly changedKeys: readonly string[];
  readonly strategiesHash: string;
  readonly corpusHashes: readonly string[];
  readonly affectedCounts: Readonly<Record<string, number>>;
}
interface FieldsDefinitionEffects {
  audit(tx: FieldsTransaction, event: FieldsDefinitionEvent): Promise<void>;
  enqueue(tx: FieldsTransaction, event: FieldsDefinitionEvent): Promise<void>;
}
interface FieldsBackupManifest {
  readonly id: string;
  readonly scopeHash: string;
  readonly corpusVersion: string;
  readonly corpusHash: string;
  readonly itemCounts: Readonly<Record<string, number>>;
  readonly byteCount: number;
  readonly immutable: true;
}
interface FieldsBackupSnapshot {
  readonly manifest: FieldsBackupManifest;
  readonly payload: FieldStorageValue;
}
interface FieldsBackupStore {
  verify(tx: FieldsTransaction, backupId: string, scopeHash: string, corpusVersion: string, corpusHash: string, expectedCounts: Readonly<Record<string, number>>): Promise<FieldsBackupManifest>;
  read(tx: FieldsTransaction, manifest: FieldsBackupManifest): Promise<FieldsBackupSnapshot>;
}
interface FieldsDestructiveEvent {
  readonly operationId: string;
  readonly principalId: string;
  readonly definitionKind: 'group' | 'optionsPage' | 'block';
  readonly definitionKey: string;
  readonly strategy: FieldStorageValue;
  readonly authorizationPolicyVersion: string;
  readonly corpusVersion: string;
  readonly corpusHash: string;
  readonly previewToken: string;
  readonly affectedCounts: Readonly<Record<string, number>>;
  readonly backup: FieldsBackupManifest;
}
interface FieldsBackupRestoreEvent {
  readonly kind: 'backupRestored';
  readonly operationId: string;
  readonly principalId: string;
  readonly authorizationPolicyVersion: string;
  readonly manifest: FieldsBackupManifest;
  readonly destinationCorpusHash: string;
  readonly restoredCounts: Readonly<Record<string, number>>;
}
type FieldsDestructiveEffectEvent = FieldsDestructiveEvent | FieldsBackupRestoreEvent;
interface FieldsDestructiveEffects {
  readonly audit: {
    record(tx: FieldsTransaction, event: FieldsDestructiveEffectEvent): Promise<void>;
  };
  readonly outbox: {
    enqueue(tx: FieldsTransaction, event: FieldsDestructiveEffectEvent): Promise<void>;
  };
}
interface FieldsDestructiveDependencies {
  readonly backups: FieldsBackupStore;
  readonly effects: FieldsDestructiveEffects;
}
interface FieldsBackupRestoreResult {
  readonly operationId: string;
  readonly manifestId: string;
  readonly destinationCorpusHash: string;
  readonly restoredCounts: Readonly<Record<string, number>>;
}
interface FieldsLifecycleReader {
  execute(query: SQLWrapper): Promise<unknown>;
}
interface CodeFinalFieldGroup extends FieldGroup {
  readonly origin: 'code';
}
interface ResolvedFinalFieldGroup extends FieldGroup {
  readonly origin: 'code' | 'db';
  readonly version: number;
  readonly revision: number;
  readonly shadowedDbVersion?: number;
}
interface FieldPathMapping {
  readonly from: FieldPath;
  readonly to: FieldPath | null;
}
type FieldGroupChangeStrategy = {
  readonly kind: 'reject';
} | {
  readonly kind: 'deactivate';
} | {
  readonly kind: 'retainValues';
} | {
  readonly kind: 'migrateValues';
  readonly mappings: readonly FieldPathMapping[];
} | {
  readonly kind: 'purgeValues';
  readonly backupId: string;
};
type FieldGroupPatch = Partial<Omit<FieldGroup, 'key'>>;
interface FieldDefinitionImpact {
  readonly token: string;
  readonly groupKey: string;
  readonly expectedVersion: number;
  readonly authorizationPolicyVersion: string;
  readonly valueCorpusVersion: string;
  readonly valueCorpusHash: string;
  readonly affectedCounts: Readonly<Record<string, number>>;
  readonly incompatibilities: readonly string[];
}
declare function defineFinalFieldGroup(definition: FieldGroup): CodeFinalFieldGroup;
declare function resolveFinalFieldGroups(db: FieldsLifecycleReader, input?: {
  codeGroups?: readonly CodeFinalFieldGroup[];
}): Promise<ResolvedFinalFieldGroup[]>;
declare function createFieldGroup(tx: FieldsTransaction, definition: FieldGroup, context: FieldsContext, input: {
  codeGroups?: readonly CodeFinalFieldGroup[];
  operationId: string;
}): Promise<ResolvedFinalFieldGroup>;
declare function previewFieldGroupChange(db: FieldsLifecycleReader, key: string, expectedVersion: number, patch: FieldGroupPatch, strategyInput: FieldGroupChangeStrategy, context: FieldsContext): Promise<FieldDefinitionImpact>;
declare function applyFieldGroupChange(tx: FieldsTransaction, impactToken: string, strategyInput: FieldGroupChangeStrategy, operationId: string, context: FieldsContext, destructive?: FieldsDestructiveDependencies): Promise<ResolvedFinalFieldGroup | null>;
interface CodeFieldsRegistrySnapshot {
  readonly version: string;
  readonly canonicalHash: string;
  readonly groups: readonly CodeFinalFieldGroup[];
  readonly optionsPages: readonly CodeOptionsPage[];
  readonly blocks: readonly CodeFieldBlock[];
}
interface FieldsCodeReconciliationPlan {
  readonly token: string;
  readonly fromVersion: string;
  readonly nextCanonicalHash: string;
  readonly groupImpacts: readonly FieldDefinitionImpact[];
  readonly optionsImpacts: readonly OptionsPageImpact[];
  readonly blockImpacts: readonly FieldBlockDefinitionImpact[];
}
declare function previewFieldsCodeReconciliation(db: FieldsLifecycleReader, context: FieldsContext, input: {
  expectedCurrentVersion: string;
  next: CodeFieldsRegistrySnapshot;
  groupStrategies: Readonly<Record<string, FieldGroupChangeStrategy>>;
  optionsStrategies: Readonly<Record<string, OptionsPageDeactivateStrategy>>;
  blockStrategies: Readonly<Record<string, FieldBlockChangeStrategy>>;
}): Promise<FieldsCodeReconciliationPlan>;
declare function applyFieldsCodeReconciliation(tx: FieldsTransaction, context: FieldsContext, input: {
  planToken: string;
  operationId: string;
  next: CodeFieldsRegistrySnapshot;
  groupStrategies: Readonly<Record<string, FieldGroupChangeStrategy>>;
  optionsStrategies: Readonly<Record<string, OptionsPageDeactivateStrategy>>;
  blockStrategies: Readonly<Record<string, FieldBlockChangeStrategy>>;
}, effects: FieldsDefinitionEffects, destructive?: FieldsDestructiveDependencies): Promise<CodeFieldsRegistrySnapshot>;
interface FieldsBackupGroupDefinitionSnapshot {
  readonly key: string;
  readonly definition: FieldGroup;
}
interface FieldsBackupOptionsDefinitionSnapshot {
  readonly key: string;
  readonly definition: Omit<CodeOptionsPage, 'origin'>;
  readonly active: boolean;
}
interface FieldsBackupBlockDefinitionSnapshot {
  readonly key: string;
  readonly definition: Omit<CodeFieldBlock, 'origin'>;
  readonly active: boolean;
}
interface FieldsBackupValueSnapshot {
  readonly ref: EntityRef;
  readonly groupKey: string;
  readonly definitionRevision: number;
  readonly values: FieldStorageValue;
}
interface FieldsBackupBlockDocumentSnapshot {
  readonly ref: EntityRef;
  readonly document: FieldStorageValue;
  readonly definitionVersions: Readonly<Record<string, number>>;
  readonly parentRevisionId: string;
}
interface FieldsBackupReusableBlockSnapshot {
  readonly id: string;
  readonly document: FieldStorageValue;
  readonly definitionVersions: Readonly<Record<string, number>>;
}
interface FieldsBackupRevisionSnapshot {
  readonly id: string;
  readonly ref: EntityRef;
  readonly parentRevisionId: string;
  readonly parentAutosaveId?: string;
  readonly kind: 'revision' | 'autosave';
  readonly retentionClass?: string;
  readonly definitionVersions: Readonly<Record<string, number>>;
  readonly values: FieldStorageValue;
  readonly blockDocument?: FieldStorageValue;
  readonly createdAt: string;
  readonly createdBy: string;
  readonly sourceVersion: string;
}
interface FieldsBackupPayload {
  readonly version: 1;
  readonly groupDefinitions?: readonly FieldsBackupGroupDefinitionSnapshot[];
  readonly optionsDefinitions?: readonly FieldsBackupOptionsDefinitionSnapshot[];
  readonly blockDefinitions?: readonly FieldsBackupBlockDefinitionSnapshot[];
  readonly values?: readonly FieldsBackupValueSnapshot[];
  readonly blockDocuments?: readonly FieldsBackupBlockDocumentSnapshot[];
  readonly reusableBlocks?: readonly FieldsBackupReusableBlockSnapshot[];
  readonly revisions?: readonly FieldsBackupRevisionSnapshot[];
}
declare function fieldsBackupDestinationHash(db: FieldsLifecycleReader, payload: FieldsBackupPayload): Promise<string>;
declare function restoreFieldsBackup(tx: FieldsTransaction, manifest: FieldsBackupManifest, destinationCorpusHash: string, operationId: string, context: FieldsContext, effects: FieldsDestructiveEffects, backups: FieldsBackupStore): Promise<FieldsBackupRestoreResult>;
//#endregion
//#region src/options.d.ts
interface OptionsPageDefinition extends OptionsPageDefinitionSnapshot {}
interface CodeOptionsPage extends OptionsPageDefinition {
  readonly origin: 'code';
}
interface ResolvedOptionsPage extends OptionsPageDefinition {
  readonly origin: 'code' | 'db';
  readonly version: number;
  readonly active: boolean;
  readonly shadowedDbVersion?: number;
}
interface OptionsPageImpact {
  readonly token: string;
  readonly pageKey: string;
  readonly expectedVersion: number;
  readonly authorizationPolicyVersion: string;
  readonly valueCorpusVersion: string;
  readonly valueCorpusHash: string;
  readonly affectedCounts: Readonly<Record<string, number>>;
}
type OptionsPageDeactivateStrategy = {
  readonly kind: 'retain';
} | {
  readonly kind: 'purge';
  readonly backupId: string;
};
type OptionsPagePatch = Partial<Omit<OptionsPageDefinition, 'key'>>;
type EntityFieldValueMap = Readonly<Record<string, FieldValueMap$1>>;
type EntityFieldWriteMap = Readonly<Record<string, FieldValueMap$1>>;
type FieldsValueVersion = string;
interface FieldsReadResult<V> {
  readonly values: V;
  readonly version: FieldsValueVersion;
  readonly definitionVersions: Readonly<Record<string, number>>;
}
interface FieldsMutationResult {
  readonly version: FieldsValueVersion;
  readonly changedPaths: readonly (readonly (string | number)[])[];
}
interface FieldsMutationOptions {
  readonly expectedVersion: FieldsValueVersion;
  readonly operationId: string;
  readonly expectedTransactionIdentity?: TransactionIdentity;
}
interface FieldsReader {
  execute(query: SQLWrapper): Promise<unknown>;
}
declare function defineOptionsPage(definition: OptionsPageDefinition): CodeOptionsPage;
declare function resolveOptionsPages(db: FieldsReader, input?: {
  codePages?: readonly CodeOptionsPage[];
}): Promise<ResolvedOptionsPage[]>;
declare function createOptionsPage(tx: FieldsTransaction, definition: OptionsPageDefinition, context: FieldsContext, input: {
  codePages?: readonly CodeOptionsPage[];
  operationId: string;
}): Promise<ResolvedOptionsPage>;
declare function updateOptionsPage(tx: FieldsTransaction, key: string, patch: OptionsPagePatch, expectedVersion: number, context: FieldsContext, input: {
  codePages?: readonly CodeOptionsPage[];
  operationId: string;
}): Promise<ResolvedOptionsPage>;
declare function previewOptionsPageDeactivation(db: FieldsReader, key: string, expectedVersion: number, context: FieldsContext): Promise<OptionsPageImpact>;
declare function applyOptionsPageDeactivation(tx: FieldsTransaction, impactToken: string, strategy: OptionsPageDeactivateStrategy, operationId: string, context: FieldsContext, destructive?: FieldsDestructiveDependencies): Promise<ResolvedOptionsPage>;
declare function getOptionsValues(db: FieldsReader, key: string, context: FieldsContext): Promise<FieldsReadResult<EntityFieldValueMap>>;
declare function setOptionsValues(tx: FieldsTransaction, key: string, values: EntityFieldWriteMap, mutation: FieldsMutationOptions, context: FieldsContext): Promise<FieldsMutationResult>;
//#endregion
//#region src/revisions.d.ts
interface FieldsRevision {
  readonly id: string;
  readonly ref: EntityRef;
  readonly parentRevisionId: string;
  readonly parentAutosaveId?: string;
  readonly kind: 'revision' | 'autosave';
  readonly retentionClass?: string;
  readonly definitionVersions: Readonly<Record<string, number>>;
  readonly values: Readonly<Record<string, FieldStorageValue>>;
  readonly blockDocument?: StoredBlockDocument;
  readonly createdAt: Date;
  readonly createdBy: string;
  readonly sourceVersion: string;
}
interface FieldsRevisionCursor {
  readonly createdAt: Date;
  readonly id: string;
}
interface FieldsRevisionPage {
  readonly items: readonly FieldsRevision[];
  readonly nextCursor: FieldsRevisionCursor | null;
}
interface FieldsRevisionDiff {
  readonly valuePaths: readonly {
    path: readonly (string | number)[];
    kind: 'added' | 'removed' | 'changed';
  }[];
  readonly blockNodes: readonly {
    nodeId: string;
    kind: 'added' | 'removed' | 'moved' | 'changed';
  }[];
}
interface FieldsRevisionMutation {
  readonly expectedVersion: string;
  readonly operationId: string;
  readonly expectedTransactionIdentity: TransactionIdentity;
  readonly parentRevisionId: string;
}
interface FieldsAutosaveMutation extends FieldsRevisionMutation {
  readonly parentAutosaveId: string;
  readonly retentionClass: string;
}
interface FieldsAutosaveRetentionPolicy {
  readonly maxPerParent: number;
  readonly maxAgeMs: number;
  readonly classes: Readonly<Record<string, {
    maxPerParent: number;
    maxAgeMs: number;
  }>>;
}
/** Public structural error shape shared safely across separate package installs. */
interface FieldsLifecycleErrorShape {
  readonly name: 'FieldsLifecycleError';
  readonly code: string;
  readonly detail: string;
  readonly message: string;
  readonly stack?: string;
  readonly field?: string;
}
/** Structural guard that remains valid when separate installs contribute the error. */
declare function isFieldsLifecycleError(error: unknown): error is FieldsLifecycleErrorShape;
declare function fieldsRuntimeMigrationSql(adapter: 'postgres' | 'd1'): readonly string[];
/** D1 counterpart to captureFieldsRevision: package-owned statements, host-owned batch. */
declare function prepareCaptureFieldsRevisionD1(db: Pick<D1Client, 'execute' | 'prepare'>, ref: EntityRef, mutation: Omit<FieldsRevisionMutation, 'expectedTransactionIdentity'>, context: FieldsContext): Promise<D1PreparedContribution<FieldsRevision>>;
declare function captureFieldsRevision(tx: FieldsTransaction, ref: EntityRef, mutation: FieldsRevisionMutation, context: FieldsContext): Promise<FieldsRevision>;
declare function createFieldsAutosave(tx: FieldsTransaction, ref: EntityRef, mutation: FieldsAutosaveMutation, context: FieldsContext): Promise<FieldsRevision>;
declare function getFieldsRevision(db: Querier<FieldsSchema>, ref: EntityRef, revisionId: string, context: FieldsContext): Promise<FieldsRevision | null>;
declare function listFieldsRevisions(db: Querier<FieldsSchema>, ref: EntityRef, input: {
  cursor?: FieldsRevisionCursor;
  limit: number;
  kind?: 'revision' | 'autosave';
}, context: FieldsContext): Promise<FieldsRevisionPage>;
declare function diffFieldsRevisions(db: Querier<FieldsSchema>, ref: EntityRef, leftRevisionId: string, rightRevisionId: string, context: FieldsContext): Promise<FieldsRevisionDiff>;
declare function restoreFieldsRevision(tx: FieldsTransaction, ref: EntityRef, revisionId: string, mutation: FieldsRevisionMutation, context: FieldsContext): Promise<{
  version: string;
  revision: FieldsRevision;
}>;
declare function pruneFieldsAutosaves(tx: FieldsTransaction, ref: EntityRef, policy: FieldsAutosaveRetentionPolicy, operationId: string, context: FieldsContext): Promise<{
  deleted: number;
}>;
//#endregion
//#region src/import.d.ts
interface FieldsRevisionExport {
  readonly sourceRevisionKey: string;
  readonly sourceRef: EntityRef;
  readonly parentRevisionKey: string;
  readonly definitionVersions: Readonly<Record<string, number>>;
  readonly values: EntityFieldValueMap;
  readonly blockDocument?: BlockDocument;
  readonly createdAt: string;
  readonly createdBySourceId: string;
  readonly sourceVersion: number;
}
interface FieldDefinitionVersionExport {
  readonly groupKey: string;
  readonly revision: number;
  readonly canonicalHash: string;
  readonly definition: FieldGroup;
  readonly createdAt: string;
  readonly origin: 'code' | 'db' | 'import';
}
interface FieldBlockDefinitionVersionExport extends Omit<FieldBlockDefinitionVersion, 'createdAt'> {
  readonly createdAt: string;
}
interface FieldsExportManifest {
  readonly version: 1;
  readonly definitions: {
    readonly groups: readonly FieldGroup[];
    readonly versions: readonly FieldDefinitionVersionExport[];
    readonly optionsPages: readonly OptionsPageDefinition[];
    readonly blocks: readonly FieldBlockDefinition[];
    readonly blockVersions: readonly FieldBlockDefinitionVersionExport[];
  };
  readonly entities?: readonly {
    readonly sourceRef: EntityRef;
    readonly values: EntityFieldValueMap;
    readonly definitionVersions: Readonly<Record<string, number>>;
  }[];
  readonly revisions?: readonly FieldsRevisionExport[];
  readonly options?: readonly {
    readonly pageKey: string;
    readonly values: EntityFieldValueMap;
    readonly definitionVersions: Readonly<Record<string, number>>;
    readonly revision: number;
  }[];
  readonly blockDocuments?: readonly {
    readonly sourceRef: EntityRef;
    readonly document: BlockDocument;
    readonly version: string;
    readonly definitionVersions: Readonly<Record<string, number>>;
  }[];
  readonly omissions: readonly {
    readonly sourceRef: EntityRef;
    readonly fieldPath: FieldPath;
    readonly reason: 'sensitive' | 'unauthorized';
  }[];
}
interface FieldsImportLimits {
  readonly maxBytes: number;
  readonly maxDefinitions: number;
  readonly maxEntities: number;
  readonly maxRevisions: number;
  readonly maxBlockNodes: number;
  readonly maxDepth: number;
}
interface FieldsImportConflict {
  readonly section: 'definitions' | 'entities' | 'revisions' | 'options' | 'blockDocuments';
  readonly sourceKey: string;
  readonly kind: 'exists' | 'missingDependency' | 'incompatibleVersion' | 'unauthorized';
}
type FieldsImportConflictPolicy = 'reject' | 'preserveDestination' | 'replaceMapped';
interface FieldsImportRemappers {
  entity(ref: EntityRef): Promise<EntityRef | null>;
  user(id: string): Promise<string | null>;
  media(ref: MediaFieldRef): Promise<MediaFieldRef | null>;
  term(ref: TermFieldRef): Promise<TermFieldRef | null>;
  reusableBlock(id: string): Promise<string | null>;
}
interface ParsedFieldsImport {
  readonly manifestHash: string;
  readonly registryVersion: string;
  readonly manifest: FieldsExportManifest;
}
interface FieldsImportScope {
  readonly tenantKey: string;
  readonly entityTypes: readonly string[];
}
interface FieldsImportRequiredAuthority {
  readonly entityType: string;
  readonly branches: readonly ('manageDefinitions' | 'migrateDefinitions' | 'read' | 'write')[];
}
interface FieldsImportPlan {
  readonly planId: string;
  readonly manifestHash: string;
  readonly registryVersion: string;
  readonly codeRegistryVersion: string;
  readonly codeRegistryHash: string;
  readonly valueCorpusVersion: string;
  readonly authorizationPolicyVersion: string;
  readonly scope: FieldsImportScope;
  readonly requiredAuthority: readonly FieldsImportRequiredAuthority[];
  readonly mappings: Readonly<Record<string, string>>;
  readonly counts: Readonly<Record<'definitions' | 'entities' | 'revisions' | 'options' | 'blockDocuments', number>>;
  readonly conflicts: readonly FieldsImportConflict[];
  readonly omissions: FieldsExportManifest['omissions'];
  /** Immutable normalized bytes required by start/resume; never contains executable code. */
  readonly manifest: FieldsExportManifest;
  readonly policy: FieldsImportConflictPolicy;
}
interface FieldsImportStaging {
  readonly hostSessionId: string;
  readonly visibility: 'hiddenUntilPublish';
}
/** Read-and-prepare capability for native D1 import planning. It cannot submit a batch. */
interface FieldsImportD1PreparationDb extends FieldsReader {
  prepare<Row = unknown>(query: SQLWrapper): D1BatchItem<Row>;
}
type FieldsImportSection = 'definitions' | 'optionsPages' | 'blocks' | 'entities' | 'revisions' | 'options' | 'blockDocuments';
interface FieldsImportJournal {
  readonly importId: string;
  readonly version: string;
  readonly planId: string;
  readonly manifestHash: string;
  readonly codeRegistryVersion: string;
  readonly codeRegistryHash: string;
  readonly staging: FieldsImportStaging;
  readonly scope: FieldsImportScope;
  readonly authorizationPolicyVersion: string;
  readonly state: 'planned' | 'applying' | 'staged' | 'published' | 'rollingBack' | 'rolledBack' | 'reversing' | 'reversed' | 'failed';
  readonly nextSection: FieldsImportSection | null;
  readonly nextOffset: number;
}
interface FieldsImportCommand {
  readonly operationId: string;
  readonly expectedPlanId: string;
  readonly expectedManifestHash: string;
  readonly scope: FieldsImportScope;
  readonly expectedJournalVersion: string | null;
  readonly expectedSection: FieldsImportJournal['nextSection'];
  readonly expectedOffset: number | null;
}
interface FieldsPublishedReversePlan {
  readonly reversePlanId: string;
  readonly importId: string;
  readonly originalPlanId: string;
  readonly manifestHash: string;
  readonly publishedValueCorpusVersion: string;
  readonly beforeImageHash: string;
  readonly counts: FieldsImportPlan['counts'];
  readonly scope: FieldsImportScope;
  readonly requiredAuthority: readonly FieldsImportRequiredAuthority[];
  readonly authorizationPolicyVersion: string;
}
interface FieldsPublishedReverseCommand extends FieldsImportCommand {
  readonly expectedReversePlanId: string;
  readonly expectedPublishedValueCorpusVersion: string;
}
interface FieldsImportEvent {
  readonly kind: 'started' | 'batchStaged' | 'published' | 'rolledBack' | 'reversed';
  readonly operationId: string;
  readonly importId: string;
  readonly principalId: string;
  readonly planId: string;
  readonly manifestHash: string;
  readonly state: FieldsImportJournal['state'];
  readonly version: string;
  readonly nextSection: FieldsImportSection | null;
  readonly nextOffset: number;
  readonly counts: FieldsImportPlan['counts'];
}
interface FieldsImportEffects {
  audit(tx: FieldsTransaction, event: FieldsImportEvent): Promise<void>;
  enqueue(tx: FieldsTransaction, event: FieldsImportEvent): Promise<void>;
}
type FieldsImportErrorCode = 'validation' | 'limit' | 'access-denied' | 'stale-plan' | 'stale-journal' | 'operation-conflict' | 'integrity' | 'not-found';
declare class FieldsImportError extends Error {
  readonly code: FieldsImportErrorCode;
  readonly field?: string | undefined;
  readonly name = "FieldsImportError";
  constructor(code: FieldsImportErrorCode, message: string, field?: string | undefined);
}
declare function isFieldsImportError(error: unknown): error is FieldsImportError;
declare function parseFieldsImport(input: Uint8Array, limitsInput: FieldsImportLimits, registry: FieldTypeRegistry): Promise<ParsedFieldsImport>;
declare function planFieldsImport(db: FieldsReader, scopeInput: FieldsImportScope, parsed: ParsedFieldsImport, policy: FieldsImportConflictPolicy, remappers: FieldsImportRemappers, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<FieldsImportPlan>;
declare function planFieldsImportD1(db: FieldsReader, scopeInput: FieldsImportScope, parsed: ParsedFieldsImport, policy: FieldsImportConflictPolicy, remappers: FieldsImportRemappers, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<FieldsImportPlan>;
declare function startFieldsImport(tx: FieldsTransaction, plan: FieldsImportPlan, staging: FieldsImportStaging, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext, effects?: FieldsImportEffects): Promise<FieldsImportJournal>;
/** D1 start-import plan. The host appends its effects and commits the combined batch. */
declare function prepareStartFieldsImportD1(db: FieldsImportD1PreparationDb, plan: FieldsImportPlan, staging: FieldsImportStaging, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
declare function resumeFieldsImport(tx: FieldsTransaction, importId: string, batchSize: number, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext, effects?: FieldsImportEffects): Promise<FieldsImportJournal>;
/**
 * D1 staged-import guard. The host composes this read-only participant into its
 * one atomic batch when fields has no remaining resume transition.
 */
declare function prepareStagedFieldsImportGuardD1(db: FieldsImportD1PreparationDb, importId: string, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
/** D1 resume-import plan. The host appends its effects and commits the combined batch. */
declare function prepareResumeFieldsImportD1(db: FieldsImportD1PreparationDb, importId: string, batchSize: number, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
/** Predicts the exact semantic high-water mark a staged D1 publication will commit. */
declare function predictPublishedFieldsImportCorpus(db: Pick<D1Client<FieldsSchema>, 'execute'>, journal: FieldsImportJournal): Promise<string>;
/** D1 publish-import plan. The host appends effects and commits the combined batch. */
declare function preparePublishFieldsImportD1(db: FieldsImportD1PreparationDb, importId: string, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
declare function publishFieldsImport(tx: FieldsTransaction, importId: string, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext, effects?: FieldsImportEffects): Promise<FieldsImportJournal>;
/** D1 staged-rollback plan. The host appends effects and commits the combined batch. */
declare function prepareRollbackFieldsImportD1(db: FieldsImportD1PreparationDb, importId: string, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
declare function rollbackFieldsImport(tx: FieldsTransaction, importId: string, command: FieldsImportCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext, effects?: FieldsImportEffects): Promise<FieldsImportJournal>;
declare function planPublishedFieldsImportReverse(tx: FieldsReader, importId: string, scopeInput: FieldsImportScope, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<FieldsPublishedReversePlan>;
/** D1 published-reverse plan. The host appends effects and commits the combined batch. */
declare function planPublishedFieldsImportReverseD1(db: FieldsReader, importId: string, scopeInput: FieldsImportScope, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<FieldsPublishedReversePlan>;
declare function prepareReversePublishedFieldsImportD1(db: FieldsImportD1PreparationDb, reversePlan: FieldsPublishedReversePlan, command: FieldsPublishedReverseCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext): Promise<D1PreparedContribution<FieldsImportJournal>>;
declare function reversePublishedFieldsImport(tx: FieldsTransaction, reversePlan: FieldsPublishedReversePlan, command: FieldsPublishedReverseCommand, registry: FieldTypeRegistry, codeRegistry: CodeFieldsRegistrySnapshot, context: FieldsContext, effects?: FieldsImportEffects): Promise<FieldsImportJournal>;
//#endregion
//#region src/export.d.ts
interface FieldsExportSelection {
  readonly groups?: readonly string[];
  readonly entities?: readonly EntityRef[];
  readonly includeRevisions?: boolean;
  readonly includeOptions?: boolean;
  readonly includeBlocks?: boolean;
}
declare function exportFields(db: FieldsReader, selection: FieldsExportSelection, context: FieldsContext): Promise<FieldsExportManifest>;
declare function fieldsExportManifestHash(manifest: FieldsExportManifest): Promise<string>;
//#endregion
//#region src/headless.d.ts
interface FieldsHeadlessFieldSchema {
  readonly key: string;
  readonly name: string;
  readonly label: string;
  readonly type: string;
  readonly required: boolean;
  readonly readOnly: boolean;
  readonly value: FieldHeadlessSchema;
  readonly formatted: Readonly<Record<string, FieldStorageValue>>;
  readonly conditionalLogic?: unknown;
}
interface FieldsHeadlessGroupSchema {
  readonly key: string;
  readonly title: string;
  readonly version: number;
  readonly revision: number;
  readonly active: boolean;
  readonly origin: 'code' | 'db' | 'import';
  readonly location: FieldGroup['location'];
  readonly fields: readonly FieldsHeadlessFieldSchema[];
  readonly authorization: Readonly<{
    readAction: 'read';
    writeAction: 'write';
    manageAction: 'manageDefinitions';
  }>;
}
interface FieldsHeadlessOptionsSchema {
  readonly key: string;
  readonly title: string;
  readonly version: number;
  readonly revision: number;
  readonly active: boolean;
  readonly origin: 'code' | 'db' | 'import';
  readonly parentKey?: string;
  readonly fieldGroupKeys: readonly string[];
  readonly authorization: Readonly<{
    readCapability: string;
    writeCapability: string;
    manageCapability: string;
  }>;
}
interface FieldsHeadlessBlockSchema {
  readonly key: string;
  readonly title: string;
  readonly version: number;
  readonly revision: number;
  readonly active: boolean;
  readonly origin: 'code' | 'db' | 'import';
  readonly fieldGroupKeys: readonly string[];
  readonly parent?: readonly string[];
  readonly ancestor?: readonly string[];
  readonly supports?: FieldBlockDefinition['supports'];
  readonly templateLock?: FieldBlockDefinition['templateLock'];
  readonly tree: Readonly<Record<string, FieldStorageValue>>;
}
interface FieldsHeadlessSchema {
  readonly version: string;
  readonly registryVersion: string;
  readonly codeRegistryVersion?: string;
  readonly codeRegistryHash?: string;
  readonly groups: readonly FieldsHeadlessGroupSchema[];
  readonly optionsPages: readonly FieldsHeadlessOptionsSchema[];
  readonly blocks: readonly FieldsHeadlessBlockSchema[];
  readonly revision: Readonly<Record<string, FieldStorageValue>>;
  readonly errors: readonly Readonly<{
    category: 'validation' | 'authorization' | 'capability' | 'conflict' | 'integrity';
    fieldPath: boolean;
  }>[];
}
interface FieldsHeadlessSchemaOptions {
  readonly registry?: FieldTypeRegistry;
  readonly codeRegistry?: CodeFieldsRegistrySnapshot;
}
type FieldsHeadlessErrorCode = 'invalid-registry' | 'invalid-definition' | 'integrity';
declare class FieldsHeadlessError extends Error {
  readonly code: FieldsHeadlessErrorCode;
  readonly detail: string;
  readonly field?: string | undefined;
  readonly name = "FieldsHeadlessError";
  constructor(code: FieldsHeadlessErrorCode, detail: string, field?: string | undefined);
}
declare function isFieldsHeadlessError(error: unknown): error is FieldsHeadlessError;
declare function generateFieldsHeadlessSchema(db: FieldsReader, options?: FieldsHeadlessSchemaOptions): Promise<FieldsHeadlessSchema>;
//#endregion
export { type Actor, type AnyFieldDefinition, type AuthorizedFieldsContext, BUILTIN_LOCATION_RESOLVERS, type BaseField, type BlockAttributeValue, type BlockDocument, type BlockDocumentMutationOptions, type BlockFieldGroupValue, type BlockNode, type BlockPolicy, type BlockRenderer, type BooleanField, type BooleanSettings, type ChoiceSettings, type CloneDefinitionResolver, type CloneSettings, type CodeFieldBlock, type CodeFieldGroup, type CodeFieldsRegistrySnapshot, type CodeFinalFieldGroup, type CodeOptionsPage, type ColorField, type ColorSettings, type ConditionalRule, type ConditionalRuleGroups, type CurrentBlockDocument, type CustomFieldTypeDescriptor, DEFAULT_BLOCK_POLICY, type DateField, type DateSettings, type DateTimeSettings, type DecodeFieldNodesOptions, type DefinitionLimits, type LocationRule as DefinitionLocationRule, EMPTY_BLOCK_DOCUMENT_VERSION, type EmailField, type EmbedSettings, type EncodeFieldNodesOptions, type EntityFieldRef, type EntityFieldValueMap, type EntityFieldWriteMap, type EntityId, type EntityRef, type EntitySettings, type EntityType, FIELDS_RECURSIVE_EAV_MIGRATION_ID, FIELD_DEFINITION_LIMITS, FIELD_KEY_RE, FIELD_TYPES, FIELD_VALUE_LIMITS, type Facet, FieldAuthorizationError, type FieldBlockChangeStrategy, type FieldBlockDefinition, type FieldBlockDefinitionImpact, type FieldBlockDefinitionPatch, type FieldBlockDefinitionResolver, type FieldBlockDefinitionSnapshot, type FieldBlockDefinitionVersion, type FieldBlockDefinitionVersionExport, type FieldDefinition, type FieldDefinitionImpact, FieldDefinitionIntegrityError, type FieldDefinitionIntegrityErrorCode, type FieldDefinitionReference, type FieldDefinitionVersion, FieldDefinitionVersionError, type FieldDefinitionVersionErrorCode, type FieldDefinitionVersionExport, type FieldGroup, type FieldGroupChangeStrategy, FieldGroupConflictError, type FieldGroupPatch, type FieldHeadlessSchema, type FieldKey, type FieldMediaMetadata, type FieldMediaMetadataResolver, type FieldOrigin, type FieldPath, type FieldPathMapping, type FieldPredicate, type FieldPresentation, type FieldProjectionResolvers, type FieldStorageValue, FieldStoreError, type FieldType, type FieldTypeRegistry, FieldValidationError, type FieldValue, type FieldValueAuthorization, type FieldValueContext, type FieldValueMap, type FieldValueNodeRow, type FieldsAction, type FieldsAdapterKind, type FieldsAuthorization, type FieldsAuthorizedQueryScope, type FieldsAutosaveMutation, type FieldsAutosaveRetentionPolicy, type FieldsBackupBlockDefinitionSnapshot, type FieldsBackupBlockDocumentSnapshot, type FieldsBackupGroupDefinitionSnapshot, type FieldsBackupManifest, type FieldsBackupOptionsDefinitionSnapshot, type FieldsBackupPayload, type FieldsBackupRestoreEvent, type FieldsBackupRestoreResult, type FieldsBackupReusableBlockSnapshot, type FieldsBackupRevisionSnapshot, type FieldsBackupSnapshot, type FieldsBackupStore, type FieldsBackupValueSnapshot, type FieldsCodeReconciliationPlan, type FieldsContext, type FieldsDefinitionEffects, type FieldsDefinitionEvent, type FieldsDefinitionKind, type FieldsDefinitionOrigin, type FieldsDestructiveDependencies, type FieldsDestructiveEffectEvent, type FieldsDestructiveEffects, type FieldsDestructiveEvent, type FieldsEntityQuery, type FieldsEntityQueryAdapter, type FieldsExportManifest, type FieldsExportSelection, type FieldsFlatCorpusReader, type FieldsHeadlessBlockSchema, FieldsHeadlessError, type FieldsHeadlessErrorCode, type FieldsHeadlessFieldSchema, type FieldsHeadlessGroupSchema, type FieldsHeadlessOptionsSchema, type FieldsHeadlessSchema, type FieldsHeadlessSchemaOptions, type FieldsImportCommand, type FieldsImportConflict, type FieldsImportConflictPolicy, type FieldsImportEffects, FieldsImportError, type FieldsImportErrorCode, type FieldsImportEvent, type FieldsImportJournal, type FieldsImportLimits, type FieldsImportPlan, type FieldsImportRemappers, type FieldsImportRequiredAuthority, type FieldsImportScope, type FieldsImportSection, type FieldsImportStaging, FieldsLifecycleError, type FieldsLifecycleErrorCode, type FieldsLifecycleErrorShape, type FieldsLifecycleReader, type FieldsMigrationAdapter, type FieldsMigrationCorpusCheckpoint, type FieldsMigrationPhase, type FieldsMutationOptions, type FieldsMutationResult, type FieldsPrincipal, type FieldsPublishedReverseCommand, type FieldsPublishedReversePlan, type FieldsReadResult, type FieldsReader, type FieldsRecursiveEavMigrationPlan, type FieldsRevision, type FieldsRevisionCursor, type FieldsRevisionDiff, type FieldsRevisionExport, type FieldsRevisionMutation, type FieldsRevisionPage, type FieldsSchema, FieldsStoreContractError, type FieldsStoreErrorCode, type FieldsTransaction, type FieldsValueVersion, type FlatFieldValue, type FlexibleLayout, type FlexibleRow, type FlexibleSettings, type GallerySettings, type GroupSettings, type IconSettings, type ImageMediaSettings, type InferValues, type InlineBlockNode, type FieldDefinition$1 as LegacyFieldDefinition, type FieldGroup$1 as LegacyFieldGroup, type FieldType$1 as LegacyFieldType, type LinkSettings, type LinkValue, type LocationContext, type LocationOperator, type LocationParameterResolver, type LocationResolverRegistry, type LocationRule$1 as LocationRule, type LocationRuleGroups, type LocationValue, type MapSettings, type MapValue, type MediaField, type MediaFieldRef, type MediaRef, type MediaSettings, type MigratedFieldValueNode, type NormalizedFieldsRegistryRecord, type NumberField, type NumberSettings, type OptionsPageDeactivateStrategy, type OptionsPageDefinition, type OptionsPageDefinitionSnapshot, type OptionsPageImpact, type OptionsPagePatch, type ParsedFieldsImport, type PasswordRead, type PasswordSettings, type PasswordWrite, type RelRef, type RelRefResolver, type RelationshipField, type RelationshipSettings, type RepeaterRow, type RepeaterSettings, type ResolvedAnyFieldDefinition, type ResolvedFieldBlock, type ResolvedFieldBlockRegistry, type ResolvedFieldDefinition, type ResolvedFieldGroup, type ResolvedFinalFieldGroup, type ResolvedOptionsPage, type ReusableBlockNode, type ReusableBlockResolver, type RevisionFieldValue, type RichTextSettings, type RuntimeFieldTypeDescriptor, type FieldValueMap$1 as RuntimeFieldValueMap, type SafePattern, type SanitizedFieldHtml, type ScalarValue, type SelectField, type TaxonomySettings, type TermFieldRef, type TextAreaField, type TextField, type TextSettings, type TextareaSettings, type TimeSettings, type TypedCustomFieldDefinition, type UrlField, type UrlSettings, type UserFieldRef, type UserSettings, type ValidatedBlockDocument, type ValidatedBlockNode, type ValidatedInlineBlockNode, type ValidatedReusableBlockNode, type ValueLimits, applyFieldBlockChange, applyFieldGroupChange, applyFieldsCodeReconciliation, applyOptionsPageDeactivation, assertCanEditFields, assertCanManageGroups, assertFieldsTransactionIdentity, assertNoCodeKeyShadow, assertNoCrossGroupFieldKeyConflict, assertSerializableFieldPresentation, authorizeRelationshipReplacement, canonicalFieldGroupHash, canonicalFieldsMigrationHash, captureFieldsRevision, createFieldBlock, createFieldGroup, createFieldTypeRegistry, createFieldsAutosave, createGroup, createLocationResolverRegistry, createOptionsPage, createReusableBlockResolver, decodeFieldValueNodes, defineCustomField, defineFieldBlock, defineFieldGroup, defineFinalFieldGroup, defineOptionsPage, deleteBlockDocument, deleteEntityValues, deleteGroup, deserializeFieldValue, diffFieldsRevisions, encodeFieldValueNodes, escapeFieldPathSegment, evaluateConditionalLogic, evaluateConditionalRule, exportFields, fieldBlockDefinitionVersions, fieldBlockDefinitions, fieldBlockDocuments, fieldDefinitionRefsForPlan, fieldDefinitionVersions, fieldGroupDefinitions, fieldGroups, fieldOptionsDefinitionVersions, fieldOptionsDefinitions, fieldPath, fieldReusableBlocks, fieldRevisions, fieldValueNodes, fieldValues, fieldsBackupDestinationHash, fieldsExportManifestHash, fieldsImportJournal, fieldsImportStaging, fieldsMigrationCheckpoints, fieldsMigrationSql, fieldsMigrationWriteJournal, fieldsOperationReceipts, fieldsRecursiveEavForwardMigrationSql, fieldsRecursiveEavReverseMigrationSql, fieldsRuntimeMigrationSql, fieldsSchema, flexibleRows, formatFieldValue, generateFieldsHeadlessSchema, getBlockDocument, getEntityValues, getFieldsRevision, getOptionsValues, isCanonicalFieldValuePath, isFieldAuthorizationError, isFieldDefinitionIntegrityError, isFieldDefinitionVersionError, isFieldGroupConflictError, isFieldStoreError, isFieldValidationError, isFieldsHeadlessError, isFieldsImportError, isFieldsLifecycleError, isFieldsStoreContractError, isMultipleCapable, isSanitizedFieldHtml, legacyFieldGroupToFinalDefinition, legacyFieldToFinalDefinition, listFieldsRevisions, listGroups, materializeLegacyFieldDefinitionVersion, parseBlockDocument, parseFieldDefinition, parseFieldDefinitionVersion, parseFieldGroupDefinition, parseFieldsImport, parseLegacyMultipleValueJson, planFieldsImport, planFieldsImportD1, planFieldsRecursiveEavMigration, planPublishedFieldsImportReverse, planPublishedFieldsImportReverseD1, predictPublishedFieldsImportCorpus, prepareCaptureFieldsRevisionD1, preparePublishFieldsImportD1, prepareResumeFieldsImportD1, prepareReversePublishedFieldsImportD1, prepareRollbackFieldsImportD1, prepareStagedFieldsImportGuardD1, prepareStartFieldsImportD1, previewFieldBlockChange, previewFieldGroupChange, previewFieldsCodeReconciliation, previewOptionsPageDeactivation, pruneFieldsAutosaves, publishFieldsImport, queryEntities, queryFieldEntities, readFlatFieldValues, redactFieldValueForRevision, referencedFieldDefinitionVersions, renderBlockDocument, repeaterRows, resolveConditionalPath, resolveFieldBlocks, resolveFieldDefinitionVersion, resolveFinalFieldGroups, resolveGroups, resolveOptionsPages, resolveQueryFieldPath, restoreFieldsBackup, restoreFieldsRevision, resumeFieldsImport, reversePublishedFieldsImport, rollbackFieldsImport, sanitizeFieldHtml, serializeBlockDocument, serializeFieldValue, setBlockDocument, setEntityValues, setOptionsValues, snapshotFlatFieldsCorpus, startFieldsImport, typedValues, updateGroup, updateOptionsPage, validateBlockDocument, validateBlockPublication, validateConditionalDependencies, validateFieldValue, validateFieldsEntityQuery, validateValues };