"use strict";const p=require("./index-2wUhd9Lu.js"),d=r=>({get:(s,e)=>p.apiClient.get(s,{...e,headers:r?{...e?.headers,"X-Tenant-Slug":r}:e?.headers}).then(t=>t.data),post:(s,e,t)=>p.apiClient.post(s,e,{...t,headers:r?{...t?.headers,"X-Tenant-Slug":r}:t?.headers}).then(n=>n.data),put:(s,e,t)=>p.apiClient.put(s,e,{...t,headers:r?{...t?.headers,"X-Tenant-Slug":r}:t?.headers}).then(n=>n.data),patch:(s,e,t)=>p.apiClient.patch(s,e,{...t,headers:r?{...t?.headers,"X-Tenant-Slug":r}:t?.headers}).then(n=>n.data),delete:(s,e)=>p.apiClient.delete(s,{...e,headers:r?{...e?.headers,"X-Tenant-Slug":r}:e?.headers}).then(t=>t.data)}),a="/api/administration/users/groups",l=r=>{const s=r?d(r):p.api;return{getAll:async(e,t,n)=>{const o=new URLSearchParams;e&&o.append("search",e),t!==void 0&&o.append("isActive",String(t)),n!==void 0&&o.append("syncedFromEntra",String(n));const i=o.toString(),$=i?`${a}?${i}`:a;return await s.get($)},getById:async e=>await s.get(`${a}/${e}`),create:async e=>await s.post(a,e),update:async(e,t)=>await s.put(`${a}/${e}`,t),delete:async e=>{await s.delete(`${a}/${e}`)},activate:async e=>{await s.patch(`${a}/${e}/activate`)},deactivate:async e=>{await s.patch(`${a}/${e}/deactivate`)},linkToEntra:async(e,t)=>{await s.post(`${a}/${e}/link-entra`,t)},unlinkFromEntra:async e=>{await s.post(`${a}/${e}/unlink-entra`)},getMembers:async e=>await s.get(`${a}/${e}/members`),addMember:async(e,t)=>{await s.post(`${a}/${e}/members`,t)},removeMember:async(e,t)=>{await s.delete(`${a}/${e}/members/${t}`)},getRoles:async e=>await s.get(`${a}/${e}/roles`),assignRole:async(e,t)=>{await s.post(`${a}/${e}/roles`,t)},removeRole:async(e,t,n)=>{const o=n?`?tenantId=${n}`:"";await s.delete(`${a}/${e}/roles/${t}${o}`)},setRoleInheritable:async(e,t,n)=>{await s.patch(`${a}/${e}/roles/${t}/inheritable`,n)},getChildGroups:async e=>await s.get(`${a}/${e}/children`),setParentGroup:async(e,t)=>{await s.patch(`${a}/${e}/parent`,t)},getTenants:async e=>await s.get(`${a}/${e}/tenants`),getInheritedTenants:async e=>await s.get(`${a}/${e}/inherited-tenants`),getInheritedMembers:async e=>await s.get(`${a}/${e}/inherited-members`),getInheritedRoles:async e=>await s.get(`${a}/${e}/inherited-roles`),addToTenant:async(e,t)=>{await s.post(`${a}/${e}/tenants`,t)},removeFromTenant:async(e,t)=>{await s.delete(`${a}/${e}/tenants/${t}`)},getApplicationAccess:async(e,t)=>{const n=t?`${a}/${e}/application-access?tenantId=${t}`:`${a}/${e}/application-access`;return await s.get(n)},getCustomRole:async e=>await s.get(`${a}/${e}/custom-role`),createCustomRole:async e=>await s.post(`${a}/${e}/custom-role`),deleteCustomRole:async e=>{await s.delete(`${a}/${e}/custom-role`)}}},c=l,h=c();exports.createGroupsApi=c;exports.groupsApi=h;
//# sourceMappingURL=groupsApi-BIbG665N.js.map
