"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.JournalLine$ = exports.JournalLine$outboundSchema = exports.JournalLine$inboundSchema = exports.JournalLineCurrencyCode$ = exports.JournalLineCurrencyCode$outboundSchema = exports.JournalLineCurrencyCode$inboundSchema = exports.JournalLineSchemasValue$ = exports.JournalLineSchemasValue$outboundSchema = exports.JournalLineSchemasValue$inboundSchema = exports.JournalLineSchemasSourceValue$ = exports.JournalLineSchemasSourceValue$outboundSchema = exports.JournalLineSchemasSourceValue$inboundSchema = exports.JournalLineSchemas4$ = exports.JournalLineSchemas4$outboundSchema = exports.JournalLineSchemas4$inboundSchema = exports.JournalLineAccountType$ = exports.JournalLineAccountType$outboundSchema = exports.JournalLineAccountType$inboundSchema = exports.JournalLineValue$ = exports.JournalLineValue$outboundSchema = exports.JournalLineValue$inboundSchema = exports.JournalLineSourceValue$ = exports.JournalLineSourceValue$outboundSchema = exports.JournalLineSourceValue$inboundSchema = exports.JournalLine4$ = exports.JournalLine4$outboundSchema = exports.JournalLine4$inboundSchema = exports.JournalLineSchemasValue = exports.JournalLineValue = void 0;
exports.journalLine4ToJSON = journalLine4ToJSON;
exports.journalLine4FromJSON = journalLine4FromJSON;
exports.journalLineSourceValueToJSON = journalLineSourceValueToJSON;
exports.journalLineSourceValueFromJSON = journalLineSourceValueFromJSON;
exports.journalLineAccountTypeToJSON = journalLineAccountTypeToJSON;
exports.journalLineAccountTypeFromJSON = journalLineAccountTypeFromJSON;
exports.journalLineSchemas4ToJSON = journalLineSchemas4ToJSON;
exports.journalLineSchemas4FromJSON = journalLineSchemas4FromJSON;
exports.journalLineSchemasSourceValueToJSON = journalLineSchemasSourceValueToJSON;
exports.journalLineSchemasSourceValueFromJSON = journalLineSchemasSourceValueFromJSON;
exports.journalLineCurrencyCodeToJSON = journalLineCurrencyCodeToJSON;
exports.journalLineCurrencyCodeFromJSON = journalLineCurrencyCodeFromJSON;
exports.journalLineToJSON = journalLineToJSON;
exports.journalLineFromJSON = journalLineFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
/**
 * Type of account
 */
var JournalLineValue;
(function (JournalLineValue) {
    JournalLineValue["Asset"] = "asset";
    JournalLineValue["Liability"] = "liability";
    JournalLineValue["Equity"] = "equity";
    JournalLineValue["Revenue"] = "revenue";
    JournalLineValue["Expense"] = "expense";
    JournalLineValue["UnmappedValue"] = "unmapped_value";
})(JournalLineValue || (exports.JournalLineValue = JournalLineValue = {}));
/**
 * Default currency for the company
 */
