/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { SupportTicketMessage$inboundSchema, SupportTicketMessage$outboundSchema, } from "./supportticketmessage.js";
export const SupportTicketConversationType = {
    SupportTicket: "support_ticket",
};
export const SupportTicketConversationVisibility = {
    Private: "private",
    Public: "public",
};
/** @internal */
export const SupportTicketConversationType$inboundSchema = z.nativeEnum(SupportTicketConversationType);
/** @internal */
export const SupportTicketConversationType$outboundSchema = SupportTicketConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportTicketConversationType$;
(function (SupportTicketConversationType$) {
    /** @deprecated use `SupportTicketConversationType$inboundSchema` instead. */
    SupportTicketConversationType$.inboundSchema = SupportTicketConversationType$inboundSchema;
    /** @deprecated use `SupportTicketConversationType$outboundSchema` instead. */
    SupportTicketConversationType$.outboundSchema = SupportTicketConversationType$outboundSchema;
})(SupportTicketConversationType$ || (SupportTicketConversationType$ = {}));
/** @internal */
export const SupportTicketConversationVisibility$inboundSchema = z.nativeEnum(SupportTicketConversationVisibility);
/** @internal */
export const SupportTicketConversationVisibility$outboundSchema = SupportTicketConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportTicketConversationVisibility$;
(function (SupportTicketConversationVisibility$) {
    /** @deprecated use `SupportTicketConversationVisibility$inboundSchema` instead. */
    SupportTicketConversationVisibility$.inboundSchema = SupportTicketConversationVisibility$inboundSchema;
    /** @deprecated use `SupportTicketConversationVisibility$outboundSchema` instead. */
    SupportTicketConversationVisibility$.outboundSchema = SupportTicketConversationVisibility$outboundSchema;
})(SupportTicketConversationVisibility$ || (SupportTicketConversationVisibility$ = {}));
/** @internal */
export const SupportTicketConversation$inboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: SupportTicketConversationType$inboundSchema,
    supportTicketConversationId: z.nullable(z.string()),
    createdAt: z.string(),
    updatedAt: z.string(),
    projectId: z.nullable(z.string()),
    integrationId: z.nullable(z.string()),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    visibility: z.nullable(SupportTicketConversationVisibility$inboundSchema),
    messages: z.array(SupportTicketMessage$inboundSchema),
});
/** @internal */
export const SupportTicketConversation$outboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: SupportTicketConversationType$outboundSchema,
    supportTicketConversationId: z.nullable(z.string()),
    createdAt: z.string(),
    updatedAt: z.string(),
    projectId: z.nullable(z.string()),
    integrationId: z.nullable(z.string()),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    tags: z.nullable(z.array(z.string())).optional(),
    visibility: z.nullable(SupportTicketConversationVisibility$outboundSchema),
    messages: z.array(SupportTicketMessage$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportTicketConversation$;
(function (SupportTicketConversation$) {
    /** @deprecated use `SupportTicketConversation$inboundSchema` instead. */
    SupportTicketConversation$.inboundSchema = SupportTicketConversation$inboundSchema;
    /** @deprecated use `SupportTicketConversation$outboundSchema` instead. */
    SupportTicketConversation$.outboundSchema = SupportTicketConversation$outboundSchema;
})(SupportTicketConversation$ || (SupportTicketConversation$ = {}));
export function supportTicketConversationToJSON(supportTicketConversation) {
    return JSON.stringify(SupportTicketConversation$outboundSchema.parse(supportTicketConversation));
}
export function supportTicketConversationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SupportTicketConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportTicketConversation' from JSON`);
}
//# sourceMappingURL=supportticketconversation.js.map