"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.JobPostingSchemasStatus4$outboundSchema = exports.JobPostingSchemasStatus4$inboundSchema = exports.Internal$ = exports.Internal$outboundSchema = exports.Internal$inboundSchema = exports.jobPostingEmploymentTypeFromJSON = exports.jobPostingEmploymentTypeToJSON = exports.JobPostingEmploymentType$ = exports.JobPostingEmploymentType$outboundSchema = exports.JobPostingEmploymentType$inboundSchema = exports.JobPostingSchemasValue$ = exports.JobPostingSchemasValue$outboundSchema = exports.JobPostingSchemasValue$inboundSchema = exports.jobPostingSchemasSourceValueFromJSON = exports.jobPostingSchemasSourceValueToJSON = exports.JobPostingSchemasSourceValue$ = exports.JobPostingSchemasSourceValue$outboundSchema = exports.JobPostingSchemasSourceValue$inboundSchema = exports.jobPostingSchemas4FromJSON = exports.jobPostingSchemas4ToJSON = exports.JobPostingSchemas4$ = exports.JobPostingSchemas4$outboundSchema = exports.JobPostingSchemas4$inboundSchema = exports.jobPostingEmploymentContractTypeFromJSON = exports.jobPostingEmploymentContractTypeToJSON = exports.JobPostingEmploymentContractType$ = exports.JobPostingEmploymentContractType$outboundSchema = exports.JobPostingEmploymentContractType$inboundSchema = exports.JobPostingValue$ = exports.JobPostingValue$outboundSchema = exports.JobPostingValue$inboundSchema = exports.jobPostingSourceValueFromJSON = exports.jobPostingSourceValueToJSON = exports.JobPostingSourceValue$ = exports.JobPostingSourceValue$outboundSchema = exports.JobPostingSourceValue$inboundSchema = exports.jobPosting4FromJSON = exports.jobPosting4ToJSON = exports.JobPosting4$ = exports.JobPosting4$outboundSchema = exports.JobPosting4$inboundSchema = exports.jobPostingContentFromJSON = exports.jobPostingContentToJSON = exports.JobPostingContent$ = exports.JobPostingContent$outboundSchema = exports.JobPostingContent$inboundSchema = exports.JobPostingSchemasStatusValue = exports.Internal = exports.JobPostingSchemasValue = exports.JobPostingValue = void 0;
exports.jobPostingFromJSON = exports.jobPostingToJSON = exports.JobPosting$ = exports.JobPosting$outboundSchema = exports.JobPosting$inboundSchema = exports.jobPostingStatusFromJSON = exports.jobPostingStatusToJSON = exports.JobPostingStatus$ = exports.JobPostingStatus$outboundSchema = exports.JobPostingStatus$inboundSchema = exports.JobPostingSchemasStatusValue$ = exports.JobPostingSchemasStatusValue$outboundSchema = exports.JobPostingSchemasStatusValue$inboundSchema = exports.jobPostingSchemasStatusSourceValueFromJSON = exports.jobPostingSchemasStatusSourceValueToJSON = exports.JobPostingSchemasStatusSourceValue$ = exports.JobPostingSchemasStatusSourceValue$outboundSchema = exports.JobPostingSchemasStatusSourceValue$inboundSchema = exports.jobPostingSchemasStatus4FromJSON = exports.jobPostingSchemasStatus4ToJSON = exports.JobPostingSchemasStatus4$ = 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 jobpostingcompensation_js_1 = require("./jobpostingcompensation.js");
const jobpostingcontentsection_js_1 = require("./jobpostingcontentsection.js");
const jobpostinglocation_js_1 = require("./jobpostinglocation.js");
const jobpostingquestionnaire_js_1 = require("./jobpostingquestionnaire.js");
/**
 * The employment contract type.
 */
var JobPostingValue;
(function (JobPostingValue) {
    JobPostingValue["FullTime"] = "full_time";
    JobPostingValue["Shifts"] = "shifts";
    JobPostingValue["PartTime"] = "part_time";
    JobPostingValue["UnmappedValue"] = "unmapped_value";
})(JobPostingValue || (exports.JobPostingValue = JobPostingValue = {}));
/**
 * The type of the employment.
 */
