export type DeleteApiApiV1AppsAppIdIntegrationsGithubArgs = {app_id: string}; export type DeleteApiApiV1AppsAppIdIntegrationsGithubOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove GitHub Actions integration * * DELETE /api/v1/apps/{app_id}/integrations/github */ export const deleteApiApiV1AppsAppIdIntegrationsGithub = async (args: DeleteApiApiV1AppsAppIdIntegrationsGithubArgs, options?: DeleteApiApiV1AppsAppIdIntegrationsGithubOptions) => { const {baseUrl = "https://cloud-api.phala.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/apps/${encodeURIComponent(String(args.app_id))}/integrations/github${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 };