@builder.io/sdk-vue
Version:
Builder.io SDK for Vue
42 lines (41 loc) • 1.53 kB
TypeScript
import type { Nullable } from '../../helpers/nullable';
import type { BuilderContent } from '../../types/builder-content';
export declare const getVariants: (content: Nullable<BuilderContent>) => {
testVariationId: string | undefined;
id: string | undefined;
data?: {
[key: string]: any;
title?: string | undefined;
blocks?: import("../..").BuilderBlock[] | undefined;
inputs?: import("../../types/input").Input[] | undefined;
state?: {
[key: string]: any;
} | undefined;
jsCode?: string | undefined;
tsCode?: string | undefined;
httpRequests?: {
[key: string]: string;
} | undefined;
} | undefined;
name?: string | undefined;
testRatio?: number | undefined;
meta?: {
[key: string]: any;
breakpoints?: import("../../types/typescript").Nullable<import("../../types/builder-content").Breakpoints>;
} | undefined;
}[];
export declare const checkShouldRenderVariants: ({ canTrack, content }: {
canTrack: Nullable<boolean>;
content: Nullable<BuilderContent>;
}) => boolean;
type VariantData = {
id: string;
testRatio?: number;
};
export declare const getInitVariantsFnsScriptString: () => string;
export declare const getUpdateCookieAndStylesScript: (variants: VariantData[], contentId: string) => string;
export declare const getUpdateVariantVisibilityScript: ({ contentId, variationId }: {
variationId: string;
contentId: string;
}) => string;
export {};