/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { SupportCopilotMessage$inboundSchema, SupportCopilotMessage$outboundSchema, } from "./supportcopilotmessage.js";
export const SupportCopilotConversationType = {
    SupportCopilot: "support_copilot",
};
export const SupportCopilotConversationVisibility = {
    Private: "private",
    Public: "public",
};
/** @internal */
export const SupportCopilotConversationType$inboundSchema = z.nativeEnum(SupportCopilotConversationType);
/** @internal */
export const SupportCopilotConversationType$outboundSchema = SupportCopilotConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportCopilotConversationType$;
(function (SupportCopilotConversationType$) {
    /** @deprecated use `SupportCopilotConversationType$inboundSchema` instead. */
    SupportCopilotConversationType$.inboundSchema = SupportCopilotConversationType$inboundSchema;
    /** @deprecated use `SupportCopilotConversationType$outboundSchema` instead. */
    SupportCopilotConversationType$.outboundSchema = SupportCopilotConversationType$outboundSchema;
})(SupportCopilotConversationType$ || (SupportCopilotConversationType$ = {}));
/** @internal */
export const SupportCopilotConversationVisibility$inboundSchema = z.nativeEnum(SupportCopilotConversationVisibility);
/** @internal */
export const SupportCopilotConversationVisibility$outboundSchema = SupportCopilotConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportCopilotConversationVisibility$;
(function (SupportCopilotConversationVisibility$) {
    /** @deprecated use `SupportCopilotConversationVisibility$inboundSchema` instead. */
    SupportCopilotConversationVisibility$.inboundSchema = SupportCopilotConversationVisibility$inboundSchema;
    /** @deprecated use `SupportCopilotConversationVisibility$outboundSchema` instead. */
    SupportCopilotConversationVisibility$.outboundSchema = SupportCopilotConversationVisibility$outboundSchema;
})(SupportCopilotConversationVisibility$ || (SupportCopilotConversationVisibility$ = {}));
/** @internal */
export const SupportCopilotConversation$inboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: SupportCopilotConversationType$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(SupportCopilotConversationVisibility$inboundSchema),
    messages: z.array(SupportCopilotMessage$inboundSchema),
});
/** @internal */
export const SupportCopilotConversation$outboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: SupportCopilotConversationType$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(SupportCopilotConversationVisibility$outboundSchema),
    messages: z.array(SupportCopilotMessage$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var SupportCopilotConversation$;
(function (SupportCopilotConversation$) {
    /** @deprecated use `SupportCopilotConversation$inboundSchema` instead. */
    SupportCopilotConversation$.inboundSchema = SupportCopilotConversation$inboundSchema;
    /** @deprecated use `SupportCopilotConversation$outboundSchema` instead. */
    SupportCopilotConversation$.outboundSchema = SupportCopilotConversation$outboundSchema;
})(SupportCopilotConversation$ || (SupportCopilotConversation$ = {}));
export function supportCopilotConversationToJSON(supportCopilotConversation) {
    return JSON.stringify(SupportCopilotConversation$outboundSchema.parse(supportCopilotConversation));
}
export function supportCopilotConversationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SupportCopilotConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportCopilotConversation' from JSON`);
}
//# sourceMappingURL=supportcopilotconversation.js.map