"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.SubmitFeedbackResponseBody$ = exports.SubmitFeedbackResponseBody$outboundSchema = exports.SubmitFeedbackResponseBody$inboundSchema = exports.SubmitFeedbackReasons$ = exports.SubmitFeedbackReasons$outboundSchema = exports.SubmitFeedbackReasons$inboundSchema = exports.SubmitFeedbackType$ = exports.SubmitFeedbackType$outboundSchema = exports.SubmitFeedbackType$inboundSchema = exports.SubmitFeedbackRequestBody$ = exports.SubmitFeedbackRequestBody$outboundSchema = exports.SubmitFeedbackRequestBody$inboundSchema = exports.Reasons$ = exports.Reasons$outboundSchema = exports.Reasons$inboundSchema = exports.Type$ = exports.Type$outboundSchema = exports.Type$inboundSchema = exports.SubmitFeedbackType = exports.Type = void 0;
exports.reasonsToJSON = reasonsToJSON;
exports.reasonsFromJSON = reasonsFromJSON;
exports.submitFeedbackRequestBodyToJSON = submitFeedbackRequestBodyToJSON;
exports.submitFeedbackRequestBodyFromJSON = submitFeedbackRequestBodyFromJSON;
exports.submitFeedbackReasonsToJSON = submitFeedbackReasonsToJSON;
exports.submitFeedbackReasonsFromJSON = submitFeedbackReasonsFromJSON;
exports.submitFeedbackResponseBodyToJSON = submitFeedbackResponseBodyToJSON;
exports.submitFeedbackResponseBodyFromJSON = submitFeedbackResponseBodyFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
exports.Type = {
    Positive: "positive",
    Negative: "negative",
};
exports.SubmitFeedbackType = {
    Positive: "positive",
    Negative: "negative",
};
/** @internal */
exports.Type$inboundSchema = z.nativeEnum(exports.Type);
/** @internal */
exports.Type$outboundSchema = exports.Type$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Type$;
(function (Type$) {
    /** @deprecated use `Type$inboundSchema` instead. */
    Type$.inboundSchema = exports.Type$inboundSchema;
    /** @deprecated use `Type$outboundSchema` instead. */
    Type$.outboundSchema = exports.Type$outboundSchema;
})(Type$ || (exports.Type$ = Type$ = {}));
/** @internal */
exports.Reasons$inboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
/** @internal */
exports.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.
 */
