/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/**
 * The difficulty of the question
 */
export const PowerPath100ProgressResultDifficulty = {
    Easy: "easy",
    Medium: "medium",
    Hard: "hard",
};
/** @internal */
export const RemainingQuestionsPerDifficulty$inboundSchema = z.object({
    easy: z.number(),
    medium: z.number(),
    hard: z.number(),
});
/** @internal */
export const RemainingQuestionsPerDifficulty$outboundSchema = z.object({
    easy: z.number(),
    medium: z.number(),
    hard: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RemainingQuestionsPerDifficulty$;
(function (RemainingQuestionsPerDifficulty$) {
    /** @deprecated use `RemainingQuestionsPerDifficulty$inboundSchema` instead. */
    RemainingQuestionsPerDifficulty$.inboundSchema = RemainingQuestionsPerDifficulty$inboundSchema;
    /** @deprecated use `RemainingQuestionsPerDifficulty$outboundSchema` instead. */
    RemainingQuestionsPerDifficulty$.outboundSchema = RemainingQuestionsPerDifficulty$outboundSchema;
})(RemainingQuestionsPerDifficulty$ || (RemainingQuestionsPerDifficulty$ = {}));
export function remainingQuestionsPerDifficultyToJSON(remainingQuestionsPerDifficulty) {
    return JSON.stringify(RemainingQuestionsPerDifficulty$outboundSchema.parse(remainingQuestionsPerDifficulty));
}
export function remainingQuestionsPerDifficultyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RemainingQuestionsPerDifficulty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RemainingQuestionsPerDifficulty' from JSON`);
}
/** @internal */
export const PowerPath100ProgressResultDifficulty$inboundSchema = z.nativeEnum(PowerPath100ProgressResultDifficulty);
/** @internal */
export const PowerPath100ProgressResultDifficulty$outboundSchema = PowerPath100ProgressResultDifficulty$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PowerPath100ProgressResultDifficulty$;
(function (PowerPath100ProgressResultDifficulty$) {
    /** @deprecated use `PowerPath100ProgressResultDifficulty$inboundSchema` instead. */
    PowerPath100ProgressResultDifficulty$.inboundSchema = PowerPath100ProgressResultDifficulty$inboundSchema;
    /** @deprecated use `PowerPath100ProgressResultDifficulty$outboundSchema` instead. */
    PowerPath100ProgressResultDifficulty$.outboundSchema = PowerPath100ProgressResultDifficulty$outboundSchema;
})(PowerPath100ProgressResultDifficulty$ || (PowerPath100ProgressResultDifficulty$ = {}));
/** @internal */
export const PowerPath100ProgressResultContent$inboundSchema = z.object({
    type: z.string().optional(),
    rawXml: z.string(),
});
/** @internal */
export const PowerPath100ProgressResultContent$outboundSchema = z.object({
    type: z.string().optional(),
    rawXml: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PowerPath100ProgressResultContent$;
(function (PowerPath100ProgressResultContent$) {
    /** @deprecated use `PowerPath100ProgressResultContent$inboundSchema` instead. */
    PowerPath100ProgressResultContent$.inboundSchema = PowerPath100ProgressResultContent$inboundSchema;
    /** @deprecated use `PowerPath100ProgressResultContent$outboundSchema` instead. */
    PowerPath100ProgressResultContent$.outboundSchema = PowerPath100ProgressResultContent$outboundSchema;
})(PowerPath100ProgressResultContent$ || (PowerPath100ProgressResultContent$ = {}));
export function powerPath100ProgressResultContentToJSON(powerPath100ProgressResultContent) {
    return JSON.stringify(PowerPath100ProgressResultContent$outboundSchema.parse(powerPath100ProgressResultContent));
}
export function powerPath100ProgressResultContentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPath100ProgressResultContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPath100ProgressResultContent' from JSON`);
}
/** @internal */
export const PowerPath100ProgressResultResponse$inboundSchema = z.union([z.string(), z.array(z.string())]);
/** @internal */
export const PowerPath100ProgressResultResponse$outboundSchema = 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 var PowerPath100ProgressResultResponse$;
(function (PowerPath100ProgressResultResponse$) {
    /** @deprecated use `PowerPath100ProgressResultResponse$inboundSchema` instead. */
    PowerPath100ProgressResultResponse$.inboundSchema = PowerPath100ProgressResultResponse$inboundSchema;
    /** @deprecated use `PowerPath100ProgressResultResponse$outboundSchema` instead. */
    PowerPath100ProgressResultResponse$.outboundSchema = PowerPath100ProgressResultResponse$outboundSchema;
})(PowerPath100ProgressResultResponse$ || (PowerPath100ProgressResultResponse$ = {}));
export function powerPath100ProgressResultResponseToJSON(powerPath100ProgressResultResponse) {
    return JSON.stringify(PowerPath100ProgressResultResponse$outboundSchema.parse(powerPath100ProgressResultResponse));
}
export function powerPath100ProgressResultResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPath100ProgressResultResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPath100ProgressResultResponse' from JSON`);
}
/** @internal */
export const PowerPath100ProgressResultResult$inboundSchema = z.object({
    score: z.number(),
    feedback: z.string(),
});
/** @internal */
export const PowerPath100ProgressResultResult$outboundSchema = z.object({
    score: z.number(),
    feedback: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PowerPath100ProgressResultResult$;
(function (PowerPath100ProgressResultResult$) {
    /** @deprecated use `PowerPath100ProgressResultResult$inboundSchema` instead. */
    PowerPath100ProgressResultResult$.inboundSchema = PowerPath100ProgressResultResult$inboundSchema;
    /** @deprecated use `PowerPath100ProgressResultResult$outboundSchema` instead. */
    PowerPath100ProgressResultResult$.outboundSchema = PowerPath100ProgressResultResult$outboundSchema;
})(PowerPath100ProgressResultResult$ || (PowerPath100ProgressResultResult$ = {}));
export function powerPath100ProgressResultResultToJSON(powerPath100ProgressResultResult) {
    return JSON.stringify(PowerPath100ProgressResultResult$outboundSchema.parse(powerPath100ProgressResultResult));
}
export function powerPath100ProgressResultResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPath100ProgressResultResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPath100ProgressResultResult' from JSON`);
}
/** @internal */
export const SeenQuestion$inboundSchema = z.object({
    id: z.string(),
    index: z.number(),
    title: z.string(),
    url: z.string(),
    difficulty: PowerPath100ProgressResultDifficulty$inboundSchema.default("medium"),
    content: z.lazy(() => PowerPath100ProgressResultContent$inboundSchema)
        .optional(),
    response: z.union([z.string(), z.array(z.string())]),
    correct: z.boolean().optional(),
    result: z.lazy(() => PowerPath100ProgressResultResult$inboundSchema)
        .optional(),
});
/** @internal */
export const SeenQuestion$outboundSchema = z.object({
    id: z.string(),
    index: z.number(),
    title: z.string(),
    url: z.string(),
    difficulty: PowerPath100ProgressResultDifficulty$outboundSchema.default("medium"),
    content: z.lazy(() => PowerPath100ProgressResultContent$outboundSchema)
        .optional(),
    response: z.union([z.string(), z.array(z.string())]),
    correct: z.boolean().optional(),
    result: z.lazy(() => PowerPath100ProgressResultResult$outboundSchema)
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SeenQuestion$;
(function (SeenQuestion$) {
    /** @deprecated use `SeenQuestion$inboundSchema` instead. */
    SeenQuestion$.inboundSchema = SeenQuestion$inboundSchema;
    /** @deprecated use `SeenQuestion$outboundSchema` instead. */
    SeenQuestion$.outboundSchema = SeenQuestion$outboundSchema;
})(SeenQuestion$ || (SeenQuestion$ = {}));
export function seenQuestionToJSON(seenQuestion) {
    return JSON.stringify(SeenQuestion$outboundSchema.parse(seenQuestion));
}
export function seenQuestionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SeenQuestion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SeenQuestion' from JSON`);
}
/** @internal */
export const PowerPath100ProgressResult$inboundSchema = z.object({
    lessonType: z.literal("powerpath-100").default("powerpath-100").optional(),
    remainingQuestionsPerDifficulty: z.lazy(() => RemainingQuestionsPerDifficulty$inboundSchema),
    score: z.number(),
    seenQuestions: z.array(z.lazy(() => SeenQuestion$inboundSchema)),
    attempt: z.number(),
    xp: z.nullable(z.number()),
    multiplier: z.nullable(z.number()),
    accuracy: z.number(),
    correctQuestions: z.number(),
    totalQuestions: z.number(),
});
/** @internal */
export const PowerPath100ProgressResult$outboundSchema = z.object({
    lessonType: z.literal("powerpath-100").default("powerpath-100"),
    remainingQuestionsPerDifficulty: z.lazy(() => RemainingQuestionsPerDifficulty$outboundSchema),
    score: z.number(),
    seenQuestions: z.array(z.lazy(() => SeenQuestion$outboundSchema)),
    attempt: z.number(),
    xp: z.nullable(z.number()),
    multiplier: z.nullable(z.number()),
    accuracy: z.number(),
    correctQuestions: z.number(),
    totalQuestions: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PowerPath100ProgressResult$;
(function (PowerPath100ProgressResult$) {
    /** @deprecated use `PowerPath100ProgressResult$inboundSchema` instead. */
    PowerPath100ProgressResult$.inboundSchema = PowerPath100ProgressResult$inboundSchema;
    /** @deprecated use `PowerPath100ProgressResult$outboundSchema` instead. */
    PowerPath100ProgressResult$.outboundSchema = PowerPath100ProgressResult$outboundSchema;
})(PowerPath100ProgressResult$ || (PowerPath100ProgressResult$ = {}));
export function powerPath100ProgressResultToJSON(powerPath100ProgressResult) {
    return JSON.stringify(PowerPath100ProgressResult$outboundSchema.parse(powerPath100ProgressResult));
}
export function powerPath100ProgressResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PowerPath100ProgressResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PowerPath100ProgressResult' from JSON`);
}
//# sourceMappingURL=powerpath100progressresult.js.map