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