export type DeleteApiApiPublicV1TeamsTeamRotationsGroupIdArgs = {'X-VO-Api-Id': string, 'X-VO-Api-Key': string, team: string, groupId: number}; export type DeleteApiApiPublicV1TeamsTeamRotationsGroupIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a rotation group * * DELETE /api-public/v1/teams/{team}/rotations/{groupId} */ export const deleteApiApiPublicV1TeamsTeamRotationsGroupId = async (args: DeleteApiApiPublicV1TeamsTeamRotationsGroupIdArgs, options?: DeleteApiApiPublicV1TeamsTeamRotationsGroupIdOptions) => { const {baseUrl = "https://api.victorops.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-VO-Api-Id'] != null) headers.set("X-VO-Api-Id", String(args['X-VO-Api-Id'])) if (args['X-VO-Api-Key'] != null) headers.set("X-VO-Api-Key", String(args['X-VO-Api-Key'])) const url = `${baseUrl.replace(/\/+$/, '')}/api-public/v1/teams/${encodeURIComponent(String(args.team))}/rotations/${encodeURIComponent(String(args.groupId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };