export type DeleteApiV2StorageTablesTableIdAliasColumnsAutoSyncArgs = {tableId: string}; export type DeleteApiV2StorageTablesTableIdAliasColumnsAutoSyncOptions = {baseUrl?: string | undefined, StorageKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Disable Column Synchronization * * DELETE /v2/storage/tables/{tableId}/alias-columns-auto-sync * * Also accepts auth: ManageKey, BearerAuth */ export const deleteApiV2StorageTablesTableIdAliasColumnsAutoSync = async (args: DeleteApiV2StorageTablesTableIdAliasColumnsAutoSyncArgs, options?: DeleteApiV2StorageTablesTableIdAliasColumnsAutoSyncOptions) => { const {baseUrl = "https://connection.keboola.com", fetch: fetchFn = fetch, StorageKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (StorageKey !== undefined) headers.set("X-StorageApi-Token", StorageKey) const url = `${baseUrl.replace(/\/+$/, '')}/v2/storage/tables/${encodeURIComponent(String(args.tableId))}/alias-columns-auto-sync${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 };