/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type ExperimentPartialUpdateDtoLinks = { /** * The URL of the link */ url: string; /** * The title of the link */ title?: string | undefined; }; export type ExperimentPartialUpdateDtoGroups = { name: string; id?: any | null | undefined; size: number; parameterValues: { [k: string]: any }; disabled?: boolean | undefined; description?: string | undefined; foreignGroupID?: string | undefined; }; export type ExperimentPartialUpdateDtoPrimaryMetrics = { name: string; type: string; }; export type ExperimentPartialUpdateDtoSecondaryMetrics = { name: string; type: string; }; /** * Target apps assigned to this experiment */ export type ExperimentPartialUpdateDtoTargetApps = string | Array; /** * Default error margin used for results */ export const ExperimentPartialUpdateDtoDefaultConfidenceInterval = { Eighty: "80", Ninety: "90", NinetyFive: "95", NinetyEight: "98", NinetyNine: "99", } as const; /** * Default error margin used for results */ export type ExperimentPartialUpdateDtoDefaultConfidenceInterval = ClosedEnum< typeof ExperimentPartialUpdateDtoDefaultConfidenceInterval >; /** * The current status of the experiment */ export const ExperimentPartialUpdateDtoStatus = { Active: "active", Setup: "setup", DecisionMade: "decision_made", Abandoned: "abandoned", Archived: "archived", } as const; /** * The current status of the experiment */ export type ExperimentPartialUpdateDtoStatus = ClosedEnum; export type ExperimentPartialUpdateDto = { /** * A helpful summary of what this experiment does */ description?: string | undefined; /** * The type of ID which the experiment is based on */ idType?: string | undefined; /** * A statement that will be tested by this experiment */ hypothesis?: string | undefined; /** * Links to relevant documentation or resources */ links?: Array | undefined; /** * The test groups for your experiment */ groups?: Array | undefined; /** * Optional control group ID */ controlGroupID?: string | undefined; /** * Percent of layer allocated to this experiment */ allocation?: number | undefined; /** * Primary metric tags for the experiment */ primaryMetricTags?: Array | undefined; /** * Secondary metric tags for the experiment */ secondaryMetricTags?: Array | undefined; /** * Main metrics needed to evaluate your hypothesis */ primaryMetrics?: Array | undefined; /** * Additional metrics to monitor that might impact the analysis or final decision of the experiment */ secondaryMetrics?: Array | undefined; /** * Target apps assigned to this experiment */ targetApps?: string | Array | undefined; /** * Tags associated with the experiment */ tags?: Array | undefined; /** * How long the experiment is expected to last in days */ duration?: number | undefined; /** * Target exposures for the experiment */ targetExposures?: number | undefined; /** * Restrict your experiment to users passing the selected feature gate */ targetingGateID?: any | null | undefined; /** * Is Bonferroni correction applied? */ bonferroniCorrection?: boolean | undefined; /** * Default error margin used for results */ defaultConfidenceInterval?: ExperimentPartialUpdateDtoDefaultConfidenceInterval | undefined; /** * The current status of the experiment */ status?: ExperimentPartialUpdateDtoStatus | undefined; /** * ID of the launched group, null otherwise */ launchedGroupID?: any | null | undefined; /** * Source name of the assignment */ assignmentSourceName?: string | undefined; /** * Name of the source experiment for assignment */ assignmentSourceExperimentName?: string | undefined; /** * The Statsig ID of the creator of this experiment */ creatorID?: any | null | undefined; /** * The email of the creator of this experiment */ creatorEmail?: any | null | undefined; /** * For Warehouse Native */ isAnalysisOnly?: any | null | undefined; /** * Enterprise only */ team?: any | null | undefined; /** * Allocation duration in days */ allocationDuration?: number | undefined; /** * Cohorted analysis duration in days */ cohortedAnalysisDuration?: number | undefined; /** * Fixed analysis duration in days */ fixedAnalysisDuration?: number | undefined; }; /** @internal */ export const ExperimentPartialUpdateDtoLinks$inboundSchema: z.ZodType< ExperimentPartialUpdateDtoLinks, z.ZodTypeDef, unknown > = z.object({ url: z.string(), title: z.string().optional(), }); /** @internal */ export type ExperimentPartialUpdateDtoLinks$Outbound = { url: string; title?: string | undefined; }; /** @internal */ export const ExperimentPartialUpdateDtoLinks$outboundSchema: z.ZodType< ExperimentPartialUpdateDtoLinks$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDtoLinks > = z.object({ url: z.string(), title: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoLinks$ { /** @deprecated use `ExperimentPartialUpdateDtoLinks$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoLinks$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoLinks$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoLinks$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoLinks$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDtoLinks$Outbound; } /** @internal */ export const ExperimentPartialUpdateDtoGroups$inboundSchema: z.ZodType< ExperimentPartialUpdateDtoGroups, z.ZodTypeDef, unknown > = z.object({ name: z.string(), id: z.nullable(z.any()).optional(), size: z.number(), parameterValues: z.record(z.any()), disabled: z.boolean().optional(), description: z.string().optional(), foreignGroupID: z.string().optional(), }); /** @internal */ export type ExperimentPartialUpdateDtoGroups$Outbound = { name: string; id?: any | null | undefined; size: number; parameterValues: { [k: string]: any }; disabled?: boolean | undefined; description?: string | undefined; foreignGroupID?: string | undefined; }; /** @internal */ export const ExperimentPartialUpdateDtoGroups$outboundSchema: z.ZodType< ExperimentPartialUpdateDtoGroups$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDtoGroups > = z.object({ name: z.string(), id: z.nullable(z.any()).optional(), size: z.number(), parameterValues: z.record(z.any()), disabled: z.boolean().optional(), description: z.string().optional(), foreignGroupID: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoGroups$ { /** @deprecated use `ExperimentPartialUpdateDtoGroups$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoGroups$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoGroups$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoGroups$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoGroups$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDtoGroups$Outbound; } /** @internal */ export const ExperimentPartialUpdateDtoPrimaryMetrics$inboundSchema: z.ZodType< ExperimentPartialUpdateDtoPrimaryMetrics, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: z.string(), }); /** @internal */ export type ExperimentPartialUpdateDtoPrimaryMetrics$Outbound = { name: string; type: string; }; /** @internal */ export const ExperimentPartialUpdateDtoPrimaryMetrics$outboundSchema: z.ZodType< ExperimentPartialUpdateDtoPrimaryMetrics$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDtoPrimaryMetrics > = z.object({ name: z.string(), type: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoPrimaryMetrics$ { /** @deprecated use `ExperimentPartialUpdateDtoPrimaryMetrics$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoPrimaryMetrics$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoPrimaryMetrics$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoPrimaryMetrics$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoPrimaryMetrics$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDtoPrimaryMetrics$Outbound; } /** @internal */ export const ExperimentPartialUpdateDtoSecondaryMetrics$inboundSchema: z.ZodType< ExperimentPartialUpdateDtoSecondaryMetrics, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: z.string(), }); /** @internal */ export type ExperimentPartialUpdateDtoSecondaryMetrics$Outbound = { name: string; type: string; }; /** @internal */ export const ExperimentPartialUpdateDtoSecondaryMetrics$outboundSchema: z.ZodType< ExperimentPartialUpdateDtoSecondaryMetrics$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDtoSecondaryMetrics > = z.object({ name: z.string(), type: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoSecondaryMetrics$ { /** @deprecated use `ExperimentPartialUpdateDtoSecondaryMetrics$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoSecondaryMetrics$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoSecondaryMetrics$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoSecondaryMetrics$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoSecondaryMetrics$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDtoSecondaryMetrics$Outbound; } /** @internal */ export const ExperimentPartialUpdateDtoTargetApps$inboundSchema: z.ZodType< ExperimentPartialUpdateDtoTargetApps, z.ZodTypeDef, unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ export type ExperimentPartialUpdateDtoTargetApps$Outbound = string | Array; /** @internal */ export const ExperimentPartialUpdateDtoTargetApps$outboundSchema: z.ZodType< ExperimentPartialUpdateDtoTargetApps$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDtoTargetApps > = z.union([z.string(), z.array(z.string())]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoTargetApps$ { /** @deprecated use `ExperimentPartialUpdateDtoTargetApps$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoTargetApps$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoTargetApps$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoTargetApps$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoTargetApps$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDtoTargetApps$Outbound; } /** @internal */ export const ExperimentPartialUpdateDtoDefaultConfidenceInterval$inboundSchema: z.ZodNativeEnum< typeof ExperimentPartialUpdateDtoDefaultConfidenceInterval > = z.nativeEnum(ExperimentPartialUpdateDtoDefaultConfidenceInterval); /** @internal */ export const ExperimentPartialUpdateDtoDefaultConfidenceInterval$outboundSchema: z.ZodNativeEnum< typeof ExperimentPartialUpdateDtoDefaultConfidenceInterval > = ExperimentPartialUpdateDtoDefaultConfidenceInterval$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoDefaultConfidenceInterval$ { /** @deprecated use `ExperimentPartialUpdateDtoDefaultConfidenceInterval$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoDefaultConfidenceInterval$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoDefaultConfidenceInterval$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoDefaultConfidenceInterval$outboundSchema; } /** @internal */ export const ExperimentPartialUpdateDtoStatus$inboundSchema: z.ZodNativeEnum< typeof ExperimentPartialUpdateDtoStatus > = z.nativeEnum(ExperimentPartialUpdateDtoStatus); /** @internal */ export const ExperimentPartialUpdateDtoStatus$outboundSchema: z.ZodNativeEnum< typeof ExperimentPartialUpdateDtoStatus > = ExperimentPartialUpdateDtoStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDtoStatus$ { /** @deprecated use `ExperimentPartialUpdateDtoStatus$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDtoStatus$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDtoStatus$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDtoStatus$outboundSchema; } /** @internal */ export const ExperimentPartialUpdateDto$inboundSchema: z.ZodType< ExperimentPartialUpdateDto, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), idType: z.string().optional(), hypothesis: z.string().optional(), links: z.array(z.lazy(() => ExperimentPartialUpdateDtoLinks$inboundSchema)).optional(), groups: z.array(z.lazy(() => ExperimentPartialUpdateDtoGroups$inboundSchema)).optional(), controlGroupID: z.string().optional(), allocation: z.number().optional(), primaryMetricTags: z.array(z.string()).optional(), secondaryMetricTags: z.array(z.string()).optional(), primaryMetrics: z .array(z.lazy(() => ExperimentPartialUpdateDtoPrimaryMetrics$inboundSchema)) .optional(), secondaryMetrics: z .array(z.lazy(() => ExperimentPartialUpdateDtoSecondaryMetrics$inboundSchema)) .optional(), targetApps: z.union([z.string(), z.array(z.string())]).optional(), tags: z.array(z.string()).optional(), duration: z.number().int().optional(), targetExposures: z.number().int().optional(), targetingGateID: z.nullable(z.any()).optional(), bonferroniCorrection: z.boolean().optional(), defaultConfidenceInterval: ExperimentPartialUpdateDtoDefaultConfidenceInterval$inboundSchema.optional(), status: ExperimentPartialUpdateDtoStatus$inboundSchema.optional(), launchedGroupID: z.nullable(z.any()).optional(), assignmentSourceName: z.string().optional(), assignmentSourceExperimentName: z.string().optional(), creatorID: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), isAnalysisOnly: z.nullable(z.any()).optional(), team: z.nullable(z.any()).optional(), allocationDuration: z.number().int().optional(), cohortedAnalysisDuration: z.number().int().optional(), fixedAnalysisDuration: z.number().int().optional(), }); /** @internal */ export type ExperimentPartialUpdateDto$Outbound = { description?: string | undefined; idType?: string | undefined; hypothesis?: string | undefined; links?: Array | undefined; groups?: Array | undefined; controlGroupID?: string | undefined; allocation?: number | undefined; primaryMetricTags?: Array | undefined; secondaryMetricTags?: Array | undefined; primaryMetrics?: Array | undefined; secondaryMetrics?: Array | undefined; targetApps?: string | Array | undefined; tags?: Array | undefined; duration?: number | undefined; targetExposures?: number | undefined; targetingGateID?: any | null | undefined; bonferroniCorrection?: boolean | undefined; defaultConfidenceInterval?: string | undefined; status?: string | undefined; launchedGroupID?: any | null | undefined; assignmentSourceName?: string | undefined; assignmentSourceExperimentName?: string | undefined; creatorID?: any | null | undefined; creatorEmail?: any | null | undefined; isAnalysisOnly?: any | null | undefined; team?: any | null | undefined; allocationDuration?: number | undefined; cohortedAnalysisDuration?: number | undefined; fixedAnalysisDuration?: number | undefined; }; /** @internal */ export const ExperimentPartialUpdateDto$outboundSchema: z.ZodType< ExperimentPartialUpdateDto$Outbound, z.ZodTypeDef, ExperimentPartialUpdateDto > = z.object({ description: z.string().optional(), idType: z.string().optional(), hypothesis: z.string().optional(), links: z.array(z.lazy(() => ExperimentPartialUpdateDtoLinks$outboundSchema)).optional(), groups: z.array(z.lazy(() => ExperimentPartialUpdateDtoGroups$outboundSchema)).optional(), controlGroupID: z.string().optional(), allocation: z.number().optional(), primaryMetricTags: z.array(z.string()).optional(), secondaryMetricTags: z.array(z.string()).optional(), primaryMetrics: z .array(z.lazy(() => ExperimentPartialUpdateDtoPrimaryMetrics$outboundSchema)) .optional(), secondaryMetrics: z .array(z.lazy(() => ExperimentPartialUpdateDtoSecondaryMetrics$outboundSchema)) .optional(), targetApps: z.union([z.string(), z.array(z.string())]).optional(), tags: z.array(z.string()).optional(), duration: z.number().int().optional(), targetExposures: z.number().int().optional(), targetingGateID: z.nullable(z.any()).optional(), bonferroniCorrection: z.boolean().optional(), defaultConfidenceInterval: ExperimentPartialUpdateDtoDefaultConfidenceInterval$outboundSchema.optional(), status: ExperimentPartialUpdateDtoStatus$outboundSchema.optional(), launchedGroupID: z.nullable(z.any()).optional(), assignmentSourceName: z.string().optional(), assignmentSourceExperimentName: z.string().optional(), creatorID: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), isAnalysisOnly: z.nullable(z.any()).optional(), team: z.nullable(z.any()).optional(), allocationDuration: z.number().int().optional(), cohortedAnalysisDuration: z.number().int().optional(), fixedAnalysisDuration: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExperimentPartialUpdateDto$ { /** @deprecated use `ExperimentPartialUpdateDto$inboundSchema` instead. */ export const inboundSchema = ExperimentPartialUpdateDto$inboundSchema; /** @deprecated use `ExperimentPartialUpdateDto$outboundSchema` instead. */ export const outboundSchema = ExperimentPartialUpdateDto$outboundSchema; /** @deprecated use `ExperimentPartialUpdateDto$Outbound` instead. */ export type Outbound = ExperimentPartialUpdateDto$Outbound; }