"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.ConnectSessionCreate$ = exports.ConnectSessionCreate$outboundSchema = exports.ConnectSessionCreate$inboundSchema = exports.ConnectSessionCreateType$ = exports.ConnectSessionCreateType$outboundSchema = exports.ConnectSessionCreateType$inboundSchema = exports.ConnectSessionCreateMetadata$ = exports.ConnectSessionCreateMetadata$outboundSchema = exports.ConnectSessionCreateMetadata$inboundSchema = exports.ConnectSessionCreateCategories$ = exports.ConnectSessionCreateCategories$outboundSchema = exports.ConnectSessionCreateCategories$inboundSchema = exports.ConnectSessionCreateType = exports.ConnectSessionCreateCategories = void 0;
exports.connectSessionCreateMetadataToJSON = connectSessionCreateMetadataToJSON;
exports.connectSessionCreateMetadataFromJSON = connectSessionCreateMetadataFromJSON;
exports.connectSessionCreateToJSON = connectSessionCreateToJSON;
exports.connectSessionCreateFromJSON = connectSessionCreateFromJSON;
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");
var ConnectSessionCreateCategories;
(function (ConnectSessionCreateCategories) {
    ConnectSessionCreateCategories["Ats"] = "ats";
    ConnectSessionCreateCategories["Hris"] = "hris";
    ConnectSessionCreateCategories["HrisLegacy"] = "hris-legacy";
    ConnectSessionCreateCategories["Crm"] = "crm";
    ConnectSessionCreateCategories["Iam"] = "iam";
    ConnectSessionCreateCategories["Marketing"] = "marketing";
    ConnectSessionCreateCategories["Lms"] = "lms";
    ConnectSessionCreateCategories["Stackone"] = "stackone";
    ConnectSessionCreateCategories["Documents"] = "documents";
    ConnectSessionCreateCategories["Ticketing"] = "ticketing";
    ConnectSessionCreateCategories["Screening"] = "screening";
    ConnectSessionCreateCategories["Messaging"] = "messaging";
    ConnectSessionCreateCategories["Accounting"] = "accounting";
})(ConnectSessionCreateCategories || (exports.ConnectSessionCreateCategories = ConnectSessionCreateCategories = {}));
/**
 * The connect session account type
 */
