From 68c2b29e6225225589c65c41a866a64670d17715 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 8 Jan 2025 17:03:40 +0000 Subject: [PATCH] Admit defeat. --- packages/pro | 2 +- .../types/src/documents/app/table/schema.ts | 57 +++---------------- 2 files changed, 8 insertions(+), 51 deletions(-) diff --git a/packages/pro b/packages/pro index 788173a024..71922a7d97 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 788173a024fd5ef98d3122b26dbc06d39fb51349 +Subproject commit 71922a7d979ddca6f51d9e450abcd81ba9a5b6fa diff --git a/packages/types/src/documents/app/table/schema.ts b/packages/types/src/documents/app/table/schema.ts index 47a63e0dd9..f4a6d8481d 100644 --- a/packages/types/src/documents/app/table/schema.ts +++ b/packages/types/src/documents/app/table/schema.ts @@ -118,59 +118,16 @@ export interface FormulaFieldMetadata extends BaseFieldSchema { responseType?: FormulaResponseType } -interface AITranslateFieldMetadata extends BaseFieldSchema { +export interface AIFieldMetadata extends BaseFieldSchema { type: FieldType.AI - operation: AIOperationEnum.TRANSLATE - column: string - language: string + operation: AIOperationEnum + columns?: string[] + column?: string + categories?: string + prompt?: string + language?: string } -interface AICleanDataFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.CLEAN_DATA - column: string -} - -interface AICategoriseTextFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.CATEGORISE_TEXT - columns: string[] - categories: string -} - -interface AISentimentAnalysisFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.SENTIMENT_ANALYSIS - column: string -} - -interface AISearchWebFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.SEARCH_WEB - columns: string[] -} - -interface AIPromptFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.PROMPT - prompt: string -} - -interface AISummariseTextFieldMetadata extends BaseFieldSchema { - type: FieldType.AI - operation: AIOperationEnum.SUMMARISE_TEXT - columns: string[] -} - -export type AIFieldMetadata = - | AITranslateFieldMetadata - | AICleanDataFieldMetadata - | AICategoriseTextFieldMetadata - | AISentimentAnalysisFieldMetadata - | AIPromptFieldMetadata - | AISearchWebFieldMetadata - | AISummariseTextFieldMetadata - export interface BBReferenceFieldMetadata extends Omit { type: FieldType.BB_REFERENCE