"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.scheduledInterviewFromJSON = exports.scheduledInterviewToJSON = exports.ScheduledInterview$ = exports.ScheduledInterview$outboundSchema = exports.ScheduledInterview$inboundSchema = exports.scheduledInterviewInterviewStatusFromJSON = exports.scheduledInterviewInterviewStatusToJSON = exports.ScheduledInterviewInterviewStatus$ = exports.ScheduledInterviewInterviewStatus$outboundSchema = exports.ScheduledInterviewInterviewStatus$inboundSchema = exports.ScheduledInterviewValue$ = exports.ScheduledInterviewValue$outboundSchema = exports.ScheduledInterviewValue$inboundSchema = exports.scheduledInterviewSourceValueFromJSON = exports.scheduledInterviewSourceValueToJSON = exports.ScheduledInterviewSourceValue$ = exports.ScheduledInterviewSourceValue$outboundSchema = exports.ScheduledInterviewSourceValue$inboundSchema = exports.scheduledInterview4FromJSON = exports.scheduledInterview4ToJSON = exports.ScheduledInterview4$ = exports.ScheduledInterview4$outboundSchema = exports.ScheduledInterview4$inboundSchema = exports.scheduledInterviewInterviewStageFromJSON = exports.scheduledInterviewInterviewStageToJSON = exports.ScheduledInterviewInterviewStage$ = exports.ScheduledInterviewInterviewStage$outboundSchema = exports.ScheduledInterviewInterviewStage$inboundSchema = exports.ScheduledInterviewValue = 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 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",
    });
});
/** @internal */
exports.ScheduledInterviewInterviewStage$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 ScheduledInterviewInterviewStage$;
(function (ScheduledInterviewInterviewStage$) {
    /** @deprecated use `ScheduledInterviewInterviewStage$inboundSchema` instead. */
    ScheduledInterviewInterviewStage$.inboundSchema = exports.ScheduledInterviewInterviewStage$inboundSchema;
    /** @deprecated use `ScheduledInterviewInterviewStage$outboundSchema` instead. */
    ScheduledInterviewInterviewStage$.outboundSchema = exports.ScheduledInterviewInterviewStage$outboundSchema;
})(ScheduledInterviewInterviewStage$ || (exports.ScheduledInterviewInterviewStage$ = ScheduledInterviewInterviewStage$ = {}));
function scheduledInterviewInterviewStageToJSON(scheduledInterviewInterviewStage) {
    return JSON.stringify(exports.ScheduledInterviewInterviewStage$outboundSchema.parse(scheduledInterviewInterviewStage));
}
exports.scheduledInterviewInterviewStageToJSON = scheduledInterviewInterviewStageToJSON;
function scheduledInterviewInterviewStageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewInterviewStage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewInterviewStage' from JSON`);
}
exports.scheduledInterviewInterviewStageFromJSON = scheduledInterviewInterviewStageFromJSON;
/** @internal */
exports.ScheduledInterview4$inboundSchema = z.object({});
/** @internal */
exports.ScheduledInterview4$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 ScheduledInterview4$;
(function (ScheduledInterview4$) {
    /** @deprecated use `ScheduledInterview4$inboundSchema` instead. */
    ScheduledInterview4$.inboundSchema = exports.ScheduledInterview4$inboundSchema;
    /** @deprecated use `ScheduledInterview4$outboundSchema` instead. */
    ScheduledInterview4$.outboundSchema = exports.ScheduledInterview4$outboundSchema;
})(ScheduledInterview4$ || (exports.ScheduledInterview4$ = ScheduledInterview4$ = {}));
function scheduledInterview4ToJSON(scheduledInterview4) {
    return JSON.stringify(exports.ScheduledInterview4$outboundSchema.parse(scheduledInterview4));
}
exports.scheduledInterview4ToJSON = scheduledInterview4ToJSON;
function scheduledInterview4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterview4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterview4' from JSON`);
}
exports.scheduledInterview4FromJSON = scheduledInterview4FromJSON;
/** @internal */
exports.ScheduledInterviewSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.ScheduledInterview4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.ScheduledInterviewSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.ScheduledInterview4$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 ScheduledInterviewSourceValue$;
(function (ScheduledInterviewSourceValue$) {
    /** @deprecated use `ScheduledInterviewSourceValue$inboundSchema` instead. */
    ScheduledInterviewSourceValue$.inboundSchema = exports.ScheduledInterviewSourceValue$inboundSchema;
    /** @deprecated use `ScheduledInterviewSourceValue$outboundSchema` instead. */
    ScheduledInterviewSourceValue$.outboundSchema = exports.ScheduledInterviewSourceValue$outboundSchema;
})(ScheduledInterviewSourceValue$ || (exports.ScheduledInterviewSourceValue$ = ScheduledInterviewSourceValue$ = {}));
function scheduledInterviewSourceValueToJSON(scheduledInterviewSourceValue) {
    return JSON.stringify(exports.ScheduledInterviewSourceValue$outboundSchema.parse(scheduledInterviewSourceValue));
}
exports.scheduledInterviewSourceValueToJSON = scheduledInterviewSourceValueToJSON;
function scheduledInterviewSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewSourceValue' from JSON`);
}
exports.scheduledInterviewSourceValueFromJSON = scheduledInterviewSourceValueFromJSON;
/** @internal */
exports.ScheduledInterviewValue$inboundSchema = z
    .union([
    z.nativeEnum(ScheduledInterviewValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.ScheduledInterviewValue$outboundSchema = z.union([
    z.nativeEnum(ScheduledInterviewValue),
    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 ScheduledInterviewValue$;
(function (ScheduledInterviewValue$) {
    /** @deprecated use `ScheduledInterviewValue$inboundSchema` instead. */
    ScheduledInterviewValue$.inboundSchema = exports.ScheduledInterviewValue$inboundSchema;
    /** @deprecated use `ScheduledInterviewValue$outboundSchema` instead. */
    ScheduledInterviewValue$.outboundSchema = exports.ScheduledInterviewValue$outboundSchema;
})(ScheduledInterviewValue$ || (exports.ScheduledInterviewValue$ = ScheduledInterviewValue$ = {}));
/** @internal */
exports.ScheduledInterviewInterviewStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.ScheduledInterview4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.ScheduledInterviewValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.ScheduledInterviewInterviewStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.ScheduledInterview4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.ScheduledInterviewValue$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 ScheduledInterviewInterviewStatus$;
(function (ScheduledInterviewInterviewStatus$) {
    /** @deprecated use `ScheduledInterviewInterviewStatus$inboundSchema` instead. */
    ScheduledInterviewInterviewStatus$.inboundSchema = exports.ScheduledInterviewInterviewStatus$inboundSchema;
    /** @deprecated use `ScheduledInterviewInterviewStatus$outboundSchema` instead. */
    ScheduledInterviewInterviewStatus$.outboundSchema = exports.ScheduledInterviewInterviewStatus$outboundSchema;
})(ScheduledInterviewInterviewStatus$ || (exports.ScheduledInterviewInterviewStatus$ = ScheduledInterviewInterviewStatus$ = {}));
function scheduledInterviewInterviewStatusToJSON(scheduledInterviewInterviewStatus) {
    return JSON.stringify(exports.ScheduledInterviewInterviewStatus$outboundSchema.parse(scheduledInterviewInterviewStatus));
}
exports.scheduledInterviewInterviewStatusToJSON = scheduledInterviewInterviewStatusToJSON;
function scheduledInterviewInterviewStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterviewInterviewStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterviewInterviewStatus' from JSON`);
}
exports.scheduledInterviewInterviewStatusFromJSON = scheduledInterviewInterviewStatusFromJSON;
/** @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",
    });
});
/** @internal */
exports.ScheduledInterview$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.ScheduledInterviewInterviewStage$outboundSchema)).optional(),
    interviewStageId: z.nullable(z.string()).optional(),
    interviewStatus: z.nullable(z.lazy(() => exports.ScheduledInterviewInterviewStatus$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(),
    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",
        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 ScheduledInterview$;
(function (ScheduledInterview$) {
    /** @deprecated use `ScheduledInterview$inboundSchema` instead. */
    ScheduledInterview$.inboundSchema = exports.ScheduledInterview$inboundSchema;
    /** @deprecated use `ScheduledInterview$outboundSchema` instead. */
    ScheduledInterview$.outboundSchema = exports.ScheduledInterview$outboundSchema;
})(ScheduledInterview$ || (exports.ScheduledInterview$ = ScheduledInterview$ = {}));
function scheduledInterviewToJSON(scheduledInterview) {
    return JSON.stringify(exports.ScheduledInterview$outboundSchema.parse(scheduledInterview));
}
exports.scheduledInterviewToJSON = scheduledInterviewToJSON;
function scheduledInterviewFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ScheduledInterview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledInterview' from JSON`);
}
exports.scheduledInterviewFromJSON = scheduledInterviewFromJSON;
//# sourceMappingURL=scheduledinterview.js.map