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