export type DeleteApiOrgsOrgActionsPoliciesPolicyIdArgs = {org: string, policy_id: number}; export type DeleteApiOrgsOrgActionsPoliciesPolicyIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an organization Actions policy * * DELETE /orgs/{org}/actions/policies/{policy_id} */ export const deleteApiOrgsOrgActionsPoliciesPolicyId = async (args: DeleteApiOrgsOrgActionsPoliciesPolicyIdArgs, options?: DeleteApiOrgsOrgActionsPoliciesPolicyIdOptions) => { const {baseUrl = "https://api.github.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/orgs/${encodeURIComponent(String(args.org))}/actions/policies/${encodeURIComponent(String(args.policy_id))}${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 };