/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
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",
};
/** @internal */
export const GetFeedbackByIdRequest$inboundSchema = z.object({
    id: z.string(),
});
/** @internal */
export const GetFeedbackByIdRequest$outboundSchema = z.object({
    id: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdRequest$;
(function (GetFeedbackByIdRequest$) {
    /** @deprecated use `GetFeedbackByIdRequest$inboundSchema` instead. */
    GetFeedbackByIdRequest$.inboundSchema = GetFeedbackByIdRequest$inboundSchema;
    /** @deprecated use `GetFeedbackByIdRequest$outboundSchema` instead. */
    GetFeedbackByIdRequest$.outboundSchema = GetFeedbackByIdRequest$outboundSchema;
})(GetFeedbackByIdRequest$ || (GetFeedbackByIdRequest$ = {}));
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
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdType$;
(function (GetFeedbackByIdType$) {
    /** @deprecated use `GetFeedbackByIdType$inboundSchema` instead. */
    GetFeedbackByIdType$.inboundSchema = GetFeedbackByIdType$inboundSchema;
    /** @deprecated use `GetFeedbackByIdType$outboundSchema` instead. */
    GetFeedbackByIdType$.outboundSchema = GetFeedbackByIdType$outboundSchema;
})(GetFeedbackByIdType$ || (GetFeedbackByIdType$ = {}));
/** @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(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdReasons$;
(function (GetFeedbackByIdReasons$) {
    /** @deprecated use `GetFeedbackByIdReasons$inboundSchema` instead. */
    GetFeedbackByIdReasons$.inboundSchema = GetFeedbackByIdReasons$inboundSchema;
    /** @deprecated use `GetFeedbackByIdReasons$outboundSchema` instead. */
    GetFeedbackByIdReasons$.outboundSchema = GetFeedbackByIdReasons$outboundSchema;
})(GetFeedbackByIdReasons$ || (GetFeedbackByIdReasons$ = {}));
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()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdId$;
(function (GetFeedbackByIdId$) {
    /** @deprecated use `GetFeedbackByIdId$inboundSchema` instead. */
    GetFeedbackByIdId$.inboundSchema = GetFeedbackByIdId$inboundSchema;
    /** @deprecated use `GetFeedbackByIdId$outboundSchema` instead. */
    GetFeedbackByIdId$.outboundSchema = GetFeedbackByIdId$outboundSchema;
})(GetFeedbackByIdId$ || (GetFeedbackByIdId$ = {}));
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()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdUserId$;
(function (GetFeedbackByIdUserId$) {
    /** @deprecated use `GetFeedbackByIdUserId$inboundSchema` instead. */
    GetFeedbackByIdUserId$.inboundSchema = GetFeedbackByIdUserId$inboundSchema;
    /** @deprecated use `GetFeedbackByIdUserId$outboundSchema` instead. */
    GetFeedbackByIdUserId$.outboundSchema = GetFeedbackByIdUserId$outboundSchema;
})(GetFeedbackByIdUserId$ || (GetFeedbackByIdUserId$ = {}));
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(),
}).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(),
    additionalProperties: z.record(z.any()),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...remap$(v, {
            additionalProperties: null,
        }),
    };
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdUserProperties$;
(function (GetFeedbackByIdUserProperties$) {
    /** @deprecated use `GetFeedbackByIdUserProperties$inboundSchema` instead. */
    GetFeedbackByIdUserProperties$.inboundSchema = GetFeedbackByIdUserProperties$inboundSchema;
    /** @deprecated use `GetFeedbackByIdUserProperties$outboundSchema` instead. */
    GetFeedbackByIdUserProperties$.outboundSchema = GetFeedbackByIdUserProperties$outboundSchema;
})(GetFeedbackByIdUserProperties$ || (GetFeedbackByIdUserProperties$ = {}));
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 GetFeedbackByIdResponseBody$inboundSchema = z.object({
    id: z.string(),
    type: GetFeedbackByIdType$inboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => GetFeedbackByIdReasons$inboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => GetFeedbackByIdUserProperties$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(),
    reasons: z.nullable(z.array(z.lazy(() => GetFeedbackByIdReasons$outboundSchema))).optional(),
    properties: z.nullable(z.record(z.any())).optional(),
    userProperties: z.nullable(z.lazy(() => GetFeedbackByIdUserProperties$outboundSchema)).optional(),
    conversation: components.Conversation$outboundSchema,
    message: components.Message$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetFeedbackByIdResponseBody$;
(function (GetFeedbackByIdResponseBody$) {
    /** @deprecated use `GetFeedbackByIdResponseBody$inboundSchema` instead. */
    GetFeedbackByIdResponseBody$.inboundSchema = GetFeedbackByIdResponseBody$inboundSchema;
    /** @deprecated use `GetFeedbackByIdResponseBody$outboundSchema` instead. */
    GetFeedbackByIdResponseBody$.outboundSchema = GetFeedbackByIdResponseBody$outboundSchema;
})(GetFeedbackByIdResponseBody$ || (GetFeedbackByIdResponseBody$ = {}));
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