var Reasons$;
(function (Reasons$) {
    /** @deprecated use `Reasons$inboundSchema` instead. */
    Reasons$.inboundSchema = exports.Reasons$inboundSchema;
    /** @deprecated use `Reasons$outboundSchema` instead. */
    Reasons$.outboundSchema = exports.Reasons$outboundSchema;
})(Reasons$ || (exports.Reasons$ = Reasons$ = {}));
function reasonsToJSON(reasons) {
    return JSON.stringify(exports.Reasons$outboundSchema.parse(reasons));
}
function reasonsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Reasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Reasons' from JSON`);
}
/** @internal */
exports.SubmitFeedbackRequestBody$inboundSchema = z.object({
    id: z.string().optional(),
    type: exports.Type$inboundSchema,
    messageId: z.string(),
    createdAt: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    reasons: z.nullable(z.array(z.lazy(() => exports.Reasons$inboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
exports.SubmitFeedbackRequestBody$outboundSchema = z.object({
    id: z.string().optional(),
    type: exports.Type$outboundSchema,
    messageId: z.string(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    reasons: z.nullable(z.array(z.lazy(() => exports.Reasons$outboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SubmitFeedbackRequestBody$;
(function (SubmitFeedbackRequestBody$) {
    /** @deprecated use `SubmitFeedbackRequestBody$inboundSchema` instead. */
    SubmitFeedbackRequestBody$.inboundSchema = exports.SubmitFeedbackRequestBody$inboundSchema;
    /** @deprecated use `SubmitFeedbackRequestBody$outboundSchema` instead. */
    SubmitFeedbackRequestBody$.outboundSchema = exports.SubmitFeedbackRequestBody$outboundSchema;
})(SubmitFeedbackRequestBody$ || (exports.SubmitFeedbackRequestBody$ = SubmitFeedbackRequestBody$ = {}));
function submitFeedbackRequestBodyToJSON(submitFeedbackRequestBody) {
    return JSON.stringify(exports.SubmitFeedbackRequestBody$outboundSchema.parse(submitFeedbackRequestBody));
}
function submitFeedbackRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SubmitFeedbackRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitFeedbackRequestBody' from JSON`);
}
/** @internal */
exports.SubmitFeedbackType$inboundSchema = z.nativeEnum(exports.SubmitFeedbackType);
/** @internal */
exports.SubmitFeedbackType$outboundSchema = exports.SubmitFeedbackType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SubmitFeedbackType$;
(function (SubmitFeedbackType$) {
    /** @deprecated use `SubmitFeedbackType$inboundSchema` instead. */
    SubmitFeedbackType$.inboundSchema = exports.SubmitFeedbackType$inboundSchema;
    /** @deprecated use `SubmitFeedbackType$outboundSchema` instead. */
    SubmitFeedbackType$.outboundSchema = exports.SubmitFeedbackType$outboundSchema;
})(SubmitFeedbackType$ || (exports.SubmitFeedbackType$ = SubmitFeedbackType$ = {}));
/** @internal */
exports.SubmitFeedbackReasons$inboundSchema = z.object({
    label: z.string(),
    details: z.string(),
});
/** @internal */
exports.SubmitFeedbackReasons$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.
 */
var SubmitFeedbackReasons$;
(function (SubmitFeedbackReasons$) {
    /** @deprecated use `SubmitFeedbackReasons$inboundSchema` instead. */
    SubmitFeedbackReasons$.inboundSchema = exports.SubmitFeedbackReasons$inboundSchema;
    /** @deprecated use `SubmitFeedbackReasons$outboundSchema` instead. */
    SubmitFeedbackReasons$.outboundSchema = exports.SubmitFeedbackReasons$outboundSchema;
})(SubmitFeedbackReasons$ || (exports.SubmitFeedbackReasons$ = SubmitFeedbackReasons$ = {}));
function submitFeedbackReasonsToJSON(submitFeedbackReasons) {
    return JSON.stringify(exports.SubmitFeedbackReasons$outboundSchema.parse(submitFeedbackReasons));
}
function submitFeedbackReasonsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SubmitFeedbackReasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitFeedbackReasons' from JSON`);
}
/** @internal */
exports.SubmitFeedbackResponseBody$inboundSchema = z.object({
    id: z.string(),
    type: exports.SubmitFeedbackType$inboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => exports.SubmitFeedbackReasons$inboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/** @internal */
exports.SubmitFeedbackResponseBody$outboundSchema = z.object({
    id: z.string(),
    type: exports.SubmitFeedbackType$outboundSchema,
    messageId: z.string(),
    createdAt: z.string(),
    reasons: z.nullable(z.array(z.lazy(() => exports.SubmitFeedbackReasons$outboundSchema))).optional(),
    userProperties: z.nullable(z.record(z.any())).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SubmitFeedbackResponseBody$;
(function (SubmitFeedbackResponseBody$) {
    /** @deprecated use `SubmitFeedbackResponseBody$inboundSchema` instead. */
    SubmitFeedbackResponseBody$.inboundSchema = exports.SubmitFeedbackResponseBody$inboundSchema;
    /** @deprecated use `SubmitFeedbackResponseBody$outboundSchema` instead. */
    SubmitFeedbackResponseBody$.outboundSchema = exports.SubmitFeedbackResponseBody$outboundSchema;
})(SubmitFeedbackResponseBody$ || (exports.SubmitFeedbackResponseBody$ = SubmitFeedbackResponseBody$ = {}));
function submitFeedbackResponseBodyToJSON(submitFeedbackResponseBody) {
    return JSON.stringify(exports.SubmitFeedbackResponseBody$outboundSchema.parse(submitFeedbackResponseBody));
}
function submitFeedbackResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SubmitFeedbackResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitFeedbackResponseBody' from JSON`);
}
//# sourceMappingURL=submitfeedback.js.map