/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const EventsAggregationSelectionType = {
    Aggregation: "aggregation",
};
export const EventsAggregationSelectionAggregation = {
    Sum: "sum",
    Count: "count",
    Avg: "avg",
    Min: "min",
    Max: "max",
};
export const EventsAggregationSelectionField = {
    Id: "id",
    OrganizationId: "organizationId",
    MessageId: "messageId",
    ConversationId: "conversationId",
    CreatedAt: "createdAt",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
    EventType: "eventType",
    Type: "type",
    SearchQuery: "searchQuery",
    Properties: "properties",
    UserProperties: "userProperties",
};
/** @internal */
export const EventsAggregationSelectionType$inboundSchema = z.nativeEnum(EventsAggregationSelectionType);
/** @internal */
export const EventsAggregationSelectionType$outboundSchema = EventsAggregationSelectionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var EventsAggregationSelectionType$;
(function (EventsAggregationSelectionType$) {
    /** @deprecated use `EventsAggregationSelectionType$inboundSchema` instead. */
    EventsAggregationSelectionType$.inboundSchema = EventsAggregationSelectionType$inboundSchema;
    /** @deprecated use `EventsAggregationSelectionType$outboundSchema` instead. */
    EventsAggregationSelectionType$.outboundSchema = EventsAggregationSelectionType$outboundSchema;
})(EventsAggregationSelectionType$ || (EventsAggregationSelectionType$ = {}));
/** @internal */
export const EventsAggregationSelectionAggregation$inboundSchema = z.nativeEnum(EventsAggregationSelectionAggregation);
/** @internal */
export const EventsAggregationSelectionAggregation$outboundSchema = EventsAggregationSelectionAggregation$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var EventsAggregationSelectionAggregation$;
(function (EventsAggregationSelectionAggregation$) {
    /** @deprecated use `EventsAggregationSelectionAggregation$inboundSchema` instead. */
    EventsAggregationSelectionAggregation$.inboundSchema = EventsAggregationSelectionAggregation$inboundSchema;
    /** @deprecated use `EventsAggregationSelectionAggregation$outboundSchema` instead. */
    EventsAggregationSelectionAggregation$.outboundSchema = EventsAggregationSelectionAggregation$outboundSchema;
})(EventsAggregationSelectionAggregation$ || (EventsAggregationSelectionAggregation$ = {}));
/** @internal */
export const EventsAggregationSelectionField$inboundSchema = z.nativeEnum(EventsAggregationSelectionField);
/** @internal */
export const EventsAggregationSelectionField$outboundSchema = EventsAggregationSelectionField$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var EventsAggregationSelectionField$;
(function (EventsAggregationSelectionField$) {
    /** @deprecated use `EventsAggregationSelectionField$inboundSchema` instead. */
    EventsAggregationSelectionField$.inboundSchema = EventsAggregationSelectionField$inboundSchema;
    /** @deprecated use `EventsAggregationSelectionField$outboundSchema` instead. */
    EventsAggregationSelectionField$.outboundSchema = EventsAggregationSelectionField$outboundSchema;
})(EventsAggregationSelectionField$ || (EventsAggregationSelectionField$ = {}));
/** @internal */
export const EventsAggregationSelection$inboundSchema = z.object({
    type: EventsAggregationSelectionType$inboundSchema,
    aggregation: EventsAggregationSelectionAggregation$inboundSchema,
    field: EventsAggregationSelectionField$inboundSchema.optional(),
});
/** @internal */
export const EventsAggregationSelection$outboundSchema = z.object({
    type: EventsAggregationSelectionType$outboundSchema,
    aggregation: EventsAggregationSelectionAggregation$outboundSchema,
    field: EventsAggregationSelectionField$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var EventsAggregationSelection$;
(function (EventsAggregationSelection$) {
    /** @deprecated use `EventsAggregationSelection$inboundSchema` instead. */
    EventsAggregationSelection$.inboundSchema = EventsAggregationSelection$inboundSchema;
    /** @deprecated use `EventsAggregationSelection$outboundSchema` instead. */
    EventsAggregationSelection$.outboundSchema = EventsAggregationSelection$outboundSchema;
})(EventsAggregationSelection$ || (EventsAggregationSelection$ = {}));
export function eventsAggregationSelectionToJSON(eventsAggregationSelection) {
    return JSON.stringify(EventsAggregationSelection$outboundSchema.parse(eventsAggregationSelection));
}
export function eventsAggregationSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsAggregationSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsAggregationSelection' from JSON`);
}
//# sourceMappingURL=eventsaggregationselection.js.map