ORM service configuration.
Subscribe to public ORM operation observations.
This allows optional systems such as Health to attach to an already configured ORM instance without rebuilding its application configuration.
Observation callback.
Function that removes the observer.
ProtectedbuildType name for field mapping.
Item to extract structured fields from.
Structured fields record for indexing.
ProtectedbuildBuild qualified Link & Lock field metadata, including optional fields.
Safely clean orphaned index state for exactly one type+id.
The method refuses destructive cleanup without a strongly consistent canonical read. It rechecks canonical state after destructive phases and reindexes a concurrently-created item before returning.
TypeInfo type being repaired.
Canonical item identifier.
Guard data captured during the audit.
Guarded cleanup outcome.
ProtectedcleanupRemove one removed-Type index identity after the schema removal has been independently confirmed by Health monitoring.
This method never touches canonical data. It only removes index artifacts belonging to the prior type namespace.
Persisted document identity.
Prior type descriptor and audited index state.
Create a new item of the given type.
Type name to create.
Item payload to create.
Primary field value for the created item.
Create a new relationship between two items.
Relationship item to create.
When DAC is enabled and getOwnerPrefix is configured, relationship
creation requires:
from and to items.Optionalcontext: TypeInfoORMContextTrue when the relationship was created.
ProtecteddecodeOptionalcursor: stringCursor from list config.
Decoded offset for full-scan compare pagination.
Delete an existing item of the given type.
Type name to delete.
Primary field value to delete.
Optionalcontext: TypeInfoORMContextTrue when the delete succeeded.
Delete a relationship between two items.
Relationship item to delete.
When DAC is enabled and getOwnerPrefix is configured, relationship
deletion requires:
from and to items.Optionalcontext: TypeInfoORMContextDeletion results including whether items remain.
ProtectedemitEmit structured index write observability events without impacting behavior.
Type being indexed.
Indexed document id.
Structured indexing action.
Number of indexed fields in the write payload.
ProtectedemitEmit list routing decision observability events without impacting runtime behavior.
Type being listed.
Selected routing path.
Why this path was selected.
Number of criteria considered.
Optionalplan: IndexSearchDiagnosticsProtectedemitEmit a public ORM operation observation without impacting runtime behavior.
ProtectedencodeNext offset in filtered/sorted results.
Encoded cursor for full-scan compare pagination.
ProtectedgetType name used to look up TypeInfo.
Item to clean.
OptionaldacFieldResources: Partial<Record<string, DACAccessResult>>Optional DAC field resource map.
OptionalselectedFields: string[]Optional selected fields to include.
Cleaned item with selected fields and DAC constraints applied.
ProtectedgetType name used to look up TypeInfo.
OptionalselectedFields: string[]Optional selected fields to include.
Sanitized selected fields or undefined for all fields.
ProtectedgetResolve all configured field capabilities for a type.
ProtectedgetType name used to clean the item.
Item snapshot to normalize.
Item snapshot normalized for indexing operations.
ProtectedgetIndexing relationship driver for relation indexing.
Return all TypeInfo types known to this ORM for index maintenance.
Type descriptors derived from current ORM/index configuration.
ProtectedgetBuild a non-sensitive fingerprint for public ORM query shape.
ProtectedgetResolve a non-sensitive TypeInfo type name from a public ORM argument list.
ProtectedgetWrite the provided item snapshot into the configured indexes.
Use this when data was created or modified outside TypeInfoORMService.
Type name for the indexed item.
Item snapshot to index.
Optional field overrides.
Promise resolved when manual indexing completes.
Inspect one bounded page of canonical items against current index mirrors.
This catches the inverse of orphaned indexes: canonical items whose current structured or text index state is missing or stale. Inspection is non-destructive. Health callers should strongly revalidate an unhealthy item through verifyStoredItemIndexesForMaintenance before applying repair.
Current TypeInfo type.
Paging options.
Bounded inspection results and continuation state.
ProtectedisValue to check.
True when the value is a supported structured value.
List items of the given type, with the given criteria.
Type name to list.
List configuration and criteria.
OptionalselectedFields: string[]Optional fields to select.
Optionalcontext: TypeInfoORMContextList results with items and cursor.
ProtectedlistExecute a criteria list via full scan + in-memory compare.
This is the universal fallback strategy for criteria/operators that are not supported by indexed query planners.
Type name to list.
Original list config.
Selected fields for cleaned response.
Whether DAC checks are enabled.
Optionalcontext: TypeInfoORMContextOptional request context.
List results with cursor.
List related items for the relationship origin.
Relationship list configuration.
OptionalselectedFields: string[]Optional fields to select on related items.
Optionalcontext: TypeInfoORMContextItems and cursor for related items.
List the relationships for a given item.
Relationship list configuration.
Optionalcontext: TypeInfoORMContextRelationship items and paging cursor.
Enumerate bounded structured document mirrors when supported.
Paging options.
Structured index document page, or undefined when unsupported.
Enumerate bounded full-text document mirrors when supported.
Paging options.
Full-text document page, or undefined when unsupported.
ProtectedmutatePromise resolved once indexing is complete.
Read an existing item of the given type.
Type name to read.
Primary field value to fetch.
OptionalselectedFields: string[]Optional fields to select.
Optionalcontext: TypeInfoORMContextCleaned item data.
Reconcile one bounded page of canonical items after an index-relevant TypeInfo schema change.
Structured writes replace the persisted structured mirror, which removes fields no longer indexed. Full-text fields removed from the schema are deleted through document-level maintenance before current fields are reindexed.
Current TypeInfo type.
Previous schema descriptor and paging state.
Processed count and continuation token.
Reindex the current stored item using the configured driver.
When no previous snapshot is supplied, the current stored item is used for
both removal and indexing to refresh existing postings without duplication.
Supply previousItem when an out-of-band update changed indexed field
values, otherwise stale index entries cannot be removed safely.
Type name to reindex.
Primary field value for the stored item.
Optional previous snapshot and indexed field overrides.
True when reindexing completed.
Reindex all currently stored items for a type.
This is intended for maintenance passes after out-of-band writes or
schema/index configuration changes. Deleted items still require explicit
cleanup via removeItemIndexes, because index removal needs a prior
snapshot of indexed field values. For out-of-band updates
that changed indexed values, provide previousItemsByPrimaryField.
Type name to reindex.
Paging, previous snapshots, and indexed field overrides.
Count of processed stored items.
Remove the provided item snapshot from the configured indexes.
Use this when data was deleted outside TypeInfoORMService.
Type name for the indexed item.
Item snapshot to remove from the indexes.
Optional field overrides.
Promise resolved when index cleanup completes.
Replace one indexed item snapshot with another.
Use this when an existing stored item changed outside TypeInfoORMService
or when a schema/config change requires removing old indexed fields and
indexing a new field set.
Type name for the indexed item.
Previous item snapshot to remove.
Next item snapshot to index.
Optional previous/next field overrides.
Promise resolved when replacement indexing completes.
ProtectedresolveResolve deterministic, deduplicated fields for mutation operations.
Optionaloverride: string[]ProtectedresolveResolve one globally ordered value capability.
Update an existing item of the given type.
This update will always act as a patch.
Use null to signify the deletion of a field.
Assign values to all fields to perform a replacement.
The item must always contain its primary field value.
Type name to update.
Item payload to update.
OptionalupdateConfig: TypeInfoORMUpdateConfigOptional per-field operator config.
Optionalcontext: TypeInfoORMContextTrue when the update succeeded.
ProtectedvalidateType name to validate.
Item to validate.
Operation being validated.
OptionalitemIsPartial: booleanWhether the item is a partial update.
Nothing (throws on invalid items).
ProtectedvalidateValidate a delete operation against only the item's primary field.
Delete receives an identity, not a complete item. The primary field still needs its normal operation and value validation, but unrelated required fields must not participate.
ProtectedvalidateType name to validate for read.
OptionalselectedFields: string[]Optional selected fields to validate.
Nothing (throws on invalid operations).
ProtectedvalidateRelationship item to validate.
Relationship fields to omit from validation.
Nothing (throws on invalid relationships).
ProtectedvalidateValidate update operator config against the target TypeInfo fields.
OptionalupdateConfig: TypeInfoORMUpdateConfigVerify canonical item existence for index maintenance.
Drivers with a strong-read capability are preferred. Best-effort reads are still useful for diagnostics but must not authorize destructive healing.
TypeInfo type to verify.
Canonical item identifier.
Existence result and the consistency level used.
Strongly revalidate one canonical item's current index state when the configured driver supports it.
Current TypeInfo type.
Canonical primary-field value.
Canonical existence, consistency level, and current index issues.
ProtectedwrapWrap one public ORM method with lightweight duration/result observation.
TypeInfo-driven ORM service with optional DAC and indexing integrations.