"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.CreateSupportTicketConversation$ = exports.CreateSupportTicketConversation$outboundSchema = exports.CreateSupportTicketConversation$inboundSchema = exports.CreateSupportTicketConversationMessages$ = exports.CreateSupportTicketConversationMessages$outboundSchema = exports.CreateSupportTicketConversationMessages$inboundSchema = exports.CreateSupportTicketConversationLinks$ = exports.CreateSupportTicketConversationLinks$outboundSchema = exports.CreateSupportTicketConversationLinks$inboundSchema = exports.CreateSupportTicketConversationMessagesType$ = exports.CreateSupportTicketConversationMessagesType$outboundSchema = exports.CreateSupportTicketConversationMessagesType$inboundSchema = exports.CreateSupportTicketConversationType1$ = exports.CreateSupportTicketConversationType1$outboundSchema = exports.CreateSupportTicketConversationType1$inboundSchema = exports.CreateSupportTicketConversationVisibility$ = exports.CreateSupportTicketConversationVisibility$outboundSchema = exports.CreateSupportTicketConversationVisibility$inboundSchema = exports.CreateSupportTicketConversationType$ = exports.CreateSupportTicketConversationType$outboundSchema = exports.CreateSupportTicketConversationType$inboundSchema = exports.CreateSupportTicketConversationType1 = exports.CreateSupportTicketConversationVisibility = exports.CreateSupportTicketConversationType = void 0;
exports.createSupportTicketConversationMessagesTypeToJSON = createSupportTicketConversationMessagesTypeToJSON;
exports.createSupportTicketConversationMessagesTypeFromJSON = createSupportTicketConversationMessagesTypeFromJSON;
exports.createSupportTicketConversationLinksToJSON = createSupportTicketConversationLinksToJSON;
exports.createSupportTicketConversationLinksFromJSON = createSupportTicketConversationLinksFromJSON;
exports.createSupportTicketConversationMessagesToJSON = createSupportTicketConversationMessagesToJSON;
exports.createSupportTicketConversationMessagesFromJSON = createSupportTicketConversationMessagesFromJSON;
exports.createSupportTicketConversationToJSON = createSupportTicketConversationToJSON;
exports.createSupportTicketConversationFromJSON = createSupportTicketConversationFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.CreateSupportTicketConversationType = {
    SupportTicket: "support_ticket",
};
exports.CreateSupportTicketConversationVisibility = {
    Private: "private",
    Public: "public",
};
exports.CreateSupportTicketConversationType1 = {
    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.CreateSupportTicketConversationType$inboundSchema = z.nativeEnum(exports.CreateSupportTicketConversationType);
/** @internal */
exports.CreateSupportTicketConversationType$outboundSchema = exports.CreateSupportTicketConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportTicketConversationType$;
(function (CreateSupportTicketConversationType$) {
    /** @deprecated use `CreateSupportTicketConversationType$inboundSchema` instead. */
    CreateSupportTicketConversationType$.inboundSchema = exports.CreateSupportTicketConversationType$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationType$outboundSchema` instead. */
    CreateSupportTicketConversationType$.outboundSchema = exports.CreateSupportTicketConversationType$outboundSchema;
})(CreateSupportTicketConversationType$ || (exports.CreateSupportTicketConversationType$ = CreateSupportTicketConversationType$ = {}));
/** @internal */
exports.CreateSupportTicketConversationVisibility$inboundSchema = z
    .nativeEnum(exports.CreateSupportTicketConversationVisibility);
/** @internal */
exports.CreateSupportTicketConversationVisibility$outboundSchema = exports.CreateSupportTicketConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportTicketConversationVisibility$;
(function (CreateSupportTicketConversationVisibility$) {
    /** @deprecated use `CreateSupportTicketConversationVisibility$inboundSchema` instead. */
    CreateSupportTicketConversationVisibility$.inboundSchema = exports.CreateSupportTicketConversationVisibility$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationVisibility$outboundSchema` instead. */
    CreateSupportTicketConversationVisibility$.outboundSchema = exports.CreateSupportTicketConversationVisibility$outboundSchema;
})(CreateSupportTicketConversationVisibility$ || (exports.CreateSupportTicketConversationVisibility$ = CreateSupportTicketConversationVisibility$ = {}));
/** @internal */
exports.CreateSupportTicketConversationType1$inboundSchema = z.nativeEnum(exports.CreateSupportTicketConversationType1);
/** @internal */
exports.CreateSupportTicketConversationType1$outboundSchema = exports.CreateSupportTicketConversationType1$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportTicketConversationType1$;
(function (CreateSupportTicketConversationType1$) {
    /** @deprecated use `CreateSupportTicketConversationType1$inboundSchema` instead. */
    CreateSupportTicketConversationType1$.inboundSchema = exports.CreateSupportTicketConversationType1$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationType1$outboundSchema` instead. */
    CreateSupportTicketConversationType1$.outboundSchema = exports.CreateSupportTicketConversationType1$outboundSchema;
})(CreateSupportTicketConversationType1$ || (exports.CreateSupportTicketConversationType1$ = CreateSupportTicketConversationType1$ = {}));
/** @internal */
exports.CreateSupportTicketConversationMessagesType$inboundSchema = z.union([exports.CreateSupportTicketConversationType1$inboundSchema, z.string()]);
/** @internal */
exports.CreateSupportTicketConversationMessagesType$outboundSchema = z.union([
    exports.CreateSupportTicketConversationType1$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 CreateSupportTicketConversationMessagesType$;
(function (CreateSupportTicketConversationMessagesType$) {
    /** @deprecated use `CreateSupportTicketConversationMessagesType$inboundSchema` instead. */
    CreateSupportTicketConversationMessagesType$.inboundSchema = exports.CreateSupportTicketConversationMessagesType$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationMessagesType$outboundSchema` instead. */
    CreateSupportTicketConversationMessagesType$.outboundSchema = exports.CreateSupportTicketConversationMessagesType$outboundSchema;
})(CreateSupportTicketConversationMessagesType$ || (exports.CreateSupportTicketConversationMessagesType$ = CreateSupportTicketConversationMessagesType$ = {}));
function createSupportTicketConversationMessagesTypeToJSON(createSupportTicketConversationMessagesType) {
    return JSON.stringify(exports.CreateSupportTicketConversationMessagesType$outboundSchema.parse(createSupportTicketConversationMessagesType));
}
function createSupportTicketConversationMessagesTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportTicketConversationMessagesType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportTicketConversationMessagesType' from JSON`);
}
/** @internal */
exports.CreateSupportTicketConversationLinks$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.CreateSupportTicketConversationType1$inboundSchema, z.string()])).optional(),
    breadcrumbs: z.nullable(z.array(z.string())).optional(),
});
/** @internal */
exports.CreateSupportTicketConversationLinks$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.CreateSupportTicketConversationType1$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 CreateSupportTicketConversationLinks$;
(function (CreateSupportTicketConversationLinks$) {
    /** @deprecated use `CreateSupportTicketConversationLinks$inboundSchema` instead. */
    CreateSupportTicketConversationLinks$.inboundSchema = exports.CreateSupportTicketConversationLinks$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationLinks$outboundSchema` instead. */
    CreateSupportTicketConversationLinks$.outboundSchema = exports.CreateSupportTicketConversationLinks$outboundSchema;
})(CreateSupportTicketConversationLinks$ || (exports.CreateSupportTicketConversationLinks$ = CreateSupportTicketConversationLinks$ = {}));
function createSupportTicketConversationLinksToJSON(createSupportTicketConversationLinks) {
    return JSON.stringify(exports.CreateSupportTicketConversationLinks$outboundSchema.parse(createSupportTicketConversationLinks));
}
function createSupportTicketConversationLinksFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportTicketConversationLinks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportTicketConversationLinks' from JSON`);
}
/** @internal */
exports.CreateSupportTicketConversationMessages$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.CreateSupportTicketConversationLinks$inboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
exports.CreateSupportTicketConversationMessages$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.CreateSupportTicketConversationLinks$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 CreateSupportTicketConversationMessages$;
(function (CreateSupportTicketConversationMessages$) {
    /** @deprecated use `CreateSupportTicketConversationMessages$inboundSchema` instead. */
    CreateSupportTicketConversationMessages$.inboundSchema = exports.CreateSupportTicketConversationMessages$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversationMessages$outboundSchema` instead. */
    CreateSupportTicketConversationMessages$.outboundSchema = exports.CreateSupportTicketConversationMessages$outboundSchema;
})(CreateSupportTicketConversationMessages$ || (exports.CreateSupportTicketConversationMessages$ = CreateSupportTicketConversationMessages$ = {}));
function createSupportTicketConversationMessagesToJSON(createSupportTicketConversationMessages) {
    return JSON.stringify(exports.CreateSupportTicketConversationMessages$outboundSchema.parse(createSupportTicketConversationMessages));
}
function createSupportTicketConversationMessagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportTicketConversationMessages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportTicketConversationMessages' from JSON`);
}
/** @internal */
exports.CreateSupportTicketConversation$inboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: exports.CreateSupportTicketConversationType$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.CreateSupportTicketConversationVisibility$inboundSchema).optional(),
    messages: z.array(z.lazy(() => exports.CreateSupportTicketConversationMessages$inboundSchema)),
});
/** @internal */
exports.CreateSupportTicketConversation$outboundSchema = z.object({
    id: z.string().optional(),
    externalId: z.nullable(z.string()).optional(),
    externalUrl: z.nullable(z.string()).optional(),
    type: exports.CreateSupportTicketConversationType$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.CreateSupportTicketConversationVisibility$outboundSchema).optional(),
    messages: z.array(z.lazy(() => exports.CreateSupportTicketConversationMessages$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateSupportTicketConversation$;
(function (CreateSupportTicketConversation$) {
    /** @deprecated use `CreateSupportTicketConversation$inboundSchema` instead. */
    CreateSupportTicketConversation$.inboundSchema = exports.CreateSupportTicketConversation$inboundSchema;
    /** @deprecated use `CreateSupportTicketConversation$outboundSchema` instead. */
    CreateSupportTicketConversation$.outboundSchema = exports.CreateSupportTicketConversation$outboundSchema;
})(CreateSupportTicketConversation$ || (exports.CreateSupportTicketConversation$ = CreateSupportTicketConversation$ = {}));
function createSupportTicketConversationToJSON(createSupportTicketConversation) {
    return JSON.stringify(exports.CreateSupportTicketConversation$outboundSchema.parse(createSupportTicketConversation));
}
function createSupportTicketConversationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateSupportTicketConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSupportTicketConversation' from JSON`);
}
//# sourceMappingURL=createsupportticketconversation.js.map