/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
export const EventsSimpleFieldSelectionField = {
    Id: "id",
    OrganizationId: "organizationId",
    MessageId: "messageId",
    ConversationId: "conversationId",
    CreatedAt: "createdAt",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
    EventType: "eventType",
    Type: "type",
    SearchQuery: "searchQuery",
    Properties: "properties",
    UserProperties: "userProperties",
};
/**
 * Export mode for JSON fields (properties, userProperties). "unpack" (default): Flattens JSON into separate columns (e.g., properties.key1, properties.key2). "json": Exports the entire JSON object as a single stringified column. Only applicable to JSON fields like properties and userProperties.
 */
export const EventsSimpleFieldSelectionMode = {
    Unpack: "unpack",
    Json: "json",
};
/** @internal */
export const EventsSimpleFieldSelectionField$inboundSchema = z.nativeEnum(EventsSimpleFieldSelectionField);
/** @internal */
export const EventsSimpleFieldSelectionField$outboundSchema = EventsSimpleFieldSelectionField$inboundSchema;
/** @internal */
export const EventsSimpleFieldSelectionMode$inboundSchema = z.nativeEnum(EventsSimpleFieldSelectionMode);
/** @internal */
export const EventsSimpleFieldSelectionMode$outboundSchema = EventsSimpleFieldSelectionMode$inboundSchema;
/** @internal */
export const EventsSimpleFieldSelection$inboundSchema = z.object({
    type: z.literal("field"),
    field: EventsSimpleFieldSelectionField$inboundSchema,
    path: z.array(z.string()).optional(),
    mode: EventsSimpleFieldSelectionMode$inboundSchema.optional(),
});
/** @internal */
export const EventsSimpleFieldSelection$outboundSchema = z.object({
    type: z.literal("field"),
    field: EventsSimpleFieldSelectionField$outboundSchema,
    path: z.array(z.string()).optional(),
    mode: EventsSimpleFieldSelectionMode$outboundSchema.optional(),
});
export function eventsSimpleFieldSelectionToJSON(eventsSimpleFieldSelection) {
    return JSON.stringify(EventsSimpleFieldSelection$outboundSchema.parse(eventsSimpleFieldSelection));
}
export function eventsSimpleFieldSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsSimpleFieldSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsSimpleFieldSelection' from JSON`);
}
//# sourceMappingURL=eventssimplefieldselection.js.map