"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.SupportTicketConversation$ = exports.SupportTicketConversation$outboundSchema = exports.SupportTicketConversation$inboundSchema = exports.SupportTicketConversationVisibility$ = exports.SupportTicketConversationVisibility$outboundSchema = exports.SupportTicketConversationVisibility$inboundSchema = exports.SupportTicketConversationType$ = exports.SupportTicketConversationType$outboundSchema = exports.SupportTicketConversationType$inboundSchema = exports.SupportTicketConversationVisibility = exports.SupportTicketConversationType = void 0;
exports.supportTicketConversationToJSON = supportTicketConversationToJSON;
exports.supportTicketConversationFromJSON = supportTicketConversationFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const supportticketmessage_js_1 = require("./supportticketmessage.js");
exports.SupportTicketConversationType = {
    SupportTicket: "support_ticket",
};
exports.SupportTicketConversationVisibility = {
    Private: "private",
    Public: "public",
};
/** @internal */
exports.SupportTicketConversationType$inboundSchema = z.nativeEnum(exports.SupportTicketConversationType);
/** @internal */
exports.SupportTicketConversationType$outboundSchema = exports.SupportTicketConversationType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketConversationType$;
(function (SupportTicketConversationType$) {
    /** @deprecated use `SupportTicketConversationType$inboundSchema` instead. */
    SupportTicketConversationType$.inboundSchema = exports.SupportTicketConversationType$inboundSchema;
    /** @deprecated use `SupportTicketConversationType$outboundSchema` instead. */
    SupportTicketConversationType$.outboundSchema = exports.SupportTicketConversationType$outboundSchema;
})(SupportTicketConversationType$ || (exports.SupportTicketConversationType$ = SupportTicketConversationType$ = {}));
/** @internal */
exports.SupportTicketConversationVisibility$inboundSchema = z.nativeEnum(exports.SupportTicketConversationVisibility);
/** @internal */
exports.SupportTicketConversationVisibility$outboundSchema = exports.SupportTicketConversationVisibility$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketConversationVisibility$;
(function (SupportTicketConversationVisibility$) {
    /** @deprecated use `SupportTicketConversationVisibility$inboundSchema` instead. */
    SupportTicketConversationVisibility$.inboundSchema = exports.SupportTicketConversationVisibility$inboundSchema;
    /** @deprecated use `SupportTicketConversationVisibility$outboundSchema` instead. */
    SupportTicketConversationVisibility$.outboundSchema = exports.SupportTicketConversationVisibility$outboundSchema;
})(SupportTicketConversationVisibility$ || (exports.SupportTicketConversationVisibility$ = SupportTicketConversationVisibility$ = {}));
/** @internal */
exports.SupportTicketConversation$inboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: exports.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(exports.SupportTicketConversationVisibility$inboundSchema),
    messages: z.array(supportticketmessage_js_1.SupportTicketMessage$inboundSchema),
});
/** @internal */
exports.SupportTicketConversation$outboundSchema = z.object({
    id: z.string(),
    externalId: z.nullable(z.string()),
    externalUrl: z.nullable(z.string()),
    type: exports.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(exports.SupportTicketConversationVisibility$outboundSchema),
    messages: z.array(supportticketmessage_js_1.SupportTicketMessage$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SupportTicketConversation$;
(function (SupportTicketConversation$) {
    /** @deprecated use `SupportTicketConversation$inboundSchema` instead. */
    SupportTicketConversation$.inboundSchema = exports.SupportTicketConversation$inboundSchema;
    /** @deprecated use `SupportTicketConversation$outboundSchema` instead. */
    SupportTicketConversation$.outboundSchema = exports.SupportTicketConversation$outboundSchema;
})(SupportTicketConversation$ || (exports.SupportTicketConversation$ = SupportTicketConversation$ = {}));
function supportTicketConversationToJSON(supportTicketConversation) {
    return JSON.stringify(exports.SupportTicketConversation$outboundSchema.parse(supportTicketConversation));
}
function supportTicketConversationFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SupportTicketConversation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupportTicketConversation' from JSON`);
}
//# sourceMappingURL=supportticketconversation.js.map