export type CreateApiV1AccountAccountSlugProjectProjectSlugSimulationsSimulationIdUnshareArgs = {accountSlug: string, projectSlug: string, simulationId: string}; export type CreateApiV1AccountAccountSlugProjectProjectSlugSimulationsSimulationIdUnshareOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disable simulation sharing * * POST /v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare * * Also accepts auth: BearerAuth */ export const createApiV1AccountAccountSlugProjectProjectSlugSimulationsSimulationIdUnshare = async (args: CreateApiV1AccountAccountSlugProjectProjectSlugSimulationsSimulationIdUnshareArgs, options?: CreateApiV1AccountAccountSlugProjectProjectSlugSimulationsSimulationIdUnshareOptions) => { const {baseUrl = "https://api.tenderly.co/api", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-Access-Key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/account/${encodeURIComponent(String(args.accountSlug))}/project/${encodeURIComponent(String(args.projectSlug))}/simulations/${encodeURIComponent(String(args.simulationId))}/unshare${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };