π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat: add AggregationValue type and improve type safety in aggregation filtering
DarkPhoenix27047c9c2c1711f2
diff --git a/packages/nocodb-sdk/src/lib/aggregationHelper.ts b/packages/nocodb-sdk/src/lib/aggregationHelper.tsindex ca83f8525e..1051f49f06 100644--- a/packages/nocodb-sdk/src/lib/aggregationHelper.ts+++ b/packages/nocodb-sdk/src/lib/aggregationHelper.ts@@ -56,6 +56,8 @@ const AllAggregations = {...DateAggregations,};+type AggregationValue = typeof AllAggregations[keyof typeof AllAggregations]+const getAvailableAggregations = (type: string, parsed_tree?): string[] => {let returnAggregations = [];if (type === UITypes.Formula && parsed_tree?.dataType) {@@ -235,4 +237,5 @@ export {AttachmentAggregations,AllAggregations,formatAggregation,+ AggregationValue,};