Contentful Personalization & Analytics
    Preparing search index...
    • Type guard for PersonalizationEntry.

      Parameters

      • entry:
            | { sys: { id: string; linkType: string; type: "Link" } }
            | {
                fields: { [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;
                };
            }

        Contentful entry or link to test.

        • { sys: { id: string; linkType: string; type: "Link" } }
        • {
              fields: { [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: { [key: string]: JSONType }

            The entry fields payload.

          • 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.

      Returns entry is {
          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: boolean; id: string };
                          type?: "EntryReplacement";
                          variants: { hidden: boolean; id: string }[];
                      }
                      | {
                          baseline: {
                              value: null
                              | string
                              | number
                              | boolean
                              | Record<(...), (...)>;
                          };
                          key: string;
                          type: "InlineVariable";
                          valueType: "Boolean"
                          | "Number"
                          | "Object"
                          | "String";
                          variants: { value: (...) | (...) | (...) | (...) | (...) | (...) }[];
                      }
                  )[];
                  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;
          };
      }

      true if the value conforms to PersonalizationEntry, otherwise false.