var JobPostingSchemasValue;
(function (JobPostingSchemasValue) {
    JobPostingSchemasValue["Contractor"] = "contractor";
    JobPostingSchemasValue["Intern"] = "intern";
    JobPostingSchemasValue["Permanent"] = "permanent";
    JobPostingSchemasValue["Apprentice"] = "apprentice";
    JobPostingSchemasValue["Freelance"] = "freelance";
    JobPostingSchemasValue["Terminated"] = "terminated";
    JobPostingSchemasValue["Temporary"] = "temporary";
    JobPostingSchemasValue["Seasonal"] = "seasonal";
    JobPostingSchemasValue["Volunteer"] = "volunteer";
    JobPostingSchemasValue["Probation"] = "probation";
    JobPostingSchemasValue["Internal"] = "internal";
    JobPostingSchemasValue["External"] = "external";
    JobPostingSchemasValue["Expatriate"] = "expatriate";
    JobPostingSchemasValue["EmployerOfRecord"] = "employer_of_record";
    JobPostingSchemasValue["Casual"] = "casual";
    JobPostingSchemasValue["Programme"] = "Programme";
    JobPostingSchemasValue["UnmappedValue"] = "unmapped_value";
})(JobPostingSchemasValue || (exports.JobPostingSchemasValue = JobPostingSchemasValue = {}));
var Internal;
(function (Internal) {
    Internal["True"] = "true";
    Internal["False"] = "false";
    Internal["UnmappedValue"] = "unmapped_value";
})(Internal || (exports.Internal = Internal = {}));
/**
 * The status of the job postings.
 */
