@sanity/personalization-plugin

3.1.83.1.9
dist/index.d.ts
~dist/index.d.tsModified
+18−19
Index: package/dist/index.d.ts
===================================================================
--- package/dist/index.d.ts
+++ package/dist/index.d.ts
@@ -1,16 +1,16 @@
 import "@sanity/ui/styles.css";
 import { ArrayOfObjectsInputProps, FieldDefinition, ObjectField, Path, PreviewProps, SanityClient, SchemaType } from "sanity";
-type VariantType = {
+export type VariantType = {
   id: string;
   label: string;
 };
-type ExperimentType = {
+export type ExperimentType = {
   id: string;
   label: string;
   variants: VariantType[];
 };
-type ExperimentFieldPluginConfig = {
+export type ExperimentFieldPluginConfig = {
   fields: (string | FieldDefinition)[];
   experiments: ExperimentType[] | ((client: SanityClient) => Promise<ExperimentType[]>);
   apiVersion?: string;
   experimentNameOverride?: string;
@@ -19,54 +19,54 @@
   variantArrayName?: string;
   experimentId?: string;
 };
 /** @deprecated Use {@link ExperimentFieldPluginConfig} instead. */
-type FieldPluginConfig = ExperimentFieldPluginConfig;
-type PersonalizationFieldPluginConfig = {
+export type FieldPluginConfig = ExperimentFieldPluginConfig;
+export type PersonalizationFieldPluginConfig = {
   fields: (string | FieldDefinition)[];
   segments: VariantType[] | ((client: SanityClient) => Promise<VariantType[]>);
   apiVersion?: string;
   personalizationNameOverride?: string;
   segmentNameOverride?: string;
   segmentId?: string;
   segmentArrayName?: string;
 };
-type VariantPreviewProps = Omit<PreviewProps, 'SchemaType'> & {
+export type VariantPreviewProps = Omit<PreviewProps, 'SchemaType'> & {
   [key: string]: string;
   value: any;
 };
-type ExperimentContextProps = Required<ExperimentFieldPluginConfig> & {
+export type ExperimentContextProps = Required<ExperimentFieldPluginConfig> & {
   experiments: ExperimentType[];
 };
-type PersonalizationContextProps = Required<PersonalizationFieldPluginConfig> & {
+export type PersonalizationContextProps = Required<PersonalizationFieldPluginConfig> & {
   segments: VariantType[];
 };
-type ArrayInputProps = ArrayOfObjectsInputProps & {
+export type ArrayInputProps = ArrayOfObjectsInputProps & {
   variantName: string;
   variantId: string;
   experimentId: string;
 };
-type PersonalizationArrayInputProps = ArrayOfObjectsInputProps & {
+export type PersonalizationArrayInputProps = ArrayOfObjectsInputProps & {
   segmentName: string;
   segmentId: string;
 };
-type ObjectFieldWithPath = ObjectField & {
+export type ObjectFieldWithPath = ObjectField & {
   path: Path;
 };
-type VariantGeneric<T> = {
+export type VariantGeneric<T> = {
   [key: string]: string | T | undefined;
   _type: string;
   value?: T;
 };
-type ExperimentGeneric<T> = {
+export type ExperimentGeneric<T> = {
   _type: string;
   default?: T;
   experimentValue?: string;
   [key: string]: Array<{
     _key: string;
   } & VariantGeneric<T>> | string | T | undefined;
 };
-type GrowthbookExperiment = {
+export type GrowthbookExperiment = {
   id: string;
   dateCreated: string;
   dateUpdated: string;
   name: string;
@@ -170,9 +170,9 @@
     releasedVariationId: string;
     excludeFromPayload: boolean;
   };
 };
-type GrowthbookFeature = {
+export type GrowthbookFeature = {
   id: string;
   dateCreated: string;
   dateUpdated: string;
   archived: boolean;
@@ -236,12 +236,11 @@
     date: string;
     publishedBy: string;
   };
 };
-declare const fieldLevelExperiments: import("sanity").Plugin<ExperimentFieldPluginConfig>;
-declare const fieldLevelPersonalization: import("sanity").Plugin<PersonalizationFieldPluginConfig>;
+export declare const fieldLevelExperiments: import("sanity").Plugin<ExperimentFieldPluginConfig>;
+export declare const fieldLevelPersonalization: import("sanity").Plugin<PersonalizationFieldPluginConfig>;
 /**
  * Flattens a document's schema type into a flat array of fields and includes their path
  */
-declare function flattenSchemaType(schemaType: SchemaType): ObjectFieldWithPath[];
-export { ArrayInputProps, ExperimentContextProps, ExperimentFieldPluginConfig, ExperimentGeneric, ExperimentType, FieldPluginConfig, GrowthbookExperiment, GrowthbookFeature, ObjectFieldWithPath, PersonalizationArrayInputProps, PersonalizationContextProps, PersonalizationFieldPluginConfig, VariantGeneric, VariantPreviewProps, VariantType, fieldLevelExperiments, fieldLevelPersonalization, flattenSchemaType };
+export declare function flattenSchemaType(schemaType: SchemaType): ObjectFieldWithPath[];
 //# sourceMappingURL=index.d.ts.map
\ No newline at end of file