"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.connectSessionTokenAuthLinkFromJSON = exports.connectSessionTokenAuthLinkToJSON = exports.ConnectSessionTokenAuthLink$ = exports.ConnectSessionTokenAuthLink$outboundSchema = exports.ConnectSessionTokenAuthLink$inboundSchema = exports.connectSessionTokenAuthLinkMetadataFromJSON = exports.connectSessionTokenAuthLinkMetadataToJSON = exports.ConnectSessionTokenAuthLinkMetadata$ = exports.ConnectSessionTokenAuthLinkMetadata$outboundSchema = exports.ConnectSessionTokenAuthLinkMetadata$inboundSchema = exports.ConnectSessionTokenAuthLinkCategories$ = exports.ConnectSessionTokenAuthLinkCategories$outboundSchema = exports.ConnectSessionTokenAuthLinkCategories$inboundSchema = exports.ConnectSessionTokenAuthLinkCategories = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
var ConnectSessionTokenAuthLinkCategories;
(function (ConnectSessionTokenAuthLinkCategories) {
    ConnectSessionTokenAuthLinkCategories["Ats"] = "ats";
    ConnectSessionTokenAuthLinkCategories["Hris"] = "hris";
    ConnectSessionTokenAuthLinkCategories["HrisLegacy"] = "hris-legacy";
    ConnectSessionTokenAuthLinkCategories["Crm"] = "crm";
    ConnectSessionTokenAuthLinkCategories["Iam"] = "iam";
    ConnectSessionTokenAuthLinkCategories["Marketing"] = "marketing";
    ConnectSessionTokenAuthLinkCategories["Lms"] = "lms";
    ConnectSessionTokenAuthLinkCategories["Stackone"] = "stackone";
    ConnectSessionTokenAuthLinkCategories["Documents"] = "documents";
    ConnectSessionTokenAuthLinkCategories["Ticketing"] = "ticketing";
    ConnectSessionTokenAuthLinkCategories["Screening"] = "screening";
    ConnectSessionTokenAuthLinkCategories["Messaging"] = "messaging";
})(ConnectSessionTokenAuthLinkCategories || (exports.ConnectSessionTokenAuthLinkCategories = ConnectSessionTokenAuthLinkCategories = {}));
/** @internal */
exports.ConnectSessionTokenAuthLinkCategories$inboundSchema = z.nativeEnum(ConnectSessionTokenAuthLinkCategories);
/** @internal */
exports.ConnectSessionTokenAuthLinkCategories$outboundSchema = exports.ConnectSessionTokenAuthLinkCategories$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConnectSessionTokenAuthLinkCategories$;
(function (ConnectSessionTokenAuthLinkCategories$) {
    /** @deprecated use `ConnectSessionTokenAuthLinkCategories$inboundSchema` instead. */
    ConnectSessionTokenAuthLinkCategories$.inboundSchema = exports.ConnectSessionTokenAuthLinkCategories$inboundSchema;
    /** @deprecated use `ConnectSessionTokenAuthLinkCategories$outboundSchema` instead. */
    ConnectSessionTokenAuthLinkCategories$.outboundSchema = exports.ConnectSessionTokenAuthLinkCategories$outboundSchema;
})(ConnectSessionTokenAuthLinkCategories$ || (exports.ConnectSessionTokenAuthLinkCategories$ = ConnectSessionTokenAuthLinkCategories$ = {}));
/** @internal */
exports.ConnectSessionTokenAuthLinkMetadata$inboundSchema = z.object({});
/** @internal */
exports.ConnectSessionTokenAuthLinkMetadata$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 ConnectSessionTokenAuthLinkMetadata$;
(function (ConnectSessionTokenAuthLinkMetadata$) {
    /** @deprecated use `ConnectSessionTokenAuthLinkMetadata$inboundSchema` instead. */
    ConnectSessionTokenAuthLinkMetadata$.inboundSchema = exports.ConnectSessionTokenAuthLinkMetadata$inboundSchema;
    /** @deprecated use `ConnectSessionTokenAuthLinkMetadata$outboundSchema` instead. */
    ConnectSessionTokenAuthLinkMetadata$.outboundSchema = exports.ConnectSessionTokenAuthLinkMetadata$outboundSchema;
})(ConnectSessionTokenAuthLinkMetadata$ || (exports.ConnectSessionTokenAuthLinkMetadata$ = ConnectSessionTokenAuthLinkMetadata$ = {}));
function connectSessionTokenAuthLinkMetadataToJSON(connectSessionTokenAuthLinkMetadata) {
    return JSON.stringify(exports.ConnectSessionTokenAuthLinkMetadata$outboundSchema.parse(connectSessionTokenAuthLinkMetadata));
}
exports.connectSessionTokenAuthLinkMetadataToJSON = connectSessionTokenAuthLinkMetadataToJSON;
function connectSessionTokenAuthLinkMetadataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConnectSessionTokenAuthLinkMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectSessionTokenAuthLinkMetadata' from JSON`);
}
exports.connectSessionTokenAuthLinkMetadataFromJSON = connectSessionTokenAuthLinkMetadataFromJSON;
/** @internal */
exports.ConnectSessionTokenAuthLink$inboundSchema = z.object({
    account_id: z.nullable(z.string()).optional(),
    auth_link_url: z.string(),
    categories: z.nullable(z.array(exports.ConnectSessionTokenAuthLinkCategories$inboundSchema)).optional(),
    created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    external_trigger_token: z.nullable(z.string()).optional(),
    id: z.number(),
    label: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.lazy(() => exports.ConnectSessionTokenAuthLinkMetadata$inboundSchema)).optional(),
    organization_id: z.number(),
    origin_owner_id: z.string(),
    origin_owner_name: z.string(),
    origin_username: z.nullable(z.string()).optional(),
    project_id: z.string(),
    provider: z.nullable(z.string()).optional(),
    token: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_id": "accountId",
        "auth_link_url": "authLinkUrl",
        "created_at": "createdAt",
        "external_trigger_token": "externalTriggerToken",
        "organization_id": "organizationId",
        "origin_owner_id": "originOwnerId",
        "origin_owner_name": "originOwnerName",
        "origin_username": "originUsername",
        "project_id": "projectId",
    });
});
/** @internal */
exports.ConnectSessionTokenAuthLink$outboundSchema = z.object({
    accountId: z.nullable(z.string()).optional(),
    authLinkUrl: z.string(),
    categories: z.nullable(z.array(exports.ConnectSessionTokenAuthLinkCategories$outboundSchema)).optional(),
    createdAt: z.date().transform(v => v.toISOString()),
    externalTriggerToken: z.nullable(z.string()).optional(),
    id: z.number(),
    label: z.nullable(z.string()).optional(),
    metadata: z.nullable(z.lazy(() => exports.ConnectSessionTokenAuthLinkMetadata$outboundSchema)).optional(),
    organizationId: z.number(),
    originOwnerId: z.string(),
    originOwnerName: z.string(),
    originUsername: z.nullable(z.string()).optional(),
    projectId: z.string(),
    provider: z.nullable(z.string()).optional(),
    token: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountId: "account_id",
        authLinkUrl: "auth_link_url",
        createdAt: "created_at",
        externalTriggerToken: "external_trigger_token",
        organizationId: "organization_id",
        originOwnerId: "origin_owner_id",
        originOwnerName: "origin_owner_name",
        originUsername: "origin_username",
        projectId: "project_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ConnectSessionTokenAuthLink$;
(function (ConnectSessionTokenAuthLink$) {
    /** @deprecated use `ConnectSessionTokenAuthLink$inboundSchema` instead. */
    ConnectSessionTokenAuthLink$.inboundSchema = exports.ConnectSessionTokenAuthLink$inboundSchema;
    /** @deprecated use `ConnectSessionTokenAuthLink$outboundSchema` instead. */
    ConnectSessionTokenAuthLink$.outboundSchema = exports.ConnectSessionTokenAuthLink$outboundSchema;
})(ConnectSessionTokenAuthLink$ || (exports.ConnectSessionTokenAuthLink$ = ConnectSessionTokenAuthLink$ = {}));
function connectSessionTokenAuthLinkToJSON(connectSessionTokenAuthLink) {
    return JSON.stringify(exports.ConnectSessionTokenAuthLink$outboundSchema.parse(connectSessionTokenAuthLink));
}
exports.connectSessionTokenAuthLinkToJSON = connectSessionTokenAuthLinkToJSON;
function connectSessionTokenAuthLinkFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ConnectSessionTokenAuthLink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectSessionTokenAuthLink' from JSON`);
}
exports.connectSessionTokenAuthLinkFromJSON = connectSessionTokenAuthLinkFromJSON;
//# sourceMappingURL=connectsessiontokenauthlink.js.map