var JobPostingSchemasStatusValue;
(function (JobPostingSchemasStatusValue) {
    JobPostingSchemasStatusValue["Live"] = "live";
    JobPostingSchemasStatusValue["Draft"] = "draft";
    JobPostingSchemasStatusValue["Pending"] = "pending";
    JobPostingSchemasStatusValue["Internal"] = "internal";
    JobPostingSchemasStatusValue["Rejected"] = "rejected";
    JobPostingSchemasStatusValue["Closed"] = "closed";
    JobPostingSchemasStatusValue["Archived"] = "archived";
    JobPostingSchemasStatusValue["UnmappedValue"] = "unmapped_value";
})(JobPostingSchemasStatusValue || (exports.JobPostingSchemasStatusValue = JobPostingSchemasStatusValue = {}));
/** @internal */
exports.JobPostingContent$inboundSchema = z.object({
    html: z.nullable(z.string()).optional(),
    plain: z.nullable(z.string()).optional(),
    sections: z.nullable(z.array(jobpostingcontentsection_js_1.JobPostingContentSection$inboundSchema))
        .optional(),
});
/** @internal */
exports.JobPostingContent$outboundSchema = z.object({
    html: z.nullable(z.string()).optional(),
    plain: z.nullable(z.string()).optional(),
    sections: z.nullable(z.array(jobpostingcontentsection_js_1.JobPostingContentSection$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JobPostingContent$;
(function (JobPostingContent$) {
    /** @deprecated use `JobPostingContent$inboundSchema` instead. */
    JobPostingContent$.inboundSchema = exports.JobPostingContent$inboundSchema;
    /** @deprecated use `JobPostingContent$outboundSchema` instead. */
    JobPostingContent$.outboundSchema = exports.JobPostingContent$outboundSchema;
})(JobPostingContent$ || (exports.JobPostingContent$ = JobPostingContent$ = {}));
function jobPostingContentToJSON(jobPostingContent) {
    return JSON.stringify(exports.JobPostingContent$outboundSchema.parse(jobPostingContent));
}
exports.jobPostingContentToJSON = jobPostingContentToJSON;
function jobPostingContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingContent' from JSON`);
}
exports.jobPostingContentFromJSON = jobPostingContentFromJSON;
/** @internal */
exports.JobPosting4$inboundSchema = z.object({});
/** @internal */
exports.JobPosting4$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 JobPosting4$;
(function (JobPosting4$) {
    /** @deprecated use `JobPosting4$inboundSchema` instead. */
    JobPosting4$.inboundSchema = exports.JobPosting4$inboundSchema;
    /** @deprecated use `JobPosting4$outboundSchema` instead. */
    JobPosting4$.outboundSchema = exports.JobPosting4$outboundSchema;
})(JobPosting4$ || (exports.JobPosting4$ = JobPosting4$ = {}));
function jobPosting4ToJSON(jobPosting4) {
    return JSON.stringify(exports.JobPosting4$outboundSchema.parse(jobPosting4));
}
exports.jobPosting4ToJSON = jobPosting4ToJSON;
function jobPosting4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPosting4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPosting4' from JSON`);
}
exports.jobPosting4FromJSON = jobPosting4FromJSON;
/** @internal */
exports.JobPostingSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.JobPosting4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.JobPostingSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.JobPosting4$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 JobPostingSourceValue$;
(function (JobPostingSourceValue$) {
    /** @deprecated use `JobPostingSourceValue$inboundSchema` instead. */
    JobPostingSourceValue$.inboundSchema = exports.JobPostingSourceValue$inboundSchema;
    /** @deprecated use `JobPostingSourceValue$outboundSchema` instead. */
    JobPostingSourceValue$.outboundSchema = exports.JobPostingSourceValue$outboundSchema;
})(JobPostingSourceValue$ || (exports.JobPostingSourceValue$ = JobPostingSourceValue$ = {}));
function jobPostingSourceValueToJSON(jobPostingSourceValue) {
    return JSON.stringify(exports.JobPostingSourceValue$outboundSchema.parse(jobPostingSourceValue));
}
exports.jobPostingSourceValueToJSON = jobPostingSourceValueToJSON;
function jobPostingSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSourceValue' from JSON`);
}
exports.jobPostingSourceValueFromJSON = jobPostingSourceValueFromJSON;
/** @internal */
exports.JobPostingValue$inboundSchema = z
    .union([
    z.nativeEnum(JobPostingValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.JobPostingValue$outboundSchema = z.union([
    z.nativeEnum(JobPostingValue),
    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 JobPostingValue$;
(function (JobPostingValue$) {
    /** @deprecated use `JobPostingValue$inboundSchema` instead. */
    JobPostingValue$.inboundSchema = exports.JobPostingValue$inboundSchema;
    /** @deprecated use `JobPostingValue$outboundSchema` instead. */
    JobPostingValue$.outboundSchema = exports.JobPostingValue$outboundSchema;
})(JobPostingValue$ || (exports.JobPostingValue$ = JobPostingValue$ = {}));
/** @internal */
exports.JobPostingEmploymentContractType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.JobPosting4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JobPostingEmploymentContractType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.JobPosting4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingValue$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 JobPostingEmploymentContractType$;
(function (JobPostingEmploymentContractType$) {
    /** @deprecated use `JobPostingEmploymentContractType$inboundSchema` instead. */
    JobPostingEmploymentContractType$.inboundSchema = exports.JobPostingEmploymentContractType$inboundSchema;
    /** @deprecated use `JobPostingEmploymentContractType$outboundSchema` instead. */
    JobPostingEmploymentContractType$.outboundSchema = exports.JobPostingEmploymentContractType$outboundSchema;
})(JobPostingEmploymentContractType$ || (exports.JobPostingEmploymentContractType$ = JobPostingEmploymentContractType$ = {}));
function jobPostingEmploymentContractTypeToJSON(jobPostingEmploymentContractType) {
    return JSON.stringify(exports.JobPostingEmploymentContractType$outboundSchema.parse(jobPostingEmploymentContractType));
}
exports.jobPostingEmploymentContractTypeToJSON = jobPostingEmploymentContractTypeToJSON;
function jobPostingEmploymentContractTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingEmploymentContractType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingEmploymentContractType' from JSON`);
}
exports.jobPostingEmploymentContractTypeFromJSON = jobPostingEmploymentContractTypeFromJSON;
/** @internal */
exports.JobPostingSchemas4$inboundSchema = z.object({});
/** @internal */
exports.JobPostingSchemas4$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 JobPostingSchemas4$;
(function (JobPostingSchemas4$) {
    /** @deprecated use `JobPostingSchemas4$inboundSchema` instead. */
    JobPostingSchemas4$.inboundSchema = exports.JobPostingSchemas4$inboundSchema;
    /** @deprecated use `JobPostingSchemas4$outboundSchema` instead. */
    JobPostingSchemas4$.outboundSchema = exports.JobPostingSchemas4$outboundSchema;
})(JobPostingSchemas4$ || (exports.JobPostingSchemas4$ = JobPostingSchemas4$ = {}));
function jobPostingSchemas4ToJSON(jobPostingSchemas4) {
    return JSON.stringify(exports.JobPostingSchemas4$outboundSchema.parse(jobPostingSchemas4));
}
exports.jobPostingSchemas4ToJSON = jobPostingSchemas4ToJSON;
function jobPostingSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemas4' from JSON`);
}
exports.jobPostingSchemas4FromJSON = jobPostingSchemas4FromJSON;
/** @internal */
exports.JobPostingSchemasSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.JobPostingSchemas4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.JobPostingSchemasSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.JobPostingSchemas4$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 JobPostingSchemasSourceValue$;
(function (JobPostingSchemasSourceValue$) {
    /** @deprecated use `JobPostingSchemasSourceValue$inboundSchema` instead. */
    JobPostingSchemasSourceValue$.inboundSchema = exports.JobPostingSchemasSourceValue$inboundSchema;
    /** @deprecated use `JobPostingSchemasSourceValue$outboundSchema` instead. */
    JobPostingSchemasSourceValue$.outboundSchema = exports.JobPostingSchemasSourceValue$outboundSchema;
})(JobPostingSchemasSourceValue$ || (exports.JobPostingSchemasSourceValue$ = JobPostingSchemasSourceValue$ = {}));
function jobPostingSchemasSourceValueToJSON(jobPostingSchemasSourceValue) {
    return JSON.stringify(exports.JobPostingSchemasSourceValue$outboundSchema.parse(jobPostingSchemasSourceValue));
}
exports.jobPostingSchemasSourceValueToJSON = jobPostingSchemasSourceValueToJSON;
function jobPostingSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasSourceValue' from JSON`);
}
exports.jobPostingSchemasSourceValueFromJSON = jobPostingSchemasSourceValueFromJSON;
/** @internal */
exports.JobPostingSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(JobPostingSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.JobPostingSchemasValue$outboundSchema = z.union([
    z.nativeEnum(JobPostingSchemasValue),
    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 JobPostingSchemasValue$;
(function (JobPostingSchemasValue$) {
    /** @deprecated use `JobPostingSchemasValue$inboundSchema` instead. */
    JobPostingSchemasValue$.inboundSchema = exports.JobPostingSchemasValue$inboundSchema;
    /** @deprecated use `JobPostingSchemasValue$outboundSchema` instead. */
    JobPostingSchemasValue$.outboundSchema = exports.JobPostingSchemasValue$outboundSchema;
})(JobPostingSchemasValue$ || (exports.JobPostingSchemasValue$ = JobPostingSchemasValue$ = {}));
/** @internal */
exports.JobPostingEmploymentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.JobPostingSchemas4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JobPostingEmploymentType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.JobPostingSchemas4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasValue$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 JobPostingEmploymentType$;
(function (JobPostingEmploymentType$) {
    /** @deprecated use `JobPostingEmploymentType$inboundSchema` instead. */
    JobPostingEmploymentType$.inboundSchema = exports.JobPostingEmploymentType$inboundSchema;
    /** @deprecated use `JobPostingEmploymentType$outboundSchema` instead. */
    JobPostingEmploymentType$.outboundSchema = exports.JobPostingEmploymentType$outboundSchema;
})(JobPostingEmploymentType$ || (exports.JobPostingEmploymentType$ = JobPostingEmploymentType$ = {}));
function jobPostingEmploymentTypeToJSON(jobPostingEmploymentType) {
    return JSON.stringify(exports.JobPostingEmploymentType$outboundSchema.parse(jobPostingEmploymentType));
}
exports.jobPostingEmploymentTypeToJSON = jobPostingEmploymentTypeToJSON;
function jobPostingEmploymentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingEmploymentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingEmploymentType' from JSON`);
}
exports.jobPostingEmploymentTypeFromJSON = jobPostingEmploymentTypeFromJSON;
/** @internal */
exports.Internal$inboundSchema = z
    .union([
    z.nativeEnum(Internal),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.Internal$outboundSchema = z.union([
    z.nativeEnum(Internal),
    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 Internal$;
(function (Internal$) {
    /** @deprecated use `Internal$inboundSchema` instead. */
    Internal$.inboundSchema = exports.Internal$inboundSchema;
    /** @deprecated use `Internal$outboundSchema` instead. */
    Internal$.outboundSchema = exports.Internal$outboundSchema;
})(Internal$ || (exports.Internal$ = Internal$ = {}));
/** @internal */
exports.JobPostingSchemasStatus4$inboundSchema = z.object({});
/** @internal */
exports.JobPostingSchemasStatus4$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 JobPostingSchemasStatus4$;
(function (JobPostingSchemasStatus4$) {
    /** @deprecated use `JobPostingSchemasStatus4$inboundSchema` instead. */
    JobPostingSchemasStatus4$.inboundSchema = exports.JobPostingSchemasStatus4$inboundSchema;
    /** @deprecated use `JobPostingSchemasStatus4$outboundSchema` instead. */
    JobPostingSchemasStatus4$.outboundSchema = exports.JobPostingSchemasStatus4$outboundSchema;
})(JobPostingSchemasStatus4$ || (exports.JobPostingSchemasStatus4$ = JobPostingSchemasStatus4$ = {}));
function jobPostingSchemasStatus4ToJSON(jobPostingSchemasStatus4) {
    return JSON.stringify(exports.JobPostingSchemasStatus4$outboundSchema.parse(jobPostingSchemasStatus4));
}
exports.jobPostingSchemasStatus4ToJSON = jobPostingSchemasStatus4ToJSON;
function jobPostingSchemasStatus4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasStatus4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasStatus4' from JSON`);
}
exports.jobPostingSchemasStatus4FromJSON = jobPostingSchemasStatus4FromJSON;
/** @internal */
exports.JobPostingSchemasStatusSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.JobPostingSchemasStatus4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.JobPostingSchemasStatusSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.JobPostingSchemasStatus4$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 JobPostingSchemasStatusSourceValue$;
(function (JobPostingSchemasStatusSourceValue$) {
    /** @deprecated use `JobPostingSchemasStatusSourceValue$inboundSchema` instead. */
    JobPostingSchemasStatusSourceValue$.inboundSchema = exports.JobPostingSchemasStatusSourceValue$inboundSchema;
    /** @deprecated use `JobPostingSchemasStatusSourceValue$outboundSchema` instead. */
    JobPostingSchemasStatusSourceValue$.outboundSchema = exports.JobPostingSchemasStatusSourceValue$outboundSchema;
})(JobPostingSchemasStatusSourceValue$ || (exports.JobPostingSchemasStatusSourceValue$ = JobPostingSchemasStatusSourceValue$ = {}));
function jobPostingSchemasStatusSourceValueToJSON(jobPostingSchemasStatusSourceValue) {
    return JSON.stringify(exports.JobPostingSchemasStatusSourceValue$outboundSchema.parse(jobPostingSchemasStatusSourceValue));
}
exports.jobPostingSchemasStatusSourceValueToJSON = jobPostingSchemasStatusSourceValueToJSON;
function jobPostingSchemasStatusSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasStatusSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasStatusSourceValue' from JSON`);
}
exports.jobPostingSchemasStatusSourceValueFromJSON = jobPostingSchemasStatusSourceValueFromJSON;
/** @internal */
exports.JobPostingSchemasStatusValue$inboundSchema = z
    .union([
    z.nativeEnum(JobPostingSchemasStatusValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.JobPostingSchemasStatusValue$outboundSchema = z.union([
    z.nativeEnum(JobPostingSchemasStatusValue),
    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 JobPostingSchemasStatusValue$;
(function (JobPostingSchemasStatusValue$) {
    /** @deprecated use `JobPostingSchemasStatusValue$inboundSchema` instead. */
    JobPostingSchemasStatusValue$.inboundSchema = exports.JobPostingSchemasStatusValue$inboundSchema;
    /** @deprecated use `JobPostingSchemasStatusValue$outboundSchema` instead. */
    JobPostingSchemasStatusValue$.outboundSchema = exports.JobPostingSchemasStatusValue$outboundSchema;
})(JobPostingSchemasStatusValue$ || (exports.JobPostingSchemasStatusValue$ = JobPostingSchemasStatusValue$ = {}));
/** @internal */
exports.JobPostingStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.JobPostingSchemasStatus4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasStatusValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JobPostingStatus$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.JobPostingSchemasStatus4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasStatusValue$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 JobPostingStatus$;
(function (JobPostingStatus$) {
    /** @deprecated use `JobPostingStatus$inboundSchema` instead. */
    JobPostingStatus$.inboundSchema = exports.JobPostingStatus$inboundSchema;
    /** @deprecated use `JobPostingStatus$outboundSchema` instead. */
    JobPostingStatus$.outboundSchema = exports.JobPostingStatus$outboundSchema;
})(JobPostingStatus$ || (exports.JobPostingStatus$ = JobPostingStatus$ = {}));
function jobPostingStatusToJSON(jobPostingStatus) {
    return JSON.stringify(exports.JobPostingStatus$outboundSchema.parse(jobPostingStatus));
}
exports.jobPostingStatusToJSON = jobPostingStatusToJSON;
function jobPostingStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingStatus' from JSON`);
}
exports.jobPostingStatusFromJSON = jobPostingStatusFromJSON;
/** @internal */
exports.JobPosting$inboundSchema = z.object({
    compensation: z.nullable(z.array(jobpostingcompensation_js_1.JobPostingCompensation$inboundSchema))
        .optional(),
    content: z.nullable(z.lazy(() => exports.JobPostingContent$inboundSchema)).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    employment_contract_type: z.nullable(z.lazy(() => exports.JobPostingEmploymentContractType$inboundSchema)).optional(),
    employment_type: z.nullable(z.lazy(() => exports.JobPostingEmploymentType$inboundSchema)).optional(),
    external_apply_url: z.nullable(z.string()).optional(),
    external_url: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(exports.Internal$inboundSchema).optional(),
    job_id: z.nullable(z.string()).optional(),
    locations: z.nullable(z.array(jobpostinglocation_js_1.JobPostingLocation$inboundSchema)).optional(),
    questionnaires: z.nullable(z.array(jobpostingquestionnaire_js_1.JobPostingQuestionnaire$inboundSchema))
        .optional(),
    remote_id: z.nullable(z.string()).optional(),
    remote_job_posting_id: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.JobPostingStatus$inboundSchema)).optional(),
    title: 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",
        "employment_contract_type": "employmentContractType",
        "employment_type": "employmentType",
        "external_apply_url": "externalApplyUrl",
        "external_url": "externalUrl",
        "job_id": "jobId",
        "remote_id": "remoteId",
        "remote_job_posting_id": "remoteJobPostingId",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.JobPosting$outboundSchema = z.object({
    compensation: z.nullable(z.array(jobpostingcompensation_js_1.JobPostingCompensation$outboundSchema))
        .optional(),
    content: z.nullable(z.lazy(() => exports.JobPostingContent$outboundSchema))
        .optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    employmentContractType: z.nullable(z.lazy(() => exports.JobPostingEmploymentContractType$outboundSchema)).optional(),
    employmentType: z.nullable(z.lazy(() => exports.JobPostingEmploymentType$outboundSchema)).optional(),
    externalApplyUrl: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    internal: z.nullable(exports.Internal$outboundSchema).optional(),
    jobId: z.nullable(z.string()).optional(),
    locations: z.nullable(z.array(jobpostinglocation_js_1.JobPostingLocation$outboundSchema)).optional(),
    questionnaires: z.nullable(z.array(jobpostingquestionnaire_js_1.JobPostingQuestionnaire$outboundSchema))
        .optional(),
    remoteId: z.nullable(z.string()).optional(),
    remoteJobPostingId: z.nullable(z.string()).optional(),
    status: z.nullable(z.lazy(() => exports.JobPostingStatus$outboundSchema)).optional(),
    title: 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",
        employmentContractType: "employment_contract_type",
        employmentType: "employment_type",
        externalApplyUrl: "external_apply_url",
        externalUrl: "external_url",
        jobId: "job_id",
        remoteId: "remote_id",
        remoteJobPostingId: "remote_job_posting_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 JobPosting$;
(function (JobPosting$) {
    /** @deprecated use `JobPosting$inboundSchema` instead. */
    JobPosting$.inboundSchema = exports.JobPosting$inboundSchema;
    /** @deprecated use `JobPosting$outboundSchema` instead. */
    JobPosting$.outboundSchema = exports.JobPosting$outboundSchema;
})(JobPosting$ || (exports.JobPosting$ = JobPosting$ = {}));
function jobPostingToJSON(jobPosting) {
    return JSON.stringify(exports.JobPosting$outboundSchema.parse(jobPosting));
}
exports.jobPostingToJSON = jobPostingToJSON;
function jobPostingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPosting$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPosting' from JSON`);
}
exports.jobPostingFromJSON = jobPostingFromJSON;
//# sourceMappingURL=jobposting.js.map