export type SoftwareAppsRetryInstallationRequest = {system_ids?: Array | undefined}; export type CreateApiApiV2SoftwareappsSoftwareAppIdRetryInstallationArgs = {body: SoftwareAppsRetryInstallationRequest}; export type CreateApiApiV2SoftwareappsSoftwareAppIdRetryInstallationOptions = {baseUrl?: string | undefined, xApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retry Installation for a Software Application * * POST /api/v2/softwareapps/{software_app_id}/retry-installation */ export const createApiApiV2SoftwareappsSoftwareAppIdRetryInstallation = async (args: CreateApiApiV2SoftwareappsSoftwareAppIdRetryInstallationArgs, options?: CreateApiApiV2SoftwareappsSoftwareAppIdRetryInstallationOptions) => { const {baseUrl = "https://console.jumpcloud.com", fetch: fetchFn = fetch, xApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (xApiKey !== undefined) headers.set("x-api-key", xApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/v2/softwareapps/${encodeURIComponent(String(args.software_app_id))}/retry-installation${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };