/* * 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 AutotunePartialUpdateDtoVariants = { /** * Variant name */ name: string; /** * Variant JSON data */ json?: any | undefined; }; /** * The initial time period where Autotune will equally split the traffic. */ export const AutotunePartialUpdateDtoExplorationWindow = { 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 AutotunePartialUpdateDtoExplorationWindow = ClosedEnum< typeof AutotunePartialUpdateDtoExplorationWindow >; /** * The maximum duration between the exposure and success event that counts as a success. */ export const AutotunePartialUpdateDtoAttributionWindow = { 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 AutotunePartialUpdateDtoAttributionWindow = ClosedEnum< typeof AutotunePartialUpdateDtoAttributionWindow >; /** * 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 AutotunePartialUpdateDtoWinnerThreshold = { 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 AutotunePartialUpdateDtoWinnerThreshold = ClosedEnum< typeof AutotunePartialUpdateDtoWinnerThreshold >; export type AutotunePartialUpdateDto = { /** * A brief summary of what the autotune is being used for. */ description?: string | undefined; /** * An array of Variant objects. */ variants?: Array | undefined; /** * The event you are trying to optimize for. */ successEvent?: string | undefined; /** * 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?: AutotunePartialUpdateDtoExplorationWindow | undefined; /** * The maximum duration between the exposure and success event that counts as a success. */ attributionWindow?: AutotunePartialUpdateDtoAttributionWindow | undefined; /** * 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?: AutotunePartialUpdateDtoWinnerThreshold | undefined; }; /** @internal */ export const AutotunePartialUpdateDtoVariants$inboundSchema: z.ZodType< AutotunePartialUpdateDtoVariants, z.ZodTypeDef, unknown > = z.object({ name: z.string(), json: z.any().optional(), }); /** @internal */ export type AutotunePartialUpdateDtoVariants$Outbound = { name: string; json?: any | undefined; }; /** @internal */ export const AutotunePartialUpdateDtoVariants$outboundSchema: z.ZodType< AutotunePartialUpdateDtoVariants$Outbound, z.ZodTypeDef, AutotunePartialUpdateDtoVariants > = 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 AutotunePartialUpdateDtoVariants$ { /** @deprecated use `AutotunePartialUpdateDtoVariants$inboundSchema` instead. */ export const inboundSchema = AutotunePartialUpdateDtoVariants$inboundSchema; /** @deprecated use `AutotunePartialUpdateDtoVariants$outboundSchema` instead. */ export const outboundSchema = AutotunePartialUpdateDtoVariants$outboundSchema; /** @deprecated use `AutotunePartialUpdateDtoVariants$Outbound` instead. */ export type Outbound = AutotunePartialUpdateDtoVariants$Outbound; } /** @internal */ export const AutotunePartialUpdateDtoExplorationWindow$inboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoExplorationWindow > = z.nativeEnum(AutotunePartialUpdateDtoExplorationWindow); /** @internal */ export const AutotunePartialUpdateDtoExplorationWindow$outboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoExplorationWindow > = AutotunePartialUpdateDtoExplorationWindow$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotunePartialUpdateDtoExplorationWindow$ { /** @deprecated use `AutotunePartialUpdateDtoExplorationWindow$inboundSchema` instead. */ export const inboundSchema = AutotunePartialUpdateDtoExplorationWindow$inboundSchema; /** @deprecated use `AutotunePartialUpdateDtoExplorationWindow$outboundSchema` instead. */ export const outboundSchema = AutotunePartialUpdateDtoExplorationWindow$outboundSchema; } /** @internal */ export const AutotunePartialUpdateDtoAttributionWindow$inboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoAttributionWindow > = z.nativeEnum(AutotunePartialUpdateDtoAttributionWindow); /** @internal */ export const AutotunePartialUpdateDtoAttributionWindow$outboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoAttributionWindow > = AutotunePartialUpdateDtoAttributionWindow$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotunePartialUpdateDtoAttributionWindow$ { /** @deprecated use `AutotunePartialUpdateDtoAttributionWindow$inboundSchema` instead. */ export const inboundSchema = AutotunePartialUpdateDtoAttributionWindow$inboundSchema; /** @deprecated use `AutotunePartialUpdateDtoAttributionWindow$outboundSchema` instead. */ export const outboundSchema = AutotunePartialUpdateDtoAttributionWindow$outboundSchema; } /** @internal */ export const AutotunePartialUpdateDtoWinnerThreshold$inboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoWinnerThreshold > = z.nativeEnum(AutotunePartialUpdateDtoWinnerThreshold); /** @internal */ export const AutotunePartialUpdateDtoWinnerThreshold$outboundSchema: z.ZodNativeEnum< typeof AutotunePartialUpdateDtoWinnerThreshold > = AutotunePartialUpdateDtoWinnerThreshold$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotunePartialUpdateDtoWinnerThreshold$ { /** @deprecated use `AutotunePartialUpdateDtoWinnerThreshold$inboundSchema` instead. */ export const inboundSchema = AutotunePartialUpdateDtoWinnerThreshold$inboundSchema; /** @deprecated use `AutotunePartialUpdateDtoWinnerThreshold$outboundSchema` instead. */ export const outboundSchema = AutotunePartialUpdateDtoWinnerThreshold$outboundSchema; } /** @internal */ export const AutotunePartialUpdateDto$inboundSchema: z.ZodType< AutotunePartialUpdateDto, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), variants: z.array(z.lazy(() => AutotunePartialUpdateDtoVariants$inboundSchema)).optional(), successEvent: z.string().optional(), successEventValue: z.string().optional(), explorationWindow: AutotunePartialUpdateDtoExplorationWindow$inboundSchema.optional(), attributionWindow: AutotunePartialUpdateDtoAttributionWindow$inboundSchema.optional(), winnerThreshold: AutotunePartialUpdateDtoWinnerThreshold$inboundSchema.optional(), }); /** @internal */ export type AutotunePartialUpdateDto$Outbound = { description?: string | undefined; variants?: Array | undefined; successEvent?: string | undefined; successEventValue?: string | undefined; explorationWindow?: string | undefined; attributionWindow?: string | undefined; winnerThreshold?: string | undefined; }; /** @internal */ export const AutotunePartialUpdateDto$outboundSchema: z.ZodType< AutotunePartialUpdateDto$Outbound, z.ZodTypeDef, AutotunePartialUpdateDto > = z.object({ description: z.string().optional(), variants: z.array(z.lazy(() => AutotunePartialUpdateDtoVariants$outboundSchema)).optional(), successEvent: z.string().optional(), successEventValue: z.string().optional(), explorationWindow: AutotunePartialUpdateDtoExplorationWindow$outboundSchema.optional(), attributionWindow: AutotunePartialUpdateDtoAttributionWindow$outboundSchema.optional(), winnerThreshold: AutotunePartialUpdateDtoWinnerThreshold$outboundSchema.optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AutotunePartialUpdateDto$ { /** @deprecated use `AutotunePartialUpdateDto$inboundSchema` instead. */ export const inboundSchema = AutotunePartialUpdateDto$inboundSchema; /** @deprecated use `AutotunePartialUpdateDto$outboundSchema` instead. */ export const outboundSchema = AutotunePartialUpdateDto$outboundSchema; /** @deprecated use `AutotunePartialUpdateDto$Outbound` instead. */ export type Outbound = AutotunePartialUpdateDto$Outbound; }