export type DeleteApiV1beta1SharedRepoCredentialsRepoCredentialsArgs = {'repo-credentials': string}; export type DeleteApiV1beta1SharedRepoCredentialsRepoCredentialsOptions = {baseUrl: string, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete shared repository credentials * * DELETE /v1beta1/shared/repo-credentials/{repo-credentials} */ export const deleteApiV1beta1SharedRepoCredentialsRepoCredentials = async (args: DeleteApiV1beta1SharedRepoCredentialsRepoCredentialsArgs, options: DeleteApiV1beta1SharedRepoCredentialsRepoCredentialsOptions) => { const {baseUrl, fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set("Authorization", BearerAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1beta1/shared/repo-credentials/${encodeURIComponent(String(args['repo-credentials']))}${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 };