'use client'
import {
  __export
} from "./chunk-JUBOAWNR.mjs";

// src/endpoints/m2m-users.v1.ts
var m2m_users_v1_exports = {};
__export(m2m_users_v1_exports, {
  activateUser: () => activateUser,
  activateUserByAdmin: () => activateUserByAdmin,
  createCompany: () => createCompany,
  createUser: () => createUser,
  deactivateUser: () => deactivateUser,
  findCompaniesByIds: () => findCompaniesByIds,
  findUserByEmail: () => findUserByEmail,
  findUserById: () => findUserById,
  findUsersByCompanyId: () => findUsersByCompanyId,
  generateToken: () => generateToken,
  generateUserToken: () => generateUserToken,
  getCompany: () => getCompany,
  getJwks: () => getJwks,
  getPublicKeys: () => getPublicKeys,
  healthCheck: () => healthCheck,
  login: () => login,
  loginWithMFA: () => loginWithMFA,
  loginWithSlash: () => loginWithSlash,
  m2mUsers_v1: () => m2mUsers_v1,
  publishMFACode: () => publishMFACode,
  resetPassword: () => resetPassword,
  root: () => root,
  sendActivationEmail: () => sendActivationEmail,
  sendResetPasswordEmail: () => sendResetPasswordEmail,
  setAuthorityScope: () => setAuthorityScope,
  updateAuthority: () => updateAuthority,
  updateCompany: () => updateCompany,
  updateCompanyPatch: () => updateCompanyPatch,
  updateUser: () => updateUser,
  updateUserByAdmin: () => updateUserByAdmin,
  updateUserPatch: () => updateUserPatch
});
var root = () => {
  let __root = "";
  if (globalThis.M2M_COMPONENTS_ENV === "local") {
    __root = "http://localhost:8080";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "localDev") {
    __root = "https://api-users.dev.m2msystems.cloud";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "development") {
    __root = "https://api-users.dev.m2msystems.cloud";
  }
  if (globalThis.M2M_COMPONENTS_ENV === "production") {
    __root = "https://api.m2msystems.cloud";
  }
  return __root;
};
var healthCheck = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`health_check`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var createCompany = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`companies/`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var getCompany = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`companies/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateCompany = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`companies/`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateCompanyPatch = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`companies/`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findCompaniesByIds = ({
  company_ids
}) => {
  const __root = root();
  const __queries = Object.entries({ company_ids }).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`companies/find_by_ids`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var createUser = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findUserById = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateUser = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateUserPatch = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var activateUserByAdmin = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}/admin_activate`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var deactivateUser = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}/deactivate`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var sendResetPasswordEmail = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/reset_password_email`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var resetPassword = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/reset_password`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var sendActivationEmail = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/activation_email`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var activateUser = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/activate`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var setAuthorityScope = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/scope`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findUserByEmail = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/find_by_email`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateAuthority = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/authority/${id}`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var findUsersByCompanyId = ({ statuses }) => {
  const __root = root();
  const __queries = Object.entries({ statuses }).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/find_by_company_id`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var updateUserByAdmin = ({ id }) => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`users/${id}/admin_update`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var login = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var loginWithSlash = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login/`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var getJwks = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login/jwks`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var getPublicKeys = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login/public_keys`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var publishMFACode = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login/publish_mfa_code`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var loginWithMFA = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`login/mfa_login`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var generateToken = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`guest/token`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var generateUserToken = () => {
  const __root = root();
  const __queries = Object.entries({}).filter(([_, value]) => {
    return value !== void 0;
  }).map(([key, value]) => {
    return `${key}=${value}`;
  }).join("&");
  const __path = `${__root}/${`generate/token`}`;
  return __queries ? `${__path}?${__queries}` : __path;
};
var m2mUsers_v1 = {
  healthCheck,
  createCompany,
  getCompany,
  updateCompany,
  updateCompanyPatch,
  findCompaniesByIds,
  createUser,
  findUserById,
  updateUser,
  updateUserPatch,
  activateUserByAdmin,
  deactivateUser,
  sendResetPasswordEmail,
  resetPassword,
  sendActivationEmail,
  activateUser,
  setAuthorityScope,
  findUserByEmail,
  updateAuthority,
  findUsersByCompanyId,
  updateUserByAdmin,
  login,
  loginWithSlash,
  getJwks,
  getPublicKeys,
  publishMFACode,
  loginWithMFA,
  generateToken,
  generateUserToken
};

export {
  root,
  healthCheck,
  createCompany,
  getCompany,
  updateCompany,
  updateCompanyPatch,
  findCompaniesByIds,
  createUser,
  findUserById,
  updateUser,
  updateUserPatch,
  activateUserByAdmin,
  deactivateUser,
  sendResetPasswordEmail,
  resetPassword,
  sendActivationEmail,
  activateUser,
  setAuthorityScope,
  findUserByEmail,
  updateAuthority,
  findUsersByCompanyId,
  updateUserByAdmin,
  login,
  loginWithSlash,
  getJwks,
  getPublicKeys,
  publishMFACode,
  loginWithMFA,
  generateToken,
  generateUserToken,
  m2mUsers_v1,
  m2m_users_v1_exports
};
//# sourceMappingURL=chunk-GMPQV5TL.mjs.map