"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.interviewFromJSON = exports.interviewToJSON = exports.Interview$ = exports.Interview$outboundSchema = exports.Interview$inboundSchema = exports.interviewStatusFromJSON = exports.interviewStatusToJSON = exports.InterviewStatus$ = exports.InterviewStatus$outboundSchema = exports.InterviewStatus$inboundSchema = exports.InterviewValue$ = exports.InterviewValue$outboundSchema = exports.InterviewValue$inboundSchema = exports.interviewSourceValueFromJSON = exports.interviewSourceValueToJSON = exports.InterviewSourceValue$ = exports.InterviewSourceValue$outboundSchema = exports.InterviewSourceValue$inboundSchema = exports.interview4FromJSON = exports.interview4ToJSON = exports.Interview4$ = exports.Interview4$outboundSchema = exports.Interview4$inboundSchema = exports.interviewInterviewStageFromJSON = exports.interviewInterviewStageToJSON = exports.InterviewInterviewStage$ = exports.InterviewInterviewStage$outboundSchema = exports.InterviewInterviewStage$inboundSchema = exports.InterviewValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
const interviewer_js_1 = require("./interviewer.js");
const interviewpart_js_1 = require("./interviewpart.js");
/**
 * The status of the interview.
 */
var InterviewValue;
(function (InterviewValue) {
    InterviewValue["Unscheduled"] = "unscheduled";
    InterviewValue["Scheduled"] = "scheduled";
    InterviewValue["Completed"] = "completed";
    InterviewValue["Cancelled"] = "cancelled";
    InterviewValue["PendingFeedback"] = "pending_feedback";
    InterviewValue["UnmappedValue"] = "unmapped_value";
})(InterviewValue || (exports.InterviewValue = InterviewValue = {}));
/** @internal */
exports.InterviewInterviewStage$inboundSchema = z.object({
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    order: z.nullable(z.number()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "created_at": "createdAt",
        "remote_id": "remoteId",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.InterviewInterviewStage$outboundSchema = z.object({
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    order: z.nullable(z.number()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        createdAt: "created_at",
        remoteId: "remote_id",
        unifiedCustomFields: "unified_custom_fields",
        updatedAt: "updated_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var InterviewInterviewStage$;
(function (InterviewInterviewStage$) {
    /** @deprecated use `InterviewInterviewStage$inboundSchema` instead. */
    InterviewInterviewStage$.inboundSchema = exports.InterviewInterviewStage$inboundSchema;
    /** @deprecated use `InterviewInterviewStage$outboundSchema` instead. */
    InterviewInterviewStage$.outboundSchema = exports.InterviewInterviewStage$outboundSchema;
})(InterviewInterviewStage$ || (exports.InterviewInterviewStage$ = InterviewInterviewStage$ = {}));
function interviewInterviewStageToJSON(interviewInterviewStage) {
    return JSON.stringify(exports.InterviewInterviewStage$outboundSchema.parse(interviewInterviewStage));
}
exports.interviewInterviewStageToJSON = interviewInterviewStageToJSON;
function interviewInterviewStageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InterviewInterviewStage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InterviewInterviewStage' from JSON`);
}
exports.interviewInterviewStageFromJSON = interviewInterviewStageFromJSON;
/** @internal */
exports.Interview4$inboundSchema = z.object({});
/** @internal */
exports.Interview4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Interview4$;
(function (Interview4$) {
    /** @deprecated use `Interview4$inboundSchema` instead. */
    Interview4$.inboundSchema = exports.Interview4$inboundSchema;
    /** @deprecated use `Interview4$outboundSchema` instead. */
    Interview4$.outboundSchema = exports.Interview4$outboundSchema;
})(Interview4$ || (exports.Interview4$ = Interview4$ = {}));
function interview4ToJSON(interview4) {
    return JSON.stringify(exports.Interview4$outboundSchema.parse(interview4));
}
exports.interview4ToJSON = interview4ToJSON;
function interview4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Interview4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Interview4' from JSON`);
}
exports.interview4FromJSON = interview4FromJSON;
/** @internal */
exports.InterviewSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.Interview4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.InterviewSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.Interview4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var InterviewSourceValue$;
(function (InterviewSourceValue$) {
    /** @deprecated use `InterviewSourceValue$inboundSchema` instead. */
    InterviewSourceValue$.inboundSchema = exports.InterviewSourceValue$inboundSchema;
    /** @deprecated use `InterviewSourceValue$outboundSchema` instead. */
    InterviewSourceValue$.outboundSchema = exports.InterviewSourceValue$outboundSchema;
})(InterviewSourceValue$ || (exports.InterviewSourceValue$ = InterviewSourceValue$ = {}));
function interviewSourceValueToJSON(interviewSourceValue) {
    return JSON.stringify(exports.InterviewSourceValue$outboundSchema.parse(interviewSourceValue));
}
exports.interviewSourceValueToJSON = interviewSourceValueToJSON;
function interviewSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InterviewSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InterviewSourceValue' from JSON`);
}
exports.interviewSourceValueFromJSON = interviewSourceValueFromJSON;
/** @internal */
exports.InterviewValue$inboundSchema = z
    .union([
    z.nativeEnum(InterviewValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.InterviewValue$outboundSchema = z.union([
    z.nativeEnum(InterviewValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var InterviewValue$;
(function (InterviewValue$) {
    /** @deprecated use `InterviewValue$inboundSchema` instead. */
    InterviewValue$.inboundSchema = exports.InterviewValue$inboundSchema;
    /** @deprecated use `InterviewValue$outboundSchema` instead. */
    InterviewValue$.outboundSchema = exports.InterviewValue$outboundSchema;
})(InterviewValue$ || (exports.InterviewValue$ = InterviewValue$ = {}));
/** @internal */
exports.InterviewStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.Interview4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.InterviewValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.InterviewStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.Interview4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.InterviewValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var InterviewStatus$;
(function (InterviewStatus$) {
    /** @deprecated use `InterviewStatus$inboundSchema` instead. */
    InterviewStatus$.inboundSchema = exports.InterviewStatus$inboundSchema;
    /** @deprecated use `InterviewStatus$outboundSchema` instead. */
    InterviewStatus$.outboundSchema = exports.InterviewStatus$outboundSchema;
})(InterviewStatus$ || (exports.InterviewStatus$ = InterviewStatus$ = {}));
function interviewStatusToJSON(interviewStatus) {
    return JSON.stringify(exports.InterviewStatus$outboundSchema.parse(interviewStatus));
}
exports.interviewStatusToJSON = interviewStatusToJSON;
function interviewStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.InterviewStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InterviewStatus' from JSON`);
}
exports.interviewStatusFromJSON = interviewStatusFromJSON;
/** @internal */
exports.Interview$inboundSchema = z.object({
    application_id: z.nullable(z.string()).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    end_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    id: z.nullable(z.string()).optional(),
    interview_parts: z.nullable(z.array(interviewpart_js_1.InterviewPart$inboundSchema)).optional(),
    interview_stage: z.nullable(z.lazy(() => exports.InterviewInterviewStage$inboundSchema)).optional(),
    interview_stage_id: z.nullable(z.string()).optional(),
    interview_status: z.nullable(z.lazy(() => exports.InterviewStatus$inboundSchema))
        .optional(),
    interviewer_ids: z.nullable(z.array(z.string())).optional(),
    interviewers: z.nullable(z.array(interviewer_js_1.Interviewer$inboundSchema)).optional(),
    meeting_url: z.nullable(z.string()).optional(),
    remote_application_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    remote_interview_stage_id: z.nullable(z.string()).optional(),
    remote_interviewer_ids: z.nullable(z.array(z.string())).optional(),
    start_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "application_id": "applicationId",
        "created_at": "createdAt",
        "end_at": "endAt",
        "interview_parts": "interviewParts",
        "interview_stage": "interviewStage",
        "interview_stage_id": "interviewStageId",
        "interview_status": "interviewStatus",
        "interviewer_ids": "interviewerIds",
        "meeting_url": "meetingUrl",
        "remote_application_id": "remoteApplicationId",
        "remote_id": "remoteId",
        "remote_interview_stage_id": "remoteInterviewStageId",
        "remote_interviewer_ids": "remoteInterviewerIds",
        "start_at": "startAt",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.Interview$outboundSchema = z.object({
    applicationId: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    endAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    id: z.nullable(z.string()).optional(),
    interviewParts: z.nullable(z.array(interviewpart_js_1.InterviewPart$outboundSchema)).optional(),
    interviewStage: z.nullable(z.lazy(() => exports.InterviewInterviewStage$outboundSchema)).optional(),
    interviewStageId: z.nullable(z.string()).optional(),
    interviewStatus: z.nullable(z.lazy(() => exports.InterviewStatus$outboundSchema))
        .optional(),
    interviewerIds: z.nullable(z.array(z.string())).optional(),
    interviewers: z.nullable(z.array(interviewer_js_1.Interviewer$outboundSchema)).optional(),
    meetingUrl: z.nullable(z.string()).optional(),
    remoteApplicationId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    remoteInterviewStageId: z.nullable(z.string()).optional(),
    remoteInterviewerIds: z.nullable(z.array(z.string())).optional(),
    startAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        applicationId: "application_id",
        createdAt: "created_at",
        endAt: "end_at",
        interviewParts: "interview_parts",
        interviewStage: "interview_stage",
        interviewStageId: "interview_stage_id",
        interviewStatus: "interview_status",
        interviewerIds: "interviewer_ids",
        meetingUrl: "meeting_url",
        remoteApplicationId: "remote_application_id",
        remoteId: "remote_id",
        remoteInterviewStageId: "remote_interview_stage_id",
        remoteInterviewerIds: "remote_interviewer_ids",
        startAt: "start_at",
        unifiedCustomFields: "unified_custom_fields",
        updatedAt: "updated_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Interview$;
(function (Interview$) {
    /** @deprecated use `Interview$inboundSchema` instead. */
    Interview$.inboundSchema = exports.Interview$inboundSchema;
    /** @deprecated use `Interview$outboundSchema` instead. */
    Interview$.outboundSchema = exports.Interview$outboundSchema;
})(Interview$ || (exports.Interview$ = Interview$ = {}));
function interviewToJSON(interview) {
    return JSON.stringify(exports.Interview$outboundSchema.parse(interview));
}
exports.interviewToJSON = interviewToJSON;
function interviewFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Interview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Interview' from JSON`);
}
exports.interviewFromJSON = interviewFromJSON;
//# sourceMappingURL=interview.js.map