/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
export const FeedbackAggregationSelectionAggregation = {
    Sum: "sum",
    Count: "count",
    CountDistinct: "countDistinct",
    Avg: "avg",
    Min: "min",
    Max: "max",
};
export const FeedbackAggregationSelectionField = {
    Id: "id",
    Type: "type",
    MessageId: "messageId",
    CreatedAt: "createdAt",
    UpdatedAt: "updatedAt",
    OrganizationId: "organizationId",
    Reasons: "reasons",
    Sources: "sources",
    Details: "details",
    Properties: "properties",
    UserProperties: "userProperties",
    ConversationId: "conversationId",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
};
/** @internal */
export const FeedbackAggregationSelectionAggregation$inboundSchema = z
    .nativeEnum(FeedbackAggregationSelectionAggregation);
/** @internal */
export const FeedbackAggregationSelectionAggregation$outboundSchema = FeedbackAggregationSelectionAggregation$inboundSchema;
/** @internal */
export const FeedbackAggregationSelectionField$inboundSchema = z.nativeEnum(FeedbackAggregationSelectionField);
/** @internal */
export const FeedbackAggregationSelectionField$outboundSchema = FeedbackAggregationSelectionField$inboundSchema;
/** @internal */
export const FeedbackAggregationSelection$inboundSchema = z.object({
    type: z.literal("aggregation"),
    aggregation: FeedbackAggregationSelectionAggregation$inboundSchema,
    field: FeedbackAggregationSelectionField$inboundSchema.optional(),
    path: z.array(z.string()).optional(),
});
/** @internal */
export const FeedbackAggregationSelection$outboundSchema = z.object({
    type: z.literal("aggregation"),
    aggregation: FeedbackAggregationSelectionAggregation$outboundSchema,
    field: FeedbackAggregationSelectionField$outboundSchema.optional(),
    path: z.array(z.string()).optional(),
});
export function feedbackAggregationSelectionToJSON(feedbackAggregationSelection) {
    return JSON.stringify(FeedbackAggregationSelection$outboundSchema.parse(feedbackAggregationSelection));
}
export function feedbackAggregationSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FeedbackAggregationSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeedbackAggregationSelection' from JSON`);
}
//# sourceMappingURL=feedbackaggregationselection.js.map