/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { Conversation$inboundSchema, Conversation$outboundSchema, } from "./conversation.js";
import { Message$inboundSchema, Message$outboundSchema, } from "./message.js";
export const GetAllFeedbackResponseType = {
    Positive: "positive",
    Negative: "negative",
};
export const GetAllFeedbackResponseNegativeFeedbackType = {
    Positive: "positive",
    Negative: "negative",
};
/** @internal */
export const GetAllFeedbackResponseType$inboundSchema = z.nativeEnum(GetAllFeedbackResponseType);
/** @internal */
export const GetAllFeedbackResponseType$outboundSchema = GetAllFeedbackResponseType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllFeedbackResponseType$;
(function (GetAllFeedbackResponseType$) {
    /** @deprecated use `GetAllFeedbackResponseType$inboundSchema` instead. */
    GetAllFeedbackResponseType$.inboundSchema = GetAllFeedbackResponseType$inboundSchema;
    /** @deprecated use `GetAllFeedbackResponseType$outboundSchema` instead. */
    GetAllFeedbackResponseType$.outboundSchema = GetAllFeedbackResponseType$outboundSchema;
})(GetAllFeedbackResponseType$ || (GetAllFeedbackResponseType$ = {}));
/** @internal */
export const Reasons$inboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
/** @internal */
export const Reasons$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 Reasons$;
(function (Reasons$) {
    /** @deprecated use `Reasons$inboundSchema` instead. */
    Reasons$.inboundSchema = Reasons$inboundSchema;
    /** @deprecated use `Reasons$outboundSchema` instead. */
    Reasons$.outboundSchema = Reasons$outboundSchema;
})(Reasons$ || (Reasons$ = {}));
export function reasonsToJSON(reasons) {
    return JSON.stringify(Reasons$outboundSchema.parse(reasons));
}
export function reasonsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Reasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Reasons' from JSON`);
}
/** @internal */
export const PositiveFeedback$inboundSchema = z.object({
    id: z.string(),
    type: GetAllFeedbackResponseType$inboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => Reasons$inboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    conversation: Conversation$inboundSchema,
    message: Message$inboundSchema,
});
/** @internal */
export const PositiveFeedback$outboundSchema = z.object({
    id: z.string(),
    type: GetAllFeedbackResponseType$outboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => Reasons$outboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    conversation: Conversation$outboundSchema,
    message: 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 PositiveFeedback$;
(function (PositiveFeedback$) {
    /** @deprecated use `PositiveFeedback$inboundSchema` instead. */
    PositiveFeedback$.inboundSchema = PositiveFeedback$inboundSchema;
    /** @deprecated use `PositiveFeedback$outboundSchema` instead. */
    PositiveFeedback$.outboundSchema = PositiveFeedback$outboundSchema;
})(PositiveFeedback$ || (PositiveFeedback$ = {}));
export function positiveFeedbackToJSON(positiveFeedback) {
    return JSON.stringify(PositiveFeedback$outboundSchema.parse(positiveFeedback));
}
export function positiveFeedbackFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PositiveFeedback$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PositiveFeedback' from JSON`);
}
/** @internal */
export const GetAllFeedbackResponseNegativeFeedbackType$inboundSchema = z
    .nativeEnum(GetAllFeedbackResponseNegativeFeedbackType);
/** @internal */
export const GetAllFeedbackResponseNegativeFeedbackType$outboundSchema = GetAllFeedbackResponseNegativeFeedbackType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllFeedbackResponseNegativeFeedbackType$;
(function (GetAllFeedbackResponseNegativeFeedbackType$) {
    /** @deprecated use `GetAllFeedbackResponseNegativeFeedbackType$inboundSchema` instead. */
    GetAllFeedbackResponseNegativeFeedbackType$.inboundSchema = GetAllFeedbackResponseNegativeFeedbackType$inboundSchema;
    /** @deprecated use `GetAllFeedbackResponseNegativeFeedbackType$outboundSchema` instead. */
    GetAllFeedbackResponseNegativeFeedbackType$.outboundSchema = GetAllFeedbackResponseNegativeFeedbackType$outboundSchema;
})(GetAllFeedbackResponseNegativeFeedbackType$ || (GetAllFeedbackResponseNegativeFeedbackType$ = {}));
/** @internal */
export const GetAllFeedbackResponseReasons$inboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
/** @internal */
export const GetAllFeedbackResponseReasons$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 GetAllFeedbackResponseReasons$;
(function (GetAllFeedbackResponseReasons$) {
    /** @deprecated use `GetAllFeedbackResponseReasons$inboundSchema` instead. */
    GetAllFeedbackResponseReasons$.inboundSchema = GetAllFeedbackResponseReasons$inboundSchema;
    /** @deprecated use `GetAllFeedbackResponseReasons$outboundSchema` instead. */
    GetAllFeedbackResponseReasons$.outboundSchema = GetAllFeedbackResponseReasons$outboundSchema;
})(GetAllFeedbackResponseReasons$ || (GetAllFeedbackResponseReasons$ = {}));
export function getAllFeedbackResponseReasonsToJSON(getAllFeedbackResponseReasons) {
    return JSON.stringify(GetAllFeedbackResponseReasons$outboundSchema.parse(getAllFeedbackResponseReasons));
}
export function getAllFeedbackResponseReasonsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllFeedbackResponseReasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllFeedbackResponseReasons' from JSON`);
}
/** @internal */
export const NegativeFeedback$inboundSchema = z.object({
    id: z.string(),
    type: GetAllFeedbackResponseNegativeFeedbackType$inboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => GetAllFeedbackResponseReasons$inboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    conversation: Conversation$inboundSchema,
    message: Message$inboundSchema,
});
/** @internal */
export const NegativeFeedback$outboundSchema = z.object({
    id: z.string(),
    type: GetAllFeedbackResponseNegativeFeedbackType$outboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => GetAllFeedbackResponseReasons$outboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
    conversation: Conversation$outboundSchema,
    message: 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 NegativeFeedback$;
(function (NegativeFeedback$) {
    /** @deprecated use `NegativeFeedback$inboundSchema` instead. */
    NegativeFeedback$.inboundSchema = NegativeFeedback$inboundSchema;
    /** @deprecated use `NegativeFeedback$outboundSchema` instead. */
    NegativeFeedback$.outboundSchema = NegativeFeedback$outboundSchema;
})(NegativeFeedback$ || (NegativeFeedback$ = {}));
export function negativeFeedbackToJSON(negativeFeedback) {
    return JSON.stringify(NegativeFeedback$outboundSchema.parse(negativeFeedback));
}
export function negativeFeedbackFromJSON(jsonString) {
    return safeParse(jsonString, (x) => NegativeFeedback$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NegativeFeedback' from JSON`);
}
/** @internal */
export const GetAllFeedbackResponse$inboundSchema = z.object({
    positiveFeedbackCount: z.number(),
    negativeFeedbackCount: z.number(),
    positiveFeedback: z.array(z.lazy(() => PositiveFeedback$inboundSchema)),
    negativeFeedback: z.array(z.lazy(() => NegativeFeedback$inboundSchema)),
});
/** @internal */
export const GetAllFeedbackResponse$outboundSchema = z.object({
    positiveFeedbackCount: z.number(),
    negativeFeedbackCount: z.number(),
    positiveFeedback: z.array(z.lazy(() => PositiveFeedback$outboundSchema)),
    negativeFeedback: z.array(z.lazy(() => NegativeFeedback$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllFeedbackResponse$;
(function (GetAllFeedbackResponse$) {
    /** @deprecated use `GetAllFeedbackResponse$inboundSchema` instead. */
    GetAllFeedbackResponse$.inboundSchema = GetAllFeedbackResponse$inboundSchema;
    /** @deprecated use `GetAllFeedbackResponse$outboundSchema` instead. */
    GetAllFeedbackResponse$.outboundSchema = GetAllFeedbackResponse$outboundSchema;
})(GetAllFeedbackResponse$ || (GetAllFeedbackResponse$ = {}));
export function getAllFeedbackResponseToJSON(getAllFeedbackResponse) {
    return JSON.stringify(GetAllFeedbackResponse$outboundSchema.parse(getAllFeedbackResponse));
}
export function getAllFeedbackResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllFeedbackResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllFeedbackResponse' from JSON`);
}
//# sourceMappingURL=getallfeedbackresponse.js.map