"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.JobPosting$inboundSchema = exports.JobPostingStatus$inboundSchema = exports.JobPostingSchemasStatusValue$inboundSchema = exports.JobPostingSchemasStatusSourceValue$inboundSchema = exports.JobPostingSchemasStatus4$inboundSchema = exports.Internal$inboundSchema = exports.JobPostingEmploymentType$inboundSchema = exports.JobPostingSchemasValue$inboundSchema = exports.JobPostingSchemasSourceValue$inboundSchema = exports.JobPostingSchemas4$inboundSchema = exports.JobPostingEmploymentContractType$inboundSchema = exports.JobPostingValue$inboundSchema = exports.JobPostingSourceValue$inboundSchema = exports.JobPosting4$inboundSchema = exports.JobPostingContent$inboundSchema = exports.JobPostingSchemasStatusValue = exports.Internal = exports.JobPostingSchemasValue = exports.JobPostingValue = void 0;
exports.jobPostingContentFromJSON = jobPostingContentFromJSON;
exports.jobPosting4FromJSON = jobPosting4FromJSON;
exports.jobPostingSourceValueFromJSON = jobPostingSourceValueFromJSON;
exports.jobPostingEmploymentContractTypeFromJSON = jobPostingEmploymentContractTypeFromJSON;
exports.jobPostingSchemas4FromJSON = jobPostingSchemas4FromJSON;
exports.jobPostingSchemasSourceValueFromJSON = jobPostingSchemasSourceValueFromJSON;
exports.jobPostingEmploymentTypeFromJSON = jobPostingEmploymentTypeFromJSON;
exports.jobPostingSchemasStatus4FromJSON = jobPostingSchemasStatus4FromJSON;
exports.jobPostingSchemasStatusSourceValueFromJSON = jobPostingSchemasStatusSourceValueFromJSON;
exports.jobPostingStatusFromJSON = jobPostingStatusFromJSON;
exports.jobPostingFromJSON = jobPostingFromJSON;
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 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(),
});
function jobPostingContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingContent' from JSON`);
}
/** @internal */
exports.JobPosting4$inboundSchema = z.object({});
function jobPosting4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPosting4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPosting4' from JSON`);
}
/** @internal */
exports.JobPostingSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JobPosting4$inboundSchema),
    z.array(z.any()),
]);
function jobPostingSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSourceValue' from JSON`);
}
/** @internal */
exports.JobPostingValue$inboundSchema = openEnums.inboundSchema(JobPostingValue);
/** @internal */
exports.JobPostingEmploymentContractType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JobPosting4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function jobPostingEmploymentContractTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingEmploymentContractType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingEmploymentContractType' from JSON`);
}
/** @internal */
exports.JobPostingSchemas4$inboundSchema = z.object({});
function jobPostingSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemas4' from JSON`);
}
/** @internal */
exports.JobPostingSchemasSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JobPostingSchemas4$inboundSchema),
    z.array(z.any()),
]);
function jobPostingSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasSourceValue' from JSON`);
}
/** @internal */
exports.JobPostingSchemasValue$inboundSchema = openEnums.inboundSchema(JobPostingSchemasValue);
/** @internal */
exports.JobPostingEmploymentType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JobPostingSchemas4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function jobPostingEmploymentTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingEmploymentType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingEmploymentType' from JSON`);
}
/** @internal */
exports.Internal$inboundSchema = openEnums.inboundSchema(Internal);
/** @internal */
exports.JobPostingSchemasStatus4$inboundSchema = z.object({});
function jobPostingSchemasStatus4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasStatus4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasStatus4' from JSON`);
}
/** @internal */
exports.JobPostingSchemasStatusSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JobPostingSchemasStatus4$inboundSchema),
    z.array(z.any()),
]);
function jobPostingSchemasStatusSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingSchemasStatusSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingSchemasStatusSourceValue' from JSON`);
}
/** @internal */
exports.JobPostingSchemasStatusValue$inboundSchema = openEnums.inboundSchema(JobPostingSchemasStatusValue);
/** @internal */
exports.JobPostingStatus$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JobPostingSchemasStatus4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JobPostingSchemasStatusValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function jobPostingStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPostingStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPostingStatus' from JSON`);
}
/** @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(),
    start_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).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",
        "start_date": "startDate",
        "unified_custom_fields": "unifiedCustomFields",
        "updated_at": "updatedAt",
    });
});
function jobPostingFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JobPosting$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JobPosting' from JSON`);
}
//# sourceMappingURL=jobposting.js.map