Skip to content

@alneas/data-access API Reference

Normalizes PopulateOptions (including legacy field name support).

export function normalizePopulateOptions(p: PopulateOptions):
Parameter Type Required Description
p PopulateOptions Yes
  • Type: { collection: string; localRef: string; foreignRef: string; as: string; unwind: boolean; }

Standard fetch call signature; custom transports need no runtime-specific helper properties.

type FetchLike

Filter criteria for record retrieval.

Filter operators align with regional-edi x-rules:

  • $eq (eq): Equals
  • $neq (neq): Not equals
  • $lt (lt), $lte (lte): Less than / Less than or equal to
  • $gt (gt), $gte (gte): Greater than / Greater than or equal to
  • $in (in): Included in array
  • $nin (nin): Not included in array
  • $regex: Regular expression match
type Filter

regional-edi document type. Used for filtering and validation by doc_type.

type DocType

Search query options.

interface QueryOptions

Configuration for populating related data. Field names are based on regional-edi terminology.

interface PopulateOptions

Abstract adapter interface for data access.

interface DataAccessAdapter

Represents outcome details of a database operation.

interface OperationResult

Represents a single search candidate option.

interface SearchableSelectOption

Definition for mapping a CSV column to a database field.

interface HeaderMapping

Represents upload progress and results.

interface UploadProgress

Opaque, runtime-local identity; never derives cache keys from credentials or user data.

export function getAdapterCacheScope(adapter: object &
Parameter Type Required Description
adapter object & { readonly cacheScope?: string; } Yes
  • Type: string