/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const FeedbackAggregationSelectionType = {
    Aggregation: "aggregation",
};
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",
    OrganizationId: "organizationId",
    Reasons: "reasons",
    Properties: "properties",
    UserProperties: "userProperties",
    ConversationId: "conversationId",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
};
/** @internal */
export const FeedbackAggregationSelectionType$inboundSchema = z.nativeEnum(FeedbackAggregationSelectionType);
/** @internal */
export const FeedbackAggregationSelectionType$outboundSchema = FeedbackAggregationSelectionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackAggregationSelectionType$;
(function (FeedbackAggregationSelectionType$) {
    /** @deprecated use `FeedbackAggregationSelectionType$inboundSchema` instead. */
    FeedbackAggregationSelectionType$.inboundSchema = FeedbackAggregationSelectionType$inboundSchema;
    /** @deprecated use `FeedbackAggregationSelectionType$outboundSchema` instead. */
    FeedbackAggregationSelectionType$.outboundSchema = FeedbackAggregationSelectionType$outboundSchema;
})(FeedbackAggregationSelectionType$ || (FeedbackAggregationSelectionType$ = {}));
/** @internal */
export const FeedbackAggregationSelectionAggregation$inboundSchema = z
    .nativeEnum(FeedbackAggregationSelectionAggregation);
/** @internal */
export const FeedbackAggregationSelectionAggregation$outboundSchema = FeedbackAggregationSelectionAggregation$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackAggregationSelectionAggregation$;
(function (FeedbackAggregationSelectionAggregation$) {
    /** @deprecated use `FeedbackAggregationSelectionAggregation$inboundSchema` instead. */
    FeedbackAggregationSelectionAggregation$.inboundSchema = FeedbackAggregationSelectionAggregation$inboundSchema;
    /** @deprecated use `FeedbackAggregationSelectionAggregation$outboundSchema` instead. */
    FeedbackAggregationSelectionAggregation$.outboundSchema = FeedbackAggregationSelectionAggregation$outboundSchema;
})(FeedbackAggregationSelectionAggregation$ || (FeedbackAggregationSelectionAggregation$ = {}));
/** @internal */
export const FeedbackAggregationSelectionField$inboundSchema = z.nativeEnum(FeedbackAggregationSelectionField);
/** @internal */
export const FeedbackAggregationSelectionField$outboundSchema = FeedbackAggregationSelectionField$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackAggregationSelectionField$;
(function (FeedbackAggregationSelectionField$) {
    /** @deprecated use `FeedbackAggregationSelectionField$inboundSchema` instead. */
    FeedbackAggregationSelectionField$.inboundSchema = FeedbackAggregationSelectionField$inboundSchema;
    /** @deprecated use `FeedbackAggregationSelectionField$outboundSchema` instead. */
    FeedbackAggregationSelectionField$.outboundSchema = FeedbackAggregationSelectionField$outboundSchema;
})(FeedbackAggregationSelectionField$ || (FeedbackAggregationSelectionField$ = {}));
/** @internal */
export const FeedbackAggregationSelection$inboundSchema = z.object({
    type: FeedbackAggregationSelectionType$inboundSchema,
    aggregation: FeedbackAggregationSelectionAggregation$inboundSchema,
    field: FeedbackAggregationSelectionField$inboundSchema.optional(),
    path: z.array(z.string()).optional(),
});
/** @internal */
export const FeedbackAggregationSelection$outboundSchema = z.object({
    type: FeedbackAggregationSelectionType$outboundSchema,
    aggregation: FeedbackAggregationSelectionAggregation$outboundSchema,
    field: FeedbackAggregationSelectionField$outboundSchema.optional(),
    path: z.array(z.string()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackAggregationSelection$;
(function (FeedbackAggregationSelection$) {
    /** @deprecated use `FeedbackAggregationSelection$inboundSchema` instead. */
    FeedbackAggregationSelection$.inboundSchema = FeedbackAggregationSelection$inboundSchema;
    /** @deprecated use `FeedbackAggregationSelection$outboundSchema` instead. */
    FeedbackAggregationSelection$.outboundSchema = FeedbackAggregationSelection$outboundSchema;
})(FeedbackAggregationSelection$ || (FeedbackAggregationSelection$ = {}));
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