"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScheduledInterview$inboundSchema = exports.ScheduledInterviewInterviewStatus$inboundSchema = exports.ScheduledInterviewValue$inboundSchema = exports.ScheduledInterviewSourceValue$inboundSchema = exports.ScheduledInterview4$inboundSchema = exports.ScheduledInterviewInterviewStage$inboundSchema = exports.ScheduledInterviewValue = void 0;
exports.scheduledInterviewInterviewStageFromJSON = scheduledInterviewInterviewStageFromJSON;
exports.scheduledInterview4FromJSON = scheduledInterview4FromJSON;
exports.scheduledInterviewSourceValueFromJSON = scheduledInterviewSourceValueFromJSON;
exports.scheduledInterviewInterviewStatusFromJSON = scheduledInterviewInterviewStatusFromJSON;
exports.scheduledInterviewFromJSON = scheduledInterviewFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const openEnums = __importStar(require("../../types/enums.js"));
const interviewer_js_1 = require("./interviewer.js");
const interviewpart_js_1 = require("./interviewpart.js");
/**
 * The status of the interview.
 */
var ScheduledInterviewValue;
(function (ScheduledInterviewValue) {
    ScheduledInterviewValue["Unscheduled"] = "unscheduled";
    ScheduledInterviewValue["Scheduled"] = "scheduled";
    ScheduledInterviewValue["Completed"] = "completed";
    ScheduledInterviewValue["Cancelled"] = "cancelled";
    ScheduledInterviewValue["PendingFeedback"] = "pending_feedback";
    ScheduledInterviewValue["UnmappedValue"] = "unmapped_value";
})(ScheduledInterviewValue || (exports.ScheduledInterviewValue = ScheduledInterviewValue = {}));
/** @internal */
exports.ScheduledInterviewInterviewStage$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",
    });
});
function scheduledInterviewInterviewStageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewInterviewStage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewInterviewStage' from JSON`);
}
/** @internal */
exports.ScheduledInterview4$inboundSchema = z.object({});
function scheduledInterview4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterview4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterview4' from JSON`);
}
/** @internal */
exports.ScheduledInterviewSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.ScheduledInterview4$inboundSchema),
    z.array(z.any()),
]);
function scheduledInterviewSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewSourceValue' from JSON`);
}
/** @internal */
exports.ScheduledInterviewValue$inboundSchema = openEnums.inboundSchema(ScheduledInterviewValue);
/** @internal */
exports.ScheduledInterviewInterviewStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.ScheduledInterview4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.ScheduledInterviewValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function scheduledInterviewInterviewStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewInterviewStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewInterviewStatus' from JSON`);
}
/** @internal */
exports.ScheduledInterview$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.ScheduledInterviewInterviewStage$inboundSchema)).optional(),
    interview_stage_id: z.nullable(z.string()).optional(),
    interview_status: z.nullable(z.lazy(() => exports.ScheduledInterviewInterviewStatus$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(),
    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",
        "updated_at": "updatedAt",
    });
});
function scheduledInterviewFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterview' from JSON`);
}
//# sourceMappingURL=scheduledinterview.js.map