@featurevisor/core
Version:
Core package of Featurevisor for Node.js usage
244 lines (243 loc) • 10.9 kB
TypeScript
import { z } from "zod";
import { ProjectConfig } from "../config";
export declare function getTestsZodSchema(projectConfig: ProjectConfig, availableFeatureKeys: [string, ...string[]], availableSegmentKeys: [string, ...string[]]): z.ZodUnion<[z.ZodObject<{
segment: z.ZodEffects<z.ZodString, string, string>;
assertions: z.ZodArray<z.ZodObject<{
matrix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">>>;
description: z.ZodOptional<z.ZodString>;
context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
expectedToMatch: z.ZodBoolean;
}, "strict", z.ZodTypeAny, {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
context?: Record<string, unknown>;
expectedToMatch?: boolean;
}, {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
context?: Record<string, unknown>;
expectedToMatch?: boolean;
}>, "many">;
}, "strict", z.ZodTypeAny, {
segment?: string;
assertions?: {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
context?: Record<string, unknown>;
expectedToMatch?: boolean;
}[];
}, {
segment?: string;
assertions?: {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
context?: Record<string, unknown>;
expectedToMatch?: boolean;
}[];
}>, z.ZodObject<{
feature: z.ZodEffects<z.ZodString, string, string>;
assertions: z.ZodArray<z.ZodObject<{
matrix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">>>;
description: z.ZodOptional<z.ZodString>;
at: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
environment: z.ZodEffects<z.ZodString, string, string> | z.ZodOptional<z.ZodNever>;
sticky: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
defaultVariationValue: z.ZodOptional<z.ZodString>;
defaultVariableValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
expectedToBeEnabled: z.ZodOptional<z.ZodBoolean>;
expectedVariation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
expectedVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
expectedEvaluations: z.ZodOptional<z.ZodObject<{
flag: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
variation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
}, "strip", z.ZodTypeAny, {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
}, {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
}>>;
children: z.ZodOptional<z.ZodArray<z.ZodObject<{
sticky: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
defaultVariationValue: z.ZodOptional<z.ZodString>;
defaultVariableValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
expectedToBeEnabled: z.ZodOptional<z.ZodBoolean>;
expectedVariation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
expectedVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
expectedEvaluations: z.ZodOptional<z.ZodObject<{
flag: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
variation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
}, "strip", z.ZodTypeAny, {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
}, {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
}>>;
}, "strip", z.ZodTypeAny, {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}, {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}>, "many">>;
}, "strict", z.ZodTypeAny, {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
at?: string | number;
environment?: string;
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
children?: {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}[];
}, {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
at?: string | number;
environment?: string;
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
children?: {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}[];
}>, "many">;
}, "strict", z.ZodTypeAny, {
feature?: string;
assertions?: {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
at?: string | number;
environment?: string;
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
children?: {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}[];
}[];
}, {
feature?: string;
assertions?: {
matrix?: Record<string, (string | number | boolean)[]>;
description?: string;
at?: string | number;
environment?: string;
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
children?: {
sticky?: Record<string, Record<string, any>>;
context?: Record<string, unknown>;
defaultVariationValue?: string;
defaultVariableValues?: Record<string, unknown>;
expectedToBeEnabled?: boolean;
expectedVariation?: string;
expectedVariables?: Record<string, unknown>;
expectedEvaluations?: {
flag?: Record<string, any>;
variation?: Record<string, any>;
variables?: Record<string, Record<string, any>>;
};
}[];
}[];
}>]>;