1import{e,h as t,j as s}from"./main-FMm0mhBU.js";import"./react-vendor-hAxFZxNQ.js";import"./ui-DlHKYJvh.js";const n=new class{get baseUrl(){return e("/api/v1/teams")}async makeRequest(e,n={}){const a=t("csrftoken"),i=s(),r={"Content-Type":"application/json","X-CSRFToken":a||""};i&&(r["X-Team-ID"]=String(i));const o=await fetch(`${this.baseUrl}${e}`,{credentials:"include",headers:{...r,...n.headers},...n});if(!o.ok){const e=await o.json().catch(()=>({}));throw new Error(e.error||e.detail||`HTTP ${o.status}`)}if(204!==o.status)return o.json()}async listTeams(){return this.makeRequest("")}async createTeam(e){return this.makeRequest("",{method:"POST",body:JSON.stringify(e)})}async getTeam(e){return this.makeRequest(`/${e}/`)}async updateTeam(e,t){return this.makeRequest(`/${e}/`,{method:"PATCH",body:JSON.stringify(t)})}async deleteTeam(e){return this.makeRequest(`/${e}/`,{method:"DELETE"})}async activateTeam(e){return this.makeRequest(`/${e}/activate/`,{method:"POST"})}async listMembers(e){return this.makeRequest(`/${e}/members/`)}async changeMemberRole(e,t,s){return this.makeRequest(`/${e}/members/${t}/`,{method:"PATCH",body:JSON.stringify({role:s})})}async removeMember(e,t){return this.makeRequest(`/${e}/members/${t}/`,{method:"DELETE"})}async listInvitations(e){return this.makeRequest(`/${e}/invitations/`)}async sendInvitation(e,t){return this.makeRequest(`/${e}/invitations/`,{method:"POST",body:JSON.stringify(t)})}async cancelInvitation(e,t){return this.makeRequest(`/${e}/invitations/${t}/`,{method:"DELETE"})}async getInvitationByToken(e){return this.makeRequest(`/invitations/${e}/`)}async acceptInvitation(e){return this.makeRequest(`/invitations/${e}/accept/`,{method:"POST"})}async declineInvitation(e){return this.makeRequest(`/invitations/${e}/decline/`,{method:"POST"})}};export{n as teamsApi};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.