export type DeleteApiPublicSelfServeV1ApplicationGroupApplicationGroupNameArgs = {'application-group-name': string}; export type DeleteApiPublicSelfServeV1ApplicationGroupApplicationGroupNameOptions = {baseUrl: string, httpAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a ApplicationGroup * * DELETE /public/self-serve/v1/application-group/{application-group-name} */ export const deleteApiPublicSelfServeV1ApplicationGroupApplicationGroupName = async (args: DeleteApiPublicSelfServeV1ApplicationGroupApplicationGroupNameArgs, options: DeleteApiPublicSelfServeV1ApplicationGroupApplicationGroupNameOptions) => { const {baseUrl, fetch: fetchFn = fetch, httpAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (httpAuth !== undefined) headers.set('authorization', `Bearer ${httpAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/public/self-serve/v1/application-group/${encodeURIComponent(String(args['application-group-name']))}${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 };