From 352c71d69855e5ecf60360326c0129702dc68822 Mon Sep 17 00:00:00 2001 From: sophiamersmann Date: Wed, 17 Jul 2024 12:01:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20wip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminSiteServer/apiRouter.ts | 389 ++++++++++++++---- baker/siteRenderers.tsx | 37 +- ...veIndicatorChartsToTheChartsConfigTable.ts | 17 +- db/model/Variable.ts | 53 ++- .../types/src/dbTypes/Variables.ts | 42 +- packages/@ourworldindata/types/src/index.ts | 4 - 6 files changed, 386 insertions(+), 156 deletions(-) diff --git a/adminSiteServer/apiRouter.ts b/adminSiteServer/apiRouter.ts index 2add7d1553a..50be6eddfa0 100644 --- a/adminSiteServer/apiRouter.ts +++ b/adminSiteServer/apiRouter.ts @@ -292,7 +292,7 @@ const saveNewChart = async ( } // compute patch and full configs - const baseConfig = getBaseLayerConfig() + const baseConfig = await getBaseLayerConfigForChart(knex) const patchConfig = diffGrapherConfigs(config, baseConfig) const fullConfig = mergeGrapherConfigs(baseConfig, patchConfig) @@ -354,7 +354,7 @@ const updateExistingChart = async ( } // compute patch and full configs - const baseConfig = getBaseLayerConfig() + const baseConfig = await getBaseLayerConfigForChart(knex, chartId) const patchConfig = diffGrapherConfigs(config, baseConfig) const fullConfig = mergeGrapherConfigs(baseConfig, patchConfig) @@ -633,14 +633,81 @@ getRouteWithROTransaction( async (req, res, trx) => expectChartById(trx, req.params.chartId) ) -function getBaseLayerConfig(): GrapherInterface { +async function getBaseLayerConfigForIndicatorChartAdmin( + trx: db.KnexReadonlyTransaction, + variableId: number +): Promise { + // check if there is an ETL-authored indicator chart + const variable = await db.knexRawFirst<{ config: GrapherInterface }>( + trx, + `-- sql + SELECT cc.full AS config + FROM chart_configs cc + JOIN variables v ON v.grapherConfigIdETL = cc.id + WHERE v.id = ? + `, + [variableId] + ) + return variable?.config ?? {} +} + +async function getBaseLayerConfigForChart( + trx: db.KnexReadonlyTransaction, + chartId?: number +): Promise { + if (chartId === undefined) return defaultGrapherConfig + + // check if the chart inherits settings from an indicator + const baseIndicator = await db.knexRawFirst<{ id: number }>( + trx, + `-- sql + SELECT indicatorId AS id + FROM inheriting_charts + WHERE chartId = ? + `, + [chartId] + ) + + if (!baseIndicator) return defaultGrapherConfig + + // check if there is an admin-authored indicator chart + const variableAdmin = await db.knexRawFirst<{ config: GrapherInterface }>( + trx, + `-- sql + SELECT cc.full AS config + FROM chart_configs cc + JOIN variables v ON v.grapherConfigIdAdmin = cc.id + WHERE v.id = ? + `, + [baseIndicator.id] + ) + if (variableAdmin) + return mergeGrapherConfigs(defaultGrapherConfig, variableAdmin.config) + + // check if there is an ETL-authored indicator chart + const variableETL = await db.knexRawFirst<{ config: GrapherInterface }>( + trx, + `-- sql + SELECT cc.full AS config + FROM chart_configs cc + JOIN variables v ON v.grapherConfigIdETL = cc.id + WHERE v.id = ? + `, + [baseIndicator.id] + ) + if (variableETL) + return mergeGrapherConfigs(defaultGrapherConfig, variableETL.config) + return defaultGrapherConfig } getRouteWithROTransaction( apiRouter, "/charts/:chartId.base.json", - async (req, res, trx) => getBaseLayerConfig() + async (req, res, trx) => { + const chartId = expectInt(req.params.chartId) + return getBaseLayerConfigForChart(trx, chartId) + } ) getRouteWithROTransaction( @@ -1141,21 +1208,25 @@ getRouteWithROTransaction( const whereClause = filterSExpr?.toSql() ?? "true" const resultsWithStringGrapherConfigs = await db.knexRaw( trx, - `SELECT variables.id as id, - variables.name as name, - variables.grapherConfigAdmin as config, - d.name as datasetname, - namespaces.name as namespacename, - variables.createdAt as createdAt, - variables.updatedAt as updatedAt, - variables.description as description -FROM variables -LEFT JOIN active_datasets as d on variables.datasetId = d.id -LEFT JOIN namespaces on d.namespace = namespaces.name -WHERE ${whereClause} -ORDER BY variables.id DESC -LIMIT 50 -OFFSET ${offset.toString()}` + `-- sql + SELECT + variables.id as id, + variables.name as name, + chart_configs.patch as config, + d.name as datasetname, + namespaces.name as namespacename, + variables.createdAt as createdAt, + variables.updatedAt as updatedAt, + variables.description as description + FROM variables + LEFT JOIN active_datasets as d on variables.datasetId = d.id + LEFT JOIN namespaces on d.namespace = namespaces.name + LEFT JOIN chart_configs on variables.grapherConfigIdAdmin = cc.id + WHERE ${whereClause} + ORDER BY variables.id DESC + LIMIT 50 + OFFSET ${offset.toString()} + ` ) const results = resultsWithStringGrapherConfigs.map((row: any) => ({ @@ -1164,11 +1235,14 @@ OFFSET ${offset.toString()}` })) const resultCount = await db.knexRaw<{ count: number }>( trx, - `SELECT count(*) as count -FROM variables -LEFT JOIN active_datasets as d on variables.datasetId = d.id -LEFT JOIN namespaces on d.namespace = namespaces.name -WHERE ${whereClause}` + `-- sql + SELECT count(*) as count + FROM variables + LEFT JOIN active_datasets as d on variables.datasetId = d.id + LEFT JOIN namespaces on d.namespace = namespaces.name + LEFT JOIN chart_configs on variables.grapherConfigIdAdmin = cc.id + WHERE ${whereClause} + ` ) return { rows: results, numTotalRows: resultCount[0].count } } @@ -1182,10 +1256,19 @@ patchRouteWithRWTransaction( const variableIds = new Set(patchesList.map((patch) => patch.id)) const configsAndIds = await db.knexRaw< - Pick - >(trx, `SELECT id, grapherConfigAdmin FROM variables where id IN (?)`, [ - [...variableIds.values()], - ]) + Pick & { + grapherConfigAdmin: DbRawChartConfig["patch"] + } + >( + trx, + `-- sql + SELECT v.id, cc.patch AS grapherConfigAdmin + FROM variables v + LEFT JOIN chart_configs cc ON v.grapherConfigIdAdmin = cc.id + WHERE v.id IN (?) + `, + [[...variableIds.values()]] + ) const configMap = new Map( configsAndIds.map((item: any) => [ item.id, @@ -1201,8 +1284,18 @@ patchRouteWithRWTransaction( for (const [variableId, newConfig] of configMap.entries()) { await db.knexRaw( trx, - `UPDATE variables SET grapherConfigAdmin = ? where id = ?`, - [JSON.stringify(newConfig), variableId] + `-- sql + UPDATE chart_configs + SET + patch = ?, + full = ? + WHERE id = ? + `, + [ + JSON.stringify(newConfig), + JSON.stringify(newConfig), + variableId, + ] // TODO: full is wrong!! ) } @@ -1270,19 +1363,19 @@ getRouteWithROTransaction( variableId, trx ) - if ( - grapherConfig && - (!grapherConfig.dimensions || grapherConfig.dimensions.length === 0) - ) { - const dimensions: OwidChartDimensionInterface[] = [ - { - variableId: variableId, - property: DimensionProperty.y, - display: variable.display, - }, - ] - grapherConfig.dimensions = dimensions - } + // if ( + // grapherConfig && + // (!grapherConfig.dimensions || grapherConfig.dimensions.length === 0) + // ) { + // const dimensions: OwidChartDimensionInterface[] = [ + // { + // variableId: variableId, + // property: DimensionProperty.y, + // display: variable.display, + // }, + // ] + // grapherConfig.dimensions = dimensions + // } const variablesWithCharts: OwidVariableWithSource & { charts: Record @@ -1301,10 +1394,9 @@ getRouteWithROTransaction( postRouteWithRWTransaction( apiRouter, - "/variables/:variableId/grapherConfigETL/new", + "/variables/:variableId/grapherConfigETL/update", async (req, res, trx) => { const variableId = expectInt(req.params.variableId) - // const user = res.locals.user const config = req.body // if no schema is given, assume it's the latest @@ -1325,55 +1417,211 @@ postRouteWithRWTransaction( config.dimensions = [{ property: DimensionProperty.y, variableId }] } - // ETL configs inherit from the default - const patchConfigETL = diffGrapherConfigs(config, defaultGrapherConfig) - const fullConfigETL = mergeGrapherConfigs( - defaultGrapherConfig, - patchConfigETL - ) - - // insert chart config into the database - const configId = await getBinaryUUID(trx) - await db.knexRaw( + const variableRowETL = await db.knexRawFirst<{ + configId: DbRawChartConfig["id"] + // patchConfig: DbRawChartConfig["patch"] + }>( trx, `-- sql + SELECT + cc.id as configId, + cc.patch as patchConfig + FROM chart_configs cc + JOIN variables v ON cc.id = v.grapherConfigIdETL + WHERE v.id = ? + `, + [variableId] + ) + + const configETL = config + if (variableRowETL) { + // update existing chart config + await db.knexRaw( + trx, + `-- sql + UPDATE chart_configs + SET + patch = ?, + full = ? + WHERE id = ? + `, + [ + JSON.stringify(configETL), + JSON.stringify(configETL), + variableRowETL.configId, + ] + ) + } else { + // insert chart config into the database + const configId = await getBinaryUUID(trx) + await db.knexRaw( + trx, + `-- sql INSERT INTO chart_configs (id, patch, full) VALUES (?, ?, ?) `, - [ - configId, - JSON.stringify(patchConfigETL), - JSON.stringify(fullConfigETL), - ] + [configId, JSON.stringify(configETL), JSON.stringify(configETL)] + ) + + // make a reference to the config from the variables table + await db.knexRaw( + trx, + `-- sql + UPDATE variables + SET grapherConfigIdETL = ? + WHERE id = ? + `, + [configId, variableId] + ) + } + + // grab the admin-authored indicator chart and update it if there is one + let patchConfigAdmin: GrapherInterface = {} + const variableRowAdmin = await db.knexRawFirst<{ + configId: DbRawChartConfig["id"] + patchConfig: DbRawChartConfig["patch"] + }>( + trx, + `-- sql + SELECT + cc.id as configId, + cc.patch as patchConfig + FROM chart_configs cc + JOIN variables v ON cc.id = v.grapherConfigIdAdmin + WHERE v.id = ? + `, + [variableId] ) + if (variableRowAdmin) { + patchConfigAdmin = parseChartConfig(variableRowAdmin.patchConfig) + const fullConfigAdmin = mergeGrapherConfigs( + configETL, + patchConfigAdmin + ) - // make a reference to the config from the variables table + // update the admin-authored indicator chart + await db.knexRaw( + trx, + `-- sql + UPDATE variables + SET full = ? + WHERE grapherConfigIdAdmin = ? + `, + [JSON.stringify(fullConfigAdmin), variableRowAdmin.configId] + ) + } + + // find all charts that inherit from the indicator + const children = await db.knexRaw<{ + chartId: number + patchConfig: string + }>( + trx, + `-- sql + SELECT c.id as chartId, cc.patch as patchConfig + FROM inheriting_charts ic + JOIN charts c ON c.id = ic.chartId + JOIN chart_configs cc ON cc.id = c.configId + WHERE ic.variableId = ? + `, + [variableId] + ) + + for (const child of children) { + const patchConfigChild = JSON.parse(child.patchConfig) + const fullConfigChild = mergeGrapherConfigs( + defaultGrapherConfig, + configETL, + patchConfigAdmin, + patchConfigChild + ) + await db.knexRaw( + trx, + `-- sql + UPDATE chart_configs cc + JOIN charts c ON c.configId = cc.id + SET cc.full = ? + WHERE c.id = ? + `, + [JSON.stringify(fullConfigChild), child.chartId] + ) + } + } +) + +deleteRouteWithRWTransaction( + apiRouter, + "/variables/:variableId/grapherConfigETL/delete", + async (req, res, trx) => { + const variableId = expectInt(req.params.variableId) + + // grab the config id + const variableRowETL = await db.knexRawFirst<{ configId: Buffer }>( + trx, + `-- sql + SELECT grapherConfigIdETL AS configId + FROM variables + WHERE id = ? + `, + [variableId] + ) + + // nothing to be done if there is no entry + if (!variableRowETL || !variableRowETL.configId) { + return { success: true } + } + + // delete reference in the variables table await db.knexRaw( trx, `-- sql UPDATE variables - SET grapherConfigIdETL = ? + SET grapherConfigIdETL = NULL + WHERE id = ? + `, + [variableId] + ) + + // delete row in the chart_configs table + await db.knexRaw( + trx, + `-- sql + DELETE FROM chart_configs WHERE id = ? `, - [configId, variableId] + [variableRowETL.configId] ) - // grab the admin-authored indicator chart if there is one + // grab the admin-authored indicator chart and update it if there is one let patchConfigAdmin: GrapherInterface = {} - const row = await db.knexRawFirst<{ - adminConfig: DbRawChartConfig["full"] // TODO: type + const variableRowAdmin = await db.knexRawFirst<{ + configId: DbRawChartConfig["id"] + patchConfig: DbRawChartConfig["patch"] }>( trx, `-- sql - SELECT cc.patch as adminConfig + SELECT + cc.id as configId, + cc.patch as patchConfig FROM chart_configs cc JOIN variables v ON cc.id = v.grapherConfigIdAdmin WHERE v.id = ? `, [variableId] ) - if (row) { - patchConfigAdmin = parseChartConfig(row.adminConfig) + if (variableRowAdmin) { + patchConfigAdmin = parseChartConfig(variableRowAdmin.patchConfig) + + // update the admin-authored indicator chart + await db.knexRaw( + trx, + `-- sql + UPDATE variables + SET full = ? + WHERE grapherConfigIdAdmin = ? + `, + [variableRowAdmin.patchConfig, variableRowAdmin.configId] + ) } // find all charts that inherit from the indicator @@ -1396,7 +1644,6 @@ postRouteWithRWTransaction( const patchConfigChild = JSON.parse(child.patchConfig) const fullConfigChild = mergeGrapherConfigs( defaultGrapherConfig, - patchConfigETL, patchConfigAdmin, patchConfigChild ) @@ -1411,6 +1658,8 @@ postRouteWithRWTransaction( [JSON.stringify(fullConfigChild), child.chartId] ) } + + return { success: true } } ) diff --git a/baker/siteRenderers.tsx b/baker/siteRenderers.tsx index afe9054586e..d3760b8bb55 100644 --- a/baker/siteRenderers.tsx +++ b/baker/siteRenderers.tsx @@ -48,6 +48,7 @@ import { OwidGdoc, OwidGdocDataInsightInterface, DbRawPost, + mergeGrapherConfigs, } from "@ourworldindata/utils" import { extractFormattingOptions } from "../serverUtils/wordpressUtils.js" import { @@ -751,7 +752,16 @@ export const renderExplorerPage = async ( if (requiredVariableIds.length) { partialGrapherConfigRows = await knexRaw( knex, - `SELECT id, grapherConfigETL, grapherConfigAdmin FROM variables WHERE id IN (?)`, + `-- sql + SELECT + v.id, + cc_etl.full AS grapherConfigETL, + cc_admin.full AS grapherConfigAdmin + FROM variables v + JOIN chart_configs cc_admin ON cc.id=v.grapherConfigIdAdmin + JOIN chart_configs cc_etl ON cc.id=v.grapherConfigIdETL + WHERE v.id IN (?) + `, [requiredVariableIds] ) @@ -779,20 +789,17 @@ export const renderExplorerPage = async ( const partialGrapherConfigs = partialGrapherConfigRows .filter((row) => row.grapherConfigAdmin || row.grapherConfigETL) .map((row) => { - const adminConfig = row.grapherConfigAdmin - ? parseGrapherConfigFromRow({ - id: row.id, - config: row.grapherConfigAdmin as string, - }) - : {} - const etlConfig = row.grapherConfigETL - ? parseGrapherConfigFromRow({ - id: row.id, - config: row.grapherConfigETL as string, - }) - : {} - // TODO(inheritance): use mergeGrapherConfigs instead - return mergePartialGrapherConfigs(etlConfig, adminConfig) + if (row.grapherConfigAdmin) { + return parseGrapherConfigFromRow({ + id: row.id, + config: row.grapherConfigAdmin as string, + }) + } else { + return parseGrapherConfigFromRow({ + id: row.id, + config: row.grapherConfigETL as string, + }) + } }) const wpContent = transformedProgram.wpBlockId diff --git a/db/migration/1721134584504-MoveIndicatorChartsToTheChartsConfigTable.ts b/db/migration/1721134584504-MoveIndicatorChartsToTheChartsConfigTable.ts index 02d4ded66a0..062bb2de123 100644 --- a/db/migration/1721134584504-MoveIndicatorChartsToTheChartsConfigTable.ts +++ b/db/migration/1721134584504-MoveIndicatorChartsToTheChartsConfigTable.ts @@ -71,10 +71,6 @@ export class MoveIndicatorChartsToTheChartsConfigTable1721134584504 config.$schema = defaultGrapherConfig.$schema } - // ETL configs inherit from the default config - const patchConfig = diffGrapherConfigs(config, defaultGrapherConfig) - const fullConfig = mergeGrapherConfigs(defaultGrapherConfig, config) - // insert config into the chart_configs table const configId = await getBinaryUUID(queryRunner) await queryRunner.query( @@ -82,11 +78,7 @@ export class MoveIndicatorChartsToTheChartsConfigTable1721134584504 INSERT INTO chart_configs (id, patch, full) VALUES (?, ?, ?) `, - [ - configId, - JSON.stringify(patchConfig), - JSON.stringify(fullConfig), - ] + [configId, JSON.stringify(config), JSON.stringify(config)] ) // update reference in the variables table @@ -108,7 +100,7 @@ export class MoveIndicatorChartsToTheChartsConfigTable1721134584504 `) await queryRunner.query(`-- sql - CREATE VIEW inheritance_indicators_x_charts AS ( + CREATE VIEW inheriting_charts AS ( WITH y_dimensions AS ( SELECT * @@ -145,6 +137,11 @@ export class MoveIndicatorChartsToTheChartsConfigTable1721134584504 } public async down(queryRunner: QueryRunner): Promise { + // drop view + await queryRunner.query(`-- sql + DROP VIEW inheriting_charts + `) + // add back the `grapherConfigAdmin` and `grapherConfigETL` columns await queryRunner.query(`-- sql ALTER TABLE variables diff --git a/db/model/Variable.ts b/db/model/Variable.ts index 8bcd74abe0e..a57b4fd48f7 100644 --- a/db/model/Variable.ts +++ b/db/model/Variable.ts @@ -1,7 +1,11 @@ import _ from "lodash" import { Writable } from "stream" import * as db from "../db.js" -import { retryPromise, isEmpty } from "@ourworldindata/utils" +import { + retryPromise, + isEmpty, + mergeGrapherConfigs, +} from "@ourworldindata/utils" import { getVariableDataRoute, getVariableMetadataRoute, @@ -20,8 +24,10 @@ import { GrapherInterface, DbRawVariable, VariablesTableName, + DbRawChartConfig, + parseChartConfig, } from "@ourworldindata/types" -import { knexRaw } from "../db.js" +import { knexRaw, knexRawFirst } from "../db.js" //export type Field = keyof VariableRow @@ -29,24 +35,37 @@ export async function getMergedGrapherConfigForVariable( variableId: number, knex: db.KnexReadonlyTransaction ): Promise { - const rows: Pick< - DbRawVariable, - "grapherConfigAdmin" | "grapherConfigETL" - >[] = await knexRaw( + // check if there is an admin-authored config + const admin = await knexRawFirst<{ + config: DbRawChartConfig["full"] + }>( + knex, + `-- sql + SELECT cc.full AS config + FROM variables v + JOIN chart_configs cc ON v.grapherConfigIdAdmin = cc.id + WHERE v.id = ? + `, + [variableId] + ) + if (admin) return parseChartConfig(admin.config) + + // check if there is an ETL-authored config + const etl = await knexRawFirst<{ + config: DbRawChartConfig["full"] + }>( knex, - `SELECT grapherConfigAdmin, grapherConfigETL FROM variables WHERE id = ?`, + `-- sql + SELECT cc.full AS config + FROM variables v + JOIN chart_configs cc ON v.grapherConfigIdETL = cc.id + WHERE v.id = ? + `, [variableId] ) - if (!rows.length) return - const row = rows[0] - const grapherConfigAdmin = row.grapherConfigAdmin - ? JSON.parse(row.grapherConfigAdmin) - : undefined - const grapherConfigETL = row.grapherConfigETL - ? JSON.parse(row.grapherConfigETL) - : undefined - // TODO(inheritance): use mergeGrapherConfigs instead - return _.merge({}, grapherConfigAdmin, grapherConfigETL) + if (etl) return parseChartConfig(etl.config) + + return {} } // TODO: these are domain functions and should live somewhere else diff --git a/packages/@ourworldindata/types/src/dbTypes/Variables.ts b/packages/@ourworldindata/types/src/dbTypes/Variables.ts index ce241a997c8..f085efcbf00 100644 --- a/packages/@ourworldindata/types/src/dbTypes/Variables.ts +++ b/packages/@ourworldindata/types/src/dbTypes/Variables.ts @@ -20,8 +20,8 @@ export interface DbInsertVariable { descriptionShort?: string | null dimensions?: JsonString | null display: JsonString - grapherConfigAdmin?: JsonString | null - grapherConfigETL?: JsonString | null + grapherConfigIdAdmin?: Buffer | null + grapherConfigIdETL?: Buffer | null id?: number license?: JsonString | null licenses?: JsonString | null @@ -66,8 +66,6 @@ export type DbEnrichedVariable = Omit< | "dimensions" | "descriptionKey" | "originalMetadata" - | "grapherConfigAdmin" - | "grapherConfigETL" | "processingLog" | "sort" > & { @@ -77,8 +75,6 @@ export type DbEnrichedVariable = Omit< dimensions: VariableDisplayDimension | null descriptionKey: string[] | null originalMetadata: unknown | null - grapherConfigAdmin: GrapherInterface | null - grapherConfigETL: GrapherInterface | null processingLog: unknown | null sort: string[] | null } @@ -149,30 +145,6 @@ export function serializeVariableOriginalMetadata( return originalMetadata ? JSON.stringify(originalMetadata) : null } -export function parseVariableGrapherConfigAdmin( - grapherConfigAdmin: JsonString | null -): GrapherInterface { - return grapherConfigAdmin ? JSON.parse(grapherConfigAdmin) : null -} - -export function serializeVariableGrapherConfigAdmin( - grapherConfigAdmin: GrapherInterface | null -): JsonString | null { - return grapherConfigAdmin ? JSON.stringify(grapherConfigAdmin) : null -} - -export function parseVariableGrapherConfigETL( - grapherConfigETL: JsonString | null -): GrapherInterface { - return grapherConfigETL ? JSON.parse(grapherConfigETL) : null -} - -export function serializeVariableGrapherConfigETL( - grapherConfigETL: GrapherInterface | null -): JsonString | null { - return grapherConfigETL ? JSON.stringify(grapherConfigETL) : null -} - export function parseVariableProcessingLog( processingLog: JsonString | null ): any { @@ -204,10 +176,6 @@ export function parseVariablesRow(row: DbRawVariable): DbEnrichedVariable { dimensions: parseVariableDimensions(row.dimensions), descriptionKey: parseVariableDescriptionKey(row.descriptionKey), originalMetadata: parseVariableOriginalMetadata(row.originalMetadata), - grapherConfigAdmin: parseVariableGrapherConfigAdmin( - row.grapherConfigAdmin - ), - grapherConfigETL: parseVariableGrapherConfigETL(row.grapherConfigETL), processingLog: parseVariableProcessingLog(row.processingLog), sort: parseVariableSort(row.sort), } @@ -224,12 +192,6 @@ export function serializeVariablesRow(row: DbEnrichedVariable): DbRawVariable { originalMetadata: serializeVariableOriginalMetadata( row.originalMetadata ), - grapherConfigAdmin: serializeVariableGrapherConfigAdmin( - row.grapherConfigAdmin - ), - grapherConfigETL: serializeVariableGrapherConfigETL( - row.grapherConfigETL - ), processingLog: serializeVariableProcessingLog(row.processingLog), sort: serializeVariableSort(row.sort), } diff --git a/packages/@ourworldindata/types/src/index.ts b/packages/@ourworldindata/types/src/index.ts index f888ef464bf..fca5baf4db7 100644 --- a/packages/@ourworldindata/types/src/index.ts +++ b/packages/@ourworldindata/types/src/index.ts @@ -634,10 +634,6 @@ export { serializeVariableOriginalMetadata, parseVariableLicenses, serializeVariableLicenses, - parseVariableGrapherConfigAdmin, - serializeVariableGrapherConfigAdmin, - parseVariableGrapherConfigETL, - serializeVariableGrapherConfigETL, parseVariableProcessingLog, serializeVariableProcessingLog, type License,