"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$outboundSchema = exports.ConnectSessionCreateType$outboundSchema = exports.ConnectSessionCreateMetadata$outboundSchema = exports.ConnectSessionCreateCategories$outboundSchema = exports.ConnectSessionCreateType = exports.ConnectSessionCreateCategories = void 0;
exports.connectSessionCreateMetadataToJSON = connectSessionCreateMetadataToJSON;
exports.connectSessionCreateToJSON = connectSessionCreateToJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const openEnums = __importStar(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$outboundSchema = z.nativeEnum(ConnectSessionCreateCategories);
/** @internal */
exports.ConnectSessionCreateMetadata$outboundSchema = z.object({});
function connectSessionCreateMetadataToJSON(connectSessionCreateMetadata) {
    return JSON.stringify(exports.ConnectSessionCreateMetadata$outboundSchema.parse(connectSessionCreateMetadata));
}
/** @internal */
exports.ConnectSessionCreateType$outboundSchema = openEnums.outboundSchema(ConnectSessionCreateType);
/** @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",
    });
});
function connectSessionCreateToJSON(connectSessionCreate) {
    return JSON.stringify(exports.ConnectSessionCreate$outboundSchema.parse(connectSessionCreate));
}
//# sourceMappingURL=connectsessioncreate.js.map