/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; /** * An array of Variant objects */ export type AutotuneFullUpdateDtoVariants = { /** * Variant name */ name: string; /** * Variant JSON data */ json?: any | undefined; }; /** * The initial time period where Autotune will equally split the traffic. */ export const AutotuneFullUpdateDtoExplorationWindow = { Onehr: "1hr", TwentyFourhr: "24hr", FortyEighthr: "48hr", One: "1", TwentyFour: "24", FortyEight: "48", Onehrs: "1hrs", TwentyFourhrs: "24hrs", FortyEighthrs: "48hrs", } as const; /** * The initial time period where Autotune will equally split the traffic. */ export type AutotuneFullUpdateDtoExplorationWindow = ClosedEnum< typeof AutotuneFullUpdateDtoExplorationWindow >; /** * The maximum duration between the exposure and success event that counts as a success. */ export const AutotuneFullUpdateDtoAttributionWindow = { Onehr: "1hr", Twohr: "2hr", Fourhr: "4hr", TwentyFourhr: "24hr", Onehrs: "1hrs", Twohrs: "2hrs", Fourhrs: "4hrs", TwentyFourhrs: "24hrs", One: "1", Two: "2", Four: "4", TwentyFour: "24", } as const; /** * The maximum duration between the exposure and success event that counts as a success. */ export type AutotuneFullUpdateDtoAttributionWindow = ClosedEnum< typeof AutotuneFullUpdateDtoAttributionWindow >; /** * The "probability of best" threshold a variant needs to achieve for Autotune to declare it the winner, stop collecting data, and direct all traffic. */ export const AutotuneFullUpdateDtoWinnerThreshold = { EightyPercent: "80%", NinetyPercent: "90%", NinetyFivePercent: "95%", NinetyEightPercent: "98%", NinetyNinePercent: "99%", } as const; /** * The "probability of best" threshold a variant needs to achieve for Autotune to declare it the winner, stop collecting data, and direct all traffic. */ export type AutotuneFullUpdateDtoWinnerThreshold = ClosedEnum< typeof AutotuneFullUpdateDtoWinnerThreshold >; /** * Autotune object */ export type AutotuneFullUpdateDto = { /** * A brief summary of what the autotune is being used for. */ description?: string | undefined; /** * An array of Variant objects. */ variants: Array; /** * The event you are trying to optimize for. */ successEvent: string; /** * The value that should come with the event for it to be considered successful. */ successEventValue?: string | undefined; /** * The initial time period where Autotune will equally split the traffic. */ explorationWindow: AutotuneFullUpdateDtoExplorationWindow; /** * The maximum duration between the exposure and success event that counts as a success. */ attributionWindow: AutotuneFullUpdateDtoAttributionWindow; /** * The "probability of best" threshold a variant needs to achieve for Autotune to declare it the winner, stop collecting data, and direct all traffic. */ winnerThreshold: AutotuneFullUpdateDtoWinnerThreshold; }; /** @internal */ export const AutotuneFullUpdateDtoVariants$inboundSchema: z.ZodType< AutotuneFullUpdateDtoVariants, z.ZodTypeDef, unknown > = z.object({ name: z.string(), json: z.any().optional(), }); /** @internal */ export type AutotuneFullUpdateDtoVariants$Outbound = { name: string; json?: any | undefined; }; /** @internal */ export const AutotuneFullUpdateDtoVariants$outboundSchema: z.ZodType< AutotuneFullUpdateDtoVariants$Outbound, z.ZodTypeDef, AutotuneFullUpdateDtoVariants > = z.object({ name: z.string(), json: z.any().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotuneFullUpdateDtoVariants$ { /** @deprecated use `AutotuneFullUpdateDtoVariants$inboundSchema` instead. */ export const inboundSchema = AutotuneFullUpdateDtoVariants$inboundSchema; /** @deprecated use `AutotuneFullUpdateDtoVariants$outboundSchema` instead. */ export const outboundSchema = AutotuneFullUpdateDtoVariants$outboundSchema; /** @deprecated use `AutotuneFullUpdateDtoVariants$Outbound` instead. */ export type Outbound = AutotuneFullUpdateDtoVariants$Outbound; } /** @internal */ export const AutotuneFullUpdateDtoExplorationWindow$inboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoExplorationWindow > = z.nativeEnum(AutotuneFullUpdateDtoExplorationWindow); /** @internal */ export const AutotuneFullUpdateDtoExplorationWindow$outboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoExplorationWindow > = AutotuneFullUpdateDtoExplorationWindow$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotuneFullUpdateDtoExplorationWindow$ { /** @deprecated use `AutotuneFullUpdateDtoExplorationWindow$inboundSchema` instead. */ export const inboundSchema = AutotuneFullUpdateDtoExplorationWindow$inboundSchema; /** @deprecated use `AutotuneFullUpdateDtoExplorationWindow$outboundSchema` instead. */ export const outboundSchema = AutotuneFullUpdateDtoExplorationWindow$outboundSchema; } /** @internal */ export const AutotuneFullUpdateDtoAttributionWindow$inboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoAttributionWindow > = z.nativeEnum(AutotuneFullUpdateDtoAttributionWindow); /** @internal */ export const AutotuneFullUpdateDtoAttributionWindow$outboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoAttributionWindow > = AutotuneFullUpdateDtoAttributionWindow$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotuneFullUpdateDtoAttributionWindow$ { /** @deprecated use `AutotuneFullUpdateDtoAttributionWindow$inboundSchema` instead. */ export const inboundSchema = AutotuneFullUpdateDtoAttributionWindow$inboundSchema; /** @deprecated use `AutotuneFullUpdateDtoAttributionWindow$outboundSchema` instead. */ export const outboundSchema = AutotuneFullUpdateDtoAttributionWindow$outboundSchema; } /** @internal */ export const AutotuneFullUpdateDtoWinnerThreshold$inboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoWinnerThreshold > = z.nativeEnum(AutotuneFullUpdateDtoWinnerThreshold); /** @internal */ export const AutotuneFullUpdateDtoWinnerThreshold$outboundSchema: z.ZodNativeEnum< typeof AutotuneFullUpdateDtoWinnerThreshold > = AutotuneFullUpdateDtoWinnerThreshold$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotuneFullUpdateDtoWinnerThreshold$ { /** @deprecated use `AutotuneFullUpdateDtoWinnerThreshold$inboundSchema` instead. */ export const inboundSchema = AutotuneFullUpdateDtoWinnerThreshold$inboundSchema; /** @deprecated use `AutotuneFullUpdateDtoWinnerThreshold$outboundSchema` instead. */ export const outboundSchema = AutotuneFullUpdateDtoWinnerThreshold$outboundSchema; } /** @internal */ export const AutotuneFullUpdateDto$inboundSchema: z.ZodType< AutotuneFullUpdateDto, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), variants: z.array(z.lazy(() => AutotuneFullUpdateDtoVariants$inboundSchema)), successEvent: z.string(), successEventValue: z.string().optional(), explorationWindow: AutotuneFullUpdateDtoExplorationWindow$inboundSchema, attributionWindow: AutotuneFullUpdateDtoAttributionWindow$inboundSchema, winnerThreshold: AutotuneFullUpdateDtoWinnerThreshold$inboundSchema, }); /** @internal */ export type AutotuneFullUpdateDto$Outbound = { description?: string | undefined; variants: Array; successEvent: string; successEventValue?: string | undefined; explorationWindow: string; attributionWindow: string; winnerThreshold: string; }; /** @internal */ export const AutotuneFullUpdateDto$outboundSchema: z.ZodType< AutotuneFullUpdateDto$Outbound, z.ZodTypeDef, AutotuneFullUpdateDto > = z.object({ description: z.string().optional(), variants: z.array(z.lazy(() => AutotuneFullUpdateDtoVariants$outboundSchema)), successEvent: z.string(), successEventValue: z.string().optional(), explorationWindow: AutotuneFullUpdateDtoExplorationWindow$outboundSchema, attributionWindow: AutotuneFullUpdateDtoAttributionWindow$outboundSchema, winnerThreshold: AutotuneFullUpdateDtoWinnerThreshold$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotuneFullUpdateDto$ { /** @deprecated use `AutotuneFullUpdateDto$inboundSchema` instead. */ export const inboundSchema = AutotuneFullUpdateDto$inboundSchema; /** @deprecated use `AutotuneFullUpdateDto$outboundSchema` instead. */ export const outboundSchema = AutotuneFullUpdateDto$outboundSchema; /** @deprecated use `AutotuneFullUpdateDto$Outbound` instead. */ export type Outbound = AutotuneFullUpdateDto$Outbound; }