"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.connectorsMetaFromJSON = exports.connectorsMetaToJSON = exports.ConnectorsMeta$ = exports.ConnectorsMeta$outboundSchema = exports.ConnectorsMeta$inboundSchema = exports.resourcesFromJSON = exports.resourcesToJSON = exports.Resources$ = exports.Resources$outboundSchema = exports.Resources$inboundSchema = exports.imagesFromJSON = exports.imagesToJSON = exports.Images$ = exports.Images$outboundSchema = exports.Images$inboundSchema = exports.ConnectorsMetaCategory$ = exports.ConnectorsMetaCategory$outboundSchema = exports.ConnectorsMetaCategory$inboundSchema = exports.ConnectorsMetaCategory = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
/**
 * The provider service category
 */
var ConnectorsMetaCategory;
(function (ConnectorsMetaCategory) {
    ConnectorsMetaCategory["Ats"] = "ats";
    ConnectorsMetaCategory["Hris"] = "hris";
    ConnectorsMetaCategory["HrisLegacy"] = "hris-legacy";
    ConnectorsMetaCategory["Crm"] = "crm";
    ConnectorsMetaCategory["Iam"] = "iam";
    ConnectorsMetaCategory["Marketing"] = "marketing";
    ConnectorsMetaCategory["Lms"] = "lms";
    ConnectorsMetaCategory["Stackone"] = "stackone";
    ConnectorsMetaCategory["Documents"] = "documents";
})(ConnectorsMetaCategory || (exports.ConnectorsMetaCategory = ConnectorsMetaCategory = {}));
/** @internal */
exports.ConnectorsMetaCategory$inboundSchema = z
    .union([
    z.nativeEnum(ConnectorsMetaCategory),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.ConnectorsMetaCategory$outboundSchema = z.union([
    z.nativeEnum(ConnectorsMetaCategory),
    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 ConnectorsMetaCategory$;
(function (ConnectorsMetaCategory$) {
    /** @deprecated use `ConnectorsMetaCategory$inboundSchema` instead. */
    ConnectorsMetaCategory$.inboundSchema = exports.ConnectorsMetaCategory$inboundSchema;
    /** @deprecated use `ConnectorsMetaCategory$outboundSchema` instead. */
    ConnectorsMetaCategory$.outboundSchema = exports.ConnectorsMetaCategory$outboundSchema;
})(ConnectorsMetaCategory$ || (exports.ConnectorsMetaCategory$ = ConnectorsMetaCategory$ = {}));
/** @internal */
exports.Images$inboundSchema = z
    .object({
    logo_url: z.nullable(z.string()).optional(),
    original_logo_horizontal_url: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "logo_url": "logoUrl",
        "original_logo_horizontal_url": "originalLogoHorizontalUrl",
    });
});
/** @internal */
exports.Images$outboundSchema = z.object({
    logoUrl: z.nullable(z.string()).optional(),
    originalLogoHorizontalUrl: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        logoUrl: "logo_url",
        originalLogoHorizontalUrl: "original_logo_horizontal_url",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Images$;
(function (Images$) {
    /** @deprecated use `Images$inboundSchema` instead. */
    Images$.inboundSchema = exports.Images$inboundSchema;
    /** @deprecated use `Images$outboundSchema` instead. */
    Images$.outboundSchema = exports.Images$outboundSchema;
})(Images$ || (exports.Images$ = Images$ = {}));
function imagesToJSON(images) {
    return JSON.stringify(exports.Images$outboundSchema.parse(images));
}
exports.imagesToJSON = imagesToJSON;
function imagesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Images$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Images' from JSON`);
}
exports.imagesFromJSON = imagesFromJSON;
/** @internal */
exports.Resources$inboundSchema = z.object({
    images: z.nullable(z.lazy(() => exports.Images$inboundSchema)).optional(),
});
/** @internal */
exports.Resources$outboundSchema = z.object({
    images: z.nullable(z.lazy(() => exports.Images$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Resources$;
(function (Resources$) {
    /** @deprecated use `Resources$inboundSchema` instead. */
    Resources$.inboundSchema = exports.Resources$inboundSchema;
    /** @deprecated use `Resources$outboundSchema` instead. */
    Resources$.outboundSchema = exports.Resources$outboundSchema;
})(Resources$ || (exports.Resources$ = Resources$ = {}));
function resourcesToJSON(resources) {
    return JSON.stringify(exports.Resources$outboundSchema.parse(resources));
}
exports.resourcesToJSON = resourcesToJSON;
function resourcesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Resources$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Resources' from JSON`);
}
exports.resourcesFromJSON = resourcesFromJSON;
/** @internal */
exports.ConnectorsMeta$inboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    category: exports.ConnectorsMetaCategory$inboundSchema,
    models: z.record(z.any()),
    provider: z.string(),
    provider_name: z.string(),
    resources: z.nullable(z.lazy(() => exports.Resources$inboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "provider_name": "providerName",
    });
});
/** @internal */
exports.ConnectorsMeta$outboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    category: exports.ConnectorsMetaCategory$outboundSchema,
    models: z.record(z.any()),
    provider: z.string(),
    providerName: z.string(),
    resources: z.nullable(z.lazy(() => exports.Resources$outboundSchema)).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        providerName: "provider_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConnectorsMeta$;
(function (ConnectorsMeta$) {
    /** @deprecated use `ConnectorsMeta$inboundSchema` instead. */
    ConnectorsMeta$.inboundSchema = exports.ConnectorsMeta$inboundSchema;
    /** @deprecated use `ConnectorsMeta$outboundSchema` instead. */
    ConnectorsMeta$.outboundSchema = exports.ConnectorsMeta$outboundSchema;
})(ConnectorsMeta$ || (exports.ConnectorsMeta$ = ConnectorsMeta$ = {}));
function connectorsMetaToJSON(connectorsMeta) {
    return JSON.stringify(exports.ConnectorsMeta$outboundSchema.parse(connectorsMeta));
}
exports.connectorsMetaToJSON = connectorsMetaToJSON;
function connectorsMetaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConnectorsMeta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectorsMeta' from JSON`);
}
exports.connectorsMetaFromJSON = connectorsMetaFromJSON;
//# sourceMappingURL=connectorsmeta.js.map