"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.backgroundCheckOrderFromJSON = exports.backgroundCheckOrderToJSON = exports.BackgroundCheckOrder$ = exports.BackgroundCheckOrder$outboundSchema = exports.BackgroundCheckOrder$inboundSchema = exports.backgroundCheckOrderRequesterFromJSON = exports.backgroundCheckOrderRequesterToJSON = exports.BackgroundCheckOrderRequester$ = exports.BackgroundCheckOrderRequester$outboundSchema = exports.BackgroundCheckOrderRequester$inboundSchema = exports.backgroundCheckOrderPackageFromJSON = exports.backgroundCheckOrderPackageToJSON = exports.BackgroundCheckOrderPackage$ = exports.BackgroundCheckOrderPackage$outboundSchema = exports.BackgroundCheckOrderPackage$inboundSchema = exports.backgroundCheckOrderJobFromJSON = exports.backgroundCheckOrderJobToJSON = exports.BackgroundCheckOrderJob$ = exports.BackgroundCheckOrderJob$outboundSchema = exports.BackgroundCheckOrderJob$inboundSchema = exports.backgroundCheckOrderCandidateFromJSON = exports.backgroundCheckOrderCandidateToJSON = exports.BackgroundCheckOrderCandidate$ = exports.BackgroundCheckOrderCandidate$outboundSchema = exports.BackgroundCheckOrderCandidate$inboundSchema = exports.backgroundCheckOrderApplicationFromJSON = exports.backgroundCheckOrderApplicationToJSON = exports.BackgroundCheckOrderApplication$ = exports.BackgroundCheckOrderApplication$outboundSchema = exports.BackgroundCheckOrderApplication$inboundSchema = exports.backgroundCheckOrderApplicationStatusFromJSON = exports.backgroundCheckOrderApplicationStatusToJSON = exports.BackgroundCheckOrderApplicationStatus$ = exports.BackgroundCheckOrderApplicationStatus$outboundSchema = exports.BackgroundCheckOrderApplicationStatus$inboundSchema = exports.BackgroundCheckOrderValue$ = exports.BackgroundCheckOrderValue$outboundSchema = exports.BackgroundCheckOrderValue$inboundSchema = exports.backgroundCheckOrderSourceValueFromJSON = exports.backgroundCheckOrderSourceValueToJSON = exports.BackgroundCheckOrderSourceValue$ = exports.BackgroundCheckOrderSourceValue$outboundSchema = exports.BackgroundCheckOrderSourceValue$inboundSchema = exports.backgroundCheckOrder4FromJSON = exports.backgroundCheckOrder4ToJSON = exports.BackgroundCheckOrder4$ = exports.BackgroundCheckOrder4$outboundSchema = exports.BackgroundCheckOrder4$inboundSchema = exports.BackgroundCheckOrderValue = 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 candidateemail_js_1 = require("./candidateemail.js");
const jobhiringteam_js_1 = require("./jobhiringteam.js");
const package_js_1 = require("./package.js");
/**
 * The status of the application.
 */
