"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvVar = exports.EnvVars = exports.maybeGetEnvParam = void 0;
const maybeGetEnvParam = (paramName) => {
    const maybeEnvParamValue = process.env[paramName];
    const isEnvParamValid = typeof maybeEnvParamValue === 'string' && maybeEnvParamValue.length > 0;
    if (!isEnvParamValid) {
        throw new Error(`Invalid env param ${paramName}`);
    }
    return maybeEnvParamValue;
};
exports.maybeGetEnvParam = maybeGetEnvParam;
class EnvVars {
    static setAuthenticatedUserId(userId) {
        process.env.AUTHENTICATED_USER_ID = userId;
    }
    static getAuthenticatedUserId() {
        return process.env.AUTHENTICATED_USER_ID;
    }
}
exports.EnvVars = EnvVars;
var EnvVar;
(function (EnvVar) {
    EnvVar["AUTH0_DOMAIN"] = "AUTH0_DOMAIN";
    EnvVar["AUTH0_ORGS_USERS_CLIENT_ID"] = "AUTH0_ORGS_USERS_CLIENT_ID";
    EnvVar["AUTH0_ORGS_USERS_CLIENT_SECRET"] = "AUTH0_ORGS_USERS_CLIENT_SECRET";
    EnvVar["ENVIRONMENT"] = "ENVIRONMENT";
    EnvVar["SERVICE_NAME"] = "SERVICE_NAME";
    EnvVar["AWS_REGION"] = "AWS_REGION";
    EnvVar["DOMAIN"] = "DOMAIN";
    EnvVar["VINTER_API_URL"] = "VINTER_API_URL";
    EnvVar["AUTH_SERVICE_CLIENT_ID"] = "AUTH_SERVICE_CLIENT_ID";
    EnvVar["AUTH_SERVICE_CLIENT_SECRET"] = "AUTH_SERVICE_CLIENT_SECRET";
    EnvVar["AUTH_SERVICE_DOMAIN"] = "AUTH_SERVICE_DOMAIN";
    EnvVar["PRIVATE_API_URL"] = "PRIVATE_API_URL";
    EnvVar["ORGS_API_URL"] = "ORGS_API_URL";
    EnvVar["FEATURE_FLAG_ENABLE_AUTHV2"] = "FEATURE_FLAG_ENABLE_AUTHV2";
})(EnvVar = exports.EnvVar || (exports.EnvVar = {}));
//# sourceMappingURL=index.js.map