/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const CreateSupportCopilotConversationType = {
    SupportCopilot: "support_copilot",
};
export const CreateSupportCopilotConversationVisibility = {
    Private: "private",
    Public: "public",
};
export const CreateSupportCopilotConversationType1 = {
    Documentation: "documentation",
    Site: "site",
    DiscoursePost: "discourse_post",
    GithubIssue: "github_issue",
    GithubDiscussion: "github_discussion",
    StackoverflowQuestion: "stackoverflow_question",
    DiscordForumPost: "discord_forum_post",
    DiscordMessage: "discord_message",
    CustomQuestionAnswer: "custom_question_answer",
};
/** @internal */
export const CreateSupportCopilotConversationType$inboundSchema = z.nativeEnum(CreateSupportCopilotConversationType);
/** @internal */
export const CreateSupportCopilotConversationType$outboundSchema = CreateSupportCopilotConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversationType$;
(function (CreateSupportCopilotConversationType$) {
    /** @deprecated use `CreateSupportCopilotConversationType$inboundSchema` instead. */
    CreateSupportCopilotConversationType$.inboundSchema = CreateSupportCopilotConversationType$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationType$outboundSchema` instead. */
    CreateSupportCopilotConversationType$.outboundSchema = CreateSupportCopilotConversationType$outboundSchema;
})(CreateSupportCopilotConversationType$ || (CreateSupportCopilotConversationType$ = {}));
/** @internal */
export const CreateSupportCopilotConversationVisibility$inboundSchema = z
    .nativeEnum(CreateSupportCopilotConversationVisibility);
/** @internal */
export const CreateSupportCopilotConversationVisibility$outboundSchema = CreateSupportCopilotConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversationVisibility$;
(function (CreateSupportCopilotConversationVisibility$) {
    /** @deprecated use `CreateSupportCopilotConversationVisibility$inboundSchema` instead. */
    CreateSupportCopilotConversationVisibility$.inboundSchema = CreateSupportCopilotConversationVisibility$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationVisibility$outboundSchema` instead. */
    CreateSupportCopilotConversationVisibility$.outboundSchema = CreateSupportCopilotConversationVisibility$outboundSchema;
})(CreateSupportCopilotConversationVisibility$ || (CreateSupportCopilotConversationVisibility$ = {}));
/** @internal */
export const CreateSupportCopilotConversationType1$inboundSchema = z.nativeEnum(CreateSupportCopilotConversationType1);
/** @internal */
export const CreateSupportCopilotConversationType1$outboundSchema = CreateSupportCopilotConversationType1$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversationType1$;
(function (CreateSupportCopilotConversationType1$) {
    /** @deprecated use `CreateSupportCopilotConversationType1$inboundSchema` instead. */
    CreateSupportCopilotConversationType1$.inboundSchema = CreateSupportCopilotConversationType1$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationType1$outboundSchema` instead. */
    CreateSupportCopilotConversationType1$.outboundSchema = CreateSupportCopilotConversationType1$outboundSchema;
})(CreateSupportCopilotConversationType1$ || (CreateSupportCopilotConversationType1$ = {}));
/** @internal */
export const CreateSupportCopilotConversationMessagesType$inboundSchema = z.union([
    CreateSupportCopilotConversationType1$inboundSchema,
    z.string(),
]);
/** @internal */
export const CreateSupportCopilotConversationMessagesType$outboundSchema = z.union([
    CreateSupportCopilotConversationType1$outboundSchema,
    z.string(),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversationMessagesType$;
(function (CreateSupportCopilotConversationMessagesType$) {
    /** @deprecated use `CreateSupportCopilotConversationMessagesType$inboundSchema` instead. */
    CreateSupportCopilotConversationMessagesType$.inboundSchema = CreateSupportCopilotConversationMessagesType$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationMessagesType$outboundSchema` instead. */
    CreateSupportCopilotConversationMessagesType$.outboundSchema = CreateSupportCopilotConversationMessagesType$outboundSchema;
})(CreateSupportCopilotConversationMessagesType$ || (CreateSupportCopilotConversationMessagesType$ = {}));
export function createSupportCopilotConversationMessagesTypeToJSON(createSupportCopilotConversationMessagesType) {
    return JSON.stringify(CreateSupportCopilotConversationMessagesType$outboundSchema.parse(createSupportCopilotConversationMessagesType));
}
export function createSupportCopilotConversationMessagesTypeFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSupportCopilotConversationMessagesType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationMessagesType' from JSON`);
}
/** @internal */
export const CreateSupportCopilotConversationLinks$inboundSchema = z.object({
    label: z.nullable(z.string()).optional(),
    url: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    type: z.nullable(z.union([CreateSupportCopilotConversationType1$inboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(z.array(z.string())).optional(),
});
/** @internal */
export const CreateSupportCopilotConversationLinks$outboundSchema = z.object({
    label: z.nullable(z.string()).optional(),
    url: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.nullable(z.string()).optional(),
    type: z.nullable(z.union([CreateSupportCopilotConversationType1$outboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(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 CreateSupportCopilotConversationLinks$;
(function (CreateSupportCopilotConversationLinks$) {
    /** @deprecated use `CreateSupportCopilotConversationLinks$inboundSchema` instead. */
    CreateSupportCopilotConversationLinks$.inboundSchema = CreateSupportCopilotConversationLinks$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationLinks$outboundSchema` instead. */
    CreateSupportCopilotConversationLinks$.outboundSchema = CreateSupportCopilotConversationLinks$outboundSchema;
})(CreateSupportCopilotConversationLinks$ || (CreateSupportCopilotConversationLinks$ = {}));
export function createSupportCopilotConversationLinksToJSON(createSupportCopilotConversationLinks) {
    return JSON.stringify(CreateSupportCopilotConversationLinks$outboundSchema.parse(createSupportCopilotConversationLinks));
}
export function createSupportCopilotConversationLinksFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSupportCopilotConversationLinks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationLinks' from JSON`);
}
/** @internal */
export const CreateSupportCopilotConversationMessages$inboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    updatedAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    role: z.string(),
    content: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    links: z.nullable(z.array(z.lazy(() => CreateSupportCopilotConversationLinks$inboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
export const CreateSupportCopilotConversationMessages$outboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    role: z.string(),
    content: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    links: z.nullable(z.array(z.lazy(() => CreateSupportCopilotConversationLinks$outboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversationMessages$;
(function (CreateSupportCopilotConversationMessages$) {
    /** @deprecated use `CreateSupportCopilotConversationMessages$inboundSchema` instead. */
    CreateSupportCopilotConversationMessages$.inboundSchema = CreateSupportCopilotConversationMessages$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationMessages$outboundSchema` instead. */
    CreateSupportCopilotConversationMessages$.outboundSchema = CreateSupportCopilotConversationMessages$outboundSchema;
})(CreateSupportCopilotConversationMessages$ || (CreateSupportCopilotConversationMessages$ = {}));
export function createSupportCopilotConversationMessagesToJSON(createSupportCopilotConversationMessages) {
    return JSON.stringify(CreateSupportCopilotConversationMessages$outboundSchema.parse(createSupportCopilotConversationMessages));
}
export function createSupportCopilotConversationMessagesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSupportCopilotConversationMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationMessages' from JSON`);
}
/** @internal */
export const CreateSupportCopilotConversation$inboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: CreateSupportCopilotConversationType$inboundSchema,
    supportTicketConversationId: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    updatedAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    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(CreateSupportCopilotConversationVisibility$inboundSchema).optional(),
    messages: z.array(z.lazy(() => CreateSupportCopilotConversationMessages$inboundSchema)),
});
/** @internal */
export const CreateSupportCopilotConversation$outboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: CreateSupportCopilotConversationType$outboundSchema,
    supportTicketConversationId: z.nullable(z.string()).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    projectId: z.nullable(z.string()).optional(),
    integrationId: z.nullable(z.string()).optional(),
    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(CreateSupportCopilotConversationVisibility$outboundSchema).optional(),
    messages: z.array(z.lazy(() => CreateSupportCopilotConversationMessages$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var CreateSupportCopilotConversation$;
(function (CreateSupportCopilotConversation$) {
    /** @deprecated use `CreateSupportCopilotConversation$inboundSchema` instead. */
    CreateSupportCopilotConversation$.inboundSchema = CreateSupportCopilotConversation$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversation$outboundSchema` instead. */
    CreateSupportCopilotConversation$.outboundSchema = CreateSupportCopilotConversation$outboundSchema;
})(CreateSupportCopilotConversation$ || (CreateSupportCopilotConversation$ = {}));
export function createSupportCopilotConversationToJSON(createSupportCopilotConversation) {
    return JSON.stringify(CreateSupportCopilotConversation$outboundSchema.parse(createSupportCopilotConversation));
}
export function createSupportCopilotConversationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CreateSupportCopilotConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversation' from JSON`);
}
//# sourceMappingURL=createsupportcopilotconversation.js.map