export type CreateApiTestsTestIdEntitiesEntityIdReactivateArgs = {testId: string, entityId: string}; export type CreateApiTestsTestIdEntitiesEntityIdReactivateOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reactivate test entity * * POST /tests/{testId}/entities/{entityId}/reactivate */ export const createApiTestsTestIdEntitiesEntityIdReactivate = async (args: CreateApiTestsTestIdEntitiesEntityIdReactivateArgs, options?: CreateApiTestsTestIdEntitiesEntityIdReactivateOptions) => { const {baseUrl = "https://api.vanta.com", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/tests/${encodeURIComponent(String(args.testId))}/entities/${encodeURIComponent(String(args.entityId))}/reactivate${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 };