"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.PropertyKeysRequestBody$outboundSchema = exports.PropertyKeysRequestBody$inboundSchema = exports.Where$outboundSchema = exports.Where$inboundSchema = exports.Views$outboundSchema = exports.Views$inboundSchema = exports.PropertyKeysRequestBodyField$outboundSchema = exports.PropertyKeysRequestBodyField$inboundSchema = exports.Views = exports.PropertyKeysRequestBodyField = void 0;
exports.whereToJSON = whereToJSON;
exports.whereFromJSON = whereFromJSON;
exports.propertyKeysRequestBodyToJSON = propertyKeysRequestBodyToJSON;
exports.propertyKeysRequestBodyFromJSON = propertyKeysRequestBodyFromJSON;
const z = __importStar(require("zod/v3"));
const schemas_js_1 = require("../../lib/schemas.js");
const conversationsfilterand_js_1 = require("./conversationsfilterand.js");
const conversationsfiltercondition_js_1 = require("./conversationsfiltercondition.js");
const conversationsfilteror_js_1 = require("./conversationsfilteror.js");
const eventsfilterand_js_1 = require("./eventsfilterand.js");
const eventsfiltercondition_js_1 = require("./eventsfiltercondition.js");
const eventsfilteror_js_1 = require("./eventsfilteror.js");
const feedbackfilterand_js_1 = require("./feedbackfilterand.js");
const feedbackfiltercondition_js_1 = require("./feedbackfiltercondition.js");
const feedbackfilteror_js_1 = require("./feedbackfilteror.js");
const semanticthreadfilterand_js_1 = require("./semanticthreadfilterand.js");
const semanticthreadfiltercondition_js_1 = require("./semanticthreadfiltercondition.js");
const semanticthreadfilteror_js_1 = require("./semanticthreadfilteror.js");
exports.PropertyKeysRequestBodyField = {
    Properties: "properties",
    UserProperties: "userProperties",
};
exports.Views = {
    EventsView: "events_view",
    ConversationsView: "conversations_view",
    SemanticThreadsView: "semantic_threads_view",
    FeedbackView: "feedback_view",
};
/** @internal */
exports.PropertyKeysRequestBodyField$inboundSchema = z.nativeEnum(exports.PropertyKeysRequestBodyField);
/** @internal */
exports.PropertyKeysRequestBodyField$outboundSchema = exports.PropertyKeysRequestBodyField$inboundSchema;
/** @internal */
exports.Views$inboundSchema = z.nativeEnum(exports.Views);
/** @internal */
exports.Views$outboundSchema = exports.Views$inboundSchema;
/** @internal */
exports.Where$inboundSchema = z
    .union([
    eventsfiltercondition_js_1.EventsFilterCondition$inboundSchema,
    eventsfilterand_js_1.EventsFilterAND$inboundSchema,
    eventsfilteror_js_1.EventsFilterOR$inboundSchema,
    conversationsfiltercondition_js_1.ConversationsFilterCondition$inboundSchema,
    conversationsfilterand_js_1.ConversationsFilterAND$inboundSchema,
    conversationsfilteror_js_1.ConversationsFilterOR$inboundSchema,
    semanticthreadfiltercondition_js_1.SemanticThreadFilterCondition$inboundSchema,
    semanticthreadfilterand_js_1.SemanticThreadFilterAND$inboundSchema,
    semanticthreadfilteror_js_1.SemanticThreadFilterOR$inboundSchema,
    feedbackfiltercondition_js_1.FeedbackFilterCondition$inboundSchema,
    feedbackfilterand_js_1.FeedbackFilterAND$inboundSchema,
    feedbackfilteror_js_1.FeedbackFilterOR$inboundSchema,
]);
/** @internal */
exports.Where$outboundSchema = z.union([
    eventsfiltercondition_js_1.EventsFilterCondition$outboundSchema,
    eventsfilterand_js_1.EventsFilterAND$outboundSchema,
    eventsfilteror_js_1.EventsFilterOR$outboundSchema,
    conversationsfiltercondition_js_1.ConversationsFilterCondition$outboundSchema,
    conversationsfilterand_js_1.ConversationsFilterAND$outboundSchema,
    conversationsfilteror_js_1.ConversationsFilterOR$outboundSchema,
    semanticthreadfiltercondition_js_1.SemanticThreadFilterCondition$outboundSchema,
    semanticthreadfilterand_js_1.SemanticThreadFilterAND$outboundSchema,
    semanticthreadfilteror_js_1.SemanticThreadFilterOR$outboundSchema,
    feedbackfiltercondition_js_1.FeedbackFilterCondition$outboundSchema,
    feedbackfilterand_js_1.FeedbackFilterAND$outboundSchema,
    feedbackfilteror_js_1.FeedbackFilterOR$outboundSchema,
]);
function whereToJSON(where) {
    return JSON.stringify(exports.Where$outboundSchema.parse(where));
}
function whereFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Where$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Where' from JSON`);
}
/** @internal */
exports.PropertyKeysRequestBody$inboundSchema = z.object({
    field: exports.PropertyKeysRequestBodyField$inboundSchema,
    views: z.array(exports.Views$inboundSchema).optional(),
    where: z.union([
        eventsfiltercondition_js_1.EventsFilterCondition$inboundSchema,
        eventsfilterand_js_1.EventsFilterAND$inboundSchema,
        eventsfilteror_js_1.EventsFilterOR$inboundSchema,
        conversationsfiltercondition_js_1.ConversationsFilterCondition$inboundSchema,
        conversationsfilterand_js_1.ConversationsFilterAND$inboundSchema,
        conversationsfilteror_js_1.ConversationsFilterOR$inboundSchema,
        semanticthreadfiltercondition_js_1.SemanticThreadFilterCondition$inboundSchema,
        semanticthreadfilterand_js_1.SemanticThreadFilterAND$inboundSchema,
        semanticthreadfilteror_js_1.SemanticThreadFilterOR$inboundSchema,
        feedbackfiltercondition_js_1.FeedbackFilterCondition$inboundSchema,
        feedbackfilterand_js_1.FeedbackFilterAND$inboundSchema,
        feedbackfilteror_js_1.FeedbackFilterOR$inboundSchema,
    ]).optional(),
});
/** @internal */
exports.PropertyKeysRequestBody$outboundSchema = z.object({
    field: exports.PropertyKeysRequestBodyField$outboundSchema,
    views: z.array(exports.Views$outboundSchema).optional(),
    where: z.union([
        eventsfiltercondition_js_1.EventsFilterCondition$outboundSchema,
        eventsfilterand_js_1.EventsFilterAND$outboundSchema,
        eventsfilteror_js_1.EventsFilterOR$outboundSchema,
        conversationsfiltercondition_js_1.ConversationsFilterCondition$outboundSchema,
        conversationsfilterand_js_1.ConversationsFilterAND$outboundSchema,
        conversationsfilteror_js_1.ConversationsFilterOR$outboundSchema,
        semanticthreadfiltercondition_js_1.SemanticThreadFilterCondition$outboundSchema,
        semanticthreadfilterand_js_1.SemanticThreadFilterAND$outboundSchema,
        semanticthreadfilteror_js_1.SemanticThreadFilterOR$outboundSchema,
        feedbackfiltercondition_js_1.FeedbackFilterCondition$outboundSchema,
        feedbackfilterand_js_1.FeedbackFilterAND$outboundSchema,
        feedbackfilteror_js_1.FeedbackFilterOR$outboundSchema,
    ]).optional(),
});
function propertyKeysRequestBodyToJSON(propertyKeysRequestBody) {
    return JSON.stringify(exports.PropertyKeysRequestBody$outboundSchema.parse(propertyKeysRequestBody));
}
function propertyKeysRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PropertyKeysRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PropertyKeysRequestBody' from JSON`);
}
//# sourceMappingURL=propertykeysrequestbody.js.map