export type DeleteApiEnrichmentIntegrationsServicenowIntegrationIdTablesTableIdArgs = {Accept: string, integration_id: string, table_id: string}; export type DeleteApiEnrichmentIntegrationsServicenowIntegrationIdTablesTableIdOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Remove a CMDB table * * DELETE /enrichment/integrations/servicenow/{integration_id}/tables/{table_id} */ export const deleteApiEnrichmentIntegrationsServicenowIntegrationIdTablesTableId = async (args: DeleteApiEnrichmentIntegrationsServicenowIntegrationIdTablesTableIdArgs, options?: DeleteApiEnrichmentIntegrationsServicenowIntegrationIdTablesTableIdOptions) => { const {baseUrl = "https://api.pagerduty.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Accept != null) headers.set("Accept", String(args.Accept)) if (apiKey !== undefined) headers.set("Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/enrichment/integrations/servicenow/${encodeURIComponent(String(args.integration_id))}/tables/${encodeURIComponent(String(args.table_id))}${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 };