export type DeleteApiV1ApiSecretsSecretIdArgs = {secretId: number}; export type DeleteApiV1ApiSecretsSecretIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * DELETE /V1/apiSecrets/{secretId} */ export const deleteApiV1ApiSecretsSecretId = async (args: DeleteApiV1ApiSecretsSecretIdArgs, options: DeleteApiV1ApiSecretsSecretIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/V1/apiSecrets/${encodeURIComponent(String(args.secretId))}${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 };