"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.AccountingCompanyResult$inboundSchema = exports.AccountingCompanyResultData$inboundSchema = exports.AccountingCompanyResultBaseCurrency$inboundSchema = exports.AccountingCompanyResultValue$inboundSchema = exports.AccountingCompanyResultSourceValue$inboundSchema = exports.AccountingCompanyResult4$inboundSchema = exports.AccountingCompanyResultValue = void 0;
exports.accountingCompanyResult4FromJSON = accountingCompanyResult4FromJSON;
exports.accountingCompanyResultSourceValueFromJSON = accountingCompanyResultSourceValueFromJSON;
exports.accountingCompanyResultBaseCurrencyFromJSON = accountingCompanyResultBaseCurrencyFromJSON;
exports.accountingCompanyResultDataFromJSON = accountingCompanyResultDataFromJSON;
exports.accountingCompanyResultFromJSON = accountingCompanyResultFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const openEnums = __importStar(require("../../types/enums.js"));
const rawresponse_js_1 = require("./rawresponse.js");
/**
 * Default currency for the company
 */
var AccountingCompanyResultValue;
(function (AccountingCompanyResultValue) {
    AccountingCompanyResultValue["Aed"] = "AED";
    AccountingCompanyResultValue["Afn"] = "AFN";
    AccountingCompanyResultValue["All"] = "ALL";
    AccountingCompanyResultValue["Amd"] = "AMD";
    AccountingCompanyResultValue["Ang"] = "ANG";
    AccountingCompanyResultValue["Aoa"] = "AOA";
    AccountingCompanyResultValue["Ars"] = "ARS";
    AccountingCompanyResultValue["Aud"] = "AUD";
    AccountingCompanyResultValue["Awg"] = "AWG";
    AccountingCompanyResultValue["Azn"] = "AZN";
    AccountingCompanyResultValue["Bam"] = "BAM";
    AccountingCompanyResultValue["Bbd"] = "BBD";
    AccountingCompanyResultValue["Bdt"] = "BDT";
    AccountingCompanyResultValue["Bgn"] = "BGN";
    AccountingCompanyResultValue["Bhd"] = "BHD";
    AccountingCompanyResultValue["Bif"] = "BIF";
    AccountingCompanyResultValue["Bmd"] = "BMD";
    AccountingCompanyResultValue["Bnd"] = "BND";
    AccountingCompanyResultValue["Bob"] = "BOB";
    AccountingCompanyResultValue["Brl"] = "BRL";
    AccountingCompanyResultValue["Bsd"] = "BSD";
    AccountingCompanyResultValue["Btn"] = "BTN";
    AccountingCompanyResultValue["Bwp"] = "BWP";
    AccountingCompanyResultValue["Byn"] = "BYN";
    AccountingCompanyResultValue["Bzd"] = "BZD";
    AccountingCompanyResultValue["Cad"] = "CAD";
    AccountingCompanyResultValue["Cdf"] = "CDF";
    AccountingCompanyResultValue["Chf"] = "CHF";
    AccountingCompanyResultValue["Clp"] = "CLP";
    AccountingCompanyResultValue["Cny"] = "CNY";
    AccountingCompanyResultValue["Cop"] = "COP";
    AccountingCompanyResultValue["Crc"] = "CRC";
    AccountingCompanyResultValue["Cuc"] = "CUC";
    AccountingCompanyResultValue["Cup"] = "CUP";
    AccountingCompanyResultValue["Cve"] = "CVE";
    AccountingCompanyResultValue["Czk"] = "CZK";
    AccountingCompanyResultValue["Djf"] = "DJF";
    AccountingCompanyResultValue["Dkk"] = "DKK";
    AccountingCompanyResultValue["Dop"] = "DOP";
    AccountingCompanyResultValue["Dzd"] = "DZD";
    AccountingCompanyResultValue["Egp"] = "EGP";
    AccountingCompanyResultValue["Ern"] = "ERN";
    AccountingCompanyResultValue["Etb"] = "ETB";
    AccountingCompanyResultValue["Eur"] = "EUR";
    AccountingCompanyResultValue["Fjd"] = "FJD";
    AccountingCompanyResultValue["Fkp"] = "FKP";
    AccountingCompanyResultValue["Gbp"] = "GBP";
    AccountingCompanyResultValue["Gel"] = "GEL";
    AccountingCompanyResultValue["Ghs"] = "GHS";
    AccountingCompanyResultValue["Gip"] = "GIP";
    AccountingCompanyResultValue["Gmd"] = "GMD";
    AccountingCompanyResultValue["Gnf"] = "GNF";
    AccountingCompanyResultValue["Gtq"] = "GTQ";
    AccountingCompanyResultValue["Gyd"] = "GYD";
    AccountingCompanyResultValue["Hkd"] = "HKD";
    AccountingCompanyResultValue["Hnl"] = "HNL";
    AccountingCompanyResultValue["Hrk"] = "HRK";
    AccountingCompanyResultValue["Htg"] = "HTG";
    AccountingCompanyResultValue["Huf"] = "HUF";
    AccountingCompanyResultValue["Idr"] = "IDR";
    AccountingCompanyResultValue["Ils"] = "ILS";
    AccountingCompanyResultValue["Inr"] = "INR";
    AccountingCompanyResultValue["Iqd"] = "IQD";
    AccountingCompanyResultValue["Irr"] = "IRR";
    AccountingCompanyResultValue["Isk"] = "ISK";
    AccountingCompanyResultValue["Jmd"] = "JMD";
    AccountingCompanyResultValue["Jod"] = "JOD";
    AccountingCompanyResultValue["Jpy"] = "JPY";
    AccountingCompanyResultValue["Kes"] = "KES";
    AccountingCompanyResultValue["Kgs"] = "KGS";
    AccountingCompanyResultValue["Khr"] = "KHR";
    AccountingCompanyResultValue["Kmf"] = "KMF";
    AccountingCompanyResultValue["Kpw"] = "KPW";
    AccountingCompanyResultValue["Krw"] = "KRW";
    AccountingCompanyResultValue["Kwd"] = "KWD";
    AccountingCompanyResultValue["Kyd"] = "KYD";
    AccountingCompanyResultValue["Kzt"] = "KZT";
    AccountingCompanyResultValue["Lak"] = "LAK";
    AccountingCompanyResultValue["Lbp"] = "LBP";
    AccountingCompanyResultValue["Lkr"] = "LKR";
    AccountingCompanyResultValue["Lrd"] = "LRD";
    AccountingCompanyResultValue["Lsl"] = "LSL";
    AccountingCompanyResultValue["Lyd"] = "LYD";
    AccountingCompanyResultValue["Mad"] = "MAD";
    AccountingCompanyResultValue["Mdl"] = "MDL";
    AccountingCompanyResultValue["Mga"] = "MGA";
    AccountingCompanyResultValue["Mkd"] = "MKD";
    AccountingCompanyResultValue["Mmk"] = "MMK";
    AccountingCompanyResultValue["Mnt"] = "MNT";
    AccountingCompanyResultValue["Mop"] = "MOP";
    AccountingCompanyResultValue["Mru"] = "MRU";
    AccountingCompanyResultValue["Mur"] = "MUR";
    AccountingCompanyResultValue["Mvr"] = "MVR";
    AccountingCompanyResultValue["Mwk"] = "MWK";
    AccountingCompanyResultValue["Mxn"] = "MXN";
    AccountingCompanyResultValue["Myr"] = "MYR";
    AccountingCompanyResultValue["Mzn"] = "MZN";
    AccountingCompanyResultValue["Nad"] = "NAD";
    AccountingCompanyResultValue["Ngn"] = "NGN";
    AccountingCompanyResultValue["Nio"] = "NIO";
    AccountingCompanyResultValue["Nok"] = "NOK";
    AccountingCompanyResultValue["Npr"] = "NPR";
    AccountingCompanyResultValue["Nzd"] = "NZD";
    AccountingCompanyResultValue["Omr"] = "OMR";
    AccountingCompanyResultValue["Pab"] = "PAB";
    AccountingCompanyResultValue["Pen"] = "PEN";
    AccountingCompanyResultValue["Pgk"] = "PGK";
    AccountingCompanyResultValue["Php"] = "PHP";
    AccountingCompanyResultValue["Pkr"] = "PKR";
    AccountingCompanyResultValue["Pln"] = "PLN";
    AccountingCompanyResultValue["Pyg"] = "PYG";
    AccountingCompanyResultValue["Qar"] = "QAR";
    AccountingCompanyResultValue["Ron"] = "RON";
    AccountingCompanyResultValue["Rsd"] = "RSD";
    AccountingCompanyResultValue["Rub"] = "RUB";
    AccountingCompanyResultValue["Rwf"] = "RWF";
    AccountingCompanyResultValue["Sar"] = "SAR";
    AccountingCompanyResultValue["Sbd"] = "SBD";
    AccountingCompanyResultValue["Scr"] = "SCR";
    AccountingCompanyResultValue["Sdg"] = "SDG";
    AccountingCompanyResultValue["Sek"] = "SEK";
    AccountingCompanyResultValue["Sgd"] = "SGD";
    AccountingCompanyResultValue["Shp"] = "SHP";
    AccountingCompanyResultValue["Sll"] = "SLL";
    AccountingCompanyResultValue["Sos"] = "SOS";
    AccountingCompanyResultValue["Srd"] = "SRD";
    AccountingCompanyResultValue["Ssp"] = "SSP";
    AccountingCompanyResultValue["Stn"] = "STN";
    AccountingCompanyResultValue["Syp"] = "SYP";
    AccountingCompanyResultValue["Szl"] = "SZL";
    AccountingCompanyResultValue["Thb"] = "THB";
    AccountingCompanyResultValue["Tjs"] = "TJS";
    AccountingCompanyResultValue["Tmt"] = "TMT";
    AccountingCompanyResultValue["Tnd"] = "TND";
    AccountingCompanyResultValue["Top"] = "TOP";
    AccountingCompanyResultValue["Try"] = "TRY";
    AccountingCompanyResultValue["Ttd"] = "TTD";
    AccountingCompanyResultValue["Twd"] = "TWD";
    AccountingCompanyResultValue["Tzs"] = "TZS";
    AccountingCompanyResultValue["Uah"] = "UAH";
    AccountingCompanyResultValue["Ugx"] = "UGX";
    AccountingCompanyResultValue["Usd"] = "USD";
    AccountingCompanyResultValue["Uyu"] = "UYU";
    AccountingCompanyResultValue["Uzs"] = "UZS";
    AccountingCompanyResultValue["Ves"] = "VES";
    AccountingCompanyResultValue["Vnd"] = "VND";
    AccountingCompanyResultValue["Vuv"] = "VUV";
    AccountingCompanyResultValue["Wst"] = "WST";
    AccountingCompanyResultValue["Xaf"] = "XAF";
    AccountingCompanyResultValue["Xcd"] = "XCD";
    AccountingCompanyResultValue["Xdr"] = "XDR";
    AccountingCompanyResultValue["Xof"] = "XOF";
    AccountingCompanyResultValue["Xpf"] = "XPF";
    AccountingCompanyResultValue["Yer"] = "YER";
    AccountingCompanyResultValue["Zar"] = "ZAR";
    AccountingCompanyResultValue["Zmw"] = "ZMW";
    AccountingCompanyResultValue["Zwl"] = "ZWL";
    AccountingCompanyResultValue["UnmappedValue"] = "unmapped_value";
})(AccountingCompanyResultValue || (exports.AccountingCompanyResultValue = AccountingCompanyResultValue = {}));
/** @internal */
exports.AccountingCompanyResult4$inboundSchema = z.object({});
function accountingCompanyResult4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingCompanyResult4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingCompanyResult4' from JSON`);
}
/** @internal */
exports.AccountingCompanyResultSourceValue$inboundSchema = z.union([
    z.string(),
    z.number(),
    z.boolean(),
    z.lazy(() => exports.AccountingCompanyResult4$inboundSchema),
    z.array(z.any()),
]);
function accountingCompanyResultSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingCompanyResultSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingCompanyResultSourceValue' from JSON`);
}
/** @internal */
exports.AccountingCompanyResultValue$inboundSchema = openEnums.inboundSchema(AccountingCompanyResultValue);
/** @internal */
exports.AccountingCompanyResultBaseCurrency$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.string(),
        z.number(),
        z.boolean(),
        z.lazy(() => exports.AccountingCompanyResult4$inboundSchema),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.AccountingCompanyResultValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
function accountingCompanyResultBaseCurrencyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingCompanyResultBaseCurrency$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingCompanyResultBaseCurrency' from JSON`);
}
/** @internal */
exports.AccountingCompanyResultData$inboundSchema = z.object({
    base_currency: z.nullable(z.lazy(() => exports.AccountingCompanyResultBaseCurrency$inboundSchema)).optional(),
    fiscal_year_start_day: z.nullable(z.number()).optional(),
    fiscal_year_start_month: z.nullable(z.number()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "base_currency": "baseCurrency",
        "fiscal_year_start_day": "fiscalYearStartDay",
        "fiscal_year_start_month": "fiscalYearStartMonth",
        "remote_id": "remoteId",
    });
});
function accountingCompanyResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingCompanyResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingCompanyResultData' from JSON`);
}
/** @internal */
exports.AccountingCompanyResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.AccountingCompanyResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
function accountingCompanyResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingCompanyResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingCompanyResult' from JSON`);
}
//# sourceMappingURL=accountingcompanyresult.js.map