"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.AtsListApplicationChangesResponse$ = exports.AtsListApplicationChangesResponse$outboundSchema = exports.AtsListApplicationChangesResponse$inboundSchema = exports.AtsListApplicationChangesRequest$ = exports.AtsListApplicationChangesRequest$outboundSchema = exports.AtsListApplicationChangesRequest$inboundSchema = exports.AtsListApplicationChangesQueryParamFilter$ = exports.AtsListApplicationChangesQueryParamFilter$outboundSchema = exports.AtsListApplicationChangesQueryParamFilter$inboundSchema = exports.ChangeType$ = exports.ChangeType$outboundSchema = exports.ChangeType$inboundSchema = exports.ChangeType = void 0;
exports.atsListApplicationChangesQueryParamFilterToJSON = atsListApplicationChangesQueryParamFilterToJSON;
exports.atsListApplicationChangesQueryParamFilterFromJSON = atsListApplicationChangesQueryParamFilterFromJSON;
exports.atsListApplicationChangesRequestToJSON = atsListApplicationChangesRequestToJSON;
exports.atsListApplicationChangesRequestFromJSON = atsListApplicationChangesRequestFromJSON;
exports.atsListApplicationChangesResponseToJSON = atsListApplicationChangesResponseToJSON;
exports.atsListApplicationChangesResponseFromJSON = atsListApplicationChangesResponseFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
/**
 * Filter by the type of change that occurred to the application
 */
var ChangeType;
(function (ChangeType) {
    ChangeType["ApplicationStatus"] = "application_status";
    ChangeType["InterviewStage"] = "interview_stage";
    ChangeType["RejectedReasons"] = "rejected_reasons";
    ChangeType["UnmappedValue"] = "unmapped_value";
})(ChangeType || (exports.ChangeType = ChangeType = {}));
/** @internal */
exports.ChangeType$inboundSchema = z
    .nativeEnum(ChangeType);
/** @internal */
exports.ChangeType$outboundSchema = exports.ChangeType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ChangeType$;
(function (ChangeType$) {
    /** @deprecated use `ChangeType$inboundSchema` instead. */
    ChangeType$.inboundSchema = exports.ChangeType$inboundSchema;
    /** @deprecated use `ChangeType$outboundSchema` instead. */
    ChangeType$.outboundSchema = exports.ChangeType$outboundSchema;
})(ChangeType$ || (exports.ChangeType$ = ChangeType$ = {}));
/** @internal */
exports.AtsListApplicationChangesQueryParamFilter$inboundSchema = z.object({
    change_type: z.nullable(exports.ChangeType$inboundSchema).optional(),
    created_after: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "change_type": "changeType",
        "created_after": "createdAfter",
    });
});
/** @internal */
exports.AtsListApplicationChangesQueryParamFilter$outboundSchema = z.object({
    changeType: z.nullable(exports.ChangeType$outboundSchema).optional(),
    createdAfter: z.nullable(z.date().transform(v => v.toISOString()))
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        changeType: "change_type",
        createdAfter: "created_after",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListApplicationChangesQueryParamFilter$;
(function (AtsListApplicationChangesQueryParamFilter$) {
    /** @deprecated use `AtsListApplicationChangesQueryParamFilter$inboundSchema` instead. */
    AtsListApplicationChangesQueryParamFilter$.inboundSchema = exports.AtsListApplicationChangesQueryParamFilter$inboundSchema;
    /** @deprecated use `AtsListApplicationChangesQueryParamFilter$outboundSchema` instead. */
    AtsListApplicationChangesQueryParamFilter$.outboundSchema = exports.AtsListApplicationChangesQueryParamFilter$outboundSchema;
})(AtsListApplicationChangesQueryParamFilter$ || (exports.AtsListApplicationChangesQueryParamFilter$ = AtsListApplicationChangesQueryParamFilter$ = {}));
function atsListApplicationChangesQueryParamFilterToJSON(atsListApplicationChangesQueryParamFilter) {
    return JSON.stringify(exports.AtsListApplicationChangesQueryParamFilter$outboundSchema.parse(atsListApplicationChangesQueryParamFilter));
}
function atsListApplicationChangesQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListApplicationChangesQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListApplicationChangesQueryParamFilter' from JSON`);
}
/** @internal */
exports.AtsListApplicationChangesRequest$inboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.AtsListApplicationChangesQueryParamFilter$inboundSchema)).optional(),
    id: z.string(),
    next: z.nullable(z.string()).optional(),
    page_size: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    "x-account-id": z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "page_size": "pageSize",
        "x-account-id": "xAccountId",
    });
});
/** @internal */
exports.AtsListApplicationChangesRequest$outboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.AtsListApplicationChangesQueryParamFilter$outboundSchema)).optional(),
    id: z.string(),
    next: z.nullable(z.string()).optional(),
    pageSize: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    xAccountId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        pageSize: "page_size",
        xAccountId: "x-account-id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListApplicationChangesRequest$;
(function (AtsListApplicationChangesRequest$) {
    /** @deprecated use `AtsListApplicationChangesRequest$inboundSchema` instead. */
    AtsListApplicationChangesRequest$.inboundSchema = exports.AtsListApplicationChangesRequest$inboundSchema;
    /** @deprecated use `AtsListApplicationChangesRequest$outboundSchema` instead. */
    AtsListApplicationChangesRequest$.outboundSchema = exports.AtsListApplicationChangesRequest$outboundSchema;
})(AtsListApplicationChangesRequest$ || (exports.AtsListApplicationChangesRequest$ = AtsListApplicationChangesRequest$ = {}));
function atsListApplicationChangesRequestToJSON(atsListApplicationChangesRequest) {
    return JSON.stringify(exports.AtsListApplicationChangesRequest$outboundSchema.parse(atsListApplicationChangesRequest));
}
function atsListApplicationChangesRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListApplicationChangesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListApplicationChangesRequest' from JSON`);
}
/** @internal */
exports.AtsListApplicationChangesResponse$inboundSchema = z.object({
    ApplicationChangesPaginated: shared.ApplicationChangesPaginated$inboundSchema
        .optional(),
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())).default({}),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ApplicationChangesPaginated": "applicationChangesPaginated",
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
/** @internal */
exports.AtsListApplicationChangesResponse$outboundSchema = z.object({
    applicationChangesPaginated: shared.ApplicationChangesPaginated$outboundSchema
        .optional(),
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        applicationChangesPaginated: "ApplicationChangesPaginated",
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AtsListApplicationChangesResponse$;
(function (AtsListApplicationChangesResponse$) {
    /** @deprecated use `AtsListApplicationChangesResponse$inboundSchema` instead. */
    AtsListApplicationChangesResponse$.inboundSchema = exports.AtsListApplicationChangesResponse$inboundSchema;
    /** @deprecated use `AtsListApplicationChangesResponse$outboundSchema` instead. */
    AtsListApplicationChangesResponse$.outboundSchema = exports.AtsListApplicationChangesResponse$outboundSchema;
})(AtsListApplicationChangesResponse$ || (exports.AtsListApplicationChangesResponse$ = AtsListApplicationChangesResponse$ = {}));
function atsListApplicationChangesResponseToJSON(atsListApplicationChangesResponse) {
    return JSON.stringify(exports.AtsListApplicationChangesResponse$outboundSchema.parse(atsListApplicationChangesResponse));
}
function atsListApplicationChangesResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AtsListApplicationChangesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AtsListApplicationChangesResponse' from JSON`);
}
//# sourceMappingURL=atslistapplicationchanges.js.map