"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.CompanyInfo$inboundSchema = exports.TrackingCategoriesMode$inboundSchema = exports.TheStartMonthOfFiscalYear$inboundSchema = exports.CompanyStatus$inboundSchema = exports.TrackingCategoriesMode = exports.TheStartMonthOfFiscalYear = exports.CompanyStatus = void 0;
exports.companyInfoFromJSON = companyInfoFromJSON;
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 types = __importStar(require("../../types/primitives.js"));
const address_js_1 = require("./address.js");
const currency_js_1 = require("./currency.js");
const email_js_1 = require("./email.js");
const phonenumber_js_1 = require("./phonenumber.js");
const taxrate_js_1 = require("./taxrate.js");
/**
 * Based on the status some functionality is enabled or disabled.
 */
exports.CompanyStatus = {
    Active: "active",
    Inactive: "inactive",
};
/**
 * The start month of fiscal year.
 */
exports.TheStartMonthOfFiscalYear = {
    January: "January",
    February: "February",
    March: "March",
    April: "April",
    May: "May",
    June: "June",
    July: "July",
    August: "August",
    September: "September",
    October: "October",
    November: "November",
    December: "December",
};
/**
 * The mode of tracking categories for the company on transactions
 */
exports.TrackingCategoriesMode = {
    Transaction: "transaction",
    Line: "line",
    Both: "both",
    Disabled: "disabled",
};
/** @internal */
exports.CompanyStatus$inboundSchema = openEnums.inboundSchema(exports.CompanyStatus);
/** @internal */
exports.TheStartMonthOfFiscalYear$inboundSchema = openEnums.inboundSchema(exports.TheStartMonthOfFiscalYear);
/** @internal */
exports.TrackingCategoriesMode$inboundSchema = openEnums.inboundSchema(exports.TrackingCategoriesMode);
/** @internal */
exports.CompanyInfo$inboundSchema = z.object({
    id: types.optional(types.string()),
    company_name: z.nullable(types.string()).optional(),
    status: types.optional(exports.CompanyStatus$inboundSchema),
    legal_name: types.optional(types.string()),
    country: z.nullable(types.string()).optional(),
    sales_tax_number: z.nullable(types.string()).optional(),
    automated_sales_tax: types.optional(types.boolean()),
    sales_tax_enabled: types.optional(types.boolean()),
    default_sales_tax: types.optional(taxrate_js_1.TaxRate$inboundSchema),
    currency: z.nullable(currency_js_1.Currency$inboundSchema).optional(),
    language: z.nullable(types.string()).optional(),
    fiscal_year_start_month: types.optional(exports.TheStartMonthOfFiscalYear$inboundSchema),
    company_start_date: types.optional(types.date()),
    addresses: types.optional(z.array(address_js_1.Address$inboundSchema)),
    phone_numbers: types.optional(z.array(phonenumber_js_1.PhoneNumber$inboundSchema)),
    emails: types.optional(z.array(email_js_1.Email$inboundSchema)),
    custom_mappings: z.nullable(z.record(z.any())).optional(),
    tracking_categories_enabled: types.optional(types.boolean()),
    tracking_categories_mode: types.optional(exports.TrackingCategoriesMode$inboundSchema),
    row_version: z.nullable(types.string()).optional(),
    updated_by: z.nullable(types.string()).optional(),
    created_by: z.nullable(types.string()).optional(),
    updated_at: z.nullable(types.date()).optional(),
    created_at: z.nullable(types.date()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "company_name": "companyName",
        "legal_name": "legalName",
        "sales_tax_number": "salesTaxNumber",
        "automated_sales_tax": "automatedSalesTax",
        "sales_tax_enabled": "salesTaxEnabled",
        "default_sales_tax": "defaultSalesTax",
        "fiscal_year_start_month": "fiscalYearStartMonth",
        "company_start_date": "companyStartDate",
        "phone_numbers": "phoneNumbers",
        "custom_mappings": "customMappings",
        "tracking_categories_enabled": "trackingCategoriesEnabled",
        "tracking_categories_mode": "trackingCategoriesMode",
        "row_version": "rowVersion",
        "updated_by": "updatedBy",
        "created_by": "createdBy",
        "updated_at": "updatedAt",
        "created_at": "createdAt",
    });
});
function companyInfoFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CompanyInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompanyInfo' from JSON`);
}
//# sourceMappingURL=companyinfo.js.map