export type DeleteApiV1OrgsOrgIdLookupTablesIdArgs = {org_id: string, id: string}; export type DeleteApiV1OrgsOrgIdLookupTablesIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the Lookup Table for the given org and id. * * DELETE /v1/orgs/{org_id}/lookup_tables/{id} */ export const deleteApiV1OrgsOrgIdLookupTablesId = async (args: DeleteApiV1OrgsOrgIdLookupTablesIdArgs, options?: DeleteApiV1OrgsOrgIdLookupTablesIdOptions) => { const {baseUrl = "https://api.edgedelta.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-ED-API-Token", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/orgs/${encodeURIComponent(String(args.org_id))}/lookup_tables/${encodeURIComponent(String(args.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 };