var BackgroundCheckOrderValue;
(function (BackgroundCheckOrderValue) {
    BackgroundCheckOrderValue["Active"] = "active";
    BackgroundCheckOrderValue["Assessment"] = "assessment";
    BackgroundCheckOrderValue["BackgroundCheck"] = "background_check";
    BackgroundCheckOrderValue["Converted"] = "converted";
    BackgroundCheckOrderValue["DeclinedByCandidate"] = "declined_by_candidate";
    BackgroundCheckOrderValue["Hired"] = "hired";
    BackgroundCheckOrderValue["Interview"] = "interview";
    BackgroundCheckOrderValue["Lead"] = "lead";
    BackgroundCheckOrderValue["Offer"] = "offer";
    BackgroundCheckOrderValue["ReferenceCheck"] = "reference_check";
    BackgroundCheckOrderValue["Rejected"] = "rejected";
    BackgroundCheckOrderValue["Review"] = "review";
    BackgroundCheckOrderValue["Screen"] = "screen";
    BackgroundCheckOrderValue["New"] = "new";
    BackgroundCheckOrderValue["Onboarding"] = "onboarding";
    BackgroundCheckOrderValue["Created"] = "created";
    BackgroundCheckOrderValue["Accepted"] = "accepted";
    BackgroundCheckOrderValue["ShortList"] = "short_list";
    BackgroundCheckOrderValue["Approved"] = "approved";
    BackgroundCheckOrderValue["UnmappedValue"] = "unmapped_value";
})(BackgroundCheckOrderValue || (exports.BackgroundCheckOrderValue = BackgroundCheckOrderValue = {}));
/** @internal */
exports.BackgroundCheckOrder4$inboundSchema = z.object({});
/** @internal */
exports.BackgroundCheckOrder4$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 BackgroundCheckOrder4$;
(function (BackgroundCheckOrder4$) {
    /** @deprecated use `BackgroundCheckOrder4$inboundSchema` instead. */
    BackgroundCheckOrder4$.inboundSchema = exports.BackgroundCheckOrder4$inboundSchema;
    /** @deprecated use `BackgroundCheckOrder4$outboundSchema` instead. */
    BackgroundCheckOrder4$.outboundSchema = exports.BackgroundCheckOrder4$outboundSchema;
})(BackgroundCheckOrder4$ || (exports.BackgroundCheckOrder4$ = BackgroundCheckOrder4$ = {}));
function backgroundCheckOrder4ToJSON(backgroundCheckOrder4) {
    return JSON.stringify(exports.BackgroundCheckOrder4$outboundSchema.parse(backgroundCheckOrder4));
}
exports.backgroundCheckOrder4ToJSON = backgroundCheckOrder4ToJSON;
function backgroundCheckOrder4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrder4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrder4' from JSON`);
}
exports.backgroundCheckOrder4FromJSON = backgroundCheckOrder4FromJSON;
/** @internal */
exports.BackgroundCheckOrderSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.BackgroundCheckOrder4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.BackgroundCheckOrderSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.BackgroundCheckOrder4$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 BackgroundCheckOrderSourceValue$;
(function (BackgroundCheckOrderSourceValue$) {
    /** @deprecated use `BackgroundCheckOrderSourceValue$inboundSchema` instead. */
    BackgroundCheckOrderSourceValue$.inboundSchema = exports.BackgroundCheckOrderSourceValue$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderSourceValue$outboundSchema` instead. */
    BackgroundCheckOrderSourceValue$.outboundSchema = exports.BackgroundCheckOrderSourceValue$outboundSchema;
})(BackgroundCheckOrderSourceValue$ || (exports.BackgroundCheckOrderSourceValue$ = BackgroundCheckOrderSourceValue$ = {}));
function backgroundCheckOrderSourceValueToJSON(backgroundCheckOrderSourceValue) {
    return JSON.stringify(exports.BackgroundCheckOrderSourceValue$outboundSchema.parse(backgroundCheckOrderSourceValue));
}
exports.backgroundCheckOrderSourceValueToJSON = backgroundCheckOrderSourceValueToJSON;
function backgroundCheckOrderSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderSourceValue' from JSON`);
}
exports.backgroundCheckOrderSourceValueFromJSON = backgroundCheckOrderSourceValueFromJSON;
/** @internal */
exports.BackgroundCheckOrderValue$inboundSchema = z
    .union([
    z.nativeEnum(BackgroundCheckOrderValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.BackgroundCheckOrderValue$outboundSchema = z.union([
    z.nativeEnum(BackgroundCheckOrderValue),
    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 BackgroundCheckOrderValue$;
(function (BackgroundCheckOrderValue$) {
    /** @deprecated use `BackgroundCheckOrderValue$inboundSchema` instead. */
    BackgroundCheckOrderValue$.inboundSchema = exports.BackgroundCheckOrderValue$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderValue$outboundSchema` instead. */
    BackgroundCheckOrderValue$.outboundSchema = exports.BackgroundCheckOrderValue$outboundSchema;
})(BackgroundCheckOrderValue$ || (exports.BackgroundCheckOrderValue$ = BackgroundCheckOrderValue$ = {}));
/** @internal */
exports.BackgroundCheckOrderApplicationStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.BackgroundCheckOrder4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.BackgroundCheckOrderValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.BackgroundCheckOrderApplicationStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.BackgroundCheckOrder4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.BackgroundCheckOrderValue$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 BackgroundCheckOrderApplicationStatus$;
(function (BackgroundCheckOrderApplicationStatus$) {
    /** @deprecated use `BackgroundCheckOrderApplicationStatus$inboundSchema` instead. */
    BackgroundCheckOrderApplicationStatus$.inboundSchema = exports.BackgroundCheckOrderApplicationStatus$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderApplicationStatus$outboundSchema` instead. */
    BackgroundCheckOrderApplicationStatus$.outboundSchema = exports.BackgroundCheckOrderApplicationStatus$outboundSchema;
})(BackgroundCheckOrderApplicationStatus$ || (exports.BackgroundCheckOrderApplicationStatus$ = BackgroundCheckOrderApplicationStatus$ = {}));
function backgroundCheckOrderApplicationStatusToJSON(backgroundCheckOrderApplicationStatus) {
    return JSON.stringify(exports.BackgroundCheckOrderApplicationStatus$outboundSchema.parse(backgroundCheckOrderApplicationStatus));
}
exports.backgroundCheckOrderApplicationStatusToJSON = backgroundCheckOrderApplicationStatusToJSON;
function backgroundCheckOrderApplicationStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderApplicationStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderApplicationStatus' from JSON`);
}
exports.backgroundCheckOrderApplicationStatusFromJSON = backgroundCheckOrderApplicationStatusFromJSON;
/** @internal */
exports.BackgroundCheckOrderApplication$inboundSchema = z.object({
    application_status: z.nullable(z.lazy(() => exports.BackgroundCheckOrderApplicationStatus$inboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "application_status": "applicationStatus",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.BackgroundCheckOrderApplication$outboundSchema = z.object({
    applicationStatus: z.nullable(z.lazy(() => exports.BackgroundCheckOrderApplicationStatus$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrderApplication$;
(function (BackgroundCheckOrderApplication$) {
    /** @deprecated use `BackgroundCheckOrderApplication$inboundSchema` instead. */
    BackgroundCheckOrderApplication$.inboundSchema = exports.BackgroundCheckOrderApplication$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderApplication$outboundSchema` instead. */
    BackgroundCheckOrderApplication$.outboundSchema = exports.BackgroundCheckOrderApplication$outboundSchema;
})(BackgroundCheckOrderApplication$ || (exports.BackgroundCheckOrderApplication$ = BackgroundCheckOrderApplication$ = {}));
function backgroundCheckOrderApplicationToJSON(backgroundCheckOrderApplication) {
    return JSON.stringify(exports.BackgroundCheckOrderApplication$outboundSchema.parse(backgroundCheckOrderApplication));
}
exports.backgroundCheckOrderApplicationToJSON = backgroundCheckOrderApplicationToJSON;
function backgroundCheckOrderApplicationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderApplication$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderApplication' from JSON`);
}
exports.backgroundCheckOrderApplicationFromJSON = backgroundCheckOrderApplicationFromJSON;
/** @internal */
exports.BackgroundCheckOrderCandidate$inboundSchema = z.object({
    emails: z.nullable(z.array(candidateemail_js_1.CandidateEmail$inboundSchema)).optional(),
    first_name: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    last_name: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    profile_url: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "first_name": "firstName",
        "last_name": "lastName",
        "profile_url": "profileUrl",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.BackgroundCheckOrderCandidate$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrderCandidate$;
(function (BackgroundCheckOrderCandidate$) {
    /** @deprecated use `BackgroundCheckOrderCandidate$inboundSchema` instead. */
    BackgroundCheckOrderCandidate$.inboundSchema = exports.BackgroundCheckOrderCandidate$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderCandidate$outboundSchema` instead. */
    BackgroundCheckOrderCandidate$.outboundSchema = exports.BackgroundCheckOrderCandidate$outboundSchema;
})(BackgroundCheckOrderCandidate$ || (exports.BackgroundCheckOrderCandidate$ = BackgroundCheckOrderCandidate$ = {}));
function backgroundCheckOrderCandidateToJSON(backgroundCheckOrderCandidate) {
    return JSON.stringify(exports.BackgroundCheckOrderCandidate$outboundSchema.parse(backgroundCheckOrderCandidate));
}
exports.backgroundCheckOrderCandidateToJSON = backgroundCheckOrderCandidateToJSON;
function backgroundCheckOrderCandidateFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderCandidate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderCandidate' from JSON`);
}
exports.backgroundCheckOrderCandidateFromJSON = backgroundCheckOrderCandidateFromJSON;
/** @internal */
exports.BackgroundCheckOrderJob$inboundSchema = z.object({
    hiring_team: z.nullable(z.array(jobhiringteam_js_1.JobHiringTeam$inboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    passthrough: z.nullable(z.record(z.any())).optional(),
    remote_id: z.nullable(z.string()).optional(),
    title: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "hiring_team": "hiringTeam",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.BackgroundCheckOrderJob$outboundSchema = z.object({
    hiringTeam: z.nullable(z.array(jobhiringteam_js_1.JobHiringTeam$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrderJob$;
(function (BackgroundCheckOrderJob$) {
    /** @deprecated use `BackgroundCheckOrderJob$inboundSchema` instead. */
    BackgroundCheckOrderJob$.inboundSchema = exports.BackgroundCheckOrderJob$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderJob$outboundSchema` instead. */
    BackgroundCheckOrderJob$.outboundSchema = exports.BackgroundCheckOrderJob$outboundSchema;
})(BackgroundCheckOrderJob$ || (exports.BackgroundCheckOrderJob$ = BackgroundCheckOrderJob$ = {}));
function backgroundCheckOrderJobToJSON(backgroundCheckOrderJob) {
    return JSON.stringify(exports.BackgroundCheckOrderJob$outboundSchema.parse(backgroundCheckOrderJob));
}
exports.backgroundCheckOrderJobToJSON = backgroundCheckOrderJobToJSON;
function backgroundCheckOrderJobFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderJob$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderJob' from JSON`);
}
exports.backgroundCheckOrderJobFromJSON = backgroundCheckOrderJobFromJSON;
/** @internal */
exports.BackgroundCheckOrderPackage$inboundSchema = z.object({
    description: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    tests: z.nullable(z.array(package_js_1.Package$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.BackgroundCheckOrderPackage$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrderPackage$;
(function (BackgroundCheckOrderPackage$) {
    /** @deprecated use `BackgroundCheckOrderPackage$inboundSchema` instead. */
    BackgroundCheckOrderPackage$.inboundSchema = exports.BackgroundCheckOrderPackage$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderPackage$outboundSchema` instead. */
    BackgroundCheckOrderPackage$.outboundSchema = exports.BackgroundCheckOrderPackage$outboundSchema;
})(BackgroundCheckOrderPackage$ || (exports.BackgroundCheckOrderPackage$ = BackgroundCheckOrderPackage$ = {}));
function backgroundCheckOrderPackageToJSON(backgroundCheckOrderPackage) {
    return JSON.stringify(exports.BackgroundCheckOrderPackage$outboundSchema.parse(backgroundCheckOrderPackage));
}
exports.backgroundCheckOrderPackageToJSON = backgroundCheckOrderPackageToJSON;
function backgroundCheckOrderPackageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderPackage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderPackage' from JSON`);
}
exports.backgroundCheckOrderPackageFromJSON = backgroundCheckOrderPackageFromJSON;
/** @internal */
exports.BackgroundCheckOrderRequester$inboundSchema = z.object({
    email: z.nullable(z.string()).optional(),
    first_name: z.nullable(z.string()).optional(),
    last_name: z.nullable(z.string()).optional(),
    remote_user_id: z.nullable(z.string()).optional(),
    role: z.nullable(z.string()).optional(),
    user_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "first_name": "firstName",
        "last_name": "lastName",
        "remote_user_id": "remoteUserId",
        "user_id": "userId",
    });
});
/** @internal */
exports.BackgroundCheckOrderRequester$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrderRequester$;
(function (BackgroundCheckOrderRequester$) {
    /** @deprecated use `BackgroundCheckOrderRequester$inboundSchema` instead. */
    BackgroundCheckOrderRequester$.inboundSchema = exports.BackgroundCheckOrderRequester$inboundSchema;
    /** @deprecated use `BackgroundCheckOrderRequester$outboundSchema` instead. */
    BackgroundCheckOrderRequester$.outboundSchema = exports.BackgroundCheckOrderRequester$outboundSchema;
})(BackgroundCheckOrderRequester$ || (exports.BackgroundCheckOrderRequester$ = BackgroundCheckOrderRequester$ = {}));
function backgroundCheckOrderRequesterToJSON(backgroundCheckOrderRequester) {
    return JSON.stringify(exports.BackgroundCheckOrderRequester$outboundSchema.parse(backgroundCheckOrderRequester));
}
exports.backgroundCheckOrderRequesterToJSON = backgroundCheckOrderRequesterToJSON;
function backgroundCheckOrderRequesterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrderRequester$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrderRequester' from JSON`);
}
exports.backgroundCheckOrderRequesterFromJSON = backgroundCheckOrderRequesterFromJSON;
/** @internal */
exports.BackgroundCheckOrder$inboundSchema = z.object({
    application: z.nullable(z.lazy(() => exports.BackgroundCheckOrderApplication$inboundSchema)).optional(),
    candidate: z.nullable(z.lazy(() => exports.BackgroundCheckOrderCandidate$inboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    job: z.nullable(z.lazy(() => exports.BackgroundCheckOrderJob$inboundSchema))
        .optional(),
    package: z.nullable(z.lazy(() => exports.BackgroundCheckOrderPackage$inboundSchema))
        .optional(),
    remote_id: z.nullable(z.string()).optional(),
    requester: z.nullable(z.lazy(() => exports.BackgroundCheckOrderRequester$inboundSchema)).optional(),
    results_update_url: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
        "results_update_url": "resultsUpdateUrl",
    });
});
/** @internal */
exports.BackgroundCheckOrder$outboundSchema = z.object({
    application: z.nullable(z.lazy(() => exports.BackgroundCheckOrderApplication$outboundSchema)).optional(),
    candidate: z.nullable(z.lazy(() => exports.BackgroundCheckOrderCandidate$outboundSchema)).optional(),
    id: z.nullable(z.string()).optional(),
    job: z.nullable(z.lazy(() => exports.BackgroundCheckOrderJob$outboundSchema))
        .optional(),
    package: z.nullable(z.lazy(() => exports.BackgroundCheckOrderPackage$outboundSchema))
        .optional(),
    remoteId: z.nullable(z.string()).optional(),
    requester: z.nullable(z.lazy(() => exports.BackgroundCheckOrderRequester$outboundSchema)).optional(),
    resultsUpdateUrl: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
        resultsUpdateUrl: "results_update_url",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BackgroundCheckOrder$;
(function (BackgroundCheckOrder$) {
    /** @deprecated use `BackgroundCheckOrder$inboundSchema` instead. */
    BackgroundCheckOrder$.inboundSchema = exports.BackgroundCheckOrder$inboundSchema;
    /** @deprecated use `BackgroundCheckOrder$outboundSchema` instead. */
    BackgroundCheckOrder$.outboundSchema = exports.BackgroundCheckOrder$outboundSchema;
})(BackgroundCheckOrder$ || (exports.BackgroundCheckOrder$ = BackgroundCheckOrder$ = {}));
function backgroundCheckOrderToJSON(backgroundCheckOrder) {
    return JSON.stringify(exports.BackgroundCheckOrder$outboundSchema.parse(backgroundCheckOrder));
}
exports.backgroundCheckOrderToJSON = backgroundCheckOrderToJSON;
function backgroundCheckOrderFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BackgroundCheckOrder$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BackgroundCheckOrder' from JSON`);
}
exports.backgroundCheckOrderFromJSON = backgroundCheckOrderFromJSON;
//# sourceMappingURL=backgroundcheckorder.js.map