Create an instance of the Node SDK with merged defaults.
Partial Node-specific configuration. Any eventBuilder fields provided are merged with Node's defaults.
ReadonlyapiShared Optimization API client instance.
ReadonlyconfigResolved core configuration.
ReadonlyeventShared event builder instance.
ReadonlyflagsStatic resolver for evaluating optimized custom flags.
Build a flattened map of flag keys to values from a change list.
Optionalchanges: {The change list returned by the optimization service.
Key identifying the subject of the change.
Metadata describing the originating experience and variant index.
Identifier of the personalization or experiment experience.
Index of the variant within the experience configuration.
Discriminator for a variable change.
New value for the variable identified by ChangeBase.key.
A map of flag keys to their resolved values.
ReadonlyinterceptorsLifecycle interceptors for events and state updates.
ReadonlymergeStatic resolver for merge-tag lookups against profile data.
Look up a merge-tag value from a profile using normalized selectors.
Merge-tag identifier.
Optionalprofile: {Profile from which to resolve the value.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
Path component of the page URL (e.g., /products/123).
Parsed query parameters for the page.
Referrer URL that led to the current page.
Raw search string including the leading ? (e.g., "?q=test").
Optionaltitle?: stringTitle of the page as seen by the user.
Full URL of the page.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
A stringified primitive if found; otherwise undefined.
Generate a list of candidate selectors for a merge-tag ID.
Merge-tag identifier (segments separated by _).
Array of dot-path selectors to try against a profile.
Resolve the display value for a merge-tag entry using the provided profile,
falling back to the entry's configured nt_fallback when necessary.
The merge-tag entry to resolve.
Optionalnt_fallback?: stringFallback value to use when the merge tag cannot be resolved.
Internal identifier of the merge tag.
Human-readable name of the merge tag.
Contentful metadata, including tags.
System fields extended to constrain the content type to nt_mergetag.
Optionalprofile: {Optional profile used for lookup.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
Path component of the page URL (e.g., /products/123).
Parsed query parameters for the page.
Referrer URL that led to the current page.
Raw search string including the leading ? (e.g., "?q=test").
Optionaltitle?: stringTitle of the page as seen by the user.
Full URL of the page.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
The resolved string, or undefined if the entry is invalid and no
fallback is available.
ReadonlyoptimizedStatic resolver for optimized Contentful entries.
Find the optimization entry corresponding to one of the selected experiences.
Object containing the baseline optimized entry and the selections.
When true, skip type/shape validation for perf.
The matching OptimizationEntry, or undefined if not found/invalid.
Optionalnt_audience?: The audience of the optimization (Audience).
Optionalnt_config?: The configuration of an OptimizationEntry (JSON).
Optionalnt_description?: string | nullThe description of the optimization (Short Text).
The optimization/experience ID related to this optimization entry.
The name of the optimization (Short Text).
The type of the optimization (nt_experiment | nt_personalization).
Optionalnt_variants?: (All used variants of the optimization (Contentful references to other Content Types).
Contentful metadata, including tags.
System-managed properties describing the entry.
Look up the selection metadata for a specific optimization entry.
Object with the target optimization entry and selections.
When true, skip type checks.
The matching SelectedOptimization, if present.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
Get the replacement variant config for the given selection index.
Baseline entry, optimization entry, and 1‑based variant index.
When true, skip type checks.
The EntryReplacementVariant for the component, if any.
Optionalhidden?: booleanIndicates whether this variant is hidden from allocation/traffic.
Unique identifier for the variant.
Resolve the concrete Contentful entry that corresponds to a selected variant.
Entry skeleton type.
Chain modifiers.
Locale code.
Optimization entry and selected variant.
When true, skip type checks.
The resolved entry typed as Entry or undefined.
Get the value of a custom flag derived from a set of optimization changes.
The flag key to resolve.
Optionalchanges: {Optional change list to resolve from.
Key identifying the subject of the change.
Metadata describing the originating experience and variant index.
Identifier of the personalization or experiment experience.
Index of the variant within the experience configuration.
Discriminator for a variable change.
New value for the variable identified by ChangeBase.key.
The resolved JSON value for the flag if available.
Resolve a merge-tag value from the given entry node and profile.
The merge-tag entry node to resolve.
Optionalnt_fallback?: stringFallback value to use when the merge tag cannot be resolved.
Internal identifier of the merge tag.
Human-readable name of the merge tag.
Contentful metadata, including tags.
System fields extended to constrain the content type to nt_mergetag.
Optionalprofile: {Optional profile used for value lookup.
List of audience identifiers that this profile currently belongs to.
Primary identifier of the profile.
Geo-location information associated with the profile.
Optionalcity?: stringCity name associated with the location.
Optionalcontinent?: stringContinent name associated with the location.
Optionalcoordinates?: { latitude: number; longitude: number }Geographical coordinates for the location.
Latitude component of the coordinates.
Longitude component of the coordinates.
Optionalcountry?: stringCountry name associated with the location.
OptionalcountryCode?: stringCountry code associated with the location.
OptionalpostalCode?: stringPostal or ZIP code associated with the location.
Optionalregion?: stringRegion or state name associated with the location.
OptionalregionCode?: stringRegion or state code associated with the location.
Optionaltimezone?: stringTime zone identifier associated with the location.
Random value associated with the profile.
Aggregated session statistics for the profile.
Duration of the active session.
Average session duration across all sessions represented by this record.
Number of sessions associated with this profile or identifier.
Unique identifier for this session statistics record.
Indicates whether the visitor has been seen before.
Landing page for the session.
Path component of the page URL (e.g., /products/123).
Parsed query parameters for the page.
Referrer URL that led to the current page.
Raw search string including the leading ? (e.g., "?q=test").
Optionaltitle?: stringTitle of the page as seen by the user.
Full URL of the page.
Stable, long-lived identifier of the profile.
Traits describing the profile (user-level attributes).
The resolved value (typically a string) or undefined if not found.
OptionalrequestOptions: CoreStatelessRequestOptionsOptionalrequestOptions: CoreStatelessRequestOptionsResolve a Contentful entry to the appropriate optimized variant (or return the baseline entry if no matching variant is selected).
Entry skeleton type.
Locale code.
The baseline entry to resolve.
OptionalselectedOptimizations: {Optional selected optimization array for the current profile.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
ResolvedData containing the resolved entry and selected optimization metadata (if any).
Resolve a Contentful entry to the appropriate optimized variant (or return the baseline entry if no matching variant is selected).
Entry skeleton type.
Chain modifiers.
Locale code.
The baseline entry to resolve.
OptionalselectedOptimizations: {Optional selected optimization array for the current profile.
Identifier of the personalization or experiment experience.
Optionalsticky?: booleanIndicates whether this optimization selection is sticky for the user.
Index of the selected variant within the experience configuration.
Mapping of baseline entry IDs to their selected variant entry IDs.
ResolvedData containing the resolved entry and selected optimization metadata (if any).
OptionalrequestOptions: CoreStatelessRequestOptionsOptionalrequestOptions: CoreStatelessRequestOptionsOptional_requestOptions: CoreStatelessRequestOptionsOptional_requestOptions: CoreStatelessRequestOptionsOptional_requestOptions: CoreStatelessRequestOptionsOptionalrequestOptions: CoreStatelessRequestOptions
Node-specific ContentfulOptimization SDK built on CoreStateless.
Remarks
This class adapts the stateless ContentfulOptimization Core for Node runtimes by applying environment-appropriate defaults (e.g., server channel, Node SDK library metadata). No core runtime behavior is modified; only configuration defaults differ.
Example
See
CoreStateless