"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.GetFeedbackByIdResponseBody$outboundSchema = exports.GetFeedbackByIdResponseBody$inboundSchema = exports.GetFeedbackByIdSources$outboundSchema = exports.GetFeedbackByIdSources$inboundSchema = exports.GetFeedbackByIdFeedbackType$outboundSchema = exports.GetFeedbackByIdFeedbackType$inboundSchema = exports.GetFeedbackByIdUserProperties$outboundSchema = exports.GetFeedbackByIdUserProperties$inboundSchema = exports.GetFeedbackByIdUserId$outboundSchema = exports.GetFeedbackByIdUserId$inboundSchema = exports.GetFeedbackByIdId$outboundSchema = exports.GetFeedbackByIdId$inboundSchema = exports.GetFeedbackByIdReasons$outboundSchema = exports.GetFeedbackByIdReasons$inboundSchema = exports.GetFeedbackByIdType$outboundSchema = exports.GetFeedbackByIdType$inboundSchema = exports.GetFeedbackByIdRequest$outboundSchema = exports.GetFeedbackByIdRequest$inboundSchema = exports.GetFeedbackByIdFeedbackType = exports.GetFeedbackByIdType = void 0;
exports.getFeedbackByIdRequestToJSON = getFeedbackByIdRequestToJSON;
exports.getFeedbackByIdRequestFromJSON = getFeedbackByIdRequestFromJSON;
exports.getFeedbackByIdReasonsToJSON = getFeedbackByIdReasonsToJSON;
exports.getFeedbackByIdReasonsFromJSON = getFeedbackByIdReasonsFromJSON;
exports.getFeedbackByIdIdToJSON = getFeedbackByIdIdToJSON;
exports.getFeedbackByIdIdFromJSON = getFeedbackByIdIdFromJSON;
exports.getFeedbackByIdUserIdToJSON = getFeedbackByIdUserIdToJSON;
exports.getFeedbackByIdUserIdFromJSON = getFeedbackByIdUserIdFromJSON;
exports.getFeedbackByIdUserPropertiesToJSON = getFeedbackByIdUserPropertiesToJSON;
exports.getFeedbackByIdUserPropertiesFromJSON = getFeedbackByIdUserPropertiesFromJSON;
exports.getFeedbackByIdSourcesToJSON = getFeedbackByIdSourcesToJSON;
exports.getFeedbackByIdSourcesFromJSON = getFeedbackByIdSourcesFromJSON;
exports.getFeedbackByIdResponseBodyToJSON = getFeedbackByIdResponseBodyToJSON;
exports.getFeedbackByIdResponseBodyFromJSON = getFeedbackByIdResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
exports.GetFeedbackByIdType = {
    Positive: "positive",
    Negative: "negative",
};
exports.GetFeedbackByIdFeedbackType = {
    Positive: "positive",
    Negative: "negative",
    New: "new",
};
/** @internal */
exports.GetFeedbackByIdRequest$inboundSchema = z.object({
    id: z.string(),
});
/** @internal */
exports.GetFeedbackByIdRequest$outboundSchema = z.object({
    id: z.string(),
});
function getFeedbackByIdRequestToJSON(getFeedbackByIdRequest) {
    return JSON.stringify(exports.GetFeedbackByIdRequest$outboundSchema.parse(getFeedbackByIdRequest));
}
function getFeedbackByIdRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdRequest' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdType$inboundSchema = z.nativeEnum(exports.GetFeedbackByIdType);
/** @internal */
exports.GetFeedbackByIdType$outboundSchema = exports.GetFeedbackByIdType$inboundSchema;
/** @internal */
exports.GetFeedbackByIdReasons$inboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
/** @internal */
exports.GetFeedbackByIdReasons$outboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
function getFeedbackByIdReasonsToJSON(getFeedbackByIdReasons) {
    return JSON.stringify(exports.GetFeedbackByIdReasons$outboundSchema.parse(getFeedbackByIdReasons));
}
function getFeedbackByIdReasonsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdReasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdReasons' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
exports.GetFeedbackByIdId$outboundSchema = z.union([z.string(), z.number()]);
function getFeedbackByIdIdToJSON(getFeedbackByIdId) {
    return JSON.stringify(exports.GetFeedbackByIdId$outboundSchema.parse(getFeedbackByIdId));
}
function getFeedbackByIdIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdId' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdUserId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
exports.GetFeedbackByIdUserId$outboundSchema = z.union([z.string(), z.number()]);
function getFeedbackByIdUserIdToJSON(getFeedbackByIdUserId) {
    return JSON.stringify(exports.GetFeedbackByIdUserId$outboundSchema.parse(getFeedbackByIdUserId));
}
function getFeedbackByIdUserIdFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdUserId' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdUserProperties$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    id: z.nullable(z.union([z.string(), z.number()])).optional(),
    identificationType: z.nullable(z.string()).optional(),
    userId: z.nullable(z.union([z.string(), z.number()])).optional(),
    supportAgentName: z.nullable(z.string()).optional(),
    userType: z.nullable(z.string()).optional(),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.GetFeedbackByIdUserProperties$outboundSchema = z.object({
    id: z.nullable(z.union([z.string(), z.number()])).optional(),
    identificationType: z.nullable(z.string()).optional(),
    userId: z.nullable(z.union([z.string(), z.number()])).optional(),
    supportAgentName: z.nullable(z.string()).optional(),
    userType: z.nullable(z.string()).optional(),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function getFeedbackByIdUserPropertiesToJSON(getFeedbackByIdUserProperties) {
    return JSON.stringify(exports.GetFeedbackByIdUserProperties$outboundSchema.parse(getFeedbackByIdUserProperties));
}
function getFeedbackByIdUserPropertiesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdUserProperties$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdUserProperties' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdFeedbackType$inboundSchema = z.nativeEnum(exports.GetFeedbackByIdFeedbackType);
/** @internal */
exports.GetFeedbackByIdFeedbackType$outboundSchema = exports.GetFeedbackByIdFeedbackType$inboundSchema;
/** @internal */
exports.GetFeedbackByIdSources$inboundSchema = z.object({
    type: z.nullable(exports.GetFeedbackByIdFeedbackType$inboundSchema),
    title: z.nullable(z.string()).optional(),
    url: z.nullable(z.string()).optional(),
});
/** @internal */
exports.GetFeedbackByIdSources$outboundSchema = z.object({
    type: z.nullable(exports.GetFeedbackByIdFeedbackType$outboundSchema),
    title: z.nullable(z.string()).optional(),
    url: z.nullable(z.string()).optional(),
});
function getFeedbackByIdSourcesToJSON(getFeedbackByIdSources) {
    return JSON.stringify(exports.GetFeedbackByIdSources$outboundSchema.parse(getFeedbackByIdSources));
}
function getFeedbackByIdSourcesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdSources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdSources' from JSON`);
}
/** @internal */
exports.GetFeedbackByIdResponseBody$inboundSchema = z.object({
    id: z.string(),
    type: exports.GetFeedbackByIdType$inboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    updatedAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => exports.GetFeedbackByIdReasons$inboundSchema))).optional(),
    details: z.nullable(z.string()).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => exports.GetFeedbackByIdUserProperties$inboundSchema)).optional(),
    sources: z.nullable(z.array(z.lazy(() => exports.GetFeedbackByIdSources$inboundSchema))).optional(),
    conversation: components.Conversation$inboundSchema,
    message: components.Message$inboundSchema,
});
/** @internal */
exports.GetFeedbackByIdResponseBody$outboundSchema = z.object({
    id: z.string(),
    type: exports.GetFeedbackByIdType$outboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    updatedAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => exports.GetFeedbackByIdReasons$outboundSchema))).optional(),
    details: z.nullable(z.string()).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => exports.GetFeedbackByIdUserProperties$outboundSchema)).optional(),
    sources: z.nullable(z.array(z.lazy(() => exports.GetFeedbackByIdSources$outboundSchema))).optional(),
    conversation: components.Conversation$outboundSchema,
    message: components.Message$outboundSchema,
});
function getFeedbackByIdResponseBodyToJSON(getFeedbackByIdResponseBody) {
    return JSON.stringify(exports.GetFeedbackByIdResponseBody$outboundSchema.parse(getFeedbackByIdResponseBody));
}
function getFeedbackByIdResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetFeedbackByIdResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetFeedbackByIdResponseBody' from JSON`);
}
//# sourceMappingURL=getfeedbackbyid.js.map