var JournalLineSchemasValue;
(function (JournalLineSchemasValue) {
    JournalLineSchemasValue["Aed"] = "AED";
    JournalLineSchemasValue["Afn"] = "AFN";
    JournalLineSchemasValue["All"] = "ALL";
    JournalLineSchemasValue["Amd"] = "AMD";
    JournalLineSchemasValue["Ang"] = "ANG";
    JournalLineSchemasValue["Aoa"] = "AOA";
    JournalLineSchemasValue["Ars"] = "ARS";
    JournalLineSchemasValue["Aud"] = "AUD";
    JournalLineSchemasValue["Awg"] = "AWG";
    JournalLineSchemasValue["Azn"] = "AZN";
    JournalLineSchemasValue["Bam"] = "BAM";
    JournalLineSchemasValue["Bbd"] = "BBD";
    JournalLineSchemasValue["Bdt"] = "BDT";
    JournalLineSchemasValue["Bgn"] = "BGN";
    JournalLineSchemasValue["Bhd"] = "BHD";
    JournalLineSchemasValue["Bif"] = "BIF";
    JournalLineSchemasValue["Bmd"] = "BMD";
    JournalLineSchemasValue["Bnd"] = "BND";
    JournalLineSchemasValue["Bob"] = "BOB";
    JournalLineSchemasValue["Brl"] = "BRL";
    JournalLineSchemasValue["Bsd"] = "BSD";
    JournalLineSchemasValue["Btn"] = "BTN";
    JournalLineSchemasValue["Bwp"] = "BWP";
    JournalLineSchemasValue["Byn"] = "BYN";
    JournalLineSchemasValue["Bzd"] = "BZD";
    JournalLineSchemasValue["Cad"] = "CAD";
    JournalLineSchemasValue["Cdf"] = "CDF";
    JournalLineSchemasValue["Chf"] = "CHF";
    JournalLineSchemasValue["Clp"] = "CLP";
    JournalLineSchemasValue["Cny"] = "CNY";
    JournalLineSchemasValue["Cop"] = "COP";
    JournalLineSchemasValue["Crc"] = "CRC";
    JournalLineSchemasValue["Cuc"] = "CUC";
    JournalLineSchemasValue["Cup"] = "CUP";
    JournalLineSchemasValue["Cve"] = "CVE";
    JournalLineSchemasValue["Czk"] = "CZK";
    JournalLineSchemasValue["Djf"] = "DJF";
    JournalLineSchemasValue["Dkk"] = "DKK";
    JournalLineSchemasValue["Dop"] = "DOP";
    JournalLineSchemasValue["Dzd"] = "DZD";
    JournalLineSchemasValue["Egp"] = "EGP";
    JournalLineSchemasValue["Ern"] = "ERN";
    JournalLineSchemasValue["Etb"] = "ETB";
    JournalLineSchemasValue["Eur"] = "EUR";
    JournalLineSchemasValue["Fjd"] = "FJD";
    JournalLineSchemasValue["Fkp"] = "FKP";
    JournalLineSchemasValue["Gbp"] = "GBP";
    JournalLineSchemasValue["Gel"] = "GEL";
    JournalLineSchemasValue["Ghs"] = "GHS";
    JournalLineSchemasValue["Gip"] = "GIP";
    JournalLineSchemasValue["Gmd"] = "GMD";
    JournalLineSchemasValue["Gnf"] = "GNF";
    JournalLineSchemasValue["Gtq"] = "GTQ";
    JournalLineSchemasValue["Gyd"] = "GYD";
    JournalLineSchemasValue["Hkd"] = "HKD";
    JournalLineSchemasValue["Hnl"] = "HNL";
    JournalLineSchemasValue["Hrk"] = "HRK";
    JournalLineSchemasValue["Htg"] = "HTG";
    JournalLineSchemasValue["Huf"] = "HUF";
    JournalLineSchemasValue["Idr"] = "IDR";
    JournalLineSchemasValue["Ils"] = "ILS";
    JournalLineSchemasValue["Inr"] = "INR";
    JournalLineSchemasValue["Iqd"] = "IQD";
    JournalLineSchemasValue["Irr"] = "IRR";
    JournalLineSchemasValue["Isk"] = "ISK";
    JournalLineSchemasValue["Jmd"] = "JMD";
    JournalLineSchemasValue["Jod"] = "JOD";
    JournalLineSchemasValue["Jpy"] = "JPY";
    JournalLineSchemasValue["Kes"] = "KES";
    JournalLineSchemasValue["Kgs"] = "KGS";
    JournalLineSchemasValue["Khr"] = "KHR";
    JournalLineSchemasValue["Kmf"] = "KMF";
    JournalLineSchemasValue["Kpw"] = "KPW";
    JournalLineSchemasValue["Krw"] = "KRW";
    JournalLineSchemasValue["Kwd"] = "KWD";
    JournalLineSchemasValue["Kyd"] = "KYD";
    JournalLineSchemasValue["Kzt"] = "KZT";
    JournalLineSchemasValue["Lak"] = "LAK";
    JournalLineSchemasValue["Lbp"] = "LBP";
    JournalLineSchemasValue["Lkr"] = "LKR";
    JournalLineSchemasValue["Lrd"] = "LRD";
    JournalLineSchemasValue["Lsl"] = "LSL";
    JournalLineSchemasValue["Lyd"] = "LYD";
    JournalLineSchemasValue["Mad"] = "MAD";
    JournalLineSchemasValue["Mdl"] = "MDL";
    JournalLineSchemasValue["Mga"] = "MGA";
    JournalLineSchemasValue["Mkd"] = "MKD";
    JournalLineSchemasValue["Mmk"] = "MMK";
    JournalLineSchemasValue["Mnt"] = "MNT";
    JournalLineSchemasValue["Mop"] = "MOP";
    JournalLineSchemasValue["Mru"] = "MRU";
    JournalLineSchemasValue["Mur"] = "MUR";
    JournalLineSchemasValue["Mvr"] = "MVR";
    JournalLineSchemasValue["Mwk"] = "MWK";
    JournalLineSchemasValue["Mxn"] = "MXN";
    JournalLineSchemasValue["Myr"] = "MYR";
    JournalLineSchemasValue["Mzn"] = "MZN";
    JournalLineSchemasValue["Nad"] = "NAD";
    JournalLineSchemasValue["Ngn"] = "NGN";
    JournalLineSchemasValue["Nio"] = "NIO";
    JournalLineSchemasValue["Nok"] = "NOK";
    JournalLineSchemasValue["Npr"] = "NPR";
    JournalLineSchemasValue["Nzd"] = "NZD";
    JournalLineSchemasValue["Omr"] = "OMR";
    JournalLineSchemasValue["Pab"] = "PAB";
    JournalLineSchemasValue["Pen"] = "PEN";
    JournalLineSchemasValue["Pgk"] = "PGK";
    JournalLineSchemasValue["Php"] = "PHP";
    JournalLineSchemasValue["Pkr"] = "PKR";
    JournalLineSchemasValue["Pln"] = "PLN";
    JournalLineSchemasValue["Pyg"] = "PYG";
    JournalLineSchemasValue["Qar"] = "QAR";
    JournalLineSchemasValue["Ron"] = "RON";
    JournalLineSchemasValue["Rsd"] = "RSD";
    JournalLineSchemasValue["Rub"] = "RUB";
    JournalLineSchemasValue["Rwf"] = "RWF";
    JournalLineSchemasValue["Sar"] = "SAR";
    JournalLineSchemasValue["Sbd"] = "SBD";
    JournalLineSchemasValue["Scr"] = "SCR";
    JournalLineSchemasValue["Sdg"] = "SDG";
    JournalLineSchemasValue["Sek"] = "SEK";
    JournalLineSchemasValue["Sgd"] = "SGD";
    JournalLineSchemasValue["Shp"] = "SHP";
    JournalLineSchemasValue["Sll"] = "SLL";
    JournalLineSchemasValue["Sos"] = "SOS";
    JournalLineSchemasValue["Srd"] = "SRD";
    JournalLineSchemasValue["Ssp"] = "SSP";
    JournalLineSchemasValue["Stn"] = "STN";
    JournalLineSchemasValue["Syp"] = "SYP";
    JournalLineSchemasValue["Szl"] = "SZL";
    JournalLineSchemasValue["Thb"] = "THB";
    JournalLineSchemasValue["Tjs"] = "TJS";
    JournalLineSchemasValue["Tmt"] = "TMT";
    JournalLineSchemasValue["Tnd"] = "TND";
    JournalLineSchemasValue["Top"] = "TOP";
    JournalLineSchemasValue["Try"] = "TRY";
    JournalLineSchemasValue["Ttd"] = "TTD";
    JournalLineSchemasValue["Twd"] = "TWD";
    JournalLineSchemasValue["Tzs"] = "TZS";
    JournalLineSchemasValue["Uah"] = "UAH";
    JournalLineSchemasValue["Ugx"] = "UGX";
    JournalLineSchemasValue["Usd"] = "USD";
    JournalLineSchemasValue["Uyu"] = "UYU";
    JournalLineSchemasValue["Uzs"] = "UZS";
    JournalLineSchemasValue["Ves"] = "VES";
    JournalLineSchemasValue["Vnd"] = "VND";
    JournalLineSchemasValue["Vuv"] = "VUV";
    JournalLineSchemasValue["Wst"] = "WST";
    JournalLineSchemasValue["Xaf"] = "XAF";
    JournalLineSchemasValue["Xcd"] = "XCD";
    JournalLineSchemasValue["Xdr"] = "XDR";
    JournalLineSchemasValue["Xof"] = "XOF";
    JournalLineSchemasValue["Xpf"] = "XPF";
    JournalLineSchemasValue["Yer"] = "YER";
    JournalLineSchemasValue["Zar"] = "ZAR";
    JournalLineSchemasValue["Zmw"] = "ZMW";
    JournalLineSchemasValue["Zwl"] = "ZWL";
    JournalLineSchemasValue["UnmappedValue"] = "unmapped_value";
})(JournalLineSchemasValue || (exports.JournalLineSchemasValue = JournalLineSchemasValue = {}));
/** @internal */
exports.JournalLine4$inboundSchema = z.object({});
/** @internal */
exports.JournalLine4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLine4$;
(function (JournalLine4$) {
    /** @deprecated use `JournalLine4$inboundSchema` instead. */
    JournalLine4$.inboundSchema = exports.JournalLine4$inboundSchema;
    /** @deprecated use `JournalLine4$outboundSchema` instead. */
    JournalLine4$.outboundSchema = exports.JournalLine4$outboundSchema;
})(JournalLine4$ || (exports.JournalLine4$ = JournalLine4$ = {}));
function journalLine4ToJSON(journalLine4) {
    return JSON.stringify(exports.JournalLine4$outboundSchema.parse(journalLine4));
}
function journalLine4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLine4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLine4' from JSON`);
}
/** @internal */
exports.JournalLineSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JournalLine4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.JournalLineSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JournalLine4$outboundSchema),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineSourceValue$;
(function (JournalLineSourceValue$) {
    /** @deprecated use `JournalLineSourceValue$inboundSchema` instead. */
    JournalLineSourceValue$.inboundSchema = exports.JournalLineSourceValue$inboundSchema;
    /** @deprecated use `JournalLineSourceValue$outboundSchema` instead. */
    JournalLineSourceValue$.outboundSchema = exports.JournalLineSourceValue$outboundSchema;
})(JournalLineSourceValue$ || (exports.JournalLineSourceValue$ = JournalLineSourceValue$ = {}));
function journalLineSourceValueToJSON(journalLineSourceValue) {
    return JSON.stringify(exports.JournalLineSourceValue$outboundSchema.parse(journalLineSourceValue));
}
function journalLineSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLineSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLineSourceValue' from JSON`);
}
/** @internal */
exports.JournalLineValue$inboundSchema = z
    .union([
    z.nativeEnum(JournalLineValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.JournalLineValue$outboundSchema = z.union([
    z.nativeEnum(JournalLineValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineValue$;
(function (JournalLineValue$) {
    /** @deprecated use `JournalLineValue$inboundSchema` instead. */
    JournalLineValue$.inboundSchema = exports.JournalLineValue$inboundSchema;
    /** @deprecated use `JournalLineValue$outboundSchema` instead. */
    JournalLineValue$.outboundSchema = exports.JournalLineValue$outboundSchema;
})(JournalLineValue$ || (exports.JournalLineValue$ = JournalLineValue$ = {}));
/** @internal */
exports.JournalLineAccountType$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JournalLine4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JournalLineValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JournalLineAccountType$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JournalLine4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JournalLineValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineAccountType$;
(function (JournalLineAccountType$) {
    /** @deprecated use `JournalLineAccountType$inboundSchema` instead. */
    JournalLineAccountType$.inboundSchema = exports.JournalLineAccountType$inboundSchema;
    /** @deprecated use `JournalLineAccountType$outboundSchema` instead. */
    JournalLineAccountType$.outboundSchema = exports.JournalLineAccountType$outboundSchema;
})(JournalLineAccountType$ || (exports.JournalLineAccountType$ = JournalLineAccountType$ = {}));
function journalLineAccountTypeToJSON(journalLineAccountType) {
    return JSON.stringify(exports.JournalLineAccountType$outboundSchema.parse(journalLineAccountType));
}
function journalLineAccountTypeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLineAccountType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLineAccountType' from JSON`);
}
/** @internal */
exports.JournalLineSchemas4$inboundSchema = z.object({});
/** @internal */
exports.JournalLineSchemas4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineSchemas4$;
(function (JournalLineSchemas4$) {
    /** @deprecated use `JournalLineSchemas4$inboundSchema` instead. */
    JournalLineSchemas4$.inboundSchema = exports.JournalLineSchemas4$inboundSchema;
    /** @deprecated use `JournalLineSchemas4$outboundSchema` instead. */
    JournalLineSchemas4$.outboundSchema = exports.JournalLineSchemas4$outboundSchema;
})(JournalLineSchemas4$ || (exports.JournalLineSchemas4$ = JournalLineSchemas4$ = {}));
function journalLineSchemas4ToJSON(journalLineSchemas4) {
    return JSON.stringify(exports.JournalLineSchemas4$outboundSchema.parse(journalLineSchemas4));
}
function journalLineSchemas4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLineSchemas4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLineSchemas4' from JSON`);
}
/** @internal */
exports.JournalLineSchemasSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JournalLineSchemas4$inboundSchema),
    z.array(z.any()),
]);
/** @internal */
exports.JournalLineSchemasSourceValue$outboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.JournalLineSchemas4$outboundSchema),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineSchemasSourceValue$;
(function (JournalLineSchemasSourceValue$) {
    /** @deprecated use `JournalLineSchemasSourceValue$inboundSchema` instead. */
    JournalLineSchemasSourceValue$.inboundSchema = exports.JournalLineSchemasSourceValue$inboundSchema;
    /** @deprecated use `JournalLineSchemasSourceValue$outboundSchema` instead. */
    JournalLineSchemasSourceValue$.outboundSchema = exports.JournalLineSchemasSourceValue$outboundSchema;
})(JournalLineSchemasSourceValue$ || (exports.JournalLineSchemasSourceValue$ = JournalLineSchemasSourceValue$ = {}));
function journalLineSchemasSourceValueToJSON(journalLineSchemasSourceValue) {
    return JSON.stringify(exports.JournalLineSchemasSourceValue$outboundSchema.parse(journalLineSchemasSourceValue));
}
function journalLineSchemasSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLineSchemasSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLineSchemasSourceValue' from JSON`);
}
/** @internal */
exports.JournalLineSchemasValue$inboundSchema = z
    .union([
    z.nativeEnum(JournalLineSchemasValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.JournalLineSchemasValue$outboundSchema = z.union([
    z.nativeEnum(JournalLineSchemasValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineSchemasValue$;
(function (JournalLineSchemasValue$) {
    /** @deprecated use `JournalLineSchemasValue$inboundSchema` instead. */
    JournalLineSchemasValue$.inboundSchema = exports.JournalLineSchemasValue$inboundSchema;
    /** @deprecated use `JournalLineSchemasValue$outboundSchema` instead. */
    JournalLineSchemasValue$.outboundSchema = exports.JournalLineSchemasValue$outboundSchema;
})(JournalLineSchemasValue$ || (exports.JournalLineSchemasValue$ = JournalLineSchemasValue$ = {}));
/** @internal */
exports.JournalLineCurrencyCode$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JournalLineSchemas4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JournalLineSchemasValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.JournalLineCurrencyCode$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.JournalLineSchemas4$outboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.JournalLineSchemasValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLineCurrencyCode$;
(function (JournalLineCurrencyCode$) {
    /** @deprecated use `JournalLineCurrencyCode$inboundSchema` instead. */
    JournalLineCurrencyCode$.inboundSchema = exports.JournalLineCurrencyCode$inboundSchema;
    /** @deprecated use `JournalLineCurrencyCode$outboundSchema` instead. */
    JournalLineCurrencyCode$.outboundSchema = exports.JournalLineCurrencyCode$outboundSchema;
})(JournalLineCurrencyCode$ || (exports.JournalLineCurrencyCode$ = JournalLineCurrencyCode$ = {}));
function journalLineCurrencyCodeToJSON(journalLineCurrencyCode) {
    return JSON.stringify(exports.JournalLineCurrencyCode$outboundSchema.parse(journalLineCurrencyCode));
}
function journalLineCurrencyCodeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLineCurrencyCode$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLineCurrencyCode' from JSON`);
}
/** @internal */
exports.JournalLine$inboundSchema = z.object({
    account_id: z.nullable(z.string()).optional(),
    account_type: z.nullable(z.lazy(() => exports.JournalLineAccountType$inboundSchema))
        .optional(),
    amount: z.nullable(z.number()).optional(),
    currency_code: z.nullable(z.lazy(() => exports.JournalLineCurrencyCode$inboundSchema))
        .optional(),
    description: z.nullable(z.string()).optional(),
    exchange_rate: z.nullable(z.number()).optional(),
    id: z.nullable(z.string()).optional(),
    tax_amount: z.nullable(z.number()).optional(),
    tax_rate_percentage: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_id": "accountId",
        "account_type": "accountType",
        "currency_code": "currencyCode",
        "exchange_rate": "exchangeRate",
        "tax_amount": "taxAmount",
        "tax_rate_percentage": "taxRatePercentage",
    });
});
/** @internal */
exports.JournalLine$outboundSchema = z.object({
    accountId: z.nullable(z.string()).optional(),
    accountType: z.nullable(z.lazy(() => exports.JournalLineAccountType$outboundSchema))
        .optional(),
    amount: z.nullable(z.number()).optional(),
    currencyCode: z.nullable(z.lazy(() => exports.JournalLineCurrencyCode$outboundSchema))
        .optional(),
    description: z.nullable(z.string()).optional(),
    exchangeRate: z.nullable(z.number()).optional(),
    id: z.nullable(z.string()).optional(),
    taxAmount: z.nullable(z.number()).optional(),
    taxRatePercentage: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountId: "account_id",
        accountType: "account_type",
        currencyCode: "currency_code",
        exchangeRate: "exchange_rate",
        taxAmount: "tax_amount",
        taxRatePercentage: "tax_rate_percentage",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var JournalLine$;
(function (JournalLine$) {
    /** @deprecated use `JournalLine$inboundSchema` instead. */
    JournalLine$.inboundSchema = exports.JournalLine$inboundSchema;
    /** @deprecated use `JournalLine$outboundSchema` instead. */
    JournalLine$.outboundSchema = exports.JournalLine$outboundSchema;
})(JournalLine$ || (exports.JournalLine$ = JournalLine$ = {}));
function journalLineToJSON(journalLine) {
    return JSON.stringify(exports.JournalLine$outboundSchema.parse(journalLine));
}
function journalLineFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JournalLine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JournalLine' from JSON`);
}
//# sourceMappingURL=journalline.js.map