"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$ = exports.PropertyKeysRequestBody$outboundSchema = exports.PropertyKeysRequestBody$inboundSchema = exports.Where$ = exports.Where$outboundSchema = exports.Where$inboundSchema = exports.Views$ = exports.Views$outboundSchema = exports.Views$inboundSchema = exports.PropertyKeysRequestBodyField$ = 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"));
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 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",
};
/** @internal */
exports.PropertyKeysRequestBodyField$inboundSchema = z.nativeEnum(exports.PropertyKeysRequestBodyField);
/** @internal */
exports.PropertyKeysRequestBodyField$outboundSchema = exports.PropertyKeysRequestBodyField$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PropertyKeysRequestBodyField$;
(function (PropertyKeysRequestBodyField$) {
    /** @deprecated use `PropertyKeysRequestBodyField$inboundSchema` instead. */
    PropertyKeysRequestBodyField$.inboundSchema = exports.PropertyKeysRequestBodyField$inboundSchema;
    /** @deprecated use `PropertyKeysRequestBodyField$outboundSchema` instead. */
    PropertyKeysRequestBodyField$.outboundSchema = exports.PropertyKeysRequestBodyField$outboundSchema;
})(PropertyKeysRequestBodyField$ || (exports.PropertyKeysRequestBodyField$ = PropertyKeysRequestBodyField$ = {}));
/** @internal */
exports.Views$inboundSchema = z.nativeEnum(exports.Views);
/** @internal */
exports.Views$outboundSchema = exports.Views$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Views$;
(function (Views$) {
    /** @deprecated use `Views$inboundSchema` instead. */
    Views$.inboundSchema = exports.Views$inboundSchema;
    /** @deprecated use `Views$outboundSchema` instead. */
    Views$.outboundSchema = exports.Views$outboundSchema;
})(Views$ || (exports.Views$ = Views$ = {}));
/** @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,
]);
/** @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,
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Where$;
(function (Where$) {
    /** @deprecated use `Where$inboundSchema` instead. */
    Where$.inboundSchema = exports.Where$inboundSchema;
    /** @deprecated use `Where$outboundSchema` instead. */
    Where$.outboundSchema = exports.Where$outboundSchema;
})(Where$ || (exports.Where$ = Where$ = {}));
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,
    ]).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,
    ]).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var PropertyKeysRequestBody$;
(function (PropertyKeysRequestBody$) {
    /** @deprecated use `PropertyKeysRequestBody$inboundSchema` instead. */
    PropertyKeysRequestBody$.inboundSchema = exports.PropertyKeysRequestBody$inboundSchema;
    /** @deprecated use `PropertyKeysRequestBody$outboundSchema` instead. */
    PropertyKeysRequestBody$.outboundSchema = exports.PropertyKeysRequestBody$outboundSchema;
})(PropertyKeysRequestBody$ || (exports.PropertyKeysRequestBody$ = PropertyKeysRequestBody$ = {}));
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