"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.CreateSupportCopilotConversation$ = exports.CreateSupportCopilotConversation$outboundSchema = exports.CreateSupportCopilotConversation$inboundSchema = exports.CreateSupportCopilotConversationMessages$ = exports.CreateSupportCopilotConversationMessages$outboundSchema = exports.CreateSupportCopilotConversationMessages$inboundSchema = exports.CreateSupportCopilotConversationLinks$ = exports.CreateSupportCopilotConversationLinks$outboundSchema = exports.CreateSupportCopilotConversationLinks$inboundSchema = exports.CreateSupportCopilotConversationMessagesType$ = exports.CreateSupportCopilotConversationMessagesType$outboundSchema = exports.CreateSupportCopilotConversationMessagesType$inboundSchema = exports.CreateSupportCopilotConversationType1$ = exports.CreateSupportCopilotConversationType1$outboundSchema = exports.CreateSupportCopilotConversationType1$inboundSchema = exports.CreateSupportCopilotConversationVisibility$ = exports.CreateSupportCopilotConversationVisibility$outboundSchema = exports.CreateSupportCopilotConversationVisibility$inboundSchema = exports.CreateSupportCopilotConversationType$ = exports.CreateSupportCopilotConversationType$outboundSchema = exports.CreateSupportCopilotConversationType$inboundSchema = exports.CreateSupportCopilotConversationType1 = exports.CreateSupportCopilotConversationVisibility = exports.CreateSupportCopilotConversationType = void 0;
exports.createSupportCopilotConversationMessagesTypeToJSON = createSupportCopilotConversationMessagesTypeToJSON;
exports.createSupportCopilotConversationMessagesTypeFromJSON = createSupportCopilotConversationMessagesTypeFromJSON;
exports.createSupportCopilotConversationLinksToJSON = createSupportCopilotConversationLinksToJSON;
exports.createSupportCopilotConversationLinksFromJSON = createSupportCopilotConversationLinksFromJSON;
exports.createSupportCopilotConversationMessagesToJSON = createSupportCopilotConversationMessagesToJSON;
exports.createSupportCopilotConversationMessagesFromJSON = createSupportCopilotConversationMessagesFromJSON;
exports.createSupportCopilotConversationToJSON = createSupportCopilotConversationToJSON;
exports.createSupportCopilotConversationFromJSON = createSupportCopilotConversationFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateSupportCopilotConversationType = {
    SupportCopilot: "support_copilot",
};
exports.CreateSupportCopilotConversationVisibility = {
    Private: "private",
    Public: "public",
};
exports.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 */
exports.CreateSupportCopilotConversationType$inboundSchema = z.nativeEnum(exports.CreateSupportCopilotConversationType);
/** @internal */
exports.CreateSupportCopilotConversationType$outboundSchema = exports.CreateSupportCopilotConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportCopilotConversationType$;
(function (CreateSupportCopilotConversationType$) {
    /** @deprecated use `CreateSupportCopilotConversationType$inboundSchema` instead. */
    CreateSupportCopilotConversationType$.inboundSchema = exports.CreateSupportCopilotConversationType$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationType$outboundSchema` instead. */
    CreateSupportCopilotConversationType$.outboundSchema = exports.CreateSupportCopilotConversationType$outboundSchema;
})(CreateSupportCopilotConversationType$ || (exports.CreateSupportCopilotConversationType$ = CreateSupportCopilotConversationType$ = {}));
/** @internal */
exports.CreateSupportCopilotConversationVisibility$inboundSchema = z
    .nativeEnum(exports.CreateSupportCopilotConversationVisibility);
/** @internal */
exports.CreateSupportCopilotConversationVisibility$outboundSchema = exports.CreateSupportCopilotConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportCopilotConversationVisibility$;
(function (CreateSupportCopilotConversationVisibility$) {
    /** @deprecated use `CreateSupportCopilotConversationVisibility$inboundSchema` instead. */
    CreateSupportCopilotConversationVisibility$.inboundSchema = exports.CreateSupportCopilotConversationVisibility$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationVisibility$outboundSchema` instead. */
    CreateSupportCopilotConversationVisibility$.outboundSchema = exports.CreateSupportCopilotConversationVisibility$outboundSchema;
})(CreateSupportCopilotConversationVisibility$ || (exports.CreateSupportCopilotConversationVisibility$ = CreateSupportCopilotConversationVisibility$ = {}));
/** @internal */
exports.CreateSupportCopilotConversationType1$inboundSchema = z.nativeEnum(exports.CreateSupportCopilotConversationType1);
/** @internal */
exports.CreateSupportCopilotConversationType1$outboundSchema = exports.CreateSupportCopilotConversationType1$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportCopilotConversationType1$;
(function (CreateSupportCopilotConversationType1$) {
    /** @deprecated use `CreateSupportCopilotConversationType1$inboundSchema` instead. */
    CreateSupportCopilotConversationType1$.inboundSchema = exports.CreateSupportCopilotConversationType1$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationType1$outboundSchema` instead. */
    CreateSupportCopilotConversationType1$.outboundSchema = exports.CreateSupportCopilotConversationType1$outboundSchema;
})(CreateSupportCopilotConversationType1$ || (exports.CreateSupportCopilotConversationType1$ = CreateSupportCopilotConversationType1$ = {}));
/** @internal */
exports.CreateSupportCopilotConversationMessagesType$inboundSchema = z.union([
    exports.CreateSupportCopilotConversationType1$inboundSchema,
    z.string(),
]);
/** @internal */
exports.CreateSupportCopilotConversationMessagesType$outboundSchema = z.union([
    exports.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.
 */
var CreateSupportCopilotConversationMessagesType$;
(function (CreateSupportCopilotConversationMessagesType$) {
    /** @deprecated use `CreateSupportCopilotConversationMessagesType$inboundSchema` instead. */
    CreateSupportCopilotConversationMessagesType$.inboundSchema = exports.CreateSupportCopilotConversationMessagesType$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationMessagesType$outboundSchema` instead. */
    CreateSupportCopilotConversationMessagesType$.outboundSchema = exports.CreateSupportCopilotConversationMessagesType$outboundSchema;
})(CreateSupportCopilotConversationMessagesType$ || (exports.CreateSupportCopilotConversationMessagesType$ = CreateSupportCopilotConversationMessagesType$ = {}));
function createSupportCopilotConversationMessagesTypeToJSON(createSupportCopilotConversationMessagesType) {
    return JSON.stringify(exports.CreateSupportCopilotConversationMessagesType$outboundSchema.parse(createSupportCopilotConversationMessagesType));
}
function createSupportCopilotConversationMessagesTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportCopilotConversationMessagesType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationMessagesType' from JSON`);
}
/** @internal */
exports.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([exports.CreateSupportCopilotConversationType1$inboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(z.array(z.string())).optional(),
});
/** @internal */
exports.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([exports.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.
 */
var CreateSupportCopilotConversationLinks$;
(function (CreateSupportCopilotConversationLinks$) {
    /** @deprecated use `CreateSupportCopilotConversationLinks$inboundSchema` instead. */
    CreateSupportCopilotConversationLinks$.inboundSchema = exports.CreateSupportCopilotConversationLinks$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationLinks$outboundSchema` instead. */
    CreateSupportCopilotConversationLinks$.outboundSchema = exports.CreateSupportCopilotConversationLinks$outboundSchema;
})(CreateSupportCopilotConversationLinks$ || (exports.CreateSupportCopilotConversationLinks$ = CreateSupportCopilotConversationLinks$ = {}));
function createSupportCopilotConversationLinksToJSON(createSupportCopilotConversationLinks) {
    return JSON.stringify(exports.CreateSupportCopilotConversationLinks$outboundSchema.parse(createSupportCopilotConversationLinks));
}
function createSupportCopilotConversationLinksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportCopilotConversationLinks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationLinks' from JSON`);
}
/** @internal */
exports.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(() => exports.CreateSupportCopilotConversationLinks$inboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
exports.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(() => exports.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.
 */
var CreateSupportCopilotConversationMessages$;
(function (CreateSupportCopilotConversationMessages$) {
    /** @deprecated use `CreateSupportCopilotConversationMessages$inboundSchema` instead. */
    CreateSupportCopilotConversationMessages$.inboundSchema = exports.CreateSupportCopilotConversationMessages$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversationMessages$outboundSchema` instead. */
    CreateSupportCopilotConversationMessages$.outboundSchema = exports.CreateSupportCopilotConversationMessages$outboundSchema;
})(CreateSupportCopilotConversationMessages$ || (exports.CreateSupportCopilotConversationMessages$ = CreateSupportCopilotConversationMessages$ = {}));
function createSupportCopilotConversationMessagesToJSON(createSupportCopilotConversationMessages) {
    return JSON.stringify(exports.CreateSupportCopilotConversationMessages$outboundSchema.parse(createSupportCopilotConversationMessages));
}
function createSupportCopilotConversationMessagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportCopilotConversationMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversationMessages' from JSON`);
}
/** @internal */
exports.CreateSupportCopilotConversation$inboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: exports.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(exports.CreateSupportCopilotConversationVisibility$inboundSchema).optional(),
    messages: z.array(z.lazy(() => exports.CreateSupportCopilotConversationMessages$inboundSchema)),
});
/** @internal */
exports.CreateSupportCopilotConversation$outboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: exports.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(exports.CreateSupportCopilotConversationVisibility$outboundSchema).optional(),
    messages: z.array(z.lazy(() => exports.CreateSupportCopilotConversationMessages$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportCopilotConversation$;
(function (CreateSupportCopilotConversation$) {
    /** @deprecated use `CreateSupportCopilotConversation$inboundSchema` instead. */
    CreateSupportCopilotConversation$.inboundSchema = exports.CreateSupportCopilotConversation$inboundSchema;
    /** @deprecated use `CreateSupportCopilotConversation$outboundSchema` instead. */
    CreateSupportCopilotConversation$.outboundSchema = exports.CreateSupportCopilotConversation$outboundSchema;
})(CreateSupportCopilotConversation$ || (exports.CreateSupportCopilotConversation$ = CreateSupportCopilotConversation$ = {}));
function createSupportCopilotConversationToJSON(createSupportCopilotConversation) {
    return JSON.stringify(exports.CreateSupportCopilotConversation$outboundSchema.parse(createSupportCopilotConversation));
}
function createSupportCopilotConversationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportCopilotConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportCopilotConversation' from JSON`);
}
//# sourceMappingURL=createsupportcopilotconversation.js.map