/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { ConversationsFilterAND$inboundSchema, ConversationsFilterAND$outboundSchema, } from "./conversationsfilterand.js";
import { ConversationsFilterCondition$inboundSchema, ConversationsFilterCondition$outboundSchema, } from "./conversationsfiltercondition.js";
import { ConversationsFilterOR$inboundSchema, ConversationsFilterOR$outboundSchema, } from "./conversationsfilteror.js";
import { EventsFilterAND$inboundSchema, EventsFilterAND$outboundSchema, } from "./eventsfilterand.js";
import { EventsFilterCondition$inboundSchema, EventsFilterCondition$outboundSchema, } from "./eventsfiltercondition.js";
import { EventsFilterOR$inboundSchema, EventsFilterOR$outboundSchema, } from "./eventsfilteror.js";
import { FeedbackFilterAND$inboundSchema, FeedbackFilterAND$outboundSchema, } from "./feedbackfilterand.js";
import { FeedbackFilterCondition$inboundSchema, FeedbackFilterCondition$outboundSchema, } from "./feedbackfiltercondition.js";
import { FeedbackFilterOR$inboundSchema, FeedbackFilterOR$outboundSchema, } from "./feedbackfilteror.js";
import { SemanticThreadFilterAND$inboundSchema, SemanticThreadFilterAND$outboundSchema, } from "./semanticthreadfilterand.js";
import { SemanticThreadFilterCondition$inboundSchema, SemanticThreadFilterCondition$outboundSchema, } from "./semanticthreadfiltercondition.js";
import { SemanticThreadFilterOR$inboundSchema, SemanticThreadFilterOR$outboundSchema, } from "./semanticthreadfilteror.js";
export const PropertyKeysRequestBodyField = {
    Properties: "properties",
    UserProperties: "userProperties",
};
export const Views = {
    EventsView: "events_view",
    ConversationsView: "conversations_view",
    SemanticThreadsView: "semantic_threads_view",
    FeedbackView: "feedback_view",
};
/** @internal */
export const PropertyKeysRequestBodyField$inboundSchema = z.nativeEnum(PropertyKeysRequestBodyField);
/** @internal */
export const PropertyKeysRequestBodyField$outboundSchema = PropertyKeysRequestBodyField$inboundSchema;
/** @internal */
export const Views$inboundSchema = z.nativeEnum(Views);
/** @internal */
export const Views$outboundSchema = Views$inboundSchema;
/** @internal */
export const Where$inboundSchema = z
    .union([
    EventsFilterCondition$inboundSchema,
    EventsFilterAND$inboundSchema,
    EventsFilterOR$inboundSchema,
    ConversationsFilterCondition$inboundSchema,
    ConversationsFilterAND$inboundSchema,
    ConversationsFilterOR$inboundSchema,
    SemanticThreadFilterCondition$inboundSchema,
    SemanticThreadFilterAND$inboundSchema,
    SemanticThreadFilterOR$inboundSchema,
    FeedbackFilterCondition$inboundSchema,
    FeedbackFilterAND$inboundSchema,
    FeedbackFilterOR$inboundSchema,
]);
/** @internal */
export const Where$outboundSchema = z.union([
    EventsFilterCondition$outboundSchema,
    EventsFilterAND$outboundSchema,
    EventsFilterOR$outboundSchema,
    ConversationsFilterCondition$outboundSchema,
    ConversationsFilterAND$outboundSchema,
    ConversationsFilterOR$outboundSchema,
    SemanticThreadFilterCondition$outboundSchema,
    SemanticThreadFilterAND$outboundSchema,
    SemanticThreadFilterOR$outboundSchema,
    FeedbackFilterCondition$outboundSchema,
    FeedbackFilterAND$outboundSchema,
    FeedbackFilterOR$outboundSchema,
]);
export function whereToJSON(where) {
    return JSON.stringify(Where$outboundSchema.parse(where));
}
export function whereFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Where$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Where' from JSON`);
}
/** @internal */
export const PropertyKeysRequestBody$inboundSchema = z.object({
    field: PropertyKeysRequestBodyField$inboundSchema,
    views: z.array(Views$inboundSchema).optional(),
    where: z.union([
        EventsFilterCondition$inboundSchema,
        EventsFilterAND$inboundSchema,
        EventsFilterOR$inboundSchema,
        ConversationsFilterCondition$inboundSchema,
        ConversationsFilterAND$inboundSchema,
        ConversationsFilterOR$inboundSchema,
        SemanticThreadFilterCondition$inboundSchema,
        SemanticThreadFilterAND$inboundSchema,
        SemanticThreadFilterOR$inboundSchema,
        FeedbackFilterCondition$inboundSchema,
        FeedbackFilterAND$inboundSchema,
        FeedbackFilterOR$inboundSchema,
    ]).optional(),
});
/** @internal */
export const PropertyKeysRequestBody$outboundSchema = z.object({
    field: PropertyKeysRequestBodyField$outboundSchema,
    views: z.array(Views$outboundSchema).optional(),
    where: z.union([
        EventsFilterCondition$outboundSchema,
        EventsFilterAND$outboundSchema,
        EventsFilterOR$outboundSchema,
        ConversationsFilterCondition$outboundSchema,
        ConversationsFilterAND$outboundSchema,
        ConversationsFilterOR$outboundSchema,
        SemanticThreadFilterCondition$outboundSchema,
        SemanticThreadFilterAND$outboundSchema,
        SemanticThreadFilterOR$outboundSchema,
        FeedbackFilterCondition$outboundSchema,
        FeedbackFilterAND$outboundSchema,
        FeedbackFilterOR$outboundSchema,
    ]).optional(),
});
export function propertyKeysRequestBodyToJSON(propertyKeysRequestBody) {
    return JSON.stringify(PropertyKeysRequestBody$outboundSchema.parse(propertyKeysRequestBody));
}
export function propertyKeysRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PropertyKeysRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PropertyKeysRequestBody' from JSON`);
}
//# sourceMappingURL=propertykeysrequestbody.js.map