Contentful Personalization & Analytics
    Preparing search index...

    Variable PersonalizedEntryResolverConst

    PersonalizedEntryResolver: {
        getPersonalizationEntry(
            params: {
                personalizedEntry: {
                    fields: {
                        nt_experiences: (
                            | { sys: { id: string; linkType: string; type: "Link" } }
                            | {
                                fields: {
                                    nt_audience?:
                                        | null
                                        | {
                                            fields: {
                                                nt_audience_id: ...;
                                                nt_description?: ...;
                                                nt_name?: ...;
                                                [key: ...]: ...;
                                            };
                                            metadata: { tags: ...; [key: ...]: ... };
                                            sys: {
                                                contentType: ...;
                                                createdAt: ...;
                                                environment: ...;
                                                id: ...;
                                                locale?: ...;
                                                publishedVersion: ...;
                                                revision: ...;
                                                space: ...;
                                                type: ...;
                                                updatedAt: ...;
                                            };
                                        };
                                    nt_config: | null
                                    | {
                                        components?: (...)
                                        | (...);
                                        distribution?: (...) | (...);
                                        sticky?: (...) | (...) | (...);
                                        traffic?: (...) | (...);
                                    };
                                    nt_description?: null
                                    | string;
                                    nt_experience_id: string;
                                    nt_name: string;
                                    nt_type: "nt_experiment" | "nt_personalization";
                                    nt_variants?: Entry[];
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            }
                        )[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedPersonalizations: {
                    experienceId: string;
                    sticky?: boolean;
                    variantIndex: number;
                    variants: Record<string, string>;
                }[];
            },
            skipValidation?: boolean,
        ):
            | undefined
            | {
                fields: {
                    nt_audience?: | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                    nt_config: | null
                    | {
                        components?: (
                            | {
                                baseline: { hidden: ...; id: ... };
                                type?: (...) | (...);
                                variants: (...)[];
                            }
                            | {
                                baseline: { value: ... };
                                key: string;
                                type: "InlineVariable";
                                valueType: (...) | (...) | (...) | (...);
                                variants: (...)[];
                            }
                        )[];
                        distribution?: number[];
                        sticky?: boolean;
                        traffic?: number;
                    };
                    nt_description?: null
                    | string;
                    nt_experience_id: string;
                    nt_name: string;
                    nt_type: "nt_experiment" | "nt_personalization";
                    nt_variants?: Entry[];
                    [key: string]: JSONType;
                };
                metadata: {
                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                    [key: string]: JSONType;
                };
                sys: {
                    contentType: {
                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                    };
                    createdAt: any;
                    environment: {
                        sys: { id: string; linkType: "Environment"; type: "Link" };
                    };
                    id: string;
                    locale?: string;
                    publishedVersion: number;
                    revision: number;
                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                    type: "Entry";
                    updatedAt: any;
                };
            };
        getSelectedPersonalization(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedPersonalizations: {
                    experienceId: string;
                    sticky?: boolean;
                    variantIndex: number;
                    variants: Record<string, string>;
                }[];
            },
            skipValidation?: boolean,
        ):
            | undefined
            | {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            };
        getSelectedVariant(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                personalizedEntry: {
                    fields: {
                        nt_experiences: (
                            | { sys: { id: string; linkType: string; type: "Link" } }
                            | {
                                fields: {
                                    nt_audience?:
                                        | null
                                        | {
                                            fields: {
                                                nt_audience_id: ...;
                                                nt_description?: ...;
                                                nt_name?: ...;
                                                [key: ...]: ...;
                                            };
                                            metadata: { tags: ...; [key: ...]: ... };
                                            sys: {
                                                contentType: ...;
                                                createdAt: ...;
                                                environment: ...;
                                                id: ...;
                                                locale?: ...;
                                                publishedVersion: ...;
                                                revision: ...;
                                                space: ...;
                                                type: ...;
                                                updatedAt: ...;
                                            };
                                        };
                                    nt_config: | null
                                    | {
                                        components?: (...)
                                        | (...);
                                        distribution?: (...) | (...);
                                        sticky?: (...) | (...) | (...);
                                        traffic?: (...) | (...);
                                    };
                                    nt_description?: null
                                    | string;
                                    nt_experience_id: string;
                                    nt_name: string;
                                    nt_type: "nt_experiment" | "nt_personalization";
                                    nt_variants?: Entry[];
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            }
                        )[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedVariantIndex: number;
            },
            skipValidation?: boolean,
        ): undefined | { hidden: boolean; id: string };
        getSelectedVariantEntry<
            S extends EntrySkeletonType,
            M extends ChainModifiers = ChainModifiers,
            L extends string = string,
        >(
            params: {
                personalizationEntry: {
                    fields: {
                        nt_audience?:
                            | null
                            | {
                                fields: {
                                    nt_audience_id: string;
                                    nt_description?: string;
                                    nt_name?: string;
                                    [key: string]: JSONType;
                                };
                                metadata: {
                                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                    [key: string]: JSONType;
                                };
                                sys: {
                                    contentType: {
                                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                                    };
                                    createdAt: any;
                                    environment: {
                                        sys: { id: string; linkType: "Environment"; type: "Link" };
                                    };
                                    id: string;
                                    locale?: string;
                                    publishedVersion: number;
                                    revision: number;
                                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                    type: "Entry";
                                    updatedAt: any;
                                };
                            };
                        nt_config: | null
                        | {
                            components?: (
                                | {
                                    baseline: { hidden: ...; id: ... };
                                    type?: (...) | (...);
                                    variants: (...)[];
                                }
                                | {
                                    baseline: { value: ... };
                                    key: string;
                                    type: "InlineVariable";
                                    valueType: (...) | (...) | (...) | (...);
                                    variants: (...)[];
                                }
                            )[];
                            distribution?: number[];
                            sticky?: boolean;
                            traffic?: number;
                        };
                        nt_description?: null
                        | string;
                        nt_experience_id: string;
                        nt_name: string;
                        nt_type: "nt_experiment" | "nt_personalization";
                        nt_variants?: Entry[];
                        [key: string]: JSONType;
                    };
                    metadata: {
                        tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                        [key: string]: JSONType;
                    };
                    sys: {
                        contentType: {
                            sys: { id: string; linkType: "ContentType"; type: "Link" };
                        };
                        createdAt: any;
                        environment: {
                            sys: { id: string; linkType: "Environment"; type: "Link" };
                        };
                        id: string;
                        locale?: string;
                        publishedVersion: number;
                        revision: number;
                        space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                        type: "Entry";
                        updatedAt: any;
                    };
                };
                selectedVariant: { hidden: boolean; id: string };
            },
            skipValidation?: boolean,
        ): undefined | Entry<S, M, L>;
        resolve<
            S extends EntrySkeletonType,
            M extends ChainModifiers = ChainModifiers,
            L extends string = string,
        >(
            entry: Entry<S, M, L>,
            selectedPersonalizations?: {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            }[],
        ): ResolvedData<S, M, L>;
    } = ...

    Resolve a personalized Contentful entry to the correct variant for the current selections.

    Type declaration

    • getPersonalizationEntry: function
      • Find the personalization entry corresponding to one of the selected experiences.

        Parameters

        • params: {
              personalizedEntry: {
                  fields: {
                      nt_experiences: (
                          | { sys: { id: string; linkType: string; type: "Link" } }
                          | {
                              fields: {
                                  nt_audience?:
                                      | null
                                      | {
                                          fields: {
                                              nt_audience_id: ...;
                                              nt_description?: ...;
                                              nt_name?: ...;
                                              [key: ...]: ...;
                                          };
                                          metadata: { tags: ...; [key: ...]: ... };
                                          sys: {
                                              contentType: ...;
                                              createdAt: ...;
                                              environment: ...;
                                              id: ...;
                                              locale?: ...;
                                              publishedVersion: ...;
                                              revision: ...;
                                              space: ...;
                                              type: ...;
                                              updatedAt: ...;
                                          };
                                      };
                                  nt_config: | null
                                  | {
                                      components?: (...)
                                      | (...);
                                      distribution?: (...) | (...);
                                      sticky?: (...) | (...) | (...);
                                      traffic?: (...) | (...);
                                  };
                                  nt_description?: null
                                  | string;
                                  nt_experience_id: string;
                                  nt_name: string;
                                  nt_type: "nt_experiment" | "nt_personalization";
                                  nt_variants?: Entry[];
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          }
                      )[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedPersonalizations: {
                  experienceId: string;
                  sticky?: boolean;
                  variantIndex: number;
                  variants: Record<string, string>;
              }[];
          }

          Object containing the baseline personalized entry and the selections.

        • skipValidation: boolean = false

          When true, skip type/shape validation for perf.

        Returns
            | undefined
            | {
                fields: {
                    nt_audience?: | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                    nt_config: | null
                    | {
                        components?: (
                            | {
                                baseline: { hidden: ...; id: ... };
                                type?: (...) | (...);
                                variants: (...)[];
                            }
                            | {
                                baseline: { value: ... };
                                key: string;
                                type: "InlineVariable";
                                valueType: (...) | (...) | (...) | (...);
                                variants: (...)[];
                            }
                        )[];
                        distribution?: number[];
                        sticky?: boolean;
                        traffic?: number;
                    };
                    nt_description?: null
                    | string;
                    nt_experience_id: string;
                    nt_name: string;
                    nt_type: "nt_experiment" | "nt_personalization";
                    nt_variants?: Entry[];
                    [key: string]: JSONType;
                };
                metadata: {
                    tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                    [key: string]: JSONType;
                };
                sys: {
                    contentType: {
                        sys: { id: string; linkType: "ContentType"; type: "Link" };
                    };
                    createdAt: any;
                    environment: {
                        sys: { id: string; linkType: "Environment"; type: "Link" };
                    };
                    id: string;
                    locale?: string;
                    publishedVersion: number;
                    revision: number;
                    space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                    type: "Entry";
                    updatedAt: any;
                };
            }

        The matching PersonalizationEntry, or undefined if not found/invalid.

        • undefined
        • {
              fields: {
                  nt_audience?:
                      | null
                      | {
                          fields: {
                              nt_audience_id: string;
                              nt_description?: string;
                              nt_name?: string;
                              [key: string]: JSONType;
                          };
                          metadata: {
                              tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                              [key: string]: JSONType;
                          };
                          sys: {
                              contentType: {
                                  sys: { id: string; linkType: "ContentType"; type: "Link" };
                              };
                              createdAt: any;
                              environment: {
                                  sys: { id: string; linkType: "Environment"; type: "Link" };
                              };
                              id: string;
                              locale?: string;
                              publishedVersion: number;
                              revision: number;
                              space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                              type: "Entry";
                              updatedAt: any;
                          };
                      };
                  nt_config: | null
                  | {
                      components?: (
                          | {
                              baseline: { hidden: ...; id: ... };
                              type?: (...) | (...);
                              variants: (...)[];
                          }
                          | {
                              baseline: { value: ... };
                              key: string;
                              type: "InlineVariable";
                              valueType: (...) | (...) | (...) | (...);
                              variants: (...)[];
                          }
                      )[];
                      distribution?: number[];
                      sticky?: boolean;
                      traffic?: number;
                  };
                  nt_description?: null
                  | string;
                  nt_experience_id: string;
                  nt_name: string;
                  nt_type: "nt_experiment" | "nt_personalization";
                  nt_variants?: Entry[];
                  [key: string]: JSONType;
              };
              metadata: {
                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                  [key: string]: JSONType;
              };
              sys: {
                  contentType: {
                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                  };
                  createdAt: any;
                  environment: {
                      sys: { id: string; linkType: "Environment"; type: "Link" };
                  };
                  id: string;
                  locale?: string;
                  publishedVersion: number;
                  revision: number;
                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                  type: "Entry";
                  updatedAt: any;
              };
          }
          • fields: {
                nt_audience?:
                    | null
                    | {
                        fields: {
                            nt_audience_id: string;
                            nt_description?: string;
                            nt_name?: string;
                            [key: string]: JSONType;
                        };
                        metadata: {
                            tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                            [key: string]: JSONType;
                        };
                        sys: {
                            contentType: {
                                sys: { id: string; linkType: "ContentType"; type: "Link" };
                            };
                            createdAt: any;
                            environment: {
                                sys: { id: string; linkType: "Environment"; type: "Link" };
                            };
                            id: string;
                            locale?: string;
                            publishedVersion: number;
                            revision: number;
                            space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                            type: "Entry";
                            updatedAt: any;
                        };
                    };
                nt_config: | null
                | {
                    components?: (
                        | {
                            baseline: { hidden: ...; id: ... };
                            type?: (...) | (...);
                            variants: (...)[];
                        }
                        | {
                            baseline: { value: ... };
                            key: string;
                            type: "InlineVariable";
                            valueType: (...) | (...) | (...) | (...);
                            variants: (...)[];
                        }
                    )[];
                    distribution?: number[];
                    sticky?: boolean;
                    traffic?: number;
                };
                nt_description?: null
                | string;
                nt_experience_id: string;
                nt_name: string;
                nt_type: "nt_experiment" | "nt_personalization";
                nt_variants?: Entry[];
                [key: string]: JSONType;
            }
            • Optionalnt_audience?:
                  | null
                  | {
                      fields: {
                          nt_audience_id: string;
                          nt_description?: string;
                          nt_name?: string;
                          [key: string]: JSONType;
                      };
                      metadata: {
                          tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                          [key: string]: JSONType;
                      };
                      sys: {
                          contentType: {
                              sys: { id: string; linkType: "ContentType"; type: "Link" };
                          };
                          createdAt: any;
                          environment: {
                              sys: { id: string; linkType: "Environment"; type: "Link" };
                          };
                          id: string;
                          locale?: string;
                          publishedVersion: number;
                          revision: number;
                          space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                          type: "Entry";
                          updatedAt: any;
                      };
                  }

              The audience of the personalization (Audience).

              Optional and nullable; when omitted or null, the personalization may apply to all users.

            • nt_config:
                  | null
                  | {
                      components?: (
                          | {
                              baseline: { hidden: ...; id: ... };
                              type?: (...) | (...);
                              variants: (...)[];
                          }
                          | {
                              baseline: { value: ... };
                              key: string;
                              type: "InlineVariable";
                              valueType: (...) | (...) | (...) | (...);
                              variants: (...)[];
                          }
                      )[];
                      distribution?: number[];
                      sticky?: boolean;
                      traffic?: number;
                  }

              The configuration of a PersonalizationEntry (JSON).

              Accepts null or an explicit PersonalizationConfig and converts falsy/undefined values into a default configuration.

            • Optionalnt_description?: null | string

              The description of the personalization (Short Text).

              Optional, may be null if no description is provided.

            • nt_experience_id: string

              The personalization/experience ID related to this personalization entry.

            • nt_name: string

              The name of the personalization (Short Text).

            • nt_type: "nt_experiment" | "nt_personalization"

              The type of the personalization (nt_experiment | nt_personalization).

            • Optionalnt_variants?: Entry[]

              All used variants of the personalization (Contentful references to other Content Types).

              Modeled as an array of untyped Contentful entries and defaults to an empty array when omitted.

          • metadata: {
                tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                [key: string]: JSONType;
            }

            Contentful metadata, including tags.

          • sys: {
                contentType: {
                    sys: { id: string; linkType: "ContentType"; type: "Link" };
                };
                createdAt: any;
                environment: { sys: { id: string; linkType: "Environment"; type: "Link" } };
                id: string;
                locale?: string;
                publishedVersion: number;
                revision: number;
                space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                type: "Entry";
                updatedAt: any;
            }

            System-managed properties describing the entry.

        const personalizationEntry = PersonalizedEntryResolver.getPersonalizationEntry({
        personalizedEntry: entry,
        selectedPersonalizations
        })

        A personalization entry is a personalization configuration object supplied in a PersonalizedEntry.nt_experiences array. A personalized entry may relate to multiple personalizations.

    • getSelectedPersonalization: function
      • Look up the selection metadata for a specific personalization entry.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedPersonalizations: {
                  experienceId: string;
                  sticky?: boolean;
                  variantIndex: number;
                  variants: Record<string, string>;
              }[];
          }

          Object with the target personalization entry and selections.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns
            | undefined
            | {
                experienceId: string;
                sticky?: boolean;
                variantIndex: number;
                variants: Record<string, string>;
            }

        The matching SelectedPersonalization, if present.

        • undefined
        • {
              experienceId: string;
              sticky?: boolean;
              variantIndex: number;
              variants: Record<string, string>;
          }
          • experienceId: string

            Identifier of the personalization or experiment experience.

          • Optionalsticky?: boolean

            Indicates whether this personalization selection is sticky for the user.

            false
            

            Sticky selections should be reused on subsequent requests for the same user, rather than re-allocating a new variant.

          • variantIndex: number

            Index of the selected variant within the experience configuration.

            Typically corresponds to the index of the selected PersonalizationConfig entry.

          • variants: Record<string, string>

            Mapping of baseline entry IDs to their selected variant entry IDs.

            The keys are component identifiers and the values are the identifiers of the selected variant for that component.

        const selectedPersonalization = PersonalizedEntryResolver.getSelectedPersonalization({
        personalizationEntry,
        selectedPersonalizations
        })

        Selected personalizations are supplied by the Experience API in the experiences response data property.

    • getSelectedVariant: function
      • Get the replacement variant config for the given selection index.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              personalizedEntry: {
                  fields: {
                      nt_experiences: (
                          | { sys: { id: string; linkType: string; type: "Link" } }
                          | {
                              fields: {
                                  nt_audience?:
                                      | null
                                      | {
                                          fields: {
                                              nt_audience_id: ...;
                                              nt_description?: ...;
                                              nt_name?: ...;
                                              [key: ...]: ...;
                                          };
                                          metadata: { tags: ...; [key: ...]: ... };
                                          sys: {
                                              contentType: ...;
                                              createdAt: ...;
                                              environment: ...;
                                              id: ...;
                                              locale?: ...;
                                              publishedVersion: ...;
                                              revision: ...;
                                              space: ...;
                                              type: ...;
                                              updatedAt: ...;
                                          };
                                      };
                                  nt_config: | null
                                  | {
                                      components?: (...)
                                      | (...);
                                      distribution?: (...) | (...);
                                      sticky?: (...) | (...) | (...);
                                      traffic?: (...) | (...);
                                  };
                                  nt_description?: null
                                  | string;
                                  nt_experience_id: string;
                                  nt_name: string;
                                  nt_type: "nt_experiment" | "nt_personalization";
                                  nt_variants?: Entry[];
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: ...; linkType: ...; type: ... } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          }
                      )[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedVariantIndex: number;
          }

          Baseline entry, personalization entry, and 1‑based variant index.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns undefined | { hidden: boolean; id: string }

        The EntryReplacementVariant for the component, if any.

        • undefined
        • { hidden: boolean; id: string }
          • hidden: boolean

            Indicates whether this variant is hidden from allocation/traffic.

            false
            
          • id: string

            Unique identifier for the variant.

        const selectedVariant = PersonalizedEntryResolver.getSelectedVariant({
        personalizedEntry: entry,
        personalizationEntry,
        selectedVariantIndex: 2 // second variant (1‑based)
        })

        Entry replacement variants are variant configurations specified in a personalization configuration component's variants array supplied by the personalized entry via its nt_config field.

    • getSelectedVariantEntry: function
      • Resolve the concrete Contentful entry that corresponds to a selected variant.

        Type Parameters

        • S extends EntrySkeletonType

          Entry skeleton type.

        • M extends ChainModifiers = ChainModifiers

          Chain modifiers.

        • L extends string = string

          Locale code.

        Parameters

        • params: {
              personalizationEntry: {
                  fields: {
                      nt_audience?:
                          | null
                          | {
                              fields: {
                                  nt_audience_id: string;
                                  nt_description?: string;
                                  nt_name?: string;
                                  [key: string]: JSONType;
                              };
                              metadata: {
                                  tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                                  [key: string]: JSONType;
                              };
                              sys: {
                                  contentType: {
                                      sys: { id: string; linkType: "ContentType"; type: "Link" };
                                  };
                                  createdAt: any;
                                  environment: {
                                      sys: { id: string; linkType: "Environment"; type: "Link" };
                                  };
                                  id: string;
                                  locale?: string;
                                  publishedVersion: number;
                                  revision: number;
                                  space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                                  type: "Entry";
                                  updatedAt: any;
                              };
                          };
                      nt_config: | null
                      | {
                          components?: (
                              | {
                                  baseline: { hidden: ...; id: ... };
                                  type?: (...) | (...);
                                  variants: (...)[];
                              }
                              | {
                                  baseline: { value: ... };
                                  key: string;
                                  type: "InlineVariable";
                                  valueType: (...) | (...) | (...) | (...);
                                  variants: (...)[];
                              }
                          )[];
                          distribution?: number[];
                          sticky?: boolean;
                          traffic?: number;
                      };
                      nt_description?: null
                      | string;
                      nt_experience_id: string;
                      nt_name: string;
                      nt_type: "nt_experiment" | "nt_personalization";
                      nt_variants?: Entry[];
                      [key: string]: JSONType;
                  };
                  metadata: {
                      tags: { sys: { id: string; linkType: "Tag"; type: "Link" } }[];
                      [key: string]: JSONType;
                  };
                  sys: {
                      contentType: {
                          sys: { id: string; linkType: "ContentType"; type: "Link" };
                      };
                      createdAt: any;
                      environment: {
                          sys: { id: string; linkType: "Environment"; type: "Link" };
                      };
                      id: string;
                      locale?: string;
                      publishedVersion: number;
                      revision: number;
                      space: { sys: { id: string; linkType: "Space"; type: "Link" } };
                      type: "Entry";
                      updatedAt: any;
                  };
              };
              selectedVariant: { hidden: boolean; id: string };
          }

          Personalization entry and selected variant.

        • skipValidation: boolean = false

          When true, skip type checks.

        Returns undefined | Entry<S, M, L>

        The resolved entry typed as Entry or undefined.

        const selectedVariantEntry = PersonalizedEntryResolver.getSelectedVariantEntry<{ fields: unknown }>({
        personalizationEntry,
        selectedVariant
        })

        A personalized entry will resolve either to the baseline (the entry supplied as personalizedEntry) or the selected variant.

    • resolve: function
      • Resolve the selected entry (baseline or variant) for a personalized entry and optional selected personalizations, returning both the entry and the personalization metadata.

        Type Parameters

        • S extends EntrySkeletonType

          Entry skeleton type.

        • M extends ChainModifiers = ChainModifiers

          Chain modifiers.

        • L extends string = string

          Locale code.

        Parameters

        • entry: Entry<S, M, L>

          The baseline personalized entry.

        • OptionalselectedPersonalizations: {
              experienceId: string;
              sticky?: boolean;
              variantIndex: number;
              variants: Record<string, string>;
          }[]

          Optional selections for the current profile.

          • experienceId: string

            Identifier of the personalization or experiment experience.

          • Optionalsticky?: boolean

            Indicates whether this personalization selection is sticky for the user.

            false
            

            Sticky selections should be reused on subsequent requests for the same user, rather than re-allocating a new variant.

          • variantIndex: number

            Index of the selected variant within the experience configuration.

            Typically corresponds to the index of the selected PersonalizationConfig entry.

          • variants: Record<string, string>

            Mapping of baseline entry IDs to their selected variant entry IDs.

            The keys are component identifiers and the values are the identifiers of the selected variant for that component.

        Returns ResolvedData<S, M, L>

        An object containing the resolved entry and (if chosen) the selection.

        const { entry: personalizedEntry, personalization } = PersonalizedEntryResolver.resolve(entry, selections)
        if (personalization) console.log('Variant index', personalization.variantIndex)

    Given a baseline PersonalizedEntry and a set of selected personalizations (variants per experience), this resolver finds the matching replacement variant for the component configured against the baseline entry.

    Variant indexing: variantIndex in SelectedPersonalization is treated as 1‑based (index 1 = first variant). A value of 0 indicates baseline.