/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const Credentials$inboundSchema = z.object({
    email: z.string(),
    password: z.string(),
});
/** @internal */
export const Credentials$outboundSchema = z.object({
    email: z.string(),
    password: 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 Credentials$;
(function (Credentials$) {
    /** @deprecated use `Credentials$inboundSchema` instead. */
    Credentials$.inboundSchema = Credentials$inboundSchema;
    /** @deprecated use `Credentials$outboundSchema` instead. */
    Credentials$.outboundSchema = Credentials$outboundSchema;
})(Credentials$ || (Credentials$ = {}));
export function credentialsToJSON(credentials) {
    return JSON.stringify(Credentials$outboundSchema.parse(credentials));
}
export function credentialsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Credentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Credentials' from JSON`);
}
/** @internal */
export const TestOutResult$inboundSchema = z.object({
    lessonType: z.literal("test-out").default("test-out").optional(),
    lessonId: z.nullable(z.string()),
    finalized: z.boolean(),
    toolProvider: z.nullable(z.string()),
    attempt: z.number().optional(),
    credentials: z.lazy(() => Credentials$inboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: z.string().optional(),
});
/** @internal */
export const TestOutResult$outboundSchema = z.object({
    lessonType: z.literal("test-out").default("test-out"),
    lessonId: z.nullable(z.string()),
    finalized: z.boolean(),
    toolProvider: z.nullable(z.string()),
    attempt: z.number().optional(),
    credentials: z.lazy(() => Credentials$outboundSchema).optional(),
    assignmentId: z.string().optional(),
    classId: z.string().optional(),
    testUrl: z.string().optional(),
    testId: 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 var TestOutResult$;
(function (TestOutResult$) {
    /** @deprecated use `TestOutResult$inboundSchema` instead. */
    TestOutResult$.inboundSchema = TestOutResult$inboundSchema;
    /** @deprecated use `TestOutResult$outboundSchema` instead. */
    TestOutResult$.outboundSchema = TestOutResult$outboundSchema;
})(TestOutResult$ || (TestOutResult$ = {}));
export function testOutResultToJSON(testOutResult) {
    return JSON.stringify(TestOutResult$outboundSchema.parse(testOutResult));
}
export function testOutResultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TestOutResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TestOutResult' from JSON`);
}
//# sourceMappingURL=testoutresult.js.map