"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIntrinsicUserAttributes = exports.LocalIssuerTypes = exports.isOpenIdUser = exports.isUserWithOrg = void 0;
const isUserWithOrg = (user) => typeof user?.organizationUuid === 'string' &&
    typeof user?.organizationName === 'string' &&
    user?.organizationCreatedAt instanceof Date &&
    typeof user?.role === 'string';
exports.isUserWithOrg = isUserWithOrg;
const isOpenIdUser = (user) => typeof user === 'object' &&
    user !== null &&
    user.userUuid === undefined &&
    user.userId === undefined &&
    typeof user.openId === 'object' &&
    user.openId !== null &&
    typeof user.openId.subject === 'string' &&
    typeof user.openId.issuer === 'string' &&
    typeof user.openId.email === 'string' &&
    typeof user.openId.issuerType === 'string';
exports.isOpenIdUser = isOpenIdUser;
var LocalIssuerTypes;
(function (LocalIssuerTypes) {
    LocalIssuerTypes["EMAIL"] = "email";
    LocalIssuerTypes["API_TOKEN"] = "apiToken";
})(LocalIssuerTypes || (exports.LocalIssuerTypes = LocalIssuerTypes = {}));
const getIntrinsicUserAttributes = (user) => ({
    email: user.email,
});
exports.getIntrinsicUserAttributes = getIntrinsicUserAttributes;
//# sourceMappingURL=user.js.map