"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.AtsCreateBackgroundCheckOrderRequestDto$outboundSchema = exports.Requester$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoPackage$outboundSchema = exports.Job$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoCandidate$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoApplication$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoApplicationStatus$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoValue$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoSourceValue$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDto4$outboundSchema = exports.AtsCreateBackgroundCheckOrderRequestDtoValue = void 0;
exports.atsCreateBackgroundCheckOrderRequestDto4ToJSON = atsCreateBackgroundCheckOrderRequestDto4ToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoSourceValueToJSON = atsCreateBackgroundCheckOrderRequestDtoSourceValueToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoApplicationStatusToJSON = atsCreateBackgroundCheckOrderRequestDtoApplicationStatusToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoApplicationToJSON = atsCreateBackgroundCheckOrderRequestDtoApplicationToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoCandidateToJSON = atsCreateBackgroundCheckOrderRequestDtoCandidateToJSON;
exports.jobToJSON = jobToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoPackageToJSON = atsCreateBackgroundCheckOrderRequestDtoPackageToJSON;
exports.requesterToJSON = requesterToJSON;
exports.atsCreateBackgroundCheckOrderRequestDtoToJSON = atsCreateBackgroundCheckOrderRequestDtoToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(require("../../types/enums.js"));
const atsjobhiringteam_js_1 = require("./atsjobhiringteam.js");
const candidateemail_js_1 = require("./candidateemail.js");
const package_js_1 = require("./package.js");
/**
 * The status of the application.
 */
var AtsCreateBackgroundCheckOrderRequestDtoValue;
(function (AtsCreateBackgroundCheckOrderRequestDtoValue) {
    AtsCreateBackgroundCheckOrderRequestDtoValue["Active"] = "active";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Assessment"] = "assessment";
    AtsCreateBackgroundCheckOrderRequestDtoValue["BackgroundCheck"] = "background_check";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Converted"] = "converted";
    AtsCreateBackgroundCheckOrderRequestDtoValue["DeclinedByCandidate"] = "declined_by_candidate";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Hired"] = "hired";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Interview"] = "interview";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Lead"] = "lead";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Offer"] = "offer";
    AtsCreateBackgroundCheckOrderRequestDtoValue["ReferenceCheck"] = "reference_check";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Rejected"] = "rejected";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Review"] = "review";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Screen"] = "screen";
    AtsCreateBackgroundCheckOrderRequestDtoValue["New"] = "new";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Onboarding"] = "onboarding";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Created"] = "created";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Accepted"] = "accepted";
    AtsCreateBackgroundCheckOrderRequestDtoValue["ShortList"] = "short_list";
    AtsCreateBackgroundCheckOrderRequestDtoValue["Approved"] = "approved";
    AtsCreateBackgroundCheckOrderRequestDtoValue["UnmappedValue"] = "unmapped_value";
})(AtsCreateBackgroundCheckOrderRequestDtoValue || (exports.AtsCreateBackgroundCheckOrderRequestDtoValue = AtsCreateBackgroundCheckOrderRequestDtoValue = {}));
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDto4$outboundSchema = z.object({});
function atsCreateBackgroundCheckOrderRequestDto4ToJSON(atsCreateBackgroundCheckOrderRequestDto4) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDto4$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDto4));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDto4$outboundSchema),
    z.array(z.any()),
]);
function atsCreateBackgroundCheckOrderRequestDtoSourceValueToJSON(atsCreateBackgroundCheckOrderRequestDtoSourceValue) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDtoSourceValue$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDtoSourceValue));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoValue$outboundSchema = openEnums.outboundSchema(AtsCreateBackgroundCheckOrderRequestDtoValue);
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoApplicationStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDto4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AtsCreateBackgroundCheckOrderRequestDtoValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
function atsCreateBackgroundCheckOrderRequestDtoApplicationStatusToJSON(atsCreateBackgroundCheckOrderRequestDtoApplicationStatus) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDtoApplicationStatus$outboundSchema
        .parse(atsCreateBackgroundCheckOrderRequestDtoApplicationStatus));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoApplication$outboundSchema = z.object({
    applicationStatus: z.nullable(z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDtoApplicationStatus$outboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        applicationStatus: "application_status",
        remoteId: "remote_id",
    });
});
function atsCreateBackgroundCheckOrderRequestDtoApplicationToJSON(atsCreateBackgroundCheckOrderRequestDtoApplication) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDtoApplication$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDtoApplication));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoCandidate$outboundSchema = z.object({
    emails: z.nullable(z.array(candidateemail_js_1.CandidateEmail$outboundSchema)).optional(),
    firstName: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    lastName: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    profileUrl: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        firstName: "first_name",
        lastName: "last_name",
        profileUrl: "profile_url",
        remoteId: "remote_id",
    });
});
function atsCreateBackgroundCheckOrderRequestDtoCandidateToJSON(atsCreateBackgroundCheckOrderRequestDtoCandidate) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDtoCandidate$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDtoCandidate));
}
/** @internal */
exports.Job$outboundSchema = z
    .object({
    hiringTeam: z.nullable(z.array(atsjobhiringteam_js_1.AtsJobHiringTeam$outboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    remoteId: z.nullable(z.string()).optional(),
    title: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        hiringTeam: "hiring_team",
        remoteId: "remote_id",
    });
});
function jobToJSON(job) {
    return JSON.stringify(exports.Job$outboundSchema.parse(job));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDtoPackage$outboundSchema = z.object({
    description: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    tests: z.nullable(z.array(package_js_1.Package$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
    });
});
function atsCreateBackgroundCheckOrderRequestDtoPackageToJSON(atsCreateBackgroundCheckOrderRequestDtoPackage) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDtoPackage$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDtoPackage));
}
/** @internal */
exports.Requester$outboundSchema = z.object({
    email: z.nullable(z.string()).optional(),
    firstName: z.nullable(z.string()).optional(),
    lastName: z.nullable(z.string()).optional(),
    remoteUserId: z.nullable(z.string()).optional(),
    role: z.nullable(z.string()).optional(),
    userId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        firstName: "first_name",
        lastName: "last_name",
        remoteUserId: "remote_user_id",
        userId: "user_id",
    });
});
function requesterToJSON(requester) {
    return JSON.stringify(exports.Requester$outboundSchema.parse(requester));
}
/** @internal */
exports.AtsCreateBackgroundCheckOrderRequestDto$outboundSchema = z.object({
    application: z.nullable(z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDtoApplication$outboundSchema)).optional(),
    candidate: z.nullable(z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDtoCandidate$outboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    job: z.nullable(z.lazy(() => exports.Job$outboundSchema)).optional(),
    package: z.nullable(z.lazy(() => exports.AtsCreateBackgroundCheckOrderRequestDtoPackage$outboundSchema)).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    remoteId: z.nullable(z.string()).optional(),
    requester: z.nullable(z.lazy(() => exports.Requester$outboundSchema)).optional(),
    resultsUpdateUrl: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
        resultsUpdateUrl: "results_update_url",
    });
});
function atsCreateBackgroundCheckOrderRequestDtoToJSON(atsCreateBackgroundCheckOrderRequestDto) {
    return JSON.stringify(exports.AtsCreateBackgroundCheckOrderRequestDto$outboundSchema.parse(atsCreateBackgroundCheckOrderRequestDto));
}
//# sourceMappingURL=atscreatebackgroundcheckorderrequestdto.js.map