//native
/**
* Update a team
* Update various attributes and configurable settings for the given
team.
*/
export async function main(auth: RT.Sentry, team_id_or_slug: string, body: Body) {
const url = new URL(
`https://${auth.region}.sentry.io/api/0/teams/${auth.organizationSlug}/${team_id_or_slug}/`
)
const response = await fetch(url, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + auth.token
},
body: JSON.stringify(body)
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Allows parameters to be defined in snake case, but passed as camel case.
*
* Errors are output in camel case.
*/
export interface Body {
/**
* Uniquely identifies a team. This is must be available.
*/
slug: string
[k: string]: unknown
}
Submitted by hugo697 235 days ago