/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; export type ExternalExperimentDtoAllowedReviewers = { id: string; name: string; email: string; }; export type ExternalExperimentDtoReviewSettings = { requiredReview: boolean; allowedReviewers: Array | null; }; export type ExternalExperimentDtoActiveReview = { reviewID: string; reviewStatus: string; description: string; }; /** * Target apps assigned to this experiment */ export type ExternalExperimentDtoTargetApps = string | Array; export type ExternalExperimentDtoLinks = { /** * The URL of the link */ url: string; /** * The title of the link */ title?: string | undefined; }; export type ExternalExperimentDtoGroups = { name: string; id?: any | null | undefined; size: number; parameterValues: { [k: string]: any }; disabled?: boolean | undefined; description?: string | undefined; foreignGroupID?: string | undefined; }; export type ExternalExperimentDtoPrimaryMetrics = { name: string; type: string; }; export type ExternalExperimentDtoSecondaryMetrics = { name: string; type: string; }; /** * Default error margin used for results */ export const ExternalExperimentDtoDefaultConfidenceInterval = { Eighty: "80", Ninety: "90", NinetyFive: "95", NinetyEight: "98", NinetyNine: "99", } as const; /** * Default error margin used for results */ export type ExternalExperimentDtoDefaultConfidenceInterval = ClosedEnum< typeof ExternalExperimentDtoDefaultConfidenceInterval >; /** * The current status of the experiment */ export const ExternalExperimentDtoStatus = { Active: "active", Setup: "setup", DecisionMade: "decision_made", Abandoned: "abandoned", Archived: "archived", } as const; /** * The current status of the experiment */ export type ExternalExperimentDtoStatus = ClosedEnum; export const Subtype = { Conversion: "conversion", Reactivation: "reactivation", Retention: "retention", } as const; export type Subtype = ClosedEnum; export const ExternalExperimentDtoHealthChecksStatus = { Passed: "PASSED", Failed: "FAILED", Waiting: "WAITING", Warning: "WARNING", } as const; export type ExternalExperimentDtoHealthChecksStatus = ClosedEnum< typeof ExternalExperimentDtoHealthChecksStatus >; export type DeduplicationRates = { groupId: string; rate: number; groupName: string; }; export type Metrics = { metricName: string; earliestDate: Date; }; export type Metadata = { type: string; lastPulseLoadTime?: number | undefined; crossoverPercent?: number | undefined; assignmentSourceID?: string | undefined; assignmentSourceName?: string | undefined; foreignExperimentID?: string | undefined; deduplicationRate?: number | undefined; deduplicationRates?: Array | undefined; primaryIdType: string; secondaryIdType?: string | undefined; missingMetrics?: Array | undefined; metrics?: Array | undefined; lastUpdatedDs?: string | undefined; }; export const ExternalExperimentDtoType = { HasChecks: "has_checks", HasValidUnitType: "has_valid_unit_type", HasBalancedExposures: "has_balanced_exposures", HasEventMetrics: "has_event_metrics", HasPulseMetrics: "has_pulse_metrics", AssignmentHealth: "assignment_health", HasCrossover: "has_crossover", HasExposures: "has_exposures", UserMetricsExist: "user_metrics_exist", DeduplicationRate: "deduplication_rate", DeduplicationRateGroupLevel: "deduplication_rate_group_level", WindowedMetricsHaveOutliers: "windowed_metrics_have_outliers", ExposuresDataIsBehind: "exposures_data_is_behind", PreExperimentalBiasCheck: "pre_experimental_bias_check", SegmentsOfInterestAnalysis: "segments_of_interest_analysis", HasChangedParameter: "has_changed_parameter", MetricHistoryForToplineImpact: "metric_history_for_topline_impact", DefaultValueMismatch: "default_value_mismatch", } as const; export type ExternalExperimentDtoType = ClosedEnum; export type HealthChecks = { name: string; description: string; status: ExternalExperimentDtoHealthChecksStatus; metadata?: Metadata | undefined; type?: ExternalExperimentDtoType | undefined; }; /** * Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined. */ export type ExternalExperimentDtoOwner = { /** * ID of the owner */ ownerID?: string | undefined; /** * Type of the owner (e.g., SDK_KEY or USER) */ ownerType?: string | undefined; /** * The name of the owner. This field is optional. */ ownerName?: string | undefined; }; export type ExternalExperimentDto = { reviewSettings?: ExternalExperimentDtoReviewSettings | undefined; activeReview?: ExternalExperimentDtoActiveReview | undefined; /** * ID */ id: string; /** * Optional name for the configuration. */ name?: string | undefined; idType: string; /** * A helpful summary of what this experiment does */ description: string; /** * ID of the last modifier. */ lastModifierID?: any | null | undefined; /** * Time of the last modification. */ lastModifiedTime?: any | null | undefined; /** * Email of the last modifier. */ lastModifierEmail?: any | null | undefined; /** * Name of the last modifier. */ lastModifierName?: any | null | undefined; /** * The Statsig ID of the creator of this experiment */ creatorID?: any | null | undefined; /** * Timestamp when the entity was created. */ createdTime: number; /** * Name of the creator. */ creatorName?: any | null | undefined; /** * The email of the creator of this experiment */ creatorEmail?: any | null | undefined; tags: Array; /** * Target apps assigned to this experiment */ targetApps?: string | Array | undefined; /** * Holdouts applied to this configuration. */ holdoutIDs?: Array | undefined; /** * Enterprise only */ team?: any | null | undefined; /** * A statement that will be tested by this experiment */ hypothesis: string; /** * Links to relevant documentation or resources */ links?: Array | undefined; /** * The test groups for your experiment */ groups: Array; /** * Optional control group ID */ controlGroupID?: string | undefined; /** * Percent of layer allocated to this experiment */ allocation: number; /** * Primary metric tags for the experiment */ primaryMetricTags?: Array | undefined; /** * Secondary metric tags for the experiment */ secondaryMetricTags?: Array | undefined; primaryMetrics: Array; secondaryMetrics: Array; /** * 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; /** * Default error margin used for results */ defaultConfidenceInterval: ExternalExperimentDtoDefaultConfidenceInterval; /** * The current status of the experiment */ status: ExternalExperimentDtoStatus; /** * ID of the launched group, null otherwise */ launchedGroupID?: any | null | undefined; assignmentSourceName?: string | undefined; /** * Name of the source experiment for assignment */ assignmentSourceExperimentName?: string | undefined; isAnalysisOnly?: boolean | undefined; /** * Allocation duration in days */ allocationDuration?: number | undefined; /** * Cohorted analysis duration in days */ cohortedAnalysisDuration?: number | undefined; /** * Fixed analysis duration in days */ fixedAnalysisDuration?: number | undefined; subtype?: Subtype | undefined; externalExperimentName?: string | undefined; layerID?: any | null | undefined; startTime?: any | null | undefined; endTime?: any | null | undefined; decisionReason?: any | null | undefined; decisionTime?: any | null | undefined; healthChecks?: Array | undefined; /** * Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined. */ owner?: ExternalExperimentDtoOwner | null | undefined; }; /** @internal */ export const ExternalExperimentDtoAllowedReviewers$inboundSchema: z.ZodType< ExternalExperimentDtoAllowedReviewers, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), email: z.string(), }); /** @internal */ export type ExternalExperimentDtoAllowedReviewers$Outbound = { id: string; name: string; email: string; }; /** @internal */ export const ExternalExperimentDtoAllowedReviewers$outboundSchema: z.ZodType< ExternalExperimentDtoAllowedReviewers$Outbound, z.ZodTypeDef, ExternalExperimentDtoAllowedReviewers > = z.object({ id: z.string(), name: z.string(), email: 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 ExternalExperimentDtoAllowedReviewers$ { /** @deprecated use `ExternalExperimentDtoAllowedReviewers$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoAllowedReviewers$inboundSchema; /** @deprecated use `ExternalExperimentDtoAllowedReviewers$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoAllowedReviewers$outboundSchema; /** @deprecated use `ExternalExperimentDtoAllowedReviewers$Outbound` instead. */ export type Outbound = ExternalExperimentDtoAllowedReviewers$Outbound; } /** @internal */ export const ExternalExperimentDtoReviewSettings$inboundSchema: z.ZodType< ExternalExperimentDtoReviewSettings, z.ZodTypeDef, unknown > = z.object({ requiredReview: z.boolean(), allowedReviewers: z.nullable( z.array(z.lazy(() => ExternalExperimentDtoAllowedReviewers$inboundSchema)) ), }); /** @internal */ export type ExternalExperimentDtoReviewSettings$Outbound = { requiredReview: boolean; allowedReviewers: Array | null; }; /** @internal */ export const ExternalExperimentDtoReviewSettings$outboundSchema: z.ZodType< ExternalExperimentDtoReviewSettings$Outbound, z.ZodTypeDef, ExternalExperimentDtoReviewSettings > = z.object({ requiredReview: z.boolean(), allowedReviewers: z.nullable( z.array(z.lazy(() => ExternalExperimentDtoAllowedReviewers$outboundSchema)) ), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalExperimentDtoReviewSettings$ { /** @deprecated use `ExternalExperimentDtoReviewSettings$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoReviewSettings$inboundSchema; /** @deprecated use `ExternalExperimentDtoReviewSettings$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoReviewSettings$outboundSchema; /** @deprecated use `ExternalExperimentDtoReviewSettings$Outbound` instead. */ export type Outbound = ExternalExperimentDtoReviewSettings$Outbound; } /** @internal */ export const ExternalExperimentDtoActiveReview$inboundSchema: z.ZodType< ExternalExperimentDtoActiveReview, z.ZodTypeDef, unknown > = z.object({ reviewID: z.string(), reviewStatus: z.string(), description: z.string(), }); /** @internal */ export type ExternalExperimentDtoActiveReview$Outbound = { reviewID: string; reviewStatus: string; description: string; }; /** @internal */ export const ExternalExperimentDtoActiveReview$outboundSchema: z.ZodType< ExternalExperimentDtoActiveReview$Outbound, z.ZodTypeDef, ExternalExperimentDtoActiveReview > = z.object({ reviewID: z.string(), reviewStatus: z.string(), description: 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 ExternalExperimentDtoActiveReview$ { /** @deprecated use `ExternalExperimentDtoActiveReview$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoActiveReview$inboundSchema; /** @deprecated use `ExternalExperimentDtoActiveReview$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoActiveReview$outboundSchema; /** @deprecated use `ExternalExperimentDtoActiveReview$Outbound` instead. */ export type Outbound = ExternalExperimentDtoActiveReview$Outbound; } /** @internal */ export const ExternalExperimentDtoTargetApps$inboundSchema: z.ZodType< ExternalExperimentDtoTargetApps, z.ZodTypeDef, unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ export type ExternalExperimentDtoTargetApps$Outbound = string | Array; /** @internal */ export const ExternalExperimentDtoTargetApps$outboundSchema: z.ZodType< ExternalExperimentDtoTargetApps$Outbound, z.ZodTypeDef, ExternalExperimentDtoTargetApps > = 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 ExternalExperimentDtoTargetApps$ { /** @deprecated use `ExternalExperimentDtoTargetApps$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoTargetApps$inboundSchema; /** @deprecated use `ExternalExperimentDtoTargetApps$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoTargetApps$outboundSchema; /** @deprecated use `ExternalExperimentDtoTargetApps$Outbound` instead. */ export type Outbound = ExternalExperimentDtoTargetApps$Outbound; } /** @internal */ export const ExternalExperimentDtoLinks$inboundSchema: z.ZodType< ExternalExperimentDtoLinks, z.ZodTypeDef, unknown > = z.object({ url: z.string(), title: z.string().optional(), }); /** @internal */ export type ExternalExperimentDtoLinks$Outbound = { url: string; title?: string | undefined; }; /** @internal */ export const ExternalExperimentDtoLinks$outboundSchema: z.ZodType< ExternalExperimentDtoLinks$Outbound, z.ZodTypeDef, ExternalExperimentDtoLinks > = 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 ExternalExperimentDtoLinks$ { /** @deprecated use `ExternalExperimentDtoLinks$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoLinks$inboundSchema; /** @deprecated use `ExternalExperimentDtoLinks$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoLinks$outboundSchema; /** @deprecated use `ExternalExperimentDtoLinks$Outbound` instead. */ export type Outbound = ExternalExperimentDtoLinks$Outbound; } /** @internal */ export const ExternalExperimentDtoGroups$inboundSchema: z.ZodType< ExternalExperimentDtoGroups, 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 ExternalExperimentDtoGroups$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 ExternalExperimentDtoGroups$outboundSchema: z.ZodType< ExternalExperimentDtoGroups$Outbound, z.ZodTypeDef, ExternalExperimentDtoGroups > = 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 ExternalExperimentDtoGroups$ { /** @deprecated use `ExternalExperimentDtoGroups$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoGroups$inboundSchema; /** @deprecated use `ExternalExperimentDtoGroups$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoGroups$outboundSchema; /** @deprecated use `ExternalExperimentDtoGroups$Outbound` instead. */ export type Outbound = ExternalExperimentDtoGroups$Outbound; } /** @internal */ export const ExternalExperimentDtoPrimaryMetrics$inboundSchema: z.ZodType< ExternalExperimentDtoPrimaryMetrics, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: z.string(), }); /** @internal */ export type ExternalExperimentDtoPrimaryMetrics$Outbound = { name: string; type: string; }; /** @internal */ export const ExternalExperimentDtoPrimaryMetrics$outboundSchema: z.ZodType< ExternalExperimentDtoPrimaryMetrics$Outbound, z.ZodTypeDef, ExternalExperimentDtoPrimaryMetrics > = 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 ExternalExperimentDtoPrimaryMetrics$ { /** @deprecated use `ExternalExperimentDtoPrimaryMetrics$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoPrimaryMetrics$inboundSchema; /** @deprecated use `ExternalExperimentDtoPrimaryMetrics$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoPrimaryMetrics$outboundSchema; /** @deprecated use `ExternalExperimentDtoPrimaryMetrics$Outbound` instead. */ export type Outbound = ExternalExperimentDtoPrimaryMetrics$Outbound; } /** @internal */ export const ExternalExperimentDtoSecondaryMetrics$inboundSchema: z.ZodType< ExternalExperimentDtoSecondaryMetrics, z.ZodTypeDef, unknown > = z.object({ name: z.string(), type: z.string(), }); /** @internal */ export type ExternalExperimentDtoSecondaryMetrics$Outbound = { name: string; type: string; }; /** @internal */ export const ExternalExperimentDtoSecondaryMetrics$outboundSchema: z.ZodType< ExternalExperimentDtoSecondaryMetrics$Outbound, z.ZodTypeDef, ExternalExperimentDtoSecondaryMetrics > = 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 ExternalExperimentDtoSecondaryMetrics$ { /** @deprecated use `ExternalExperimentDtoSecondaryMetrics$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoSecondaryMetrics$inboundSchema; /** @deprecated use `ExternalExperimentDtoSecondaryMetrics$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoSecondaryMetrics$outboundSchema; /** @deprecated use `ExternalExperimentDtoSecondaryMetrics$Outbound` instead. */ export type Outbound = ExternalExperimentDtoSecondaryMetrics$Outbound; } /** @internal */ export const ExternalExperimentDtoDefaultConfidenceInterval$inboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoDefaultConfidenceInterval > = z.nativeEnum(ExternalExperimentDtoDefaultConfidenceInterval); /** @internal */ export const ExternalExperimentDtoDefaultConfidenceInterval$outboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoDefaultConfidenceInterval > = ExternalExperimentDtoDefaultConfidenceInterval$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalExperimentDtoDefaultConfidenceInterval$ { /** @deprecated use `ExternalExperimentDtoDefaultConfidenceInterval$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoDefaultConfidenceInterval$inboundSchema; /** @deprecated use `ExternalExperimentDtoDefaultConfidenceInterval$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoDefaultConfidenceInterval$outboundSchema; } /** @internal */ export const ExternalExperimentDtoStatus$inboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoStatus > = z.nativeEnum(ExternalExperimentDtoStatus); /** @internal */ export const ExternalExperimentDtoStatus$outboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoStatus > = ExternalExperimentDtoStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalExperimentDtoStatus$ { /** @deprecated use `ExternalExperimentDtoStatus$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoStatus$inboundSchema; /** @deprecated use `ExternalExperimentDtoStatus$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoStatus$outboundSchema; } /** @internal */ export const Subtype$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Subtype); /** @internal */ export const Subtype$outboundSchema: z.ZodNativeEnum = Subtype$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Subtype$ { /** @deprecated use `Subtype$inboundSchema` instead. */ export const inboundSchema = Subtype$inboundSchema; /** @deprecated use `Subtype$outboundSchema` instead. */ export const outboundSchema = Subtype$outboundSchema; } /** @internal */ export const ExternalExperimentDtoHealthChecksStatus$inboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoHealthChecksStatus > = z.nativeEnum(ExternalExperimentDtoHealthChecksStatus); /** @internal */ export const ExternalExperimentDtoHealthChecksStatus$outboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoHealthChecksStatus > = ExternalExperimentDtoHealthChecksStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalExperimentDtoHealthChecksStatus$ { /** @deprecated use `ExternalExperimentDtoHealthChecksStatus$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoHealthChecksStatus$inboundSchema; /** @deprecated use `ExternalExperimentDtoHealthChecksStatus$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoHealthChecksStatus$outboundSchema; } /** @internal */ export const DeduplicationRates$inboundSchema: z.ZodType< DeduplicationRates, z.ZodTypeDef, unknown > = z .object({ group_id: z.string(), rate: z.number(), group_name: z.string(), }) .transform((v) => { return remap$(v, { group_id: "groupId", group_name: "groupName", }); }); /** @internal */ export type DeduplicationRates$Outbound = { group_id: string; rate: number; group_name: string; }; /** @internal */ export const DeduplicationRates$outboundSchema: z.ZodType< DeduplicationRates$Outbound, z.ZodTypeDef, DeduplicationRates > = z .object({ groupId: z.string(), rate: z.number(), groupName: z.string(), }) .transform((v) => { return remap$(v, { groupId: "group_id", groupName: "group_name", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeduplicationRates$ { /** @deprecated use `DeduplicationRates$inboundSchema` instead. */ export const inboundSchema = DeduplicationRates$inboundSchema; /** @deprecated use `DeduplicationRates$outboundSchema` instead. */ export const outboundSchema = DeduplicationRates$outboundSchema; /** @deprecated use `DeduplicationRates$Outbound` instead. */ export type Outbound = DeduplicationRates$Outbound; } /** @internal */ export const Metrics$inboundSchema: z.ZodType = z .object({ metric_name: z.string(), earliest_date: z .string() .datetime({ offset: true }) .transform((v) => new Date(v)), }) .transform((v) => { return remap$(v, { metric_name: "metricName", earliest_date: "earliestDate", }); }); /** @internal */ export type Metrics$Outbound = { metric_name: string; earliest_date: string; }; /** @internal */ export const Metrics$outboundSchema: z.ZodType = z .object({ metricName: z.string(), earliestDate: z.date().transform((v) => v.toISOString()), }) .transform((v) => { return remap$(v, { metricName: "metric_name", earliestDate: "earliest_date", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metrics$ { /** @deprecated use `Metrics$inboundSchema` instead. */ export const inboundSchema = Metrics$inboundSchema; /** @deprecated use `Metrics$outboundSchema` instead. */ export const outboundSchema = Metrics$outboundSchema; /** @deprecated use `Metrics$Outbound` instead. */ export type Outbound = Metrics$Outbound; } /** @internal */ export const Metadata$inboundSchema: z.ZodType = z .object({ type: z.string(), lastPulseLoadTime: z.number().optional(), crossoverPercent: z.number().optional(), assignmentSourceID: z.string().optional(), assignmentSourceName: z.string().optional(), foreignExperimentID: z.string().optional(), deduplication_rate: z.number().optional(), deduplication_rates: z.array(z.lazy(() => DeduplicationRates$inboundSchema)).optional(), primary_id_type: z.string(), secondary_id_type: z.string().optional(), missingMetrics: z.array(z.string()).optional(), metrics: z.array(z.lazy(() => Metrics$inboundSchema)).optional(), lastUpdatedDs: z.string().optional(), }) .transform((v) => { return remap$(v, { deduplication_rate: "deduplicationRate", deduplication_rates: "deduplicationRates", primary_id_type: "primaryIdType", secondary_id_type: "secondaryIdType", }); }); /** @internal */ export type Metadata$Outbound = { type: string; lastPulseLoadTime?: number | undefined; crossoverPercent?: number | undefined; assignmentSourceID?: string | undefined; assignmentSourceName?: string | undefined; foreignExperimentID?: string | undefined; deduplication_rate?: number | undefined; deduplication_rates?: Array | undefined; primary_id_type: string; secondary_id_type?: string | undefined; missingMetrics?: Array | undefined; metrics?: Array | undefined; lastUpdatedDs?: string | undefined; }; /** @internal */ export const Metadata$outboundSchema: z.ZodType = z .object({ type: z.string(), lastPulseLoadTime: z.number().optional(), crossoverPercent: z.number().optional(), assignmentSourceID: z.string().optional(), assignmentSourceName: z.string().optional(), foreignExperimentID: z.string().optional(), deduplicationRate: z.number().optional(), deduplicationRates: z.array(z.lazy(() => DeduplicationRates$outboundSchema)).optional(), primaryIdType: z.string(), secondaryIdType: z.string().optional(), missingMetrics: z.array(z.string()).optional(), metrics: z.array(z.lazy(() => Metrics$outboundSchema)).optional(), lastUpdatedDs: z.string().optional(), }) .transform((v) => { return remap$(v, { deduplicationRate: "deduplication_rate", deduplicationRates: "deduplication_rates", primaryIdType: "primary_id_type", secondaryIdType: "secondary_id_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metadata$ { /** @deprecated use `Metadata$inboundSchema` instead. */ export const inboundSchema = Metadata$inboundSchema; /** @deprecated use `Metadata$outboundSchema` instead. */ export const outboundSchema = Metadata$outboundSchema; /** @deprecated use `Metadata$Outbound` instead. */ export type Outbound = Metadata$Outbound; } /** @internal */ export const ExternalExperimentDtoType$inboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoType > = z.nativeEnum(ExternalExperimentDtoType); /** @internal */ export const ExternalExperimentDtoType$outboundSchema: z.ZodNativeEnum< typeof ExternalExperimentDtoType > = ExternalExperimentDtoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ExternalExperimentDtoType$ { /** @deprecated use `ExternalExperimentDtoType$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoType$inboundSchema; /** @deprecated use `ExternalExperimentDtoType$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoType$outboundSchema; } /** @internal */ export const HealthChecks$inboundSchema: z.ZodType = z.object({ name: z.string(), description: z.string(), status: ExternalExperimentDtoHealthChecksStatus$inboundSchema, metadata: z.lazy(() => Metadata$inboundSchema).optional(), type: ExternalExperimentDtoType$inboundSchema.optional(), }); /** @internal */ export type HealthChecks$Outbound = { name: string; description: string; status: string; metadata?: Metadata$Outbound | undefined; type?: string | undefined; }; /** @internal */ export const HealthChecks$outboundSchema: z.ZodType< HealthChecks$Outbound, z.ZodTypeDef, HealthChecks > = z.object({ name: z.string(), description: z.string(), status: ExternalExperimentDtoHealthChecksStatus$outboundSchema, metadata: z.lazy(() => Metadata$outboundSchema).optional(), type: ExternalExperimentDtoType$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 HealthChecks$ { /** @deprecated use `HealthChecks$inboundSchema` instead. */ export const inboundSchema = HealthChecks$inboundSchema; /** @deprecated use `HealthChecks$outboundSchema` instead. */ export const outboundSchema = HealthChecks$outboundSchema; /** @deprecated use `HealthChecks$Outbound` instead. */ export type Outbound = HealthChecks$Outbound; } /** @internal */ export const ExternalExperimentDtoOwner$inboundSchema: z.ZodType< ExternalExperimentDtoOwner, z.ZodTypeDef, unknown > = z.object({ ownerID: z.string().optional(), ownerType: z.string().optional(), ownerName: z.string().optional(), }); /** @internal */ export type ExternalExperimentDtoOwner$Outbound = { ownerID?: string | undefined; ownerType?: string | undefined; ownerName?: string | undefined; }; /** @internal */ export const ExternalExperimentDtoOwner$outboundSchema: z.ZodType< ExternalExperimentDtoOwner$Outbound, z.ZodTypeDef, ExternalExperimentDtoOwner > = z.object({ ownerID: z.string().optional(), ownerType: z.string().optional(), ownerName: 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 ExternalExperimentDtoOwner$ { /** @deprecated use `ExternalExperimentDtoOwner$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDtoOwner$inboundSchema; /** @deprecated use `ExternalExperimentDtoOwner$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDtoOwner$outboundSchema; /** @deprecated use `ExternalExperimentDtoOwner$Outbound` instead. */ export type Outbound = ExternalExperimentDtoOwner$Outbound; } /** @internal */ export const ExternalExperimentDto$inboundSchema: z.ZodType< ExternalExperimentDto, z.ZodTypeDef, unknown > = z.object({ reviewSettings: z.lazy(() => ExternalExperimentDtoReviewSettings$inboundSchema).optional(), activeReview: z.lazy(() => ExternalExperimentDtoActiveReview$inboundSchema).optional(), id: z.string(), name: z.string().optional(), idType: z.string(), description: z.string(), lastModifierID: z.nullable(z.any()).optional(), lastModifiedTime: z.nullable(z.any()).optional(), lastModifierEmail: z.nullable(z.any()).optional(), lastModifierName: z.nullable(z.any()).optional(), creatorID: z.nullable(z.any()).optional(), createdTime: z.number(), creatorName: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), tags: z.array(z.string()), targetApps: z.union([z.string(), z.array(z.string())]).optional(), holdoutIDs: z.array(z.string()).optional(), team: z.nullable(z.any()).optional(), hypothesis: z.string(), links: z.array(z.lazy(() => ExternalExperimentDtoLinks$inboundSchema)).optional(), groups: z.array(z.lazy(() => ExternalExperimentDtoGroups$inboundSchema)), controlGroupID: z.string().optional(), allocation: z.number(), primaryMetricTags: z.array(z.string()).optional(), secondaryMetricTags: z.array(z.string()).optional(), primaryMetrics: z.array(z.lazy(() => ExternalExperimentDtoPrimaryMetrics$inboundSchema)), secondaryMetrics: z.array(z.lazy(() => ExternalExperimentDtoSecondaryMetrics$inboundSchema)), duration: z.number().int().optional(), targetExposures: z.number().int().optional(), targetingGateID: z.nullable(z.any()).optional(), bonferroniCorrection: z.boolean(), defaultConfidenceInterval: ExternalExperimentDtoDefaultConfidenceInterval$inboundSchema, status: ExternalExperimentDtoStatus$inboundSchema, launchedGroupID: z.nullable(z.any()).optional(), assignmentSourceName: z.string().optional(), assignmentSourceExperimentName: z.string().optional(), isAnalysisOnly: z.boolean().optional(), allocationDuration: z.number().int().optional(), cohortedAnalysisDuration: z.number().int().optional(), fixedAnalysisDuration: z.number().int().optional(), subtype: Subtype$inboundSchema.optional(), externalExperimentName: z.string().optional(), layerID: z.nullable(z.any()).optional(), startTime: z.nullable(z.any()).optional(), endTime: z.nullable(z.any()).optional(), decisionReason: z.nullable(z.any()).optional(), decisionTime: z.nullable(z.any()).optional(), healthChecks: z.array(z.lazy(() => HealthChecks$inboundSchema)).optional(), owner: z.nullable(z.lazy(() => ExternalExperimentDtoOwner$inboundSchema)).optional(), }); /** @internal */ export type ExternalExperimentDto$Outbound = { reviewSettings?: ExternalExperimentDtoReviewSettings$Outbound | undefined; activeReview?: ExternalExperimentDtoActiveReview$Outbound | undefined; id: string; name?: string | undefined; idType: string; description: string; lastModifierID?: any | null | undefined; lastModifiedTime?: any | null | undefined; lastModifierEmail?: any | null | undefined; lastModifierName?: any | null | undefined; creatorID?: any | null | undefined; createdTime: number; creatorName?: any | null | undefined; creatorEmail?: any | null | undefined; tags: Array; targetApps?: string | Array | undefined; holdoutIDs?: Array | undefined; team?: any | null | undefined; hypothesis: string; links?: Array | undefined; groups: Array; controlGroupID?: string | undefined; allocation: number; primaryMetricTags?: Array | undefined; secondaryMetricTags?: Array | undefined; primaryMetrics: Array; secondaryMetrics: Array; duration?: number | undefined; targetExposures?: number | undefined; targetingGateID?: any | null | undefined; bonferroniCorrection: boolean; defaultConfidenceInterval: string; status: string; launchedGroupID?: any | null | undefined; assignmentSourceName?: string | undefined; assignmentSourceExperimentName?: string | undefined; isAnalysisOnly?: boolean | undefined; allocationDuration?: number | undefined; cohortedAnalysisDuration?: number | undefined; fixedAnalysisDuration?: number | undefined; subtype?: string | undefined; externalExperimentName?: string | undefined; layerID?: any | null | undefined; startTime?: any | null | undefined; endTime?: any | null | undefined; decisionReason?: any | null | undefined; decisionTime?: any | null | undefined; healthChecks?: Array | undefined; owner?: ExternalExperimentDtoOwner$Outbound | null | undefined; }; /** @internal */ export const ExternalExperimentDto$outboundSchema: z.ZodType< ExternalExperimentDto$Outbound, z.ZodTypeDef, ExternalExperimentDto > = z.object({ reviewSettings: z.lazy(() => ExternalExperimentDtoReviewSettings$outboundSchema).optional(), activeReview: z.lazy(() => ExternalExperimentDtoActiveReview$outboundSchema).optional(), id: z.string(), name: z.string().optional(), idType: z.string(), description: z.string(), lastModifierID: z.nullable(z.any()).optional(), lastModifiedTime: z.nullable(z.any()).optional(), lastModifierEmail: z.nullable(z.any()).optional(), lastModifierName: z.nullable(z.any()).optional(), creatorID: z.nullable(z.any()).optional(), createdTime: z.number(), creatorName: z.nullable(z.any()).optional(), creatorEmail: z.nullable(z.any()).optional(), tags: z.array(z.string()), targetApps: z.union([z.string(), z.array(z.string())]).optional(), holdoutIDs: z.array(z.string()).optional(), team: z.nullable(z.any()).optional(), hypothesis: z.string(), links: z.array(z.lazy(() => ExternalExperimentDtoLinks$outboundSchema)).optional(), groups: z.array(z.lazy(() => ExternalExperimentDtoGroups$outboundSchema)), controlGroupID: z.string().optional(), allocation: z.number(), primaryMetricTags: z.array(z.string()).optional(), secondaryMetricTags: z.array(z.string()).optional(), primaryMetrics: z.array(z.lazy(() => ExternalExperimentDtoPrimaryMetrics$outboundSchema)), secondaryMetrics: z.array(z.lazy(() => ExternalExperimentDtoSecondaryMetrics$outboundSchema)), duration: z.number().int().optional(), targetExposures: z.number().int().optional(), targetingGateID: z.nullable(z.any()).optional(), bonferroniCorrection: z.boolean(), defaultConfidenceInterval: ExternalExperimentDtoDefaultConfidenceInterval$outboundSchema, status: ExternalExperimentDtoStatus$outboundSchema, launchedGroupID: z.nullable(z.any()).optional(), assignmentSourceName: z.string().optional(), assignmentSourceExperimentName: z.string().optional(), isAnalysisOnly: z.boolean().optional(), allocationDuration: z.number().int().optional(), cohortedAnalysisDuration: z.number().int().optional(), fixedAnalysisDuration: z.number().int().optional(), subtype: Subtype$outboundSchema.optional(), externalExperimentName: z.string().optional(), layerID: z.nullable(z.any()).optional(), startTime: z.nullable(z.any()).optional(), endTime: z.nullable(z.any()).optional(), decisionReason: z.nullable(z.any()).optional(), decisionTime: z.nullable(z.any()).optional(), healthChecks: z.array(z.lazy(() => HealthChecks$outboundSchema)).optional(), owner: z.nullable(z.lazy(() => ExternalExperimentDtoOwner$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 ExternalExperimentDto$ { /** @deprecated use `ExternalExperimentDto$inboundSchema` instead. */ export const inboundSchema = ExternalExperimentDto$inboundSchema; /** @deprecated use `ExternalExperimentDto$outboundSchema` instead. */ export const outboundSchema = ExternalExperimentDto$outboundSchema; /** @deprecated use `ExternalExperimentDto$Outbound` instead. */ export type Outbound = ExternalExperimentDto$Outbound; }