/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
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 { 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
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PropertyKeysRequestBodyField$;
(function (PropertyKeysRequestBodyField$) {
    /** @deprecated use `PropertyKeysRequestBodyField$inboundSchema` instead. */
    PropertyKeysRequestBodyField$.inboundSchema = PropertyKeysRequestBodyField$inboundSchema;
    /** @deprecated use `PropertyKeysRequestBodyField$outboundSchema` instead. */
    PropertyKeysRequestBodyField$.outboundSchema = PropertyKeysRequestBodyField$outboundSchema;
})(PropertyKeysRequestBodyField$ || (PropertyKeysRequestBodyField$ = {}));
/** @internal */
export const Views$inboundSchema = z.nativeEnum(Views);
/** @internal */
export const Views$outboundSchema = Views$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Views$;
(function (Views$) {
    /** @deprecated use `Views$inboundSchema` instead. */
    Views$.inboundSchema = Views$inboundSchema;
    /** @deprecated use `Views$outboundSchema` instead. */
    Views$.outboundSchema = Views$outboundSchema;
})(Views$ || (Views$ = {}));
/** @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,
]);
/** @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,
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Where$;
(function (Where$) {
    /** @deprecated use `Where$inboundSchema` instead. */
    Where$.inboundSchema = Where$inboundSchema;
    /** @deprecated use `Where$outboundSchema` instead. */
    Where$.outboundSchema = Where$outboundSchema;
})(Where$ || (Where$ = {}));
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,
    ]).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,
    ]).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PropertyKeysRequestBody$;
(function (PropertyKeysRequestBody$) {
    /** @deprecated use `PropertyKeysRequestBody$inboundSchema` instead. */
    PropertyKeysRequestBody$.inboundSchema = PropertyKeysRequestBody$inboundSchema;
    /** @deprecated use `PropertyKeysRequestBody$outboundSchema` instead. */
    PropertyKeysRequestBody$.outboundSchema = PropertyKeysRequestBody$outboundSchema;
})(PropertyKeysRequestBody$ || (PropertyKeysRequestBody$ = {}));
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