var ConnectSessionCreateType;
(function (ConnectSessionCreateType) {
    ConnectSessionCreateType["Production"] = "production";
    ConnectSessionCreateType["Test"] = "test";
})(ConnectSessionCreateType || (exports.ConnectSessionCreateType = ConnectSessionCreateType = {}));
/** @internal */
exports.ConnectSessionCreateCategories$inboundSchema = z.nativeEnum(ConnectSessionCreateCategories);
/** @internal */
exports.ConnectSessionCreateCategories$outboundSchema = exports.ConnectSessionCreateCategories$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConnectSessionCreateCategories$;
(function (ConnectSessionCreateCategories$) {
    /** @deprecated use `ConnectSessionCreateCategories$inboundSchema` instead. */
    ConnectSessionCreateCategories$.inboundSchema = exports.ConnectSessionCreateCategories$inboundSchema;
    /** @deprecated use `ConnectSessionCreateCategories$outboundSchema` instead. */
    ConnectSessionCreateCategories$.outboundSchema = exports.ConnectSessionCreateCategories$outboundSchema;
})(ConnectSessionCreateCategories$ || (exports.ConnectSessionCreateCategories$ = ConnectSessionCreateCategories$ = {}));
/** @internal */
exports.ConnectSessionCreateMetadata$inboundSchema = z.object({});
/** @internal */
exports.ConnectSessionCreateMetadata$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 ConnectSessionCreateMetadata$;
(function (ConnectSessionCreateMetadata$) {
    /** @deprecated use `ConnectSessionCreateMetadata$inboundSchema` instead. */
    ConnectSessionCreateMetadata$.inboundSchema = exports.ConnectSessionCreateMetadata$inboundSchema;
    /** @deprecated use `ConnectSessionCreateMetadata$outboundSchema` instead. */
    ConnectSessionCreateMetadata$.outboundSchema = exports.ConnectSessionCreateMetadata$outboundSchema;
})(ConnectSessionCreateMetadata$ || (exports.ConnectSessionCreateMetadata$ = ConnectSessionCreateMetadata$ = {}));
function connectSessionCreateMetadataToJSON(connectSessionCreateMetadata) {
    return JSON.stringify(exports.ConnectSessionCreateMetadata$outboundSchema.parse(connectSessionCreateMetadata));
}
function connectSessionCreateMetadataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConnectSessionCreateMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectSessionCreateMetadata' from JSON`);
}
/** @internal */
exports.ConnectSessionCreateType$inboundSchema = z
    .union([
    z.nativeEnum(ConnectSessionCreateType),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.ConnectSessionCreateType$outboundSchema = z.union([
    z.nativeEnum(ConnectSessionCreateType),
    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 ConnectSessionCreateType$;
(function (ConnectSessionCreateType$) {
    /** @deprecated use `ConnectSessionCreateType$inboundSchema` instead. */
    ConnectSessionCreateType$.inboundSchema = exports.ConnectSessionCreateType$inboundSchema;
    /** @deprecated use `ConnectSessionCreateType$outboundSchema` instead. */
    ConnectSessionCreateType$.outboundSchema = exports.ConnectSessionCreateType$outboundSchema;
})(ConnectSessionCreateType$ || (exports.ConnectSessionCreateType$ = ConnectSessionCreateType$ = {}));
/** @internal */
exports.ConnectSessionCreate$inboundSchema = z.object({
    account_id: z.nullable(z.string()).optional(),
    categories: z.nullable(z.array(exports.ConnectSessionCreateCategories$inboundSchema))
        .optional(),
    expires_in: z.nullable(z.number().default(1800)),
    label: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.lazy(() => exports.ConnectSessionCreateMetadata$inboundSchema))
        .optional(),
    multiple: z.nullable(z.boolean().default(false)),
    origin_owner_id: z.string(),
    origin_owner_name: z.string(),
    origin_username: z.nullable(z.string()).optional(),
    provider: z.nullable(z.string()).optional(),
    provider_version: z.nullable(z.string()).optional(),
    type: z.nullable(exports.ConnectSessionCreateType$inboundSchema.default(ConnectSessionCreateType.Production)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_id": "accountId",
        "expires_in": "expiresIn",
        "origin_owner_id": "originOwnerId",
        "origin_owner_name": "originOwnerName",
        "origin_username": "originUsername",
        "provider_version": "providerVersion",
    });
});
/** @internal */
exports.ConnectSessionCreate$outboundSchema = z.object({
    accountId: z.nullable(z.string()).optional(),
    categories: z.nullable(z.array(exports.ConnectSessionCreateCategories$outboundSchema))
        .optional(),
    expiresIn: z.nullable(z.number().default(1800)),
    label: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.lazy(() => exports.ConnectSessionCreateMetadata$outboundSchema)).optional(),
    multiple: z.nullable(z.boolean().default(false)),
    originOwnerId: z.string(),
    originOwnerName: z.string(),
    originUsername: z.nullable(z.string()).optional(),
    provider: z.nullable(z.string()).optional(),
    providerVersion: z.nullable(z.string()).optional(),
    type: z.nullable(exports.ConnectSessionCreateType$outboundSchema.default(ConnectSessionCreateType.Production)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountId: "account_id",
        expiresIn: "expires_in",
        originOwnerId: "origin_owner_id",
        originOwnerName: "origin_owner_name",
        originUsername: "origin_username",
        providerVersion: "provider_version",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConnectSessionCreate$;
(function (ConnectSessionCreate$) {
    /** @deprecated use `ConnectSessionCreate$inboundSchema` instead. */
    ConnectSessionCreate$.inboundSchema = exports.ConnectSessionCreate$inboundSchema;
    /** @deprecated use `ConnectSessionCreate$outboundSchema` instead. */
    ConnectSessionCreate$.outboundSchema = exports.ConnectSessionCreate$outboundSchema;
})(ConnectSessionCreate$ || (exports.ConnectSessionCreate$ = ConnectSessionCreate$ = {}));
function connectSessionCreateToJSON(connectSessionCreate) {
    return JSON.stringify(exports.ConnectSessionCreate$outboundSchema.parse(connectSessionCreate));
}
function connectSessionCreateFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConnectSessionCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectSessionCreate' from JSON`);
}
//# sourceMappingURL=connectsessioncreate.js.map