/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
export const ConversationsSimpleFieldSelectionField = {
    Id: "id",
    UserMessageCount: "userMessageCount",
    OrganizationId: "organizationId",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
    FirstMessageTime: "firstMessageTime",
    Type: "type",
    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 Mode = {
    Unpack: "unpack",
    Json: "json",
};
/** @internal */
export const ConversationsSimpleFieldSelectionField$inboundSchema = z.nativeEnum(ConversationsSimpleFieldSelectionField);
/** @internal */
export const ConversationsSimpleFieldSelectionField$outboundSchema = ConversationsSimpleFieldSelectionField$inboundSchema;
/** @internal */
export const Mode$inboundSchema = z.nativeEnum(Mode);
/** @internal */
export const Mode$outboundSchema = Mode$inboundSchema;
/** @internal */
export const ConversationsSimpleFieldSelection$inboundSchema = z.object({
    type: z.literal("field"),
    field: ConversationsSimpleFieldSelectionField$inboundSchema,
    path: z.array(z.string()).optional(),
    mode: Mode$inboundSchema.optional(),
});
/** @internal */
export const ConversationsSimpleFieldSelection$outboundSchema = z.object({
    type: z.literal("field"),
    field: ConversationsSimpleFieldSelectionField$outboundSchema,
    path: z.array(z.string()).optional(),
    mode: Mode$outboundSchema.optional(),
});
export function conversationsSimpleFieldSelectionToJSON(conversationsSimpleFieldSelection) {
    return JSON.stringify(ConversationsSimpleFieldSelection$outboundSchema.parse(conversationsSimpleFieldSelection));
}
export function conversationsSimpleFieldSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ConversationsSimpleFieldSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConversationsSimpleFieldSelection' from JSON`);
}
//# sourceMappingURL=conversationssimplefieldselection.js.map