export type DeleteApiSchemaInstalledappsIsaIdArgs = {isaId: string, Authorization: unknown}; export type DeleteApiSchemaInstalledappsIsaIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an InstalledSchemaApp ID and Associated Devices * * DELETE /schema/installedapps/{isaId} */ export const deleteApiSchemaInstalledappsIsaId = async (args: DeleteApiSchemaInstalledappsIsaIdArgs, options?: DeleteApiSchemaInstalledappsIsaIdOptions) => { const {baseUrl = "https://api.smartthings.com/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) const url = `${baseUrl.replace(/\/+$/, '')}/schema/installedapps/${encodeURIComponent(String(args.isaId))}${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 };