"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryConversationsResponseData$ = exports.QueryConversationsResponseData$outboundSchema = exports.QueryConversationsResponseData$inboundSchema = exports.ConversationsResultItem$ = exports.ConversationsResultItem$outboundSchema = exports.ConversationsResultItem$inboundSchema = exports.QueryConversationsResponseDataUserProperties$ = exports.QueryConversationsResponseDataUserProperties$outboundSchema = exports.QueryConversationsResponseDataUserProperties$inboundSchema = exports.QueryConversationsResponseDataUserId$ = exports.QueryConversationsResponseDataUserId$outboundSchema = exports.QueryConversationsResponseDataUserId$inboundSchema = exports.QueryConversationsResponseDataId$ = exports.QueryConversationsResponseDataId$outboundSchema = exports.QueryConversationsResponseDataId$inboundSchema = exports.QueryConversationsResponseDataType$ = exports.QueryConversationsResponseDataType$outboundSchema = exports.QueryConversationsResponseDataType$inboundSchema = exports.QueryConversationsResponseDataType = void 0;
exports.queryConversationsResponseDataIdToJSON = queryConversationsResponseDataIdToJSON;
exports.queryConversationsResponseDataIdFromJSON = queryConversationsResponseDataIdFromJSON;
exports.queryConversationsResponseDataUserIdToJSON = queryConversationsResponseDataUserIdToJSON;
exports.queryConversationsResponseDataUserIdFromJSON = queryConversationsResponseDataUserIdFromJSON;
exports.queryConversationsResponseDataUserPropertiesToJSON = queryConversationsResponseDataUserPropertiesToJSON;
exports.queryConversationsResponseDataUserPropertiesFromJSON = queryConversationsResponseDataUserPropertiesFromJSON;
exports.conversationsResultItemToJSON = conversationsResultItemToJSON;
exports.conversationsResultItemFromJSON = conversationsResultItemFromJSON;
exports.queryConversationsResponseDataToJSON = queryConversationsResponseDataToJSON;
exports.queryConversationsResponseDataFromJSON = queryConversationsResponseDataFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
exports.QueryConversationsResponseDataType = {
    Openai: "openai",
    SupportTicket: "support_ticket",
    SupportCopilot: "support_copilot",
};
/** @internal */
exports.QueryConversationsResponseDataType$inboundSchema = z.nativeEnum(exports.QueryConversationsResponseDataType);
/** @internal */
exports.QueryConversationsResponseDataType$outboundSchema = exports.QueryConversationsResponseDataType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryConversationsResponseDataType$;
(function (QueryConversationsResponseDataType$) {
    /** @deprecated use `QueryConversationsResponseDataType$inboundSchema` instead. */
    QueryConversationsResponseDataType$.inboundSchema = exports.QueryConversationsResponseDataType$inboundSchema;
    /** @deprecated use `QueryConversationsResponseDataType$outboundSchema` instead. */
    QueryConversationsResponseDataType$.outboundSchema = exports.QueryConversationsResponseDataType$outboundSchema;
})(QueryConversationsResponseDataType$ || (exports.QueryConversationsResponseDataType$ = QueryConversationsResponseDataType$ = {}));
/** @internal */
exports.QueryConversationsResponseDataId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
exports.QueryConversationsResponseDataId$outboundSchema = z.union([z.string(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryConversationsResponseDataId$;
(function (QueryConversationsResponseDataId$) {
    /** @deprecated use `QueryConversationsResponseDataId$inboundSchema` instead. */
    QueryConversationsResponseDataId$.inboundSchema = exports.QueryConversationsResponseDataId$inboundSchema;
    /** @deprecated use `QueryConversationsResponseDataId$outboundSchema` instead. */
    QueryConversationsResponseDataId$.outboundSchema = exports.QueryConversationsResponseDataId$outboundSchema;
})(QueryConversationsResponseDataId$ || (exports.QueryConversationsResponseDataId$ = QueryConversationsResponseDataId$ = {}));
function queryConversationsResponseDataIdToJSON(queryConversationsResponseDataId) {
    return JSON.stringify(exports.QueryConversationsResponseDataId$outboundSchema.parse(queryConversationsResponseDataId));
}
function queryConversationsResponseDataIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QueryConversationsResponseDataId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryConversationsResponseDataId' from JSON`);
}
/** @internal */
exports.QueryConversationsResponseDataUserId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
exports.QueryConversationsResponseDataUserId$outboundSchema = z.union([z.string(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryConversationsResponseDataUserId$;
(function (QueryConversationsResponseDataUserId$) {
    /** @deprecated use `QueryConversationsResponseDataUserId$inboundSchema` instead. */
    QueryConversationsResponseDataUserId$.inboundSchema = exports.QueryConversationsResponseDataUserId$inboundSchema;
    /** @deprecated use `QueryConversationsResponseDataUserId$outboundSchema` instead. */
    QueryConversationsResponseDataUserId$.outboundSchema = exports.QueryConversationsResponseDataUserId$outboundSchema;
})(QueryConversationsResponseDataUserId$ || (exports.QueryConversationsResponseDataUserId$ = QueryConversationsResponseDataUserId$ = {}));
function queryConversationsResponseDataUserIdToJSON(queryConversationsResponseDataUserId) {
    return JSON.stringify(exports.QueryConversationsResponseDataUserId$outboundSchema.parse(queryConversationsResponseDataUserId));
}
function queryConversationsResponseDataUserIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QueryConversationsResponseDataUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryConversationsResponseDataUserId' from JSON`);
}
/** @internal */
exports.QueryConversationsResponseDataUserProperties$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    id: z.nullable(z.union([z.string(), z.number()])).optional(),
    identificationType: z.nullable(z.string()).optional(),
    userId: z.nullable(z.union([z.string(), z.number()])).optional(),
    supportAgentName: z.nullable(z.string()).optional(),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.QueryConversationsResponseDataUserProperties$outboundSchema = z.object({
    id: z.nullable(z.union([z.string(), z.number()])).optional(),
    identificationType: z.nullable(z.string()).optional(),
    userId: z.nullable(z.union([z.string(), z.number()])).optional(),
    supportAgentName: z.nullable(z.string()).optional(),
    additionalProperties: z.record(z.any()),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryConversationsResponseDataUserProperties$;
(function (QueryConversationsResponseDataUserProperties$) {
    /** @deprecated use `QueryConversationsResponseDataUserProperties$inboundSchema` instead. */
    QueryConversationsResponseDataUserProperties$.inboundSchema = exports.QueryConversationsResponseDataUserProperties$inboundSchema;
    /** @deprecated use `QueryConversationsResponseDataUserProperties$outboundSchema` instead. */
    QueryConversationsResponseDataUserProperties$.outboundSchema = exports.QueryConversationsResponseDataUserProperties$outboundSchema;
})(QueryConversationsResponseDataUserProperties$ || (exports.QueryConversationsResponseDataUserProperties$ = QueryConversationsResponseDataUserProperties$ = {}));
function queryConversationsResponseDataUserPropertiesToJSON(queryConversationsResponseDataUserProperties) {
    return JSON.stringify(exports.QueryConversationsResponseDataUserProperties$outboundSchema.parse(queryConversationsResponseDataUserProperties));
}
function queryConversationsResponseDataUserPropertiesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QueryConversationsResponseDataUserProperties$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryConversationsResponseDataUserProperties' from JSON`);
}
/** @internal */
exports.ConversationsResultItem$inboundSchema = z.object({
    id: z.string().optional(),
    userMessageCount: z.number().optional(),
    organizationId: z.nullable(z.string()).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    firstMessageTime: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    type: z.nullable(exports.QueryConversationsResponseDataType$inboundSchema).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => exports.QueryConversationsResponseDataUserProperties$inboundSchema)).optional(),
    sum: z.number().optional(),
    count: z.number().optional(),
    avg: z.number().optional(),
    min: z.number().optional(),
    max: z.number().optional(),
    id_hour: z.string().optional(),
    id_day: z.string().optional(),
    id_week: z.string().optional(),
    id_month: z.string().optional(),
    userMessageCount_hour: z.string().optional(),
    userMessageCount_day: z.string().optional(),
    userMessageCount_week: z.string().optional(),
    userMessageCount_month: z.string().optional(),
    organizationId_hour: z.string().optional(),
    organizationId_day: z.string().optional(),
    organizationId_week: z.string().optional(),
    organizationId_month: z.string().optional(),
    projectId_hour: z.string().optional(),
    projectId_day: z.string().optional(),
    projectId_week: z.string().optional(),
    projectId_month: z.string().optional(),
    integrationId_hour: z.string().optional(),
    integrationId_day: z.string().optional(),
    integrationId_week: z.string().optional(),
    integrationId_month: z.string().optional(),
    firstMessageTime_hour: z.string().optional(),
    firstMessageTime_day: z.string().optional(),
    firstMessageTime_week: z.string().optional(),
    firstMessageTime_month: z.string().optional(),
    type_hour: z.string().optional(),
    type_day: z.string().optional(),
    type_week: z.string().optional(),
    type_month: z.string().optional(),
    properties_hour: z.string().optional(),
    properties_day: z.string().optional(),
    properties_week: z.string().optional(),
    properties_month: z.string().optional(),
    userProperties_hour: z.string().optional(),
    userProperties_day: z.string().optional(),
    userProperties_week: z.string().optional(),
    userProperties_month: z.string().optional(),
    sum_id: z.number().optional(),
    sum_userMessageCount: z.number().optional(),
    sum_organizationId: z.number().optional(),
    sum_projectId: z.number().optional(),
    sum_integrationId: z.number().optional(),
    sum_firstMessageTime: z.number().optional(),
    sum_type: z.number().optional(),
    sum_properties: z.number().optional(),
    sum_userProperties: z.number().optional(),
    count_id: z.number().optional(),
    count_userMessageCount: z.number().optional(),
    count_organizationId: z.number().optional(),
    count_projectId: z.number().optional(),
    count_integrationId: z.number().optional(),
    count_firstMessageTime: z.number().optional(),
    count_type: z.number().optional(),
    count_properties: z.number().optional(),
    count_userProperties: z.number().optional(),
    avg_id: z.number().optional(),
    avg_userMessageCount: z.number().optional(),
    avg_organizationId: z.number().optional(),
    avg_projectId: z.number().optional(),
    avg_integrationId: z.number().optional(),
    avg_firstMessageTime: z.number().optional(),
    avg_type: z.number().optional(),
    avg_properties: z.number().optional(),
    avg_userProperties: z.number().optional(),
    min_id: z.number().optional(),
    min_userMessageCount: z.number().optional(),
    min_organizationId: z.number().optional(),
    min_projectId: z.number().optional(),
    min_integrationId: z.number().optional(),
    min_firstMessageTime: z.number().optional(),
    min_type: z.number().optional(),
    min_properties: z.number().optional(),
    min_userProperties: z.number().optional(),
    max_id: z.number().optional(),
    max_userMessageCount: z.number().optional(),
    max_organizationId: z.number().optional(),
    max_projectId: z.number().optional(),
    max_integrationId: z.number().optional(),
    max_firstMessageTime: z.number().optional(),
    max_type: z.number().optional(),
    max_properties: z.number().optional(),
    max_userProperties: z.number().optional(),
    "sum_properties.userId": z.number().optional(),
    "sum_properties.supportAgentName": z.number().optional(),
    "sum_userProperties.userId": z.number().optional(),
    "sum_userProperties.supportAgentName": z.number().optional(),
    "count_properties.userId": z.number().optional(),
    "count_properties.supportAgentName": z.number().optional(),
    "count_userProperties.userId": z.number().optional(),
    "count_userProperties.supportAgentName": z.number().optional(),
    "countDistinct_properties.userId": z.number().optional(),
    "countDistinct_properties.supportAgentName": z.number().optional(),
    "countDistinct_userProperties.userId": z.number().optional(),
    "countDistinct_userProperties.supportAgentName": z.number().optional(),
    "avg_properties.userId": z.number().optional(),
    "avg_properties.supportAgentName": z.number().optional(),
    "avg_userProperties.userId": z.number().optional(),
    "avg_userProperties.supportAgentName": z.number().optional(),
    "min_properties.userId": z.number().optional(),
    "min_properties.supportAgentName": z.number().optional(),
    "min_userProperties.userId": z.number().optional(),
    "min_userProperties.supportAgentName": z.number().optional(),
    "max_properties.userId": z.number().optional(),
    "max_properties.supportAgentName": z.number().optional(),
    "max_userProperties.userId": z.number().optional(),
    "max_userProperties.supportAgentName": z.number().optional(),
    "properties.userId": z.nullable(z.string()).optional(),
    "properties.supportAgentName": z.nullable(z.string()).optional(),
    "userProperties.userId": z.nullable(z.string()).optional(),
    "userProperties.supportAgentName": z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "id_hour": "idHour",
        "id_day": "idDay",
        "id_week": "idWeek",
        "id_month": "idMonth",
        "userMessageCount_hour": "userMessageCountHour",
        "userMessageCount_day": "userMessageCountDay",
        "userMessageCount_week": "userMessageCountWeek",
        "userMessageCount_month": "userMessageCountMonth",
        "organizationId_hour": "organizationIdHour",
        "organizationId_day": "organizationIdDay",
        "organizationId_week": "organizationIdWeek",
        "organizationId_month": "organizationIdMonth",
        "projectId_hour": "projectIdHour",
        "projectId_day": "projectIdDay",
        "projectId_week": "projectIdWeek",
        "projectId_month": "projectIdMonth",
        "integrationId_hour": "integrationIdHour",
        "integrationId_day": "integrationIdDay",
        "integrationId_week": "integrationIdWeek",
        "integrationId_month": "integrationIdMonth",
        "firstMessageTime_hour": "firstMessageTimeHour",
        "firstMessageTime_day": "firstMessageTimeDay",
        "firstMessageTime_week": "firstMessageTimeWeek",
        "firstMessageTime_month": "firstMessageTimeMonth",
        "type_hour": "typeHour",
        "type_day": "typeDay",
        "type_week": "typeWeek",
        "type_month": "typeMonth",
        "properties_hour": "propertiesHour",
        "properties_day": "propertiesDay",
        "properties_week": "propertiesWeek",
        "properties_month": "propertiesMonth",
        "userProperties_hour": "userPropertiesHour",
        "userProperties_day": "userPropertiesDay",
        "userProperties_week": "userPropertiesWeek",
        "userProperties_month": "userPropertiesMonth",
        "sum_id": "sumId",
        "sum_userMessageCount": "sumUserMessageCount",
        "sum_organizationId": "sumOrganizationId",
        "sum_projectId": "sumProjectId",
        "sum_integrationId": "sumIntegrationId",
        "sum_firstMessageTime": "sumFirstMessageTime",
        "sum_type": "sumType",
        "sum_properties": "sumProperties",
        "sum_userProperties": "sumUserProperties",
        "count_id": "countId",
        "count_userMessageCount": "countUserMessageCount",
        "count_organizationId": "countOrganizationId",
        "count_projectId": "countProjectId",
        "count_integrationId": "countIntegrationId",
        "count_firstMessageTime": "countFirstMessageTime",
        "count_type": "countType",
        "count_properties": "countProperties",
        "count_userProperties": "countUserProperties",
        "avg_id": "avgId",
        "avg_userMessageCount": "avgUserMessageCount",
        "avg_organizationId": "avgOrganizationId",
        "avg_projectId": "avgProjectId",
        "avg_integrationId": "avgIntegrationId",
        "avg_firstMessageTime": "avgFirstMessageTime",
        "avg_type": "avgType",
        "avg_properties": "avgProperties",
        "avg_userProperties": "avgUserProperties",
        "min_id": "minId",
        "min_userMessageCount": "minUserMessageCount",
        "min_organizationId": "minOrganizationId",
        "min_projectId": "minProjectId",
        "min_integrationId": "minIntegrationId",
        "min_firstMessageTime": "minFirstMessageTime",
        "min_type": "minType",
        "min_properties": "minProperties",
        "min_userProperties": "minUserProperties",
        "max_id": "maxId",
        "max_userMessageCount": "maxUserMessageCount",
        "max_organizationId": "maxOrganizationId",
        "max_projectId": "maxProjectId",
        "max_integrationId": "maxIntegrationId",
        "max_firstMessageTime": "maxFirstMessageTime",
        "max_type": "maxType",
        "max_properties": "maxProperties",
        "max_userProperties": "maxUserProperties",
        "sum_properties.userId": "sumPropertiesUserId",
        "sum_properties.supportAgentName": "sumPropertiesSupportAgentName",
        "sum_userProperties.userId": "sumUserPropertiesUserId",
        "sum_userProperties.supportAgentName": "sumUserPropertiesSupportAgentName",
        "count_properties.userId": "countPropertiesUserId",
        "count_properties.supportAgentName": "countPropertiesSupportAgentName",
        "count_userProperties.userId": "countUserPropertiesUserId",
        "count_userProperties.supportAgentName": "countUserPropertiesSupportAgentName",
        "countDistinct_properties.userId": "countDistinctPropertiesUserId",
        "countDistinct_properties.supportAgentName": "countDistinctPropertiesSupportAgentName",
        "countDistinct_userProperties.userId": "countDistinctUserPropertiesUserId",
        "countDistinct_userProperties.supportAgentName": "countDistinctUserPropertiesSupportAgentName",
        "avg_properties.userId": "avgPropertiesUserId",
        "avg_properties.supportAgentName": "avgPropertiesSupportAgentName",
        "avg_userProperties.userId": "avgUserPropertiesUserId",
        "avg_userProperties.supportAgentName": "avgUserPropertiesSupportAgentName",
        "min_properties.userId": "minPropertiesUserId",
        "min_properties.supportAgentName": "minPropertiesSupportAgentName",
        "min_userProperties.userId": "minUserPropertiesUserId",
        "min_userProperties.supportAgentName": "minUserPropertiesSupportAgentName",
        "max_properties.userId": "maxPropertiesUserId",
        "max_properties.supportAgentName": "maxPropertiesSupportAgentName",
        "max_userProperties.userId": "maxUserPropertiesUserId",
        "max_userProperties.supportAgentName": "maxUserPropertiesSupportAgentName",
        "properties.userId": "propertiesUserId",
        "properties.supportAgentName": "propertiesSupportAgentName",
        "userProperties.userId": "userPropertiesUserId",
        "userProperties.supportAgentName": "userPropertiesSupportAgentName",
    });
});
/** @internal */
exports.ConversationsResultItem$outboundSchema = z.object({
    id: z.string().optional(),
    userMessageCount: z.number().optional(),
    organizationId: z.nullable(z.string()).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    firstMessageTime: z.date().transform(v => v.toISOString()).optional(),
    type: z.nullable(exports.QueryConversationsResponseDataType$outboundSchema)
        .optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => exports.QueryConversationsResponseDataUserProperties$outboundSchema)).optional(),
    sum: z.number().optional(),
    count: z.number().optional(),
    avg: z.number().optional(),
    min: z.number().optional(),
    max: z.number().optional(),
    idHour: z.string().optional(),
    idDay: z.string().optional(),
    idWeek: z.string().optional(),
    idMonth: z.string().optional(),
    userMessageCountHour: z.string().optional(),
    userMessageCountDay: z.string().optional(),
    userMessageCountWeek: z.string().optional(),
    userMessageCountMonth: z.string().optional(),
    organizationIdHour: z.string().optional(),
    organizationIdDay: z.string().optional(),
    organizationIdWeek: z.string().optional(),
    organizationIdMonth: z.string().optional(),
    projectIdHour: z.string().optional(),
    projectIdDay: z.string().optional(),
    projectIdWeek: z.string().optional(),
    projectIdMonth: z.string().optional(),
    integrationIdHour: z.string().optional(),
    integrationIdDay: z.string().optional(),
    integrationIdWeek: z.string().optional(),
    integrationIdMonth: z.string().optional(),
    firstMessageTimeHour: z.string().optional(),
    firstMessageTimeDay: z.string().optional(),
    firstMessageTimeWeek: z.string().optional(),
    firstMessageTimeMonth: z.string().optional(),
    typeHour: z.string().optional(),
    typeDay: z.string().optional(),
    typeWeek: z.string().optional(),
    typeMonth: z.string().optional(),
    propertiesHour: z.string().optional(),
    propertiesDay: z.string().optional(),
    propertiesWeek: z.string().optional(),
    propertiesMonth: z.string().optional(),
    userPropertiesHour: z.string().optional(),
    userPropertiesDay: z.string().optional(),
    userPropertiesWeek: z.string().optional(),
    userPropertiesMonth: z.string().optional(),
    sumId: z.number().optional(),
    sumUserMessageCount: z.number().optional(),
    sumOrganizationId: z.number().optional(),
    sumProjectId: z.number().optional(),
    sumIntegrationId: z.number().optional(),
    sumFirstMessageTime: z.number().optional(),
    sumType: z.number().optional(),
    sumProperties: z.number().optional(),
    sumUserProperties: z.number().optional(),
    countId: z.number().optional(),
    countUserMessageCount: z.number().optional(),
    countOrganizationId: z.number().optional(),
    countProjectId: z.number().optional(),
    countIntegrationId: z.number().optional(),
    countFirstMessageTime: z.number().optional(),
    countType: z.number().optional(),
    countProperties: z.number().optional(),
    countUserProperties: z.number().optional(),
    avgId: z.number().optional(),
    avgUserMessageCount: z.number().optional(),
    avgOrganizationId: z.number().optional(),
    avgProjectId: z.number().optional(),
    avgIntegrationId: z.number().optional(),
    avgFirstMessageTime: z.number().optional(),
    avgType: z.number().optional(),
    avgProperties: z.number().optional(),
    avgUserProperties: z.number().optional(),
    minId: z.number().optional(),
    minUserMessageCount: z.number().optional(),
    minOrganizationId: z.number().optional(),
    minProjectId: z.number().optional(),
    minIntegrationId: z.number().optional(),
    minFirstMessageTime: z.number().optional(),
    minType: z.number().optional(),
    minProperties: z.number().optional(),
    minUserProperties: z.number().optional(),
    maxId: z.number().optional(),
    maxUserMessageCount: z.number().optional(),
    maxOrganizationId: z.number().optional(),
    maxProjectId: z.number().optional(),
    maxIntegrationId: z.number().optional(),
    maxFirstMessageTime: z.number().optional(),
    maxType: z.number().optional(),
    maxProperties: z.number().optional(),
    maxUserProperties: z.number().optional(),
    sumPropertiesUserId: z.number().optional(),
    sumPropertiesSupportAgentName: z.number().optional(),
    sumUserPropertiesUserId: z.number().optional(),
    sumUserPropertiesSupportAgentName: z.number().optional(),
    countPropertiesUserId: z.number().optional(),
    countPropertiesSupportAgentName: z.number().optional(),
    countUserPropertiesUserId: z.number().optional(),
    countUserPropertiesSupportAgentName: z.number().optional(),
    countDistinctPropertiesUserId: z.number().optional(),
    countDistinctPropertiesSupportAgentName: z.number().optional(),
    countDistinctUserPropertiesUserId: z.number().optional(),
    countDistinctUserPropertiesSupportAgentName: z.number().optional(),
    avgPropertiesUserId: z.number().optional(),
    avgPropertiesSupportAgentName: z.number().optional(),
    avgUserPropertiesUserId: z.number().optional(),
    avgUserPropertiesSupportAgentName: z.number().optional(),
    minPropertiesUserId: z.number().optional(),
    minPropertiesSupportAgentName: z.number().optional(),
    minUserPropertiesUserId: z.number().optional(),
    minUserPropertiesSupportAgentName: z.number().optional(),
    maxPropertiesUserId: z.number().optional(),
    maxPropertiesSupportAgentName: z.number().optional(),
    maxUserPropertiesUserId: z.number().optional(),
    maxUserPropertiesSupportAgentName: z.number().optional(),
    propertiesUserId: z.nullable(z.string()).optional(),
    propertiesSupportAgentName: z.nullable(z.string()).optional(),
    userPropertiesUserId: z.nullable(z.string()).optional(),
    userPropertiesSupportAgentName: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        idHour: "id_hour",
        idDay: "id_day",
        idWeek: "id_week",
        idMonth: "id_month",
        userMessageCountHour: "userMessageCount_hour",
        userMessageCountDay: "userMessageCount_day",
        userMessageCountWeek: "userMessageCount_week",
        userMessageCountMonth: "userMessageCount_month",
        organizationIdHour: "organizationId_hour",
        organizationIdDay: "organizationId_day",
        organizationIdWeek: "organizationId_week",
        organizationIdMonth: "organizationId_month",
        projectIdHour: "projectId_hour",
        projectIdDay: "projectId_day",
        projectIdWeek: "projectId_week",
        projectIdMonth: "projectId_month",
        integrationIdHour: "integrationId_hour",
        integrationIdDay: "integrationId_day",
        integrationIdWeek: "integrationId_week",
        integrationIdMonth: "integrationId_month",
        firstMessageTimeHour: "firstMessageTime_hour",
        firstMessageTimeDay: "firstMessageTime_day",
        firstMessageTimeWeek: "firstMessageTime_week",
        firstMessageTimeMonth: "firstMessageTime_month",
        typeHour: "type_hour",
        typeDay: "type_day",
        typeWeek: "type_week",
        typeMonth: "type_month",
        propertiesHour: "properties_hour",
        propertiesDay: "properties_day",
        propertiesWeek: "properties_week",
        propertiesMonth: "properties_month",
        userPropertiesHour: "userProperties_hour",
        userPropertiesDay: "userProperties_day",
        userPropertiesWeek: "userProperties_week",
        userPropertiesMonth: "userProperties_month",
        sumId: "sum_id",
        sumUserMessageCount: "sum_userMessageCount",
        sumOrganizationId: "sum_organizationId",
        sumProjectId: "sum_projectId",
        sumIntegrationId: "sum_integrationId",
        sumFirstMessageTime: "sum_firstMessageTime",
        sumType: "sum_type",
        sumProperties: "sum_properties",
        sumUserProperties: "sum_userProperties",
        countId: "count_id",
        countUserMessageCount: "count_userMessageCount",
        countOrganizationId: "count_organizationId",
        countProjectId: "count_projectId",
        countIntegrationId: "count_integrationId",
        countFirstMessageTime: "count_firstMessageTime",
        countType: "count_type",
        countProperties: "count_properties",
        countUserProperties: "count_userProperties",
        avgId: "avg_id",
        avgUserMessageCount: "avg_userMessageCount",
        avgOrganizationId: "avg_organizationId",
        avgProjectId: "avg_projectId",
        avgIntegrationId: "avg_integrationId",
        avgFirstMessageTime: "avg_firstMessageTime",
        avgType: "avg_type",
        avgProperties: "avg_properties",
        avgUserProperties: "avg_userProperties",
        minId: "min_id",
        minUserMessageCount: "min_userMessageCount",
        minOrganizationId: "min_organizationId",
        minProjectId: "min_projectId",
        minIntegrationId: "min_integrationId",
        minFirstMessageTime: "min_firstMessageTime",
        minType: "min_type",
        minProperties: "min_properties",
        minUserProperties: "min_userProperties",
        maxId: "max_id",
        maxUserMessageCount: "max_userMessageCount",
        maxOrganizationId: "max_organizationId",
        maxProjectId: "max_projectId",
        maxIntegrationId: "max_integrationId",
        maxFirstMessageTime: "max_firstMessageTime",
        maxType: "max_type",
        maxProperties: "max_properties",
        maxUserProperties: "max_userProperties",
        sumPropertiesUserId: "sum_properties.userId",
        sumPropertiesSupportAgentName: "sum_properties.supportAgentName",
        sumUserPropertiesUserId: "sum_userProperties.userId",
        sumUserPropertiesSupportAgentName: "sum_userProperties.supportAgentName",
        countPropertiesUserId: "count_properties.userId",
        countPropertiesSupportAgentName: "count_properties.supportAgentName",
        countUserPropertiesUserId: "count_userProperties.userId",
        countUserPropertiesSupportAgentName: "count_userProperties.supportAgentName",
        countDistinctPropertiesUserId: "countDistinct_properties.userId",
        countDistinctPropertiesSupportAgentName: "countDistinct_properties.supportAgentName",
        countDistinctUserPropertiesUserId: "countDistinct_userProperties.userId",
        countDistinctUserPropertiesSupportAgentName: "countDistinct_userProperties.supportAgentName",
        avgPropertiesUserId: "avg_properties.userId",
        avgPropertiesSupportAgentName: "avg_properties.supportAgentName",
        avgUserPropertiesUserId: "avg_userProperties.userId",
        avgUserPropertiesSupportAgentName: "avg_userProperties.supportAgentName",
        minPropertiesUserId: "min_properties.userId",
        minPropertiesSupportAgentName: "min_properties.supportAgentName",
        minUserPropertiesUserId: "min_userProperties.userId",
        minUserPropertiesSupportAgentName: "min_userProperties.supportAgentName",
        maxPropertiesUserId: "max_properties.userId",
        maxPropertiesSupportAgentName: "max_properties.supportAgentName",
        maxUserPropertiesUserId: "max_userProperties.userId",
        maxUserPropertiesSupportAgentName: "max_userProperties.supportAgentName",
        propertiesUserId: "properties.userId",
        propertiesSupportAgentName: "properties.supportAgentName",
        userPropertiesUserId: "userProperties.userId",
        userPropertiesSupportAgentName: "userProperties.supportAgentName",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConversationsResultItem$;
(function (ConversationsResultItem$) {
    /** @deprecated use `ConversationsResultItem$inboundSchema` instead. */
    ConversationsResultItem$.inboundSchema = exports.ConversationsResultItem$inboundSchema;
    /** @deprecated use `ConversationsResultItem$outboundSchema` instead. */
    ConversationsResultItem$.outboundSchema = exports.ConversationsResultItem$outboundSchema;
})(ConversationsResultItem$ || (exports.ConversationsResultItem$ = ConversationsResultItem$ = {}));
function conversationsResultItemToJSON(conversationsResultItem) {
    return JSON.stringify(exports.ConversationsResultItem$outboundSchema.parse(conversationsResultItem));
}
function conversationsResultItemFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConversationsResultItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConversationsResultItem' from JSON`);
}
/** @internal */
exports.QueryConversationsResponseData$inboundSchema = z.object({
    result: z.array(z.lazy(() => exports.ConversationsResultItem$inboundSchema)),
    total: z.number(),
    pageSize: z.number(),
    count: z.number(),
});
/** @internal */
exports.QueryConversationsResponseData$outboundSchema = z.object({
    result: z.array(z.lazy(() => exports.ConversationsResultItem$outboundSchema)),
    total: z.number(),
    pageSize: z.number(),
    count: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryConversationsResponseData$;
(function (QueryConversationsResponseData$) {
    /** @deprecated use `QueryConversationsResponseData$inboundSchema` instead. */
    QueryConversationsResponseData$.inboundSchema = exports.QueryConversationsResponseData$inboundSchema;
    /** @deprecated use `QueryConversationsResponseData$outboundSchema` instead. */
    QueryConversationsResponseData$.outboundSchema = exports.QueryConversationsResponseData$outboundSchema;
})(QueryConversationsResponseData$ || (exports.QueryConversationsResponseData$ = QueryConversationsResponseData$ = {}));
function queryConversationsResponseDataToJSON(queryConversationsResponseData) {
    return JSON.stringify(exports.QueryConversationsResponseData$outboundSchema.parse(queryConversationsResponseData));
}
function queryConversationsResponseDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QueryConversationsResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QueryConversationsResponseData' from JSON`);
}
//# sourceMappingURL=queryconversationsresponsedata.js.map