diff --git a/.github/workflows/publish-api-docs.yml b/.github/workflows/publish-api-docs.yml index e54cd12976..47860cdd7f 100644 --- a/.github/workflows/publish-api-docs.yml +++ b/.github/workflows/publish-api-docs.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] paths: - - "scripts/sdk/swagger.json" + - "packages/nocodb/src/schema/swagger.json" release: types: [ published ] @@ -22,7 +22,7 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }} with: - source_file: 'scripts/sdk/swagger.json' + source_file: 'packages/nocodb/src/schema/swagger.json' destination_repo: 'nocodb/noco-apis-doc' destination_folder: 'src' user_email: 'oof1lab@gmail.com' @@ -34,7 +34,7 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }} with: - source_file: 'scripts/sdk/swagger.json' + source_file: 'packages/nocodb/src/schema/swagger.json' destination_repo: 'nocodb/noco-apis-doc' destination_folder: 'meta-src' user_email: 'oof1lab@gmail.com' diff --git a/packages/nc-gui/components.d.ts b/packages/nc-gui/components.d.ts index 2a111be52c..78f37aba7f 100644 --- a/packages/nc-gui/components.d.ts +++ b/packages/nc-gui/components.d.ts @@ -251,8 +251,12 @@ declare module '@vue/runtime-core' { NcIconsRowHeightMedium: typeof import('~icons/nc-icons/row-height-medium')['default'] NcIconsRowHeightShort: typeof import('~icons/nc-icons/row-height-short')['default'] NcIconsRowHeightTall: typeof import('~icons/nc-icons/row-height-tall')['default'] + PhChatTextThin: typeof import('~icons/ph/chat-text-thin')['default'] PhCloudLightningDuotone: typeof import('~icons/ph/cloud-lightning-duotone')['default'] + PhCloudLightningThin: typeof import('~icons/ph/cloud-lightning-thin')['default'] PhFileCsv: typeof import('~icons/ph/file-csv')['default'] + PhUserPlusThin: typeof import('~icons/ph/user-plus-thin')['default'] + PhUsersThreeThin: typeof import('~icons/ph/users-three-thin')['default'] RiLineHeight: typeof import('~icons/ri/line-height')['default'] RiTeamFill: typeof import('~icons/ri/team-fill')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/packages/nc-gui/lang/ar.json b/packages/nc-gui/lang/ar.json index bfa90afd4c..12bf7e1643 100644 --- a/packages/nc-gui/lang/ar.json +++ b/packages/nc-gui/lang/ar.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "مشروع", @@ -98,7 +99,8 @@ "gallery": "معرض صور", "form": "نموذج", "kanban": "كانبان", - "calendar": "تقويم" + "calendar": "تقويم", + "map": "Map" }, "user": "مستخدم", "users": "مستخدمين", @@ -136,6 +138,7 @@ "Currency": "عملة", "Percent": "نسبة مؤية", "Duration": "مدة", + "GeoData": "GeoData", "Rating": "تقييم", "Formula": "معادلة", "Rollup": "جمع البيانات", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "وظيفة التجميع", "dbCreateIfNotExists": "قاعدة البيانات: إنشاء إذا لم يكن موجودا", "clientKey": "مفتاح العميل", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "الصفوف لكل صفحة", "upload": "حدد الملف المراد رفعه", "upload_sub": "أو سحب وإسقاط الملف", @@ -600,6 +615,7 @@ "gallery": "إضافة عرض المعرض", "form": "إضافة عرض النموذج", "kanban": "إضافة عرض كانبان", + "map": "Add Map View", "calendar": "إضافة طريقة عرض التقويم" }, "tablesMetadataInSync": "تزامن البيانات الوصفية للجداول", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/bn_IN.json b/packages/nc-gui/lang/bn_IN.json index e4cabed1bd..0076d7f265 100644 --- a/packages/nc-gui/lang/bn_IN.json +++ b/packages/nc-gui/lang/bn_IN.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "প্রকল্প", @@ -98,7 +99,8 @@ "gallery": "গ্যালারী", "form": "ফর্ম", "kanban": "কানবান", - "calendar": "ক্যালেন্ডার" + "calendar": "ক্যালেন্ডার", + "map": "Map" }, "user": "ব্যবহারকারী", "users": "ব্যবহারকারীরা", @@ -136,6 +138,7 @@ "Currency": "মুদ্রা", "Percent": "শতাংশ", "Duration": "সময়কাল", + "GeoData": "GeoData", "Rating": "রেটিং", "Formula": "সূত্র", "Rollup": "রোলআপ", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "সামগ্রিক ফাংশন", "dbCreateIfNotExists": "ডাটাবেস: উপস্থিত না থাকলে তৈরি করুন", "clientKey": "ক্লায়েন্ট কী", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "প্রতি পৃষ্ঠায় সারি", "upload": "আপলোড করতে ফাইল নির্বাচন করুন", "upload_sub": "অথবা ফাইল টেনে আনুন", @@ -600,6 +615,7 @@ "gallery": "গ্যালারী ভিউ যুক্ত করুন", "form": "ফর্ম ভিউ যোগ করুন", "kanban": "কানবান ভিউ যুক্ত করুন", + "map": "Add Map View", "calendar": "ক্যালেন্ডার ভিউ যুক্ত করুন" }, "tablesMetadataInSync": "টেবিলের মেটাডেটা সিঙ্ক করা আছে", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/cs.json b/packages/nc-gui/lang/cs.json index 1d2e0f228e..bbddc339ee 100644 --- a/packages/nc-gui/lang/cs.json +++ b/packages/nc-gui/lang/cs.json @@ -74,7 +74,8 @@ "insertBefore": "Vložit před", "hideField": "Skrýt pole", "sortAsc": "Seřadit vzestupně", - "sortDesc": "Seřadit sestupně" + "sortDesc": "Seřadit sestupně", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galerie", "form": "Formulář", "kanban": "Kanban", - "calendar": "Kalendář" + "calendar": "Kalendář", + "map": "Map" }, "user": "Uživatel", "users": "Uživatelé", @@ -136,6 +138,7 @@ "Currency": "Měna", "Percent": "Procenta", "Duration": "Doba trvání", + "GeoData": "GeoData", "Rating": "Hodnocení", "Formula": "Vzorec", "Rollup": "Rollup", @@ -253,6 +256,9 @@ "barcodeFormat": "Formát čárového kódu", "qrCodeValueTooLong": "Příliš mnoho znaků pro QR kód", "barcodeValueTooLong": "Příliš mnoho znaků pro čárový kód", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Agregační funkce", "dbCreateIfNotExists": "Databáze : vytvořit, pokud neexistuje", "clientKey": "Klíč klienta", @@ -452,6 +458,10 @@ "stackedBy": "Naskládáno podle", "chooseGroupingField": "Výběr pole pro seskupení", "addOrEditStack": "Přidat / upravit zásobník" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Tvůrce může vytvářet nové projekty a přistupovat k jakémukoli pozvanému projektu.", "orgViewer": "Prohlížeč nemůže vytvářet nové projekty, ale může přistupovat k jakémukoli pozvanému projektu." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Řádky na stránku", "upload": "Vyberte soubor, který chcete nahrát", "upload_sub": "nebo přetažením souboru", @@ -600,6 +615,7 @@ "gallery": "Přidat zobrazení galerie", "form": "Přidání zobrazení formuláře", "kanban": "Přidání zobrazení Kanban", + "map": "Add Map View", "calendar": "Přidat zobrazení kalendáře" }, "tablesMetadataInSync": "Metadata tabulek jsou synchronizována", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Jméno by mělo začínat abecedou nebo _", "followingCharactersAreNotAllowed": "Následující znaky nejsou povoleny", "columnNameRequired": "Název sloupce je povinný", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Název projektu přesahuje 50 znaků", "projectNameCannotStartWithSpace": "Název projektu nesmí začínat mezerou", "requiredField": "Povinné pole", diff --git a/packages/nc-gui/lang/da.json b/packages/nc-gui/lang/da.json index 7c499612ed..5e6e82e416 100644 --- a/packages/nc-gui/lang/da.json +++ b/packages/nc-gui/lang/da.json @@ -74,7 +74,8 @@ "insertBefore": "Indsæt før", "hideField": "Skjul felt", "sortAsc": "Sortere stigende", - "sortDesc": "Sortere nedadgående" + "sortDesc": "Sortere nedadgående", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galleri", "form": "Formular", "kanban": "Kanban.", - "calendar": "Kalender" + "calendar": "Kalender", + "map": "Map" }, "user": "Bruger", "users": "Brugere", @@ -136,6 +138,7 @@ "Currency": "betalingsmiddel", "Percent": "Procentdel", "Duration": "Varighed", + "GeoData": "GeoData", "Rating": "Bedømmelse", "Formula": "Formel", "Rollup": "Rul op", @@ -253,6 +256,9 @@ "barcodeFormat": "Stregkodeformat", "qrCodeValueTooLong": "For mange tegn til en QR-kode", "barcodeValueTooLong": "For mange tegn til en stregkode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Aggregate Function.", "dbCreateIfNotExists": "DATABASE: Opret, hvis ikke eksisterer", "clientKey": "Klientnøgle", @@ -452,6 +458,10 @@ "stackedBy": "Stablet af", "chooseGroupingField": "Vælg et grupperingsfelt", "addOrEditStack": "Tilføj / Rediger stak" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Skaberen kan oprette nye projekter og få adgang til alle inviterede projekter.", "orgViewer": "Seeren har ikke lov til at oprette nye projekter, men kan få adgang til alle inviterede projekter." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rækker per side", "upload": "Vælg fil for at uploade", "upload_sub": "eller træk og slip filen", @@ -600,6 +615,7 @@ "gallery": "Tilføj Gallery View.", "form": "Tilføj formularvisning", "kanban": "Tilføj Kanban View.", + "map": "Add Map View", "calendar": "Tilføj kalendervisning" }, "tablesMetadataInSync": "Tabeller Metadata er synkroniseret", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Navnet skal starte med et alfabet eller _", "followingCharactersAreNotAllowed": "Følgende tegn er ikke tilladt", "columnNameRequired": "Kolonnens navn er påkrævet", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Projektnavnet overstiger 50 tegn", "projectNameCannotStartWithSpace": "Projektnavnet kan ikke begynde med et mellemrum", "requiredField": "Obligatorisk felt", diff --git a/packages/nc-gui/lang/de.json b/packages/nc-gui/lang/de.json index 53efa1a521..f7b7de89da 100644 --- a/packages/nc-gui/lang/de.json +++ b/packages/nc-gui/lang/de.json @@ -74,7 +74,8 @@ "insertBefore": "davor einfügen", "hideField": "Feld ausblenden", "sortAsc": "Aufsteigend sortieren", - "sortDesc": "Absteigend sortieren" + "sortDesc": "Absteigend sortieren", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -137,6 +138,7 @@ "Currency": "Währung", "Percent": "Prozent", "Duration": "Dauer", + "GeoData": "GeoData", "Rating": "Klassifizierung", "Formula": "Formel", "Rollup": "Zusammenfassung", @@ -254,6 +256,9 @@ "barcodeFormat": "Barcode-Format", "qrCodeValueTooLong": "Zu viele Zeichen für einen QR-Code", "barcodeValueTooLong": "Zu viele Zeichen für einen Barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Globale Funktion", "dbCreateIfNotExists": "Datenbank: Erstellen, falls nicht vorhanden", "clientKey": "Client-Schlüssel", @@ -453,6 +458,10 @@ "stackedBy": "Gestapelt von", "chooseGroupingField": "Wählen Sie ein Gruppierungsfeld", "addOrEditStack": "Stapel hinzufügen / bearbeiten" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -519,6 +528,11 @@ "orgCreator": "Der Ersteller kann neue Projekte erstellen und auf alle eingeladenen Projekte zugreifen.", "orgViewer": "Betrachter können keine neuen Projekte erstellen, aber sie können auf alle eingeladenen Projekte zugreifen." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Zeilen pro Seite", "upload": "Datei zum Hochladen auswählen", "upload_sub": "oder Drag & Drop Datei", @@ -601,6 +615,7 @@ "gallery": "Galerie-Ansicht hinzufügen", "form": "Formular-Ansicht hinzufügen", "kanban": "Kanban-Ansicht hinzufügen", + "map": "Add Map View", "calendar": "Kalender-Ansicht hinzufügen" }, "tablesMetadataInSync": "Tabellen-Metadaten sind synchron", @@ -691,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name muss mit einem Buchstaben oder _ beginnen", "followingCharactersAreNotAllowed": "Folgende Zeichen sind nicht erlaubt", "columnNameRequired": "Spaltenname ist erforderlich", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Projektname überschreitet 50 Zeichen", "projectNameCannotStartWithSpace": "Projektname darf nicht mit einem Leerzeichen beginnen", "requiredField": "Pflichtfeld", diff --git a/packages/nc-gui/lang/es.json b/packages/nc-gui/lang/es.json index 85b274ee59..ade0869efe 100644 --- a/packages/nc-gui/lang/es.json +++ b/packages/nc-gui/lang/es.json @@ -74,7 +74,8 @@ "insertBefore": "Insertar antes", "hideField": "Ocultar campo", "sortAsc": "Ordenación ascendente", - "sortDesc": "Orden descendente" + "sortDesc": "Orden descendente", + "geoDataField": "GeoData Field" }, "objects": { "project": "Proyecto", @@ -98,7 +99,8 @@ "gallery": "Galería", "form": "Formulario", "kanban": "Kanban", - "calendar": "Calendario" + "calendar": "Calendario", + "map": "Map" }, "user": "Usuario", "users": "Usuarios", @@ -136,6 +138,7 @@ "Currency": "Divisa", "Percent": "Por ciento", "Duration": "Duración", + "GeoData": "GeoData", "Rating": "Clasificación", "Formula": "Fórmula", "Rollup": "Acumulado", @@ -253,6 +256,9 @@ "barcodeFormat": "Formato del código de barras", "qrCodeValueTooLong": "Demasiados caracteres para un código QR", "barcodeValueTooLong": "Demasiados caracteres para un código de barras", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Función agregada", "dbCreateIfNotExists": "Base de datos : Crear si no existe", "clientKey": "Clave de Cliente", @@ -452,6 +458,10 @@ "stackedBy": "Apilado por", "chooseGroupingField": "Elija un campo de agrupación", "addOrEditStack": "Añadir / Editar pila" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "El creador puede crear nuevos proyectos y acceder a cualquier proyecto invitado.", "orgViewer": "El espectador no puede crear nuevos proyectos, pero puede acceder a cualquier proyecto invitado." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Filas por página", "upload": "Selecciona Archivo para cargar", "upload_sub": "o arrastra y suelta el archivo", @@ -600,6 +615,7 @@ "gallery": "Agregar vista de Galería", "form": "Agregar vista de Formulario", "kanban": "Agregar vista de Kanban", + "map": "Add Map View", "calendar": "Agregar vista de Calendario" }, "tablesMetadataInSync": "Sincronización de tablas de metadatos activa", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "El nombre debe empezar por un alfabeto o _", "followingCharactersAreNotAllowed": "Los siguientes caracteres no están permitidos", "columnNameRequired": "El nombre de la columna es obligatorio", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "El nombre del proyecto supera los 50 caracteres", "projectNameCannotStartWithSpace": "El nombre del proyecto no puede empezar con un espacio", "requiredField": "Campo obligatorio", diff --git a/packages/nc-gui/lang/eu.json b/packages/nc-gui/lang/eu.json index 1527721ea3..225443c97e 100644 --- a/packages/nc-gui/lang/eu.json +++ b/packages/nc-gui/lang/eu.json @@ -74,7 +74,8 @@ "insertBefore": "Txertatu aurretik", "hideField": "Ezkutatu eremua", "sortAsc": "Ordenatu gorantz", - "sortDesc": "Ordenatu beherantz" + "sortDesc": "Ordenatu beherantz", + "geoDataField": "GeoData Field" }, "objects": { "project": "Proiektua", @@ -98,7 +99,8 @@ "gallery": "Galeria", "form": "Inprimakia", "kanban": "Kanban", - "calendar": "Egutegia" + "calendar": "Egutegia", + "map": "Map" }, "user": "Erabiltzailea", "users": "Erabiltzaileak", @@ -136,6 +138,7 @@ "Currency": "Moneta", "Percent": "Ehunekoa", "Duration": "Iraupena", + "GeoData": "GeoData", "Rating": "Balorazioa", "Formula": "Ekuazioa", "Rollup": "Rollup", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Aggregate function", "dbCreateIfNotExists": "Database : create if not exists", "clientKey": "Client Key", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rows per page", "upload": "Select file to Upload", "upload_sub": "or drag and drop file", @@ -600,6 +615,7 @@ "gallery": "Add Gallery View", "form": "Add Form View", "kanban": "Add Kanban View", + "map": "Add Map View", "calendar": "Add Calendar View" }, "tablesMetadataInSync": "Tables metadata is in Sync", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/fa.json b/packages/nc-gui/lang/fa.json index 475643336f..143ebc22da 100644 --- a/packages/nc-gui/lang/fa.json +++ b/packages/nc-gui/lang/fa.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "پروژه", @@ -98,7 +99,8 @@ "gallery": "گالری", "form": "فرم", "kanban": "کانبان", - "calendar": "تقویم" + "calendar": "تقویم", + "map": "Map" }, "user": "کاربر", "users": "کاربران", @@ -136,6 +138,7 @@ "Currency": "واحد پول", "Percent": "درصد", "Duration": "مدت زمان", + "GeoData": "GeoData", "Rating": "امتیاز", "Formula": "فرمول", "Rollup": "تجمیع کردن", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "تابع جمع", "dbCreateIfNotExists": "پایگاه داده: ایجاد در صورت عدم وجود", "clientKey": "کلید Client", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "تعداد ردیف‌ها در هر صفحه", "upload": "فایل را برای بارگذاری انتخاب کنید", "upload_sub": "یا فایل را بکشید و رها کنید", @@ -600,6 +615,7 @@ "gallery": "افزودن نمایش گالری", "form": "افزودن نمایش فرم", "kanban": "افزودن نمایش کانبان", + "map": "Add Map View", "calendar": "افزودن نمایش تقویم" }, "tablesMetadataInSync": "متاداده جداول در حالت همگام‌سازی است", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/fi.json b/packages/nc-gui/lang/fi.json index e1e4dbc96d..d9d6af711b 100644 --- a/packages/nc-gui/lang/fi.json +++ b/packages/nc-gui/lang/fi.json @@ -74,7 +74,8 @@ "insertBefore": "Lisää ennen", "hideField": "Piilota kenttä", "sortAsc": "Lajittelu nouseva", - "sortDesc": "Lajittelu laskeva" + "sortDesc": "Lajittelu laskeva", + "geoDataField": "GeoData Field" }, "objects": { "project": "Hanke", @@ -98,7 +99,8 @@ "gallery": "Galleria", "form": "Lomake", "kanban": "Kanban", - "calendar": "Kalenteri" + "calendar": "Kalenteri", + "map": "Map" }, "user": "Käyttäjä", "users": "Käyttäjät", @@ -136,6 +138,7 @@ "Currency": "Valuutta", "Percent": "Prosentti", "Duration": "Kesto", + "GeoData": "GeoData", "Rating": "Luokitus", "Formula": "Kaava", "Rollup": "Rullaus", @@ -253,6 +256,9 @@ "barcodeFormat": "Viivakoodin muoto", "qrCodeValueTooLong": "Liian monta merkkiä QR-koodiin", "barcodeValueTooLong": "Liikaa merkkejä viivakoodiin", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Kokonaistoiminto", "dbCreateIfNotExists": "Tietokanta: Luo jos ei ole olemassa", "clientKey": "Asiakasnäppäin", @@ -452,6 +458,10 @@ "stackedBy": "Pinottu by", "chooseGroupingField": "Valitse ryhmittelykenttä", "addOrEditStack": "Lisää / Muokkaa pinoa" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Luoja voi luoda uusia projekteja ja käyttää kaikkia kutsuttuja projekteja.", "orgViewer": "Katsoja ei saa luoda uusia projekteja, mutta hän voi käyttää mitä tahansa kutsuttua projektia." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rivit sivua kohti", "upload": "Valitse lataa tiedosto", "upload_sub": "tai vedä ja pudota tiedosto", @@ -600,6 +615,7 @@ "gallery": "Lisää galleria-näkymä", "form": "Lisää lomake", "kanban": "Lisää Kanban View", + "map": "Add Map View", "calendar": "Lisää kalenteri-näkymä" }, "tablesMetadataInSync": "Taulukot Metatieto on synkronoitu", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Nimen on alettava aakkosilla tai _", "followingCharactersAreNotAllowed": "Seuraavat merkit eivät ole sallittuja", "columnNameRequired": "Sarakkeen nimi vaaditaan", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Hankkeen nimi ylittää 50 merkkiä", "projectNameCannotStartWithSpace": "Projektin nimi ei voi alkaa välilyönnillä", "requiredField": "Pakollinen kenttä", diff --git a/packages/nc-gui/lang/fr.json b/packages/nc-gui/lang/fr.json index b622e88f73..8607928f95 100644 --- a/packages/nc-gui/lang/fr.json +++ b/packages/nc-gui/lang/fr.json @@ -74,7 +74,8 @@ "insertBefore": "Insérer avant", "hideField": "Masquer le champ", "sortAsc": "Trier par ordre croissant", - "sortDesc": "Trier par ordre décroissant" + "sortDesc": "Trier par ordre décroissant", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projet", @@ -98,7 +99,8 @@ "gallery": "Galerie", "form": "Formulaire", "kanban": "Kanban", - "calendar": "Calendrier" + "calendar": "Calendrier", + "map": "Map" }, "user": "Utilisateur", "users": "Utilisateurs", @@ -136,6 +138,7 @@ "Currency": "Devise", "Percent": "Pourcentage", "Duration": "Durée", + "GeoData": "GeoData", "Rating": "Évaluation", "Formula": "Formule", "Rollup": "Synthèse", @@ -253,6 +256,9 @@ "barcodeFormat": "Format du code-barres", "qrCodeValueTooLong": "Trop de caractères pour un code QR", "barcodeValueTooLong": "Trop de caractères pour un code-barres", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Fonction agrégée", "dbCreateIfNotExists": "Base de données : la créer si elle n'existe pas", "clientKey": "Clé client", @@ -452,6 +458,10 @@ "stackedBy": "Empilés par", "chooseGroupingField": "Choisir un champ de regroupement", "addOrEditStack": "Ajouter / Modifier une pile" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Le créateur peut créer de nouveaux projets et accéder à tout projet invité.", "orgViewer": "Le visualisateur n'est pas autorisé à créer de nouveaux projets mais il peut accéder à tout projet invité." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Lignes par page", "upload": "Sélectionner un fichier à téléverser", "upload_sub": "ou glisser-déposer un fichier", @@ -600,6 +615,7 @@ "gallery": "Ajouter une vue Galerie", "form": "Ajouter une vue Formulaire", "kanban": "Ajouter une vue Kanban", + "map": "Add Map View", "calendar": "Ajouter une vue Calendrier" }, "tablesMetadataInSync": "Les métadonnées de tables sont en synchronisation", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Le nom doit commencer par une lettre de l'alphabet ou _", "followingCharactersAreNotAllowed": "Les caractères suivants ne sont pas autorisés", "columnNameRequired": "Nom de la colonne requis", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Le nom du projet dépasse les 50 caractères", "projectNameCannotStartWithSpace": "Le nom du projet ne peut pas commencer par un espace", "requiredField": "Champ requis", diff --git a/packages/nc-gui/lang/he.json b/packages/nc-gui/lang/he.json index 612d3d7b90..cacce26319 100644 --- a/packages/nc-gui/lang/he.json +++ b/packages/nc-gui/lang/he.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "פּרוֹיֶקט", @@ -98,7 +99,8 @@ "gallery": "גלריה", "form": "טופס", "kanban": "קאנב\"כ", - "calendar": "לוּחַ שָׁנָה" + "calendar": "לוּחַ שָׁנָה", + "map": "Map" }, "user": "מִשׁתַמֵשׁ", "users": "משתמשים.", @@ -136,6 +138,7 @@ "Currency": "מַטְבֵּעַ", "Percent": "אָחוּז", "Duration": "אורך זמן", + "GeoData": "GeoData", "Rating": "דירוג", "Formula": "נוּסחָה", "Rollup": "Rullup", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "פונקציה מצטברת", "dbCreateIfNotExists": "מסד נתונים: צור אם לא קיים", "clientKey": "מפתח הלקוח", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "שורות לדף", "upload": "בחר קובץ להעלאה", "upload_sub": "או גרור ושחרר קובץ", @@ -600,6 +615,7 @@ "gallery": "הוסף תצוגת גלריה", "form": "הוסף טופס View.", "kanban": "הוסף Kanban View.", + "map": "Add Map View", "calendar": "הוסף תצוגת לוח שנה" }, "tablesMetadataInSync": "טבלאות מטא נתונים מסונכרנים", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/hi.json b/packages/nc-gui/lang/hi.json index 66c393a922..5740c4e26a 100644 --- a/packages/nc-gui/lang/hi.json +++ b/packages/nc-gui/lang/hi.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "परियोजना", @@ -98,7 +99,8 @@ "gallery": "गेलरी", "form": "प्रपत्र", "kanban": "Kanban", - "calendar": "पंचांग" + "calendar": "पंचांग", + "map": "Map" }, "user": "उपयोगकर्ता", "users": "उपयोगकर्ताओं", @@ -136,6 +138,7 @@ "Currency": "मुद्रा", "Percent": "प्रतिशत", "Duration": "अवधि", + "GeoData": "GeoData", "Rating": "रेटिंग", "Formula": "सूत्र", "Rollup": "जमना", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "कुल समारोह", "dbCreateIfNotExists": "डेटाबेस: बनाएं यदि मौजूद नहीं है", "clientKey": "ग्राहक कुंजी", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "प्रति पृष्ठ पंक्तियाँ", "upload": "अपलोड करने के लिए फ़ाइल का चयन करें", "upload_sub": "या ड्रैग एंड ड्रॉप फाइल", @@ -600,6 +615,7 @@ "gallery": "गैलरी दृश्य जोड़ें", "form": "फॉर्म व्यू जोड़ें", "kanban": "कनबान दृश्य जोड़ें", + "map": "Add Map View", "calendar": "कैलेंडर दृश्य जोड़ें" }, "tablesMetadataInSync": "टेबल के मेटाडेटा SYNC है", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/hr.json b/packages/nc-gui/lang/hr.json index 953fa0869b..d24505daeb 100644 --- a/packages/nc-gui/lang/hr.json +++ b/packages/nc-gui/lang/hr.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galerija", "form": "Oblik", "kanban": "Kanban", - "calendar": "Kalendar" + "calendar": "Kalendar", + "map": "Map" }, "user": "Korisnik", "users": "Korisnik", @@ -136,6 +138,7 @@ "Currency": "Valuta", "Percent": "Postotak", "Duration": "Trajanje", + "GeoData": "GeoData", "Rating": "Ocjena", "Formula": "Formula", "Rollup": "Valjak", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Agregatna funkcija", "dbCreateIfNotExists": "Baza podataka: stvoriti ako ne postoji", "clientKey": "Ključ klijenta", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Redaka po stranici", "upload": "Odaberite datoteku za prijenos", "upload_sub": "ili povucite i ispustite datoteku", @@ -600,6 +615,7 @@ "gallery": "Dodajte pogled na galeriju", "form": "Dodajte prikaz obrasca", "kanban": "Dodajte Kanban pogled", + "map": "Add Map View", "calendar": "Dodajte prikaz kalendara" }, "tablesMetadataInSync": "Metapodaci tablice se sinkroniziraju", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/id.json b/packages/nc-gui/lang/id.json index dda93cd5c0..dd5ae4a49c 100644 --- a/packages/nc-gui/lang/id.json +++ b/packages/nc-gui/lang/id.json @@ -74,7 +74,8 @@ "insertBefore": "Sisipkan Sebelum", "hideField": "Sembunyikan Bidang", "sortAsc": "Urutkan Menaik", - "sortDesc": "Urutkan Menurun" + "sortDesc": "Urutkan Menurun", + "geoDataField": "GeoData Field" }, "objects": { "project": "Proyek", @@ -98,7 +99,8 @@ "gallery": "Galeri", "form": "Membentuk", "kanban": "Kanban.", - "calendar": "Kalender" + "calendar": "Kalender", + "map": "Map" }, "user": "Pengguna", "users": "Pengguna.", @@ -136,6 +138,7 @@ "Currency": "Mata uang", "Percent": "Persen", "Duration": "Durasi", + "GeoData": "GeoData", "Rating": "Peringkat", "Formula": "Rumus", "Rollup": "Rollup.", @@ -253,6 +256,9 @@ "barcodeFormat": "Format kode batang", "qrCodeValueTooLong": "Terlalu banyak karakter untuk kode QR", "barcodeValueTooLong": "Terlalu banyak karakter untuk barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Fungsi agregat.", "dbCreateIfNotExists": "Basis Data: Buat jika tidak ada", "clientKey": "Kunci klien", @@ -452,6 +458,10 @@ "stackedBy": "Ditumpuk oleh", "chooseGroupingField": "Pilih Bidang Pengelompokan", "addOrEditStack": "Tambah / Edit Tumpukan" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Kreator dapat membuat proyek baru dan mengakses proyek yang diundang.", "orgViewer": "Penonton tidak diizinkan untuk membuat proyek baru, tetapi mereka dapat mengakses proyek yang diundang." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Baris per halaman", "upload": "Pilih file untuk diunggah", "upload_sub": "atau seret dan jatuhkan file", @@ -600,6 +615,7 @@ "gallery": "Tambahkan Tampilan Galeri", "form": "Tambahkan tampilan formulir", "kanban": "Tambahkan Kanban Lihat", + "map": "Add Map View", "calendar": "Tambahkan tampilan kalender" }, "tablesMetadataInSync": "Tabel metadata sedang disinkronkan", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Nama harus dimulai dengan alfabet atau _", "followingCharactersAreNotAllowed": "Karakter berikut tidak diperbolehkan", "columnNameRequired": "Nama kolom harus diisi", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Nama proyek melebihi 50 karakter", "projectNameCannotStartWithSpace": "Nama proyek tidak boleh dimulai dengan spasi", "requiredField": "Bidang yang dibutuhkan", diff --git a/packages/nc-gui/lang/it.json b/packages/nc-gui/lang/it.json index 07423e524e..f9ad41d9b6 100644 --- a/packages/nc-gui/lang/it.json +++ b/packages/nc-gui/lang/it.json @@ -74,7 +74,8 @@ "insertBefore": "Inserire prima", "hideField": "Campo nascosto", "sortAsc": "Ordinamento crescente", - "sortDesc": "Ordinamento decrescente" + "sortDesc": "Ordinamento decrescente", + "geoDataField": "GeoData Field" }, "objects": { "project": "Progetto", @@ -98,7 +99,8 @@ "gallery": "Galleria", "form": "Modulo", "kanban": "Kanban", - "calendar": "Calendario" + "calendar": "Calendario", + "map": "Map" }, "user": "Utente", "users": "Utenti", @@ -136,6 +138,7 @@ "Currency": "Moneta", "Percent": "Percento", "Duration": "Durata", + "GeoData": "GeoData", "Rating": "Valutazione", "Formula": "Formula", "Rollup": "Rollup", @@ -253,6 +256,9 @@ "barcodeFormat": "Formato del codice a barre", "qrCodeValueTooLong": "Troppi caratteri per un codice QR", "barcodeValueTooLong": "Troppi caratteri per un codice a barre", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Aggrega funzione", "dbCreateIfNotExists": "Database: crea se non esiste", "clientKey": "Chiave client", @@ -452,6 +458,10 @@ "stackedBy": "Impilato da", "chooseGroupingField": "Scegliere un campo di raggruppamento", "addOrEditStack": "Aggiungere / modificare la pila" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Il Creatore può creare nuovi progetti e accedere a qualsiasi progetto invitato.", "orgViewer": "Il visualizzatore non può creare nuovi progetti, ma può accedere a qualsiasi progetto invitato." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Righe per pagina", "upload": "Seleziona il file da caricare", "upload_sub": "o trascinalo qui", @@ -600,6 +615,7 @@ "gallery": "Aggiungi vista galleria", "form": "Aggiungi vista modulo", "kanban": "Aggiungi vista kanban", + "map": "Add Map View", "calendar": "Aggiungi vista calendario" }, "tablesMetadataInSync": "I metadati delle tabelle sono sincronizzati", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Il nome deve iniziare con un alfabeto o con _", "followingCharactersAreNotAllowed": "I seguenti caratteri non sono ammessi", "columnNameRequired": "Il nome della colonna è richiesto", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Il nome del progetto supera i 50 caratteri", "projectNameCannotStartWithSpace": "Il nome del progetto non può iniziare con uno spazio", "requiredField": "Campo obbligatorio", diff --git a/packages/nc-gui/lang/ja.json b/packages/nc-gui/lang/ja.json index 7cde87decc..03e492f329 100644 --- a/packages/nc-gui/lang/ja.json +++ b/packages/nc-gui/lang/ja.json @@ -74,7 +74,8 @@ "insertBefore": "前に挿入", "hideField": "フィールドを隠す", "sortAsc": "昇順", - "sortDesc": "降順" + "sortDesc": "降順", + "geoDataField": "GeoData Field" }, "objects": { "project": "プロジェクト", @@ -98,7 +99,8 @@ "gallery": "ギャラリー", "form": "フォーム", "kanban": "カンバン", - "calendar": "カレンダー" + "calendar": "カレンダー", + "map": "Map" }, "user": "ユーザー", "users": "ユーザー", @@ -136,6 +138,7 @@ "Currency": "通貨", "Percent": "パーセント", "Duration": "間隔", + "GeoData": "GeoData", "Rating": "レーティング", "Formula": "方式", "Rollup": "ロールアップ", @@ -253,6 +256,9 @@ "barcodeFormat": "バーコードのフォーマット", "qrCodeValueTooLong": "QRコードにするには文字数が多すぎる", "barcodeValueTooLong": "バーコードの文字数が多すぎる", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "集約関数", "dbCreateIfNotExists": "データベース:存在しない場合は作成", "clientKey": "クライアントキー", @@ -452,6 +458,10 @@ "stackedBy": "スタック", "chooseGroupingField": "グループ化するフィールドを選択", "addOrEditStack": "スタックの追加/編集" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "「作成者」は新しいプロジェクトを作成でき、かつ招待されたプロジェクトにもアクセスできます。", "orgViewer": "ビューアーは新規プロジェクトを作成することはできませんが、招待されたプロジェクトにアクセスできます。" }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "1ページあたりの行数", "upload": "アップロードするファイルを選択してください", "upload_sub": "またはファイルをドラッグ & ドロップ", @@ -600,6 +615,7 @@ "gallery": "ギャラリービューを追加", "form": "フォームビューを追加", "kanban": "カンバンビューを追加", + "map": "Add Map View", "calendar": "カレンダービューを追加" }, "tablesMetadataInSync": "テーブルメタデータは同期されています", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "名前はアルファベットまたは_で始まる必要があります", "followingCharactersAreNotAllowed": "以下の文字種は使用できません", "columnNameRequired": "列名が必要です", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "プロジェクト名が50文字を超えています", "projectNameCannotStartWithSpace": "プロジェクト名の先頭にはスペースは利用できません", "requiredField": "必須フィールド", diff --git a/packages/nc-gui/lang/ko.json b/packages/nc-gui/lang/ko.json index 999a8ed615..99ab014235 100644 --- a/packages/nc-gui/lang/ko.json +++ b/packages/nc-gui/lang/ko.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "프로젝트", @@ -98,7 +99,8 @@ "gallery": "갤러리", "form": "폼", "kanban": "칸반", - "calendar": "캘린더" + "calendar": "캘린더", + "map": "Map" }, "user": "사용자", "users": "사용자", @@ -136,6 +138,7 @@ "Currency": "통화", "Percent": "퍼센트", "Duration": "기간", + "GeoData": "GeoData", "Rating": "등급", "Formula": "공식", "Rollup": "롤업", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "집합 함수", "dbCreateIfNotExists": "데이터베이스 : 존재하지 않는 경우 생성", "clientKey": "클라이언트 키", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "페이지 당 행", "upload": "업로드 할 파일 선택", "upload_sub": "또는 끌어서 놓기 파일", @@ -600,6 +615,7 @@ "gallery": "갤러리 뷰 추가", "form": "폼 뷰 추가", "kanban": "칸반 뷰 추가", + "map": "Add Map View", "calendar": "캘린더 뷰 추가" }, "tablesMetadataInSync": "테이블 메타 데이터가 동기화되어 있습니다", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/lv.json b/packages/nc-gui/lang/lv.json index 8e0da88a4f..b859e014fd 100644 --- a/packages/nc-gui/lang/lv.json +++ b/packages/nc-gui/lang/lv.json @@ -74,7 +74,8 @@ "insertBefore": "Ievietot pirms", "hideField": "Slēpt lauku", "sortAsc": "Kārtot augošā secībā", - "sortDesc": "Kārtot dilstošā secībā" + "sortDesc": "Kārtot dilstošā secībā", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekts", @@ -98,7 +99,8 @@ "gallery": "Galerija", "form": "Forma", "kanban": "Kanban", - "calendar": "Kalendārs" + "calendar": "Kalendārs", + "map": "Map" }, "user": "Lietotājs", "users": "Lietotāji", @@ -136,6 +138,7 @@ "Currency": "Valūta", "Percent": "Procenti", "Duration": "Ilgums", + "GeoData": "GeoData", "Rating": "Vērtējums", "Formula": "Formula", "Rollup": "Apkopojums", @@ -253,6 +256,9 @@ "barcodeFormat": "Svītrkoda formāts", "qrCodeValueTooLong": "Pārāk daudz rakstzīmju QR kodam", "barcodeValueTooLong": "Pārāk daudz zīmju svītrkodam", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Agregācijas funkcija", "dbCreateIfNotExists": "Datubāze : izveidotm ja neeksistē", "clientKey": "Klienta atslēga", @@ -452,6 +458,10 @@ "stackedBy": "Sakrautas ar", "chooseGroupingField": "Izvēlieties grupēšanas lauku", "addOrEditStack": "Pievienot / rediģēt kaudzi" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Radītājs var izveidot jaunus projektus un piekļūt jebkuram uzaicinātajam projektam.", "orgViewer": "Skatītājs nedrīkst veidot jaunus projektus, bet var piekļūt jebkuram uzaicinātajam projektam." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "ieraksti lapā", "upload": "Izvēlēties datni augšupielādei", "upload_sub": "vai vilkt un nomest datni", @@ -600,6 +615,7 @@ "gallery": "Pievienot galerijas skatu", "form": "Pievienot formas skatu", "kanban": "Pievienot Kanban skatu", + "map": "Add Map View", "calendar": "Pievienot kalendāra skatu" }, "tablesMetadataInSync": "Tabulu metadati ir sinhronizācijā", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Vārdam jāsākas ar alfabētu vai _", "followingCharactersAreNotAllowed": "Šādas rakstzīmes nav atļautas", "columnNameRequired": "Slejas nosaukums ir obligāts", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Projekta nosaukums pārsniedz 50 rakstzīmes", "projectNameCannotStartWithSpace": "Projekta nosaukums nedrīkst sākties ar atstarpi", "requiredField": "Obligātais lauks", diff --git a/packages/nc-gui/lang/nl.json b/packages/nc-gui/lang/nl.json index 0b12f95e1b..004c5205aa 100644 --- a/packages/nc-gui/lang/nl.json +++ b/packages/nc-gui/lang/nl.json @@ -74,7 +74,8 @@ "insertBefore": "Invoegen voor", "hideField": "Verberg veld", "sortAsc": "Oplopend sorteren", - "sortDesc": "Aflopend sorteren" + "sortDesc": "Aflopend sorteren", + "geoDataField": "GeoData Field" }, "objects": { "project": "Project", @@ -98,7 +99,8 @@ "gallery": "Galerij", "form": "Formulier", "kanban": "Kanban", - "calendar": "Kalender" + "calendar": "Kalender", + "map": "Map" }, "user": "Gebruiker", "users": "Gebruikers", @@ -136,6 +138,7 @@ "Currency": "Munteenheid", "Percent": "Procent", "Duration": "Looptijd", + "GeoData": "GeoData", "Rating": "Beoordeling", "Formula": "Formule", "Rollup": "Rollup", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode formaat", "qrCodeValueTooLong": "Te veel tekens voor een QR-code", "barcodeValueTooLong": "Te veel tekens voor een streepjescode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Geaggregeerde functie", "dbCreateIfNotExists": "Database: creëer als het niet bestaat", "clientKey": "Klantensleutel", @@ -452,6 +458,10 @@ "stackedBy": "Gestapeld door", "chooseGroupingField": "Kies een groepeerveld", "addOrEditStack": "Stapel toevoegen / bewerken" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator kan nieuwe projecten aanmaken en heeft toegang tot elk uitgenodigd project.", "orgViewer": "De Viewer mag geen nieuwe projecten aanmaken, maar heeft wel toegang tot elk uitgenodigd project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rijen per pagina", "upload": "Selecteer bestand om te uploaden", "upload_sub": "of sleep het bestand naar hier", @@ -600,6 +615,7 @@ "gallery": "Gallerijweergave toevoegen", "form": "Formulierweergave toevoegen", "kanban": "Kanbanweergave toevoegen", + "map": "Add Map View", "calendar": "Kalenderweergave toevoegen" }, "tablesMetadataInSync": "Tabelmetadata is gesynchroniseerd", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "De naam moet beginnen met een alfabet of _", "followingCharactersAreNotAllowed": "De volgende tekens zijn niet toegestaan", "columnNameRequired": "Kolomnaam is verplicht", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Projectnaam meer dan 50 tekens", "projectNameCannotStartWithSpace": "Projectnaam kan niet beginnen met een spatie", "requiredField": "Verplicht veld", diff --git a/packages/nc-gui/lang/no.json b/packages/nc-gui/lang/no.json index 62f9b897d2..c4ec420be1 100644 --- a/packages/nc-gui/lang/no.json +++ b/packages/nc-gui/lang/no.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "Prosjekt", @@ -98,7 +99,8 @@ "gallery": "Galleri", "form": "Skjema", "kanban": "Kanban", - "calendar": "Kalender" + "calendar": "Kalender", + "map": "Map" }, "user": "Bruker", "users": "Brukere", @@ -136,6 +138,7 @@ "Currency": "Valuta", "Percent": "Prosent", "Duration": "Varighet", + "GeoData": "GeoData", "Rating": "Vurdering", "Formula": "Formel", "Rollup": "Rull opp", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Samlet funksjon", "dbCreateIfNotExists": "Database: Opprett hvis ikke eksisterer", "clientKey": "Klientnøkkel", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rader per side.", "upload": "Velg Fil for å laste opp", "upload_sub": "eller dra og slipp filen", @@ -600,6 +615,7 @@ "gallery": "Legg til galleriutsikt", "form": "Legg til skjemavisning", "kanban": "Legg til Kanban View", + "map": "Add Map View", "calendar": "Legg til kalendervisning" }, "tablesMetadataInSync": "Tabeller Metadata er synkronisert", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/pl.json b/packages/nc-gui/lang/pl.json index 082bf75fa7..d3c9dae2c4 100644 --- a/packages/nc-gui/lang/pl.json +++ b/packages/nc-gui/lang/pl.json @@ -74,7 +74,8 @@ "insertBefore": "Wstaw przed", "hideField": "Ukryj pole", "sortAsc": "Sortowanie rosnące", - "sortDesc": "Sortuj malejąco" + "sortDesc": "Sortuj malejąco", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galeria", "form": "Formularz", "kanban": "Kanban", - "calendar": "Kalendarz" + "calendar": "Kalendarz", + "map": "Map" }, "user": "Użytkownik", "users": "Użytkownicy", @@ -136,6 +138,7 @@ "Currency": "Waluta", "Percent": "Procent", "Duration": "Czas trwania", + "GeoData": "GeoData", "Rating": "Ocena", "Formula": "Formuła", "Rollup": "Zliczanie", @@ -253,6 +256,9 @@ "barcodeFormat": "Format kodu kreskowego", "qrCodeValueTooLong": "Zbyt wiele znaków dla kodu QR", "barcodeValueTooLong": "Zbyt wiele znaków dla kodu kreskowego", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Funkcja agregacji", "dbCreateIfNotExists": "Baza danych: Utwórz, jeśli nie istnieje", "clientKey": "Klucz klienta", @@ -452,6 +458,10 @@ "stackedBy": "Ułożone według", "chooseGroupingField": "Wybierz pole grupowania", "addOrEditStack": "Dodaj / Edytuj stos" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Twórca może tworzyć nowe projekty i mieć dostęp do każdego zaproszonego projektu.", "orgViewer": "Widz nie może tworzyć nowych projektów, ale może mieć dostęp do każdego zaproszonego projektu." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Wiersze na stronę", "upload": "Wybierz plik do przesłania", "upload_sub": "lub przeciągnij i upuść plik", @@ -600,6 +615,7 @@ "gallery": "Dodaj widok galerii.", "form": "Dodaj widok formy", "kanban": "Dodaj widok Kanban.", + "map": "Add Map View", "calendar": "Dodaj widok kalendarza" }, "tablesMetadataInSync": "Tabele Metadane są synchronizowane", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Nazwa powinna zaczynać się od alfabetu lub od _", "followingCharactersAreNotAllowed": "Następujące znaki są niedozwolone", "columnNameRequired": "Nazwa kolumny jest wymagana", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Nazwa projektu przekracza 50 znaków", "projectNameCannotStartWithSpace": "Nazwa projektu nie może zaczynać się od spacji", "requiredField": "Pole wymagane", diff --git a/packages/nc-gui/lang/pt.json b/packages/nc-gui/lang/pt.json index 1444dbe424..93427b42bd 100644 --- a/packages/nc-gui/lang/pt.json +++ b/packages/nc-gui/lang/pt.json @@ -74,7 +74,8 @@ "insertBefore": "Inserir Antes", "hideField": "Ocultar Campo", "sortAsc": "Ordenar Ascendente", - "sortDesc": "Ordenar Descendente" + "sortDesc": "Ordenar Descendente", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projeto", @@ -98,7 +99,8 @@ "gallery": "Galeria", "form": "Formulário", "kanban": "Kanban", - "calendar": "Calendário" + "calendar": "Calendário", + "map": "Map" }, "user": "Do utilizador", "users": "Comercial", @@ -136,6 +138,7 @@ "Currency": "Moeda", "Percent": "Por cento", "Duration": "Duração", + "GeoData": "GeoData", "Rating": "Avaliação", "Formula": "Fórmula", "Rollup": "Rolar", @@ -253,6 +256,9 @@ "barcodeFormat": "Formato do código de barras", "qrCodeValueTooLong": "Demasiados caracteres para um código QR", "barcodeValueTooLong": "Demasiados caracteres para um código de barras", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Função agregada", "dbCreateIfNotExists": "Base de Dados : criar se não existir", "clientKey": "Chave do Cliente", @@ -452,6 +458,10 @@ "stackedBy": "Empilhado por", "chooseGroupingField": "Escolha um Campo de Agrupamento", "addOrEditStack": "Adicionar / Editar Pilha" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "O criador pode criar novos projectos e aceder a qualquer projecto convidado.", "orgViewer": "O espectador não está autorizado a criar novos projectos, mas pode aceder a qualquer projecto convidado." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Linhas por página", "upload": "Selecione Arquivo para upload", "upload_sub": "ou arrastar e soltar arquivo", @@ -600,6 +615,7 @@ "gallery": "Adicionar vista de galeria", "form": "Adicionar vista de formulário", "kanban": "Adicionar vista de Kanban", + "map": "Add Map View", "calendar": "Adicionar vista de calendário" }, "tablesMetadataInSync": "Metadados de tabelas está em sincronia", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "O nome deve começar com um alfabeto ou _", "followingCharactersAreNotAllowed": "Os seguintes caracteres não são permitidos", "columnNameRequired": "O nome da coluna é obrigatório", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "O nome do projecto excede 50 caracteres", "projectNameCannotStartWithSpace": "O nome do projecto não pode começar com espaço", "requiredField": "Campo obrigatório", diff --git a/packages/nc-gui/lang/pt_BR.json b/packages/nc-gui/lang/pt_BR.json index 3e090fa336..49ee9dff36 100644 --- a/packages/nc-gui/lang/pt_BR.json +++ b/packages/nc-gui/lang/pt_BR.json @@ -74,7 +74,8 @@ "insertBefore": "Inserir Antes", "hideField": "Ocultar Campo", "sortAsc": "Ordenar Ascendente", - "sortDesc": "Ordenar Descendente" + "sortDesc": "Ordenar Descendente", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projeto", @@ -98,7 +99,8 @@ "gallery": "Galeria", "form": "Formulário", "kanban": "Kanban", - "calendar": "Calendário" + "calendar": "Calendário", + "map": "Map" }, "user": "Do utilizador", "users": "Comercial", @@ -136,6 +138,7 @@ "Currency": "Moeda", "Percent": "Por cento", "Duration": "Duração", + "GeoData": "GeoData", "Rating": "Avaliação", "Formula": "Fórmula", "Rollup": "Rolar", @@ -253,6 +256,9 @@ "barcodeFormat": "Formato do código de barras", "qrCodeValueTooLong": "Demasiados caracteres para um código QR", "barcodeValueTooLong": "Demasiados caracteres para um código de barras", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Função agregada", "dbCreateIfNotExists": "Base de Dados : criar se não existir", "clientKey": "Chave do Cliente", @@ -452,6 +458,10 @@ "stackedBy": "Empilhado por", "chooseGroupingField": "Escolha um Campo de Agrupamento", "addOrEditStack": "Adicionar / Editar Pilha" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "O criador pode criar novos projectos e aceder a qualquer projecto convidado.", "orgViewer": "O espectador não está autorizado a criar novos projectos, mas pode aceder a qualquer projecto convidado." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Linhas por página", "upload": "Selecione Arquivo para upload", "upload_sub": "ou arrastar e soltar arquivo", @@ -600,6 +615,7 @@ "gallery": "Adicionar vizualização de galeria", "form": "Adicionar vizualização de formulário", "kanban": "Adicionar vizualização de Kanban", + "map": "Add Map View", "calendar": "Adicionar vizualização de calendário" }, "tablesMetadataInSync": "Metadados de tabelas está em sincronia", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "O nome deve começar com um alfabeto ou _", "followingCharactersAreNotAllowed": "Os seguintes caracteres não são permitidos", "columnNameRequired": "O nome da coluna é obrigatório", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "O nome do projecto excede 50 caracteres", "projectNameCannotStartWithSpace": "O nome do projecto não pode começar com espaço", "requiredField": "Campo obrigatório", diff --git a/packages/nc-gui/lang/ru.json b/packages/nc-gui/lang/ru.json index f67403136d..b388d7eb7d 100644 --- a/packages/nc-gui/lang/ru.json +++ b/packages/nc-gui/lang/ru.json @@ -74,7 +74,8 @@ "insertBefore": "Вставить перед", "hideField": "Скрыть поле", "sortAsc": "По Возрастанию", - "sortDesc": "По убыванию" + "sortDesc": "По убыванию", + "geoDataField": "GeoData Field" }, "objects": { "project": "Проект", @@ -98,7 +99,8 @@ "gallery": "Галерея", "form": "Форма", "kanban": "Канбан", - "calendar": "Календарь" + "calendar": "Календарь", + "map": "Map" }, "user": "Пользователь", "users": "Пользователи", @@ -136,6 +138,7 @@ "Currency": "Валюта", "Percent": "Процент", "Duration": "Интервал времени", + "GeoData": "GeoData", "Rating": "Рейтинг", "Formula": "Формула", "Rollup": "Итоги (Rollup)", @@ -253,6 +256,9 @@ "barcodeFormat": "Формат штрих-кода", "qrCodeValueTooLong": "Слишком много символов для QR-кода", "barcodeValueTooLong": "Слишком много символов для штрихкода", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Агрегатная функция", "dbCreateIfNotExists": "База данных: создать, если не существует", "clientKey": "Ключ клиента", @@ -452,6 +458,10 @@ "stackedBy": "Группировка по", "chooseGroupingField": "Выберите поле группировки", "addOrEditStack": "Добавление / редактирование стека" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Создатель может создавать новые проекты и получать доступ к любому приглашенному проекту.", "orgViewer": "Наблюдатель не может создавать новые проекты, но может получить доступ к любому проекту по приглашению." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Количество строк на странице", "upload": "Выберите файл для загрузки", "upload_sub": "или перетащите файл", @@ -600,6 +615,7 @@ "gallery": "Добавить представление галерея", "form": "Добавить представление форма", "kanban": "Добавить представление Канбан", + "map": "Add Map View", "calendar": "Добавить представление календарь" }, "tablesMetadataInSync": "Таблицы метаданные синхронизируются", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Имя должно начинаться с алфавита или _", "followingCharactersAreNotAllowed": "Нельзя использовать следующие символы", "columnNameRequired": "Требуется название столбца", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Название проекта превышает 50 символов", "projectNameCannotStartWithSpace": "Название проекта не может начинаться с пробела", "requiredField": "Обязательное поле", diff --git a/packages/nc-gui/lang/sk.json b/packages/nc-gui/lang/sk.json index 080d3f3a1b..33846c7b85 100644 --- a/packages/nc-gui/lang/sk.json +++ b/packages/nc-gui/lang/sk.json @@ -74,7 +74,8 @@ "insertBefore": "Vložiť pred", "hideField": "Skryť pole", "sortAsc": "Zoradiť vzostupne", - "sortDesc": "Zoradiť zostupne" + "sortDesc": "Zoradiť zostupne", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galéria", "form": "Formulár", "kanban": "Kanban", - "calendar": "Kalendár" + "calendar": "Kalendár", + "map": "Map" }, "user": "Používateľ", "users": "Používatelia", @@ -136,6 +138,7 @@ "Currency": "Mena", "Percent": "Percentá", "Duration": "Trvanie", + "GeoData": "GeoData", "Rating": "Hodnotenie", "Formula": "Vzorec", "Rollup": "Rollup", @@ -253,6 +256,9 @@ "barcodeFormat": "Formát čiarového kódu", "qrCodeValueTooLong": "Príliš veľa znakov pre kód QR", "barcodeValueTooLong": "Príliš veľa znakov pre čiarový kód", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Súhrnná funkcia", "dbCreateIfNotExists": "Databáza : vytvoriť, ak neexistuje", "clientKey": "Kľúč klienta", @@ -452,6 +458,10 @@ "stackedBy": "Naskladané podľa", "chooseGroupingField": "Výber zoskupovacieho poľa", "addOrEditStack": "Pridať / upraviť zásobník" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator môže vytvárať nové projekty a pristupovať k ľubovoľnému pozvanému projektu.", "orgViewer": "Prehliadač nemôže vytvárať nové projekty, ale môže pristupovať k ľubovoľnému pozvanému projektu." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Riadky na stránku", "upload": "Vyberte súbor na odoslanie", "upload_sub": "alebo potiahnite a pustite súbor", @@ -600,6 +615,7 @@ "gallery": "Pridanie zobrazenia galérie", "form": "Pridanie zobrazenia formulára", "kanban": "Pridanie zobrazenia Kanban", + "map": "Add Map View", "calendar": "Pridanie zobrazenia kalendára" }, "tablesMetadataInSync": "Metadáta tabuliek sú synchronizované", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Meno by malo začínať abecedou alebo _", "followingCharactersAreNotAllowed": "Nasledujúce znaky nie sú povolené", "columnNameRequired": "Vyžaduje sa názov stĺpca", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Názov projektu presahuje 50 znakov", "projectNameCannotStartWithSpace": "Názov projektu nemôže začínať medzerou", "requiredField": "Povinné pole", diff --git a/packages/nc-gui/lang/sl.json b/packages/nc-gui/lang/sl.json index 61b37fbc8a..628409afd4 100644 --- a/packages/nc-gui/lang/sl.json +++ b/packages/nc-gui/lang/sl.json @@ -74,7 +74,8 @@ "insertBefore": "Vstavljanje pred", "hideField": "Skrij polje", "sortAsc": "Razvrsti naraščajoče", - "sortDesc": "Razvrsti padajoče" + "sortDesc": "Razvrsti padajoče", + "geoDataField": "GeoData Field" }, "objects": { "project": "Project.", @@ -98,7 +99,8 @@ "gallery": "Galerija", "form": "Obrazec", "kanban": "Kanban", - "calendar": "Koledar" + "calendar": "Koledar", + "map": "Map" }, "user": "Uporabnik", "users": "Uporabniki", @@ -136,6 +138,7 @@ "Currency": "Valuta", "Percent": "Odstotek", "Duration": "Trajanje", + "GeoData": "GeoData", "Rating": "Ocena", "Formula": "Formula", "Rollup": "Zavihamo", @@ -253,6 +256,9 @@ "barcodeFormat": "Format črtne kode", "qrCodeValueTooLong": "Preveč znakov za kodo QR", "barcodeValueTooLong": "Preveč znakov za črtno kodo", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Agregatna funkcija", "dbCreateIfNotExists": "Baza podatkov: Ustvari, če ne obstaja", "clientKey": "Odjemalski ključ", @@ -452,6 +458,10 @@ "stackedBy": "Zloženo po", "chooseGroupingField": "Izberite polje za združevanje", "addOrEditStack": "Dodajanje / urejanje sklada" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Ustvarjalec lahko ustvarja nove projekte in dostopa do vseh povabljenih projektov.", "orgViewer": "Pregledovalec ne sme ustvarjati novih projektov, lahko pa dostopa do vseh povabljenih projektov." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Vrstice na stran.", "upload": "Izberite datoteko za nalaganje", "upload_sub": "ali datoteko povlecite in spustite", @@ -600,6 +615,7 @@ "gallery": "Dodaj ogled galerije", "form": "Dodaj pogled obrazca", "kanban": "Dodaj pogled Kanban-a", + "map": "Add Map View", "calendar": "Dodaj pogled koledarja" }, "tablesMetadataInSync": "Tabele metapodatkov je v sinhronizaciji", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Ime se mora začeti z abecedo ali _", "followingCharactersAreNotAllowed": "Naslednji znaki niso dovoljeni", "columnNameRequired": "Ime stolpca je obvezno", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Ime projekta presega 50 znakov", "projectNameCannotStartWithSpace": "Ime projekta se ne sme začeti s presledkom", "requiredField": "Obvezno polje", diff --git a/packages/nc-gui/lang/sv.json b/packages/nc-gui/lang/sv.json index de04bf3d48..ee63c50cfd 100644 --- a/packages/nc-gui/lang/sv.json +++ b/packages/nc-gui/lang/sv.json @@ -74,7 +74,8 @@ "insertBefore": "Infoga före", "hideField": "Dölj fältet", "sortAsc": "Sortera i stigande riktning", - "sortDesc": "Sortera fallande" + "sortDesc": "Sortera fallande", + "geoDataField": "GeoData Field" }, "objects": { "project": "Projekt", @@ -98,7 +99,8 @@ "gallery": "Galleri", "form": "Formulär", "kanban": "Kanban", - "calendar": "Kalender" + "calendar": "Kalender", + "map": "Map" }, "user": "Användare", "users": "Användare", @@ -136,6 +138,7 @@ "Currency": "Valuta", "Percent": "Procent", "Duration": "Varaktighet", + "GeoData": "GeoData", "Rating": "Betyg", "Formula": "Formel", "Rollup": "Rulla upp", @@ -253,6 +256,9 @@ "barcodeFormat": "Streckkodsformat", "qrCodeValueTooLong": "För många tecken för en QR-kod", "barcodeValueTooLong": "För många tecken för en streckkod", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Aggregatfunktion", "dbCreateIfNotExists": "Databas: Skapa om det inte finns", "clientKey": "Klientnyckel", @@ -452,6 +458,10 @@ "stackedBy": "Staplade av", "chooseGroupingField": "Välj ett grupperingsfält", "addOrEditStack": "Lägg till/redigera stacken" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Skaparen kan skapa nya projekt och få tillgång till alla inbjudna projekt.", "orgViewer": "Visaren får inte skapa nya projekt, men kan få tillgång till alla inbjudna projekt." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Rader per sida", "upload": "Välj fil för att ladda upp", "upload_sub": "eller dra och släpp filen", @@ -600,6 +615,7 @@ "gallery": "Lägg till Gallery View", "form": "Lägg till formulärvy", "kanban": "Lägg till Kanban View", + "map": "Add Map View", "calendar": "Lägg till kalendervisning" }, "tablesMetadataInSync": "Tabeller Metadata är synkroniserad", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Namnet ska börja med ett alfabet eller _", "followingCharactersAreNotAllowed": "Följande tecken är inte tillåtna", "columnNameRequired": "Kolumnnamn krävs", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Projektnamnet har mer än 50 tecken", "projectNameCannotStartWithSpace": "Projektnamnet kan inte börja med ett mellanslag", "requiredField": "Obligatoriskt fält", diff --git a/packages/nc-gui/lang/th.json b/packages/nc-gui/lang/th.json index a08a489270..53197156b0 100644 --- a/packages/nc-gui/lang/th.json +++ b/packages/nc-gui/lang/th.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "โครงการ", @@ -98,7 +99,8 @@ "gallery": "แกลลอรี่", "form": "รูปร่าง", "kanban": "ภาษาคณาตา", - "calendar": "ปฏิทิน" + "calendar": "ปฏิทิน", + "map": "Map" }, "user": "ผู้ใช้", "users": "ผู้ใช้", @@ -136,6 +138,7 @@ "Currency": "สกุลเงิน", "Percent": "ร้อยละ", "Duration": "ระยะเวลา", + "GeoData": "GeoData", "Rating": "การจัดอันดับ", "Formula": "สูตร", "Rollup": "ม้วน", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "ฟังก์ชั่นรวม", "dbCreateIfNotExists": "ฐานข้อมูล: สร้างถ้าไม่มีอยู่", "clientKey": "รหัสลูกค้า", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "แถวต่อหน้า", "upload": "เลือกไฟล์ที่จะอัปโหลด", "upload_sub": "หรือลากและวางไฟล์", @@ -600,6 +615,7 @@ "gallery": "เพิ่มมุมมองแกลลอรี่", "form": "เพิ่มมุมมองแบบฟอร์ม", "kanban": "เพิ่มมุมมอง Kanban", + "map": "Add Map View", "calendar": "เพิ่มมุมมองปฏิทิน" }, "tablesMetadataInSync": "ตารางเมตาดาต้ากำลังซิงค์", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/tr.json b/packages/nc-gui/lang/tr.json index 1ecc9d6aac..23ad9a2bf6 100644 --- a/packages/nc-gui/lang/tr.json +++ b/packages/nc-gui/lang/tr.json @@ -74,7 +74,8 @@ "insertBefore": "Önce Ekle", "hideField": "Alanı Gizle", "sortAsc": "Artan Sırala", - "sortDesc": "Azalan Sıralama" + "sortDesc": "Azalan Sıralama", + "geoDataField": "GeoData Field" }, "objects": { "project": "Proje", @@ -98,7 +99,8 @@ "gallery": "Galeri", "form": "Form", "kanban": "Kanban", - "calendar": "Takvim" + "calendar": "Takvim", + "map": "Map" }, "user": "Kullanıcı", "users": "Kullanıcılar", @@ -136,6 +138,7 @@ "Currency": "Para birimi", "Percent": "Yüzde", "Duration": "Süre", + "GeoData": "GeoData", "Rating": "Değerlendirme", "Formula": "Formül", "Rollup": "Referans hesapla", @@ -253,6 +256,9 @@ "barcodeFormat": "Barkod formatı", "qrCodeValueTooLong": "QR kodu için çok fazla karakter", "barcodeValueTooLong": "Barkod için çok fazla karakter", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Birleştirme fonksiyonu", "dbCreateIfNotExists": "Veritabanı : yoksa oluştur", "clientKey": "İstemci Anahtarı", @@ -452,6 +458,10 @@ "stackedBy": "Tarafından Yığılmış", "chooseGroupingField": "Bir Gruplama Alanı Seçin", "addOrEditStack": "Yığın Ekle / Düzenle" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "İçerik oluşturucu yeni projeler oluşturabilir ve davet edilen herhangi bir projeye erişebilir.", "orgViewer": "İzleyicinin yeni proje oluşturmasına izin verilmez ancak davet edilen herhangi bir projeye erişebilir." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Sayfa başına satır", "upload": "Yüklenecek Dosyayı Seçin", "upload_sub": "veya dosyayı sürükleyip bırakın", @@ -600,6 +615,7 @@ "gallery": "Galeri görünümü ekle", "form": "Form görünümü ekle", "kanban": "Kanban görünümü ekle", + "map": "Add Map View", "calendar": "Takvim görünümü ekle" }, "tablesMetadataInSync": "Tablonun meta verileri senkronize", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "İsim bir alfabe veya _ ile başlamalıdır", "followingCharactersAreNotAllowed": "Aşağıdaki karakterlere izin verilmez", "columnNameRequired": "Sütun adı gereklidir", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Proje adı 50 karakteri aşıyor", "projectNameCannotStartWithSpace": "Proje adı boşlukla başlayamaz", "requiredField": "Zorunlu alan", diff --git a/packages/nc-gui/lang/uk.json b/packages/nc-gui/lang/uk.json index 4720215934..2ed4552a0a 100644 --- a/packages/nc-gui/lang/uk.json +++ b/packages/nc-gui/lang/uk.json @@ -74,7 +74,8 @@ "insertBefore": "Вставити перед", "hideField": "Приховати поле", "sortAsc": "За зростанням", - "sortDesc": "За спаданням" + "sortDesc": "За спаданням", + "geoDataField": "GeoData Field" }, "objects": { "project": "Проєкт", @@ -98,7 +99,8 @@ "gallery": "Галерея", "form": "Форма", "kanban": "Канбан", - "calendar": "Календар" + "calendar": "Календар", + "map": "Map" }, "user": "Користувач", "users": "Користувачі", @@ -136,6 +138,7 @@ "Currency": "Валюта", "Percent": "Відсоток", "Duration": "Тривалість", + "GeoData": "GeoData", "Rating": "Рейтинг", "Formula": "Формула", "Rollup": "Накопичення", @@ -253,6 +256,9 @@ "barcodeFormat": "Формат штрих-коду", "qrCodeValueTooLong": "Забагато символів для QR-коду", "barcodeValueTooLong": "Забагато символів для штрих-коду", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Агрегатна функція", "dbCreateIfNotExists": "База даних: створити, якщо не існує", "clientKey": "Ключ клієнта", @@ -452,6 +458,10 @@ "stackedBy": "Групувати по", "chooseGroupingField": "Виберіть поле групування", "addOrEditStack": "Додавання/Редагування Стеку" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Розробник може створювати нові проєкти та мати доступ до будь-якого відкритого проєкту.", "orgViewer": "Глядач не може створювати нові проєкти, але він може отримати доступ до будь-якого відкритого проєкту." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Рядків на сторінці", "upload": "Виберіть файл для завантаження", "upload_sub": "або перетягніть файл", @@ -600,6 +615,7 @@ "gallery": "Додати вигляд галереї", "form": "Додати вигляд форми", "kanban": "Додати вигляд Kanban", + "map": "Add Map View", "calendar": "Додати вигляд календаря" }, "tablesMetadataInSync": "Таблиці метаданих синхронізуються", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Ім'я повинно починатися з літери або _", "followingCharactersAreNotAllowed": "Наступні символи не допускаються", "columnNameRequired": "Ім'я стовпця є обов'язковим", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Назва проєкту перевищує 50 символів", "projectNameCannotStartWithSpace": "Назва проєкту не може починатися з пробілу", "requiredField": "Обов'язкове поле", diff --git a/packages/nc-gui/lang/vi.json b/packages/nc-gui/lang/vi.json index 8d2e9ba7be..95b6ae905c 100644 --- a/packages/nc-gui/lang/vi.json +++ b/packages/nc-gui/lang/vi.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "Dự định", @@ -98,7 +99,8 @@ "gallery": "Bộ sưu tập", "form": "Mẫu đơn", "kanban": "Kanban.", - "calendar": "Lịch" + "calendar": "Lịch", + "map": "Map" }, "user": "Người dùng", "users": "Người dùng", @@ -136,6 +138,7 @@ "Currency": "Tiền tệ", "Percent": "Phần trăm", "Duration": "Khoảng thời gian", + "GeoData": "GeoData", "Rating": "Xếp hạng", "Formula": "Công thức", "Rollup": "ROLLUP.", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "Chức năng tổng hợp", "dbCreateIfNotExists": "Cơ sở dữ liệu: Tạo nếu không tồn tại", "clientKey": "Khóa khách", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "Creator can create new projects and access any invited project.", "orgViewer": "Viewer is not allowed to create new projects but they can access any invited project." }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "Hàng trên mỗi trang", "upload": "Chọn tệp để tải lên", "upload_sub": "hoặc kéo và thả tập tin", @@ -600,6 +615,7 @@ "gallery": "Thêm Gallery View.", "form": "Thêm hình thức xem", "kanban": "Thêm tầm nhìn Kanban", + "map": "Add Map View", "calendar": "Thêm chế độ xem lịch" }, "tablesMetadataInSync": "Bảng siêu dữ liệu được đồng bộ hóa", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "Column name is required", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "Project name exceeds 50 characters", "projectNameCannotStartWithSpace": "Project name cannot start with space", "requiredField": "Required field", diff --git a/packages/nc-gui/lang/zh-Hans.json b/packages/nc-gui/lang/zh-Hans.json index 3c52639863..328a296f47 100644 --- a/packages/nc-gui/lang/zh-Hans.json +++ b/packages/nc-gui/lang/zh-Hans.json @@ -67,14 +67,15 @@ "questions": "问题", "reachOut": "联系我们", "betaNote": "此功能仍在测试中。", - "moreInfo": "点击此处了解更多信息。", + "moreInfo": "这里可以找到更多信息", "logs": "日志", "groupingField": "分组字段", "insertAfter": "在右侧插入列", "insertBefore": "在左侧插入列", "hideField": "隐藏字段", "sortAsc": "升序", - "sortDesc": "降序" + "sortDesc": "降序", + "geoDataField": "GeoData Field" }, "objects": { "project": "项目", @@ -98,7 +99,8 @@ "gallery": "画廊", "form": "表单", "kanban": "看板", - "calendar": "日历" + "calendar": "日历", + "map": "Map" }, "user": "用户", "users": "用户", @@ -136,6 +138,7 @@ "Currency": "货币", "Percent": "百分比", "Duration": "时长", + "GeoData": "GeoData", "Rating": "评分", "Formula": "公式", "Rollup": "聚合", @@ -253,6 +256,9 @@ "barcodeFormat": "条形码码制", "qrCodeValueTooLong": "字数超出二维码容量", "barcodeValueTooLong": "字数超出条形码容量", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "汇总功能", "dbCreateIfNotExists": "自动创建数据库", "clientKey": "客户端密钥", @@ -298,7 +304,7 @@ "noData": "暂无数据", "goToDashboard": "转到仪表板", "importing": "导入中", - "flattenNested": "Flatten Nested", + "flattenNested": "扁平化嵌套", "downloadAllowed": "允许下载", "weAreHiring": "我们在招募!", "primaryKey": "主键", @@ -380,14 +386,14 @@ "renameTable": "重命名表格", "deleteTable": "删除表格", "addField": "添加新字段", - "setDisplay": "Set as Display value", + "setDisplay": "设置为显示值", "addRow": "添加新行", "saveRow": "保存行", "saveAndExit": "保存并退出", "saveAndStay": "保存并留在此页", "insertRow": "插入新行", "deleteRow": "删除行", - "duplicateRow": "Duplicate Row", + "duplicateRow": "复制该行", "deleteSelectedRow": "删除所选行", "importExcel": "导入 Excel", "importCSV": "导入 CSV", @@ -452,6 +458,10 @@ "stackedBy": "分类依据为", "chooseGroupingField": "选择分组字段", "addOrEditStack": "添加/编辑分类标签" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -508,16 +518,21 @@ "renderError": "条形码错误 - 请注意输入数据和条形码类型之间的兼容性" }, "nonEditableFields": { - "computedFieldUnableToClear": "Warning: Computed field - unable to clear text", - "qrFieldsCannotBeDirectlyChanged": "Warning: QR fields cannot be directly changed." + "computedFieldUnableToClear": "警告:自动计算的字段无法被清除内容。", + "qrFieldsCannotBeDirectlyChanged": "警告:二维码字段无法更改。" } }, "info": { - "pasteNotSupported": "Paste operation is not supported on the active cell", + "pasteNotSupported": "处于活动状态的单元格不能粘贴内容", "roles": { "orgCreator": "创始人可以创建新项目,访问受邀项目。", "orgViewer": "游客不能创建新项目,仅允许访问受邀项目。" }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "每页行驶", "upload": "选择文件以上传", "upload_sub": "或拖放文件", @@ -600,6 +615,7 @@ "gallery": "添加画廊视图", "form": "添加表单视图", "kanban": "添加看板视图", + "map": "Add Map View", "calendar": "添加日历视图" }, "tablesMetadataInSync": "表元数据同步", @@ -627,18 +643,18 @@ "valueAlreadyInList": "此值已经在列表中", "noColumnsToUpdate": "没有要更新的列", "tableDeleted": "已成功删除表", - "generatePublicShareableReadonlyBase": "Generate publicly shareable readonly base", + "generatePublicShareableReadonlyBase": "生成公开可共享的只读库", "deleteViewConfirmation": "您确定要删除此视图?", "deleteTableConfirmation": "您想要删除该表吗?", "showM2mTables": "显示中间表", - "showM2mTablesDesc": "Many-to-many relation is supported via a junction table & is hidden by default. Enable this option to list all such tables along with existing tables.", - "showNullInCells": "Show NULL in Cells", - "showNullInCellsDesc": "Display 'NULL' tag in cells holding NULL value. This helps differentiate against cells holding EMPTY string.", - "showNullAndEmptyInFilter": "Show NULL and EMPTY in Filter", - "showNullAndEmptyInFilterDesc": "Enable 'additional' filters to differentiate fields containing NULL & Empty Strings. Default support for Blank treats both NULL & Empty strings alike.", + "showM2mTablesDesc": "NocoDB 用来支持多对多关系的中间表默认不可见。打开此选项将显示所有中间表。", + "showNullInCells": "单元格为空时显示 NULL", + "showNullInCellsDesc": "未设置值的单元格将显示 NULL。这是为了和值为空字符串(显示 EMPTY)的单元格作出区分。", + "showNullAndEmptyInFilter": "在过滤器中显示 NULL 和 EMPTY 选项", + "showNullAndEmptyInFilterDesc": "启用”附加”过滤器来区分未设置值(NULL)和值为空字符串(EMPTY)的字段。默认对 NULL 的处理和对空字符串的处理一样。", "deleteKanbanStackConfirmation": "删除这个类别标签也将从 \"{groupingField}\"中删除选择选项 \"{stackToBeDeleted}\"。这类记录将移到未分类的类别中。", - "computedFieldEditWarning": "Computed field: contents are read-only. Use column edit menu to reconfigure", - "computedFieldDeleteWarning": "Computed field: contents are read-only. Unable to clear content.", + "computedFieldEditWarning": "计算字段:此内容是只读的。使用列编辑菜单来重新配置该字段", + "computedFieldDeleteWarning": "计算字段:此内容是只读的。无法清除内容。", "noMoreRecords": "暂无数据" }, "error": { @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "名称应该以字母或 _ 开头", "followingCharactersAreNotAllowed": "不允许使用以下字符", "columnNameRequired": "列名是必填项", + "columnNameExceedsCharacters": "列名的长度超过了 {value} 字符的限制", "projectNameExceeds50Characters": "项目名称超过 50 个字符", "projectNameCannotStartWithSpace": "项目名称不能以空格开头", "requiredField": "必填字段", @@ -722,7 +739,7 @@ }, "success": { "columnDuplicated": "此列的副本创建成功", - "rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)", + "rowDuplicatedWithoutSavedYet": "该行已复制(未保存)", "updatedUIACL": "已成功更新表的 UI ACL", "pluginUninstalled": "插件卸载成功", "pluginSettingsSaved": "插件设置保存成功", diff --git a/packages/nc-gui/lang/zh-Hant.json b/packages/nc-gui/lang/zh-Hant.json index e51d2eedd5..18a6d91fe0 100644 --- a/packages/nc-gui/lang/zh-Hant.json +++ b/packages/nc-gui/lang/zh-Hant.json @@ -74,7 +74,8 @@ "insertBefore": "Insert Before", "hideField": "Hide Field", "sortAsc": "Sort Ascending", - "sortDesc": "Sort Descending" + "sortDesc": "Sort Descending", + "geoDataField": "GeoData Field" }, "objects": { "project": "項目", @@ -98,7 +99,8 @@ "gallery": "相簿", "form": "表單", "kanban": "看板", - "calendar": "日曆" + "calendar": "日曆", + "map": "Map" }, "user": "使用者", "users": "使用者", @@ -136,6 +138,7 @@ "Currency": "貨幣", "Percent": "百分", "Duration": "期間", + "GeoData": "GeoData", "Rating": "評分", "Formula": "公式", "Rollup": "捲起", @@ -253,6 +256,9 @@ "barcodeFormat": "Barcode format", "qrCodeValueTooLong": "Too many characters for a QR code", "barcodeValueTooLong": "Too many characters for a barcode", + "yourLocation": "Your Location", + "lng": "Lng", + "lat": "Lat", "aggregateFunction": "匯總功能", "dbCreateIfNotExists": "資料庫:不存在則建立", "clientKey": "用戶端金鑰", @@ -452,6 +458,10 @@ "stackedBy": "Stacked By", "chooseGroupingField": "Choose a Grouping Field", "addOrEditStack": "Add / Edit Stack" + }, + "map": { + "mappedBy": "Mapped By", + "chooseMappingField": "Choose a Mapping Field" } }, "tooltip": { @@ -518,6 +528,11 @@ "orgCreator": "建立者可以建立專案與存取任何受邀請的專案", "orgViewer": "檢視者不能建立專案但可以存取任何受邀請的專案" }, + "map": { + "overLimit": "You're over the limit.", + "closeLimit": "You're getting close to the limit.", + "limitNumber": "The limit of markers shown in a Map View is 1000 records." + }, "footerInfo": "每頁行駛", "upload": "選擇檔案以上傳", "upload_sub": "或拖放檔案", @@ -600,6 +615,7 @@ "gallery": "加入相簿檢視", "form": "加入表單檢視", "kanban": "加入看板檢視", + "map": "Add Map View", "calendar": "加入日曆檢視" }, "tablesMetadataInSync": "表元數據同步", @@ -690,6 +706,7 @@ "nameShouldStartWithAnAlphabetOr_": "名稱必須用 英文字母 或 _ 當開頭", "followingCharactersAreNotAllowed": "Following characters are not allowed", "columnNameRequired": "欄位名稱必填", + "columnNameExceedsCharacters": "The length of column name exceeds the max {value} characters", "projectNameExceeds50Characters": "專案名稱超過 50 個字元", "projectNameCannotStartWithSpace": "專案名稱不能有空白開頭", "requiredField": "必填欄位", diff --git a/packages/nc-gui/utils/errorUtils.ts b/packages/nc-gui/utils/errorUtils.ts index 6601b5b1dc..373881783c 100644 --- a/packages/nc-gui/utils/errorUtils.ts +++ b/packages/nc-gui/utils/errorUtils.ts @@ -1,14 +1,23 @@ export async function extractSdkResponseErrorMsg(e: Error & { response: any }) { if (!e || !e.response) return e.message let msg + let errors: any[] | null = null if (e.response.data instanceof Blob) { try { - msg = JSON.parse(await e.response.data.text()).msg + const parsedData = JSON.parse(await e.response.data.text()) + msg = parsedData.msg + errors = parsedData.errors } catch { msg = 'Some internal error occurred' } } else { msg = e.response.data.msg || e.response.data.message || 'Some internal error occurred' + errors = e.response.data.errors } + + if (Array.isArray(errors) && errors.length) { + return errors.map((e: any) => (e.instancePath ? `${e.instancePath} - ` : '') + e.message).join(', ') + } + return msg || 'Some error occurred' } diff --git a/packages/noco-docs/content/en/setup-and-usages/column-types.md b/packages/noco-docs/content/en/setup-and-usages/column-types.md index a6b11cca6d..182999b520 100644 --- a/packages/noco-docs/content/en/setup-and-usages/column-types.md +++ b/packages/noco-docs/content/en/setup-and-usages/column-types.md @@ -10,9 +10,7 @@ menuTitle: 'Column Types' | Type | Description | |---|---| - | [LinkToAnotherRecord](#linktoanotherrecord) | Has Many or Many To Many columns | - | [SingleLineText](#singlelinetext) | For short text | | [LongText](#longtext) | For lengthy string content | | [Attachment](#attachment) | File attachment column | @@ -36,7 +34,6 @@ menuTitle: 'Column Types' | [DateTime](#datetime)| Date & Time selector | | [QR Code](#qr-code)| QR Code visualization of another referenced column | | [Barcode](#barcode)| Barcode visualization of another referenced column | - | [Geometry](#geometry)| Geometry column | | [GeoData](#geodata)| GeoData column | | [Json](#json)| Json column | diff --git a/packages/nocodb-sdk/package.json b/packages/nocodb-sdk/package.json index ec22d9e676..442f2c9033 100644 --- a/packages/nocodb-sdk/package.json +++ b/packages/nocodb-sdk/package.json @@ -31,7 +31,7 @@ "test:prettier": "prettier \"src/**/*.ts\" --list-different", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", "watch:build": "tsc -p tsconfig.json -w", - "generate:sdk": "npx --yes swagger-typescript-api@10.0.3 -r -p ../../scripts/sdk/swagger.json -o ./src/lib/ --axios --unwrap-response-data --module-name-first-tag --type-suffix=Type --templates ../../scripts/sdk/templates" + "generate:sdk": "npx --yes swagger-typescript-api@10.0.3 -r -p ../nocodb/src/schema/swagger.json -o ./src/lib/ --axios --unwrap-response-data --module-name-first-tag --type-suffix=Type --templates ../../scripts/sdk/templates" }, "dependencies": { "axios": "^0.21.1", @@ -63,4 +63,4 @@ "prettier": { "singleQuote": true } -} \ No newline at end of file +} diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index 4c326f9469..f7a1372ddc 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -45,7 +45,7 @@ export interface UserListType { } export interface ProjectReqType { - title?: string; + title: string; description?: string; color?: string; bases?: BaseReqType[]; @@ -56,12 +56,12 @@ export interface ProjectType { title?: string; status?: string; description?: string; - meta?: string | object; + meta?: MetaType; color?: string; - deleted?: string | boolean; + deleted?: BoolType; order?: number; bases?: BaseType[]; - is_meta?: boolean; + is_meta?: BoolType; prefix?: string; created_at?: any; updated_at?: any; @@ -78,14 +78,14 @@ export interface BaseType { project_id?: string; alias?: string; type?: string; - is_meta?: boolean; + is_meta?: BoolType; config?: any; created_at?: any; updated_at?: any; inflection_column?: string; inflection_table?: string; order?: number; - enabled?: boolean; + enabled?: BoolType; } export interface BaseReqType { @@ -113,33 +113,39 @@ export interface TableType { table_name: string; title: string; type?: string; - enabled?: boolean; + enabled?: BoolType; parent_id?: string; show_as?: string; tags?: string; - pinned?: boolean; - deleted?: boolean; + pinned?: BoolType; + deleted?: BoolType; order?: number; columns?: ColumnType[]; columnsById?: object; slug?: string; - mm?: boolean | number; - meta?: any; + mm?: BoolType; + meta?: MetaType; } export interface ViewType { id?: string; title: string; - deleted?: boolean; + deleted?: BoolType; order?: number; fk_model_id?: string; slug?: string; uuid?: string; - meta?: any; - show_system_fields?: boolean; + meta?: MetaType; + show_system_fields?: BoolType; lock_type?: 'collaborative' | 'locked' | 'personal'; type?: number; - view?: FormType | GridType | GalleryType | KanbanType | MapType; + view?: + | FormType + | GridType + | GalleryType + | KanbanType + | MapType + | (FormType & GridType & GalleryType & KanbanType & MapType); } export interface TableInfoType { @@ -153,8 +159,8 @@ export interface TableInfoType { parent_id?: string; show_as?: string; tags?: string; - pinned?: boolean; - deleted?: boolean; + pinned?: BoolType; + deleted?: BoolType; order?: number; column?: ColumnType[]; filters?: FilterType[]; @@ -172,12 +178,12 @@ export interface TableReqType { parent_id?: string; show_as?: string; tags?: string; - pinned?: boolean; - deleted?: boolean; + pinned?: BoolType; + deleted?: BoolType; order?: number; - mm?: boolean; - columns: ColumnType[]; - meta?: any; + mm?: BoolType; + columns: NormalColumnRequestType[]; + meta?: MetaType; } export interface TableListType { @@ -191,15 +197,31 @@ export interface FilterType { fk_column_id?: string; logical_op?: string; comparison_op?: string; + value?: any; comparison_sub_op?: string; - value?: string | number | boolean | null; - is_group?: boolean; + is_group?: boolean | number | null; children?: FilterType[]; project_id?: string; base_id?: string; fk_parent_id?: string; - fk_view_id?: string; - fk_hook_id?: string; + fk_view_id?: StringOrNullType; + fk_hook_id?: StringOrNullType; +} + +export interface FilterReqType { + id?: string; + fk_model_id?: string; + fk_column_id?: string; + logical_op?: string; + comparison_op?: string; + value?: any; + is_group?: boolean | number | null; + children?: FilterType[]; + project_id?: string; + base_id?: string; + fk_parent_id?: string; + fk_view_id?: StringOrNullType; + fk_hook_id?: StringOrNullType; } export interface FilterListType { @@ -218,6 +240,11 @@ export interface SortType { base_id?: string; } +export interface SortReqType { + fk_column_id?: string; + direction?: string; +} + export interface SortListType { sorts: { list: SharedViewType[]; @@ -229,39 +256,45 @@ export interface ColumnType { base_id?: string; fk_model_id?: string; title?: string; - uidt: string; + uidt?: string; dt?: string; - np?: string; - ns?: string; - clen?: string | number; + np?: string | number | null; + ns?: string | number | null; + clen?: string | number | null; cop?: string; - pk?: boolean; - pv?: boolean; - rqd?: boolean; + pk?: BoolType; + pv?: BoolType; + rqd?: BoolType; column_name?: string; - un?: boolean; + un?: BoolType; ct?: string; - ai?: boolean; - unique?: boolean; + ai?: BoolType; + unique?: BoolType; cdf?: string; cc?: string; csn?: string; dtx?: string; - dtxp?: string; - dtxs?: string; - au?: boolean; - deleted?: boolean; - visible?: boolean; + dtxp?: string | number | null; + dtxs?: string | number | null; + au?: BoolType; + deleted?: BoolType; + visible?: BoolType; order?: number; - system?: number | boolean; - meta?: any; + system?: BoolType; + meta?: MetaType; colOptions?: | LinkToAnotherRecordType | FormulaType | RollupType | LookupType | SelectOptionsType - | object; + | object + | (LinkToAnotherRecordType & + FormulaType & + RollupType & + LookupType & + SelectOptionsType & + object); } export interface ColumnListType { @@ -273,7 +306,7 @@ export interface ColumnListType { export interface LinkToAnotherRecordType { id?: string; type?: string; - virtual?: boolean; + virtual?: BoolType; fk_column_id?: string; fk_child_column_id?: string; fk_parent_column_id?: string; @@ -291,7 +324,7 @@ export interface LinkToAnotherRecordType { export interface LookupType { id?: string; type?: string; - virtual?: boolean; + virtual?: BoolType; fk_column_id?: string; fk_relation_column_id?: string; fk_lookup_column_id?: string; @@ -302,7 +335,7 @@ export interface LookupType { export interface RollupType { id?: string; type?: string; - virtual?: boolean; + virtual?: BoolType; fk_column_id?: string; fk_relation_column_id?: string; fk_rollup_column_id?: string; @@ -314,7 +347,7 @@ export interface RollupType { export interface FormulaType { id?: string; type?: string; - virtual?: boolean; + virtual?: BoolType; fk_column_id?: string; formula?: string; formula_raw?: string; @@ -338,7 +371,14 @@ export interface GridType { id?: string; title?: string; alias?: string; - deleted?: boolean; + deleted?: BoolType; + order?: number; + lock_type?: 'collaborative' | 'locked' | 'personal'; + row_height?: number; +} + +export interface GridReqType { + title: string; order?: number; lock_type?: 'collaborative' | 'locked' | 'personal'; row_height?: number; @@ -348,10 +388,10 @@ export interface GalleryType { fk_view_id?: string; title?: string; alias?: string; - deleted?: boolean; + deleted?: BoolType; order?: number; - next_enabled?: boolean; - prev_enabled?: boolean; + next_enabled?: BoolType; + prev_enabled?: BoolType; cover_image_idx?: number; cover_image?: string; restrict_types?: string; @@ -363,6 +403,19 @@ export interface GalleryType { lock_type?: 'collaborative' | 'locked' | 'personal'; } +export interface GalleryReqType { + title: string; + next_enabled?: BoolType; + prev_enabled?: BoolType; + cover_image_idx?: number; + cover_image?: string; + restrict_types?: string; + restrict_size?: string; + restrict_number?: string; + fk_cover_image_col_id?: string; + lock_type?: 'collaborative' | 'locked' | 'personal'; +} + export interface GalleryColumnType { id?: string; label?: string; @@ -371,6 +424,14 @@ export interface GalleryColumnType { fk_gallery_id?: string; } +export interface GridColumnReqType { + label?: string; + help?: string; + fk_column_id?: string; + fk_gallery_id?: string; + width?: string; +} + export interface GridColumnType { id?: string; label?: string; @@ -394,9 +455,9 @@ export interface KanbanType { alias?: string; columns?: KanbanColumnType[]; fk_model_id?: string; - fk_grp_col_id?: string | null; + fk_grp_col_id?: StringOrNullType; fk_cover_image_col_id?: string; - meta?: string | object; + meta?: MetaType; } export interface GeoLocationType { @@ -413,9 +474,9 @@ export interface MapType { initial_geo_position?: GeoLocationType; fk_model_id?: string; fk_view_id?: string; - fk_geo_data_col_id?: string | null; + fk_geo_data_col_id?: StringOrNullType; columns?: MapColumnType[]; - meta?: string | object; + meta?: MetaType; } export interface MapColumnType { @@ -426,25 +487,56 @@ export interface MapColumnType { fk_gallery_id?: string; } +export interface LicenseReqType { + key?: string; +} + +export interface KanbanReqType { + title: string; + fk_grp_col_id?: StringOrNullType; +} + +export interface KanbanUpdateReqType { + fk_grp_col_id?: StringOrNullType; +} + export interface FormType { id?: string; title?: string; heading?: string; subheading?: string; success_msg?: string; - redirect_url?: string; - redirect_after_secs?: string; - email?: string; - banner_image_url?: string; - logo_url?: string; - submit_another_form?: boolean; - show_blank_form?: boolean; + redirect_url?: StringOrNullType; + redirect_after_secs?: StringOrNullType; + email?: StringOrNullType; + banner_image_url?: StringOrNullType; + logo_url?: StringOrNullType; + submit_another_form?: BoolType; + show_blank_form?: BoolType; columns?: FormColumnType[]; fk_model_id?: string; lock_type?: 'collaborative' | 'locked' | 'personal'; - meta?: any; + meta?: MetaType; +} + +export interface FormReqType { + title?: string; + heading?: string; + subheading?: string; + success_msg?: string; + redirect_url?: StringOrNullType; + redirect_after_secs?: StringOrNullType; + email?: StringOrNullType; + banner_image_url?: StringOrNullType; + logo_url?: StringOrNullType; + submit_another_form?: BoolType; + show_blank_form?: BoolType; + lock_type?: 'collaborative' | 'locked' | 'personal'; + meta?: MetaType; } +export type FormCreateReqType = FormReqType; + export interface FormColumnType { fk_column_id?: string; id?: string; @@ -452,19 +544,30 @@ export interface FormColumnType { uuid?: any; label?: string; help?: any; - required?: boolean; - show?: boolean; + required?: BoolType; + show?: BoolType; order?: number; created_at?: string; updated_at?: string; description?: string; - meta?: any; + meta?: MetaType; +} + +export interface FormColumnReqType { + uuid?: any; + label?: string; + help?: any; + required?: BoolType; + show?: BoolType; + order?: number; + description?: string; + meta?: MetaType; } export interface PaginatedType { pageSize?: number; totalRows?: number; - sort?: string | any[]; + sort?: string | SortType[]; isFirstPage?: boolean; isLastPage?: boolean; page?: number; @@ -532,23 +635,67 @@ export interface HookType { type?: string; event?: 'after' | 'before'; operation?: 'insert' | 'delete' | 'update'; - async?: boolean; - payload?: string; - url?: string; - headers?: string; - condition?: boolean; + async?: BoolType; notification?: string; retries?: number; retry_interval?: number; timeout?: number; - active?: boolean; + active?: BoolType; +} + +export interface HookReqType { + id?: string; + fk_model_id?: string; + title: string; + description?: StringOrNullType; + env?: string; + event: 'after' | 'before'; + operation: 'insert' | 'delete' | 'update'; + async?: string | number | null; + notification: object; + retries?: number; + retry_interval?: number; + timeout?: number; + active?: BoolType; +} + +export interface HookTestReqType { + payload: any; + hook: HookReqType; +} + +export interface SignUpReqType { + email: string; + password: string; +} + +export interface SignInReqType { + email: string; + password: string; +} + +export interface PasswordForgotReqType { + email: string; +} + +export interface PasswordResetReqType { + password: string; +} + +export interface PasswordChangeReqType { + currentPassword: string; + newPassword: string; +} + +export interface ApiTokenReqType { + description?: StringOrNullType; } export interface PluginType { id?: string; title?: string; description?: string; - active?: boolean; + active?: BoolType; rating?: number; version?: string; docs?: string; @@ -559,7 +706,7 @@ export interface PluginType { tags?: string; category?: string; input_schema?: string; - input?: string | null; + input?: number | StringOrNullType; creator?: string; creator_website?: string; price?: string; @@ -572,7 +719,7 @@ export interface ModelRoleVisibilityType { fk_model_id?: string; fk_view_id?: string; role?: string; - disabled?: boolean; + disabled?: BoolType; } export interface ApiTokenType { @@ -588,12 +735,12 @@ export interface HookLogType { id?: string; base_id?: string; project_id?: string; - fk_hook_id?: string; + fk_hook_id?: StringOrNullType; type?: string; event?: string; operation?: string; - test_call?: boolean; - payload?: string; + test_call?: BoolType; + payload?: any; conditions?: string; notifications?: string; error_code?: string; @@ -644,31 +791,29 @@ export interface NormalColumnRequestType { fk_model_id?: string; title?: string; dt?: string; - np?: string; - ns?: string; - clen?: string | number; - cop?: string; - pk?: boolean; - pv?: boolean; - rqd?: boolean; + np?: number | StringOrNullType; + ns?: number | StringOrNullType; + pk?: BoolType; + pv?: BoolType; + rqd?: BoolType; column_name?: string; - un?: boolean; + un?: BoolType; ct?: string; - ai?: boolean; - unique?: boolean; - cdf?: string; + ai?: BoolType; + unique?: BoolType; + cdf?: StringOrNullType; cc?: string; csn?: string; dtx?: string; - dtxp?: string; - dtxs?: string; - au?: boolean; + dtxp?: number | StringOrNullType; + dtxs?: number | StringOrNullType; + au?: BoolType; } export interface LinkToAnotherColumnReqType { uidt: 'LinkToAnotherRecord'; title: string; - virtual?: boolean; + virtual?: BoolType; parentId: string; childId: string; type: 'hm' | 'bt' | 'mm'; @@ -697,11 +842,16 @@ export interface FormulaColumnReqType { } export type ColumnReqType = ( - | NormalColumnRequestType | LinkToAnotherColumnReqType | RollupColumnReqType | FormulaColumnReqType | LookupColumnReqType + | NormalColumnRequestType + | (LinkToAnotherColumnReqType & + RollupColumnReqType & + FormulaColumnReqType & + LookupColumnReqType & + NormalColumnRequestType) ) & { column_name?: string; title?: string; @@ -720,6 +870,62 @@ export interface UserInfoType { roles?: any; } +export type VisibilityRuleReqType = { + disabled?: { + commenter?: BoolType; + creator?: BoolType; + editor?: BoolType; + guest?: BoolType; + owner?: BoolType; + viewer?: BoolType; + }; +}[]; + +export type BoolType = boolean | number | null; + +export type StringOrNullType = string | null; + +export type MetaType = object | string | null; + +export interface CommentReqType { + row_id: string; + fk_model_id: string; + description?: string; +} + +export interface AuditRowUpdateReqType { + fk_model_id?: string; + column_name?: string; + row_id?: string; + value?: any; + prev_value?: any; +} + +export interface OrgUserReqType { + email?: string; + roles?: string; +} + +export interface ProjectUserReqType { + email?: string; + roles?: string; +} + +export interface SharedBaseReqType { + uuid?: StringOrNullType; + roles?: StringOrNullType; +} + +export interface PluginTestReqType { + title?: string; + input?: any; +} + +export interface PluginReqType { + active?: BoolType; + input?: any; +} + import axios, { AxiosInstance, AxiosRequestConfig, ResponseType } from 'axios'; export type QueryParamsType = Record; @@ -905,13 +1111,7 @@ export class Api< * @response `401` `void` Unauthorized * @response `403` `void` Forbidden */ - signup: ( - data: { - email?: string; - password?: string; - }, - params: RequestParams = {} - ) => + signup: (data: SignUpReqType, params: RequestParams = {}) => this.request< { token?: string; @@ -943,13 +1143,7 @@ export class Api< }` Bad Request */ - signin: ( - data: { - email: string; - password: string; - }, - params: RequestParams = {} - ) => + signin: (data: SignInReqType, params: RequestParams = {}) => this.request< { token?: string; @@ -1000,12 +1194,7 @@ export class Api< * @response `200` `void` OK * @response `401` `void` Unauthorized */ - passwordForgot: ( - data: { - email?: string; - }, - params: RequestParams = {} - ) => + passwordForgot: (data: PasswordForgotReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/auth/password/forgot`, method: 'POST', @@ -1030,13 +1219,7 @@ export class Api< }` Bad request */ - passwordChange: ( - data: { - currentPassword?: string; - newPassword?: string; - }, - params: RequestParams = {} - ) => + passwordChange: (data: PasswordChangeReqType, params: RequestParams = {}) => this.request< { msg?: string; @@ -1096,9 +1279,7 @@ export class Api< */ passwordReset: ( token: string, - data: { - new_password?: string; - }, + data: PasswordResetReqType, params: RequestParams = {} ) => this.request({ @@ -1168,7 +1349,7 @@ export class Api< */ projectUserAdd: ( projectId: string, - data: any, + data: ProjectUserReqType, params: RequestParams = {} ) => this.request({ @@ -1192,7 +1373,7 @@ export class Api< projectUserUpdate: ( projectId: string, userId: string, - data: any, + data: ProjectUserReqType, params: RequestParams = {} ) => this.request({ @@ -1291,7 +1472,7 @@ export class Api< * @request POST:/api/v1/tokens * @response `200` `void` OK */ - create: (data: ApiTokenType, params: RequestParams = {}) => + create: (data: ApiTokenReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/tokens`, method: 'POST', @@ -1350,12 +1531,7 @@ export class Api< * @request POST:/api/v1/license * @response `200` `void` OK */ - set: ( - data: { - key?: string; - }, - params: RequestParams = {} - ) => + set: (data: LicenseReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/license`, method: 'POST', @@ -1474,7 +1650,11 @@ export class Api< * @request PATCH:/api/v1/users/{userId} * @response `200` `void` OK */ - update: (userId: string, data: UserType, params: RequestParams = {}) => + update: ( + userId: string, + data: OrgUserReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/users/${userId}`, method: 'PATCH', @@ -1613,14 +1793,14 @@ export class Api< * @tags Project * @name ModelVisibilitySet * @request POST:/api/v1/db/meta/projects/{projectId}/visibility-rules - * @response `200` `any` OK + * @response `200` `VisibilityRuleReqType` OK */ modelVisibilitySet: ( projectId: string, data: any, params: RequestParams = {} ) => - this.request({ + this.request({ path: `/api/v1/db/meta/projects/${projectId}/visibility-rules`, method: 'POST', body: data, @@ -1772,18 +1952,13 @@ export class Api< }), /** - * No description - * - * @tags Project - * @name SharedBaseCreate - * @request POST:/api/v1/db/meta/projects/{projectId}/shared - * @response `200` `{ - uuid?: string, - url?: string, - roles?: string, - -}` OK - */ + * No description + * + * @tags Project + * @name SharedBaseCreate + * @request POST:/api/v1/db/meta/projects/{projectId}/shared + * @response `200` `SharedBaseReqType` OK + */ sharedBaseCreate: ( projectId: string, data: { @@ -1792,14 +1967,7 @@ export class Api< }, params: RequestParams = {} ) => - this.request< - { - uuid?: string; - url?: string; - roles?: string; - }, - any - >({ + this.request({ path: `/api/v1/db/meta/projects/${projectId}/shared`, method: 'POST', body: data, @@ -2210,7 +2378,7 @@ export class Api< table_name?: string; title?: string; project_id?: string; - meta?: any; + meta?: MetaType; }, params: RequestParams = {} ) => @@ -2382,7 +2550,7 @@ export class Api< viewId: string, data: { order?: number; - meta?: any; + meta?: MetaType; title?: string; show_system_fields?: boolean; lock_type?: 'collaborative' | 'locked' | 'personal'; @@ -2464,7 +2632,11 @@ export class Api< * @request POST:/api/v1/db/meta/tables/{tableId}/grids * @response `200` `GridType` OK */ - gridCreate: (tableId: string, data: GridType, params: RequestParams = {}) => + gridCreate: ( + tableId: string, + data: GridReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/db/meta/tables/${tableId}/grids`, method: 'POST', @@ -2482,7 +2654,11 @@ export class Api< * @request POST:/api/v1/db/meta/tables/{tableId}/forms * @response `200` `FormType` OK */ - formCreate: (tableId: string, data: FormType, params: RequestParams = {}) => + formCreate: ( + tableId: string, + data: FormCreateReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/db/meta/tables/${tableId}/forms`, method: 'POST', @@ -2500,7 +2676,11 @@ export class Api< * @request PATCH:/api/v1/db/meta/forms/{formId} * @response `200` `void` OK */ - formUpdate: (formId: string, data: FormType, params: RequestParams = {}) => + formUpdate: ( + formId: string, + data: FormReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/db/meta/forms/${formId}`, method: 'PATCH', @@ -2535,7 +2715,7 @@ export class Api< */ formColumnUpdate: ( formViewColumnId: string, - data: FormColumnType, + data: FormColumnReqType, params: RequestParams = {} ) => this.request({ @@ -2591,7 +2771,7 @@ export class Api< */ gridColumnUpdate: ( columnId: string, - data: GridColumnType, + data: GridColumnReqType, params: RequestParams = {} ) => this.request({ @@ -2613,7 +2793,7 @@ export class Api< */ galleryCreate: ( tableId: string, - data: GalleryType, + data: GalleryReqType, params: RequestParams = {} ) => this.request({ @@ -2635,7 +2815,7 @@ export class Api< */ galleryUpdate: ( galleryId: string, - data: GalleryType, + data: GalleryReqType, params: RequestParams = {} ) => this.request({ @@ -2672,7 +2852,7 @@ export class Api< */ kanbanCreate: ( tableId: string, - data: KanbanType, + data: KanbanReqType, params: RequestParams = {} ) => this.request({ @@ -2694,7 +2874,7 @@ export class Api< */ kanbanUpdate: ( kanbanId: string, - data: KanbanType, + data: KanbanUpdateReqType, params: RequestParams = {} ) => this.request({ @@ -2826,7 +3006,7 @@ export class Api< viewId: string, data: { password?: string; - meta?: any; + meta?: MetaType; }, params: RequestParams = {} ) => @@ -3034,7 +3214,7 @@ export class Api< * @request POST:/api/v1/db/meta/views/{viewId}/filters * @response `200` `FilterType` OK */ - create: (viewId: string, data: FilterType, params: RequestParams = {}) => + create: (viewId: string, data: FilterReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/db/meta/views/${viewId}/filters`, method: 'POST', @@ -3068,7 +3248,11 @@ export class Api< * @request PATCH:/api/v1/db/meta/filters/{filterId} * @response `200` `void` OK */ - update: (filterId: string, data: FilterType, params: RequestParams = {}) => + update: ( + filterId: string, + data: FilterReqType, + params: RequestParams = {} + ) => this.request({ path: `/api/v1/db/meta/filters/${filterId}`, method: 'PATCH', @@ -3132,7 +3316,7 @@ export class Api< * @request POST:/api/v1/db/meta/hooks/{hookId}/filters * @response `200` `void` OK */ - create: (hookId: string, data: FilterType, params: RequestParams = {}) => + create: (hookId: string, data: FilterReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/db/meta/hooks/${hookId}/filters`, method: 'POST', @@ -4140,11 +4324,11 @@ export class Api< relatedMetas?: any, client?: string, base_id?: string, - columns?: ((GridColumnType | FormColumnType | GalleryColumnType) & ColumnType), + columns?: ((GridColumnType | FormColumnType | GalleryColumnType | (GridColumnType & FormColumnType & GalleryColumnType)) & ColumnType), model?: TableType, } & { - view?: (FormType | GridType | GalleryType), + view?: (FormType | GridType | GalleryType | (FormType & GridType & GalleryType)), })` OK */ @@ -4154,11 +4338,20 @@ export class Api< relatedMetas?: any; client?: string; base_id?: string; - columns?: (GridColumnType | FormColumnType | GalleryColumnType) & + columns?: ( + | GridColumnType + | FormColumnType + | GalleryColumnType + | (GridColumnType & FormColumnType & GalleryColumnType) + ) & ColumnType; model?: TableType; } & { - view?: FormType | GridType | GalleryType; + view?: + | FormType + | GridType + | GalleryType + | (FormType & GridType & GalleryType); }, any >({ @@ -4201,14 +4394,7 @@ export class Api< * @request POST:/api/v1/db/meta/audits/comments * @response `200` `void` OK */ - commentRow: ( - data: { - row_id: string; - fk_model_id: string; - description?: string; - }, - params: RequestParams = {} - ) => + commentRow: (data: CommentReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/db/meta/audits/comments`, method: 'POST', @@ -4250,13 +4436,7 @@ export class Api< */ auditRowUpdate: ( rowId: string, - data: { - fk_model_id?: string; - column_name?: string; - row_id?: string; - value?: string; - prev_value?: string; - }, + data: AuditRowUpdateReqType, params: RequestParams = {} ) => this.request({ @@ -4548,13 +4728,7 @@ export class Api< */ test: ( tableId: string, - data: { - payload?: { - data?: any; - user?: any; - }; - hook?: HookType; - }, + data: HookTestReqType, params: RequestParams = {} ) => this.request({ @@ -4687,15 +4861,7 @@ export class Api< * @response `400` `void` Bad Request * @response `401` `void` Unauthorized */ - test: ( - data: { - id?: string; - title?: string; - input?: any; - category?: string; - }, - params: RequestParams = {} - ) => + test: (data: PluginTestReqType, params: RequestParams = {}) => this.request({ path: `/api/v1/db/meta/plugins/test`, method: 'POST', @@ -4711,10 +4877,10 @@ export class Api< * @tags Plugin * @name Update * @request PATCH:/api/v1/db/meta/plugins/{pluginId} - * @response `200` `PluginType` OK + * @response `200` `PluginReqType` OK */ update: (pluginId: string, data: PluginType, params: RequestParams = {}) => - this.request({ + this.request({ path: `/api/v1/db/meta/plugins/${pluginId}`, method: 'PATCH', body: data, @@ -4764,7 +4930,7 @@ export class Api< * @name Create * @request POST:/api/v1/db/meta/projects/{projectId}/api-tokens * @response `200` `void` OK - * @response `201` `ApiTokenType` Created + * @response `201` `ApiTokenReqType` Created */ create: ( projectId: string, diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index c63e48dd18..1f94426e0a 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -13,6 +13,7 @@ "@graphql-tools/merge": "^6.0.12", "@sentry/node": "^6.3.5", "airtable": "^0.11.3", + "ajv": "^8.12.0", "archiver": "^5.0.2", "auto-bind": "^4.0.0", "aws-sdk": "^2.829.0", @@ -658,6 +659,22 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.15.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", @@ -682,6 +699,12 @@ "node": ">= 4" } }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -2215,13 +2238,13 @@ "integrity": "sha512-x5W9s+8P4XteaxT/jKF0PSb7XEvo5VmqEWgsMlyeY4ZlLK8I6aH6g5TPPyDlLAep+GYf4kefb7HFyc7PAO3m+Q==" }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -2238,15 +2261,6 @@ "ajv": ">=5.0.0" } }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -5957,6 +5971,22 @@ "@babel/highlight": "^7.10.4" } }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/eslint/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -6042,6 +6072,12 @@ "node": ">= 4" } }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/eslint/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -8002,6 +8038,26 @@ "node": ">=6" } }, + "node_modules/har-validator/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/har-validator/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -9465,9 +9521,9 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -13898,7 +13954,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -14179,6 +14234,37 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/scmp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/scmp/-/scmp-2.1.0.tgz", @@ -15573,22 +15659,6 @@ "node": ">=10.0.0" } }, - "node_modules/table/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/table/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -15598,12 +15668,6 @@ "node": ">=8" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "node_modules/table/node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -18168,6 +18232,31 @@ "node": ">=0.4.0" } }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/webpack/node_modules/braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", @@ -18303,6 +18392,12 @@ "node": ">=0.10.0" } }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/webpack/node_modules/json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", @@ -19500,6 +19595,18 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "globals": { "version": "13.15.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.15.0.tgz", @@ -19515,6 +19622,12 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -20789,13 +20902,13 @@ } }, "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, @@ -20806,13 +20919,6 @@ "dev": true, "requires": {} }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} - }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -23538,6 +23644,18 @@ "@babel/highlight": "^7.10.4" } }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -23592,6 +23710,12 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -25352,6 +25476,24 @@ "requires": { "ajv": "^6.12.3", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + } } }, "has": { @@ -26420,9 +26562,9 @@ "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -29930,8 +30072,7 @@ "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "require-main-filename": { "version": "2.0.0", @@ -30138,6 +30279,33 @@ "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } } }, "scmp": { @@ -31273,30 +31441,12 @@ "strip-ansi": "^6.0.1" }, "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, "slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", @@ -32978,6 +33128,25 @@ "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", @@ -33095,6 +33264,12 @@ } } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "json5": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 87bcff9e79..0b77966f58 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -53,6 +53,7 @@ "@graphql-tools/merge": "^6.0.12", "@sentry/node": "^6.3.5", "airtable": "^0.11.3", + "ajv": "^8.12.0", "archiver": "^5.0.2", "auto-bind": "^4.0.0", "aws-sdk": "^2.829.0", diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts index 704225e569..e12dd700e6 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/CustomKnex.ts @@ -1,5 +1,6 @@ import { Knex, knex } from 'knex'; import { SnowflakeClient } from 'nc-help'; +import { FilterType } from 'nocodb-sdk'; const types = require('pg').types; // override parsing date column to Date() @@ -1248,7 +1249,13 @@ knex.QueryBuilder.extend('conditionv2', function (conditionObj: Filter) { return parseConditionv2(conditionObj, this); } as any); -const parseConditionv2 = (obj: Filter, qb: Knex.QueryBuilder) => { +const parseConditionv2 = (_obj: Filter | FilterType, qb: Knex.QueryBuilder) => { + let obj: Filter; + if (_obj instanceof Filter) { + obj = _obj; + } else { + obj = new Filter(_obj); + } if (obj.is_group) { qb = qb.where(function () { const children = obj.children; diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts index 67834641d9..8b8c3def97 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/helpers/getAst.ts @@ -81,13 +81,13 @@ const getAst = async ({ ...(await obj), [col.title]: allowedCols && (!includePkByDefault || !col.pk) - ? (allowedCols[col.id] && + ? allowedCols[col.id] && (!isSystemColumn(col) || view.show_system_fields) && (!fields?.length || fields.includes(col.title)) && - value) - : (fields?.length + value + : fields?.length ? fields.includes(col.title) && value - : value), + : value, }; }, Promise.resolve({})); }; diff --git a/packages/nocodb/src/lib/meta/api/apiTokenApis.ts b/packages/nocodb/src/lib/meta/api/apiTokenApis.ts index dea013346d..5ed4c08094 100644 --- a/packages/nocodb/src/lib/meta/api/apiTokenApis.ts +++ b/packages/nocodb/src/lib/meta/api/apiTokenApis.ts @@ -5,6 +5,7 @@ import { NcError } from '../helpers/catchError'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import ApiToken from '../../models/ApiToken'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function apiTokenList(req: Request, res: Response) { res.json(await ApiToken.list(req['user'].id)); @@ -40,6 +41,7 @@ router.get( router.post( '/api/v1/db/meta/projects/:projectId/api-tokens', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ApiTokenReq'), ncMetaAclMw(apiTokenCreate, 'apiTokenCreate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/auditApis.ts b/packages/nocodb/src/lib/meta/api/auditApis.ts index a9c6b89dcd..fdf9f70daf 100644 --- a/packages/nocodb/src/lib/meta/api/auditApis.ts +++ b/packages/nocodb/src/lib/meta/api/auditApis.ts @@ -6,6 +6,7 @@ import { PagedResponseImpl } from '../helpers/PagedResponse'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import DOMPurify from 'isomorphic-dompurify'; +import { getAjvValidatorMw } from './helpers'; export async function commentRow(req: Request, res) { res.json( @@ -69,10 +70,12 @@ router.get( ); router.post( '/api/v1/db/meta/audits/comments', + getAjvValidatorMw('swagger.json#/components/schemas/CommentReq'), ncMetaAclMw(commentRow, 'commentRow') ); router.post( '/api/v1/db/meta/audits/rows/:rowId/update', + getAjvValidatorMw('swagger.json#/components/schemas/AuditRowUpdateReq'), ncMetaAclMw(auditRowUpdate, 'auditRowUpdate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/baseApis.ts b/packages/nocodb/src/lib/meta/api/baseApis.ts index 9b81d8e06b..c13bbd18d3 100644 --- a/packages/nocodb/src/lib/meta/api/baseApis.ts +++ b/packages/nocodb/src/lib/meta/api/baseApis.ts @@ -7,7 +7,7 @@ import Base from '../../models/Base'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { Tele } from 'nc-help'; import { metaApiMetrics } from '../helpers/apiMetrics'; -import { populateMeta } from './helpers'; +import { getAjvValidatorMw, populateMeta } from './helpers'; export async function baseGet( req: Request, @@ -107,6 +107,7 @@ export default (router) => { router.patch( '/api/v1/db/meta/projects/:projectId/bases/:baseId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/BaseReq'), ncMetaAclMw(baseUpdate, 'baseUpdate') ); router.delete( @@ -117,6 +118,7 @@ export default (router) => { router.post( '/api/v1/db/meta/projects/:projectId/bases', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/BaseReq'), ncMetaAclMw(baseCreate, 'baseCreate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/columnApis.ts b/packages/nocodb/src/lib/meta/api/columnApis.ts index ab36b0103c..a5e9e8e9ec 100644 --- a/packages/nocodb/src/lib/meta/api/columnApis.ts +++ b/packages/nocodb/src/lib/meta/api/columnApis.ts @@ -41,6 +41,7 @@ import formulaQueryBuilderv2 from '../../db/sql-data-mapper/lib/sql/formulav2/fo import { createHmAndBtColumn, generateFkName, + getAjvValidatorMw, randomID, validateLookupPayload, validateRequiredField, @@ -1785,6 +1786,7 @@ const router = Router({ mergeParams: true }); router.post( '/api/v1/db/meta/tables/:tableId/columns/', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ColumnReq'), ncMetaAclMw(columnAdd, 'columnAdd') ); diff --git a/packages/nocodb/src/lib/meta/api/filterApis.ts b/packages/nocodb/src/lib/meta/api/filterApis.ts index 0f3393229f..1be850b7d8 100644 --- a/packages/nocodb/src/lib/meta/api/filterApis.ts +++ b/packages/nocodb/src/lib/meta/api/filterApis.ts @@ -13,6 +13,7 @@ import Project from '../../models/Project'; import Filter from '../../models/Filter'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; // @ts-ignore export async function filterGet(req: Request, res: Response, next) { @@ -135,6 +136,7 @@ router.get( router.post( '/api/v1/db/meta/views/:viewId/filters', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FilterReq'), ncMetaAclMw(filterCreate, 'filterCreate') ); @@ -145,6 +147,7 @@ router.get( router.post( '/api/v1/db/meta/hooks/:hookId/filters', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FilterReq'), ncMetaAclMw(hookFilterCreate, 'filterCreate') ); @@ -156,6 +159,7 @@ router.get( router.patch( '/api/v1/db/meta/filters/:filterId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FilterReq'), ncMetaAclMw(filterUpdate, 'filterUpdate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/formViewApis.ts b/packages/nocodb/src/lib/meta/api/formViewApis.ts index d5932ea0d6..beadf3cded 100644 --- a/packages/nocodb/src/lib/meta/api/formViewApis.ts +++ b/packages/nocodb/src/lib/meta/api/formViewApis.ts @@ -13,6 +13,7 @@ import View from '../../models/View'; import FormView from '../../models/FormView'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; // @ts-ignore export async function formViewGet(req: Request, res: Response) { @@ -43,6 +44,7 @@ const router = Router({ mergeParams: true }); router.post( '/api/v1/db/meta/tables/:tableId/forms', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FormCreateReq'), ncMetaAclMw(formViewCreate, 'formViewCreate') ); router.get( @@ -53,6 +55,7 @@ router.get( router.patch( '/api/v1/db/meta/forms/:formViewId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FormReq'), ncMetaAclMw(formViewUpdate, 'formViewUpdate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/formViewColumnApis.ts b/packages/nocodb/src/lib/meta/api/formViewColumnApis.ts index 0485cb79be..bad2f91b0a 100644 --- a/packages/nocodb/src/lib/meta/api/formViewColumnApis.ts +++ b/packages/nocodb/src/lib/meta/api/formViewColumnApis.ts @@ -3,6 +3,7 @@ import FormViewColumn from '../../models/FormViewColumn'; import { Tele } from 'nc-help'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function columnUpdate(req: Request, res: Response) { Tele.emit('evt', { evt_type: 'formViewColumn:updated' }); @@ -13,6 +14,7 @@ const router = Router({ mergeParams: true }); router.patch( '/api/v1/db/meta/form-columns/:formViewColumnId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FormColumnReq'), ncMetaAclMw(columnUpdate, 'columnUpdate') ); export default router; diff --git a/packages/nocodb/src/lib/meta/api/galleryViewApis.ts b/packages/nocodb/src/lib/meta/api/galleryViewApis.ts index 56ca905ffb..2c6c79db9e 100644 --- a/packages/nocodb/src/lib/meta/api/galleryViewApis.ts +++ b/packages/nocodb/src/lib/meta/api/galleryViewApis.ts @@ -5,6 +5,7 @@ import GalleryView from '../../models/GalleryView'; import { Tele } from 'nc-help'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function galleryViewGet(req: Request, res: Response) { res.json(await GalleryView.get(req.params.galleryViewId)); } @@ -29,11 +30,13 @@ const router = Router({ mergeParams: true }); router.post( '/api/v1/db/meta/tables/:tableId/galleries', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/GalleryReq'), ncMetaAclMw(galleryViewCreate, 'galleryViewCreate') ); router.patch( '/api/v1/db/meta/galleries/:galleryViewId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/GalleryReq'), ncMetaAclMw(galleryViewUpdate, 'galleryViewUpdate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/gridViewApis.ts b/packages/nocodb/src/lib/meta/api/gridViewApis.ts index 80f8574efb..96880398cb 100644 --- a/packages/nocodb/src/lib/meta/api/gridViewApis.ts +++ b/packages/nocodb/src/lib/meta/api/gridViewApis.ts @@ -13,6 +13,7 @@ import View from '../../models/View'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; import GridView from '../../models/GridView'; +import { getAjvValidatorMw } from './helpers'; // @ts-ignore export async function gridViewCreate(req: Request, res) { @@ -35,6 +36,7 @@ const router = Router({ mergeParams: true }); router.post( '/api/v1/db/meta/tables/:tableId/grids/', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/GridReq'), ncMetaAclMw(gridViewCreate, 'gridViewCreate') ); router.patch( diff --git a/packages/nocodb/src/lib/meta/api/gridViewColumnApis.ts b/packages/nocodb/src/lib/meta/api/gridViewColumnApis.ts index b19147a323..28669a6a2f 100644 --- a/packages/nocodb/src/lib/meta/api/gridViewColumnApis.ts +++ b/packages/nocodb/src/lib/meta/api/gridViewColumnApis.ts @@ -3,6 +3,7 @@ import GridViewColumn from '../../models/GridViewColumn'; import { Tele } from 'nc-help'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function columnList(req: Request, res: Response) { res.json(await GridViewColumn.list(req.params.gridViewId)); @@ -22,6 +23,7 @@ router.get( router.patch( '/api/v1/db/meta/grid-columns/:gridViewColumnId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/GridColumnReq'), ncMetaAclMw(gridColumnUpdate, 'gridColumnUpdate') ); export default router; diff --git a/packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts b/packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts index 4ffeeb82b6..49d1fbc462 100644 --- a/packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts +++ b/packages/nocodb/src/lib/meta/api/helpers/apiHelpers.ts @@ -1,4 +1,38 @@ +import { NextFunction, Request, Response } from 'express'; +import Ajv, { ErrorObject } from 'ajv'; +// @ts-ignore +import swagger from '../../../../schema/swagger.json'; + export function parseHrtimeToSeconds(hrtime) { const seconds = (hrtime[0] + hrtime[1] / 1e6).toFixed(3); return seconds; } + +const ajv = new Ajv({ strictSchema: false, strict: false }); // Initialize AJV + +ajv.addSchema(swagger, 'swagger.json'); + +// A middleware generator to validate the request body +export const getAjvValidatorMw = (schema) => { + return (req: Request, res: Response, next: NextFunction) => { + // Validate the request body against the schema + const valid = ajv.validate( + typeof schema === 'string' ? { $ref: schema } : schema, + req.body + ); + + // If the request body is valid, call the next middleware + if (valid) { + next(); + } else { + const errors: ErrorObject[] | null | undefined = ajv.errors; + + // If the request body is invalid, send a response with an error message + res.status(400).json({ + status: 'error', + message: 'Invalid request body', + errors, + }); + } + }; +}; diff --git a/packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts b/packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts index bc331105ba..daf9344126 100644 --- a/packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts +++ b/packages/nocodb/src/lib/meta/api/helpers/columnHelpers.ts @@ -3,6 +3,7 @@ import { ColumnReqType, LinkToAnotherRecordType, LookupColumnReqType, + BoolType, RelationTypes, RollupColumnReqType, TableType, @@ -27,7 +28,7 @@ export async function createHmAndBtColumn( type?: RelationTypes, alias?: string, fkColName?: string, - virtual = false, + virtual: BoolType = false, isSystemCol = false ) { // save bt column diff --git a/packages/nocodb/src/lib/meta/api/hookApis.ts b/packages/nocodb/src/lib/meta/api/hookApis.ts index cde045c5e6..bf0b29b6ec 100644 --- a/packages/nocodb/src/lib/meta/api/hookApis.ts +++ b/packages/nocodb/src/lib/meta/api/hookApis.ts @@ -9,6 +9,7 @@ import Model from '../../models/Model'; import populateSamplePayload from '../helpers/populateSamplePayload'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function hookList( req: Request, @@ -85,11 +86,13 @@ router.get( router.post( '/api/v1/db/meta/tables/:tableId/hooks/test', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/HookTestReq'), ncMetaAclMw(hookTest, 'hookTest') ); router.post( '/api/v1/db/meta/tables/:tableId/hooks', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/HookReq'), ncMetaAclMw(hookCreate, 'hookCreate') ); router.delete( @@ -100,6 +103,7 @@ router.delete( router.patch( '/api/v1/db/meta/hooks/:hookId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/HookReq'), ncMetaAclMw(hookUpdate, 'hookUpdate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/hookFilterApis.ts b/packages/nocodb/src/lib/meta/api/hookFilterApis.ts index 4e714479ed..7b182fcab4 100644 --- a/packages/nocodb/src/lib/meta/api/hookFilterApis.ts +++ b/packages/nocodb/src/lib/meta/api/hookFilterApis.ts @@ -13,6 +13,7 @@ import Project from '../../models/Project'; import Filter from '../../models/Filter'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; // @ts-ignore export async function filterGet(req: Request, res: Response, next) { @@ -117,6 +118,7 @@ router.get( router.post( '/hooks/:hookId/filters/', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FilterReq'), ncMetaAclMw(filterCreate, 'filterCreate') ); router.get( @@ -127,6 +129,7 @@ router.get( router.patch( '/hooks/:hookId/filters/:filterId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/FilterReq'), ncMetaAclMw(filterUpdate, 'filterUpdate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/kanbanViewApis.ts b/packages/nocodb/src/lib/meta/api/kanbanViewApis.ts index df94f1fe94..c8d864bf82 100644 --- a/packages/nocodb/src/lib/meta/api/kanbanViewApis.ts +++ b/packages/nocodb/src/lib/meta/api/kanbanViewApis.ts @@ -5,6 +5,7 @@ import KanbanView from '../../models/KanbanView'; import { Tele } from 'nc-help'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function kanbanViewGet(req: Request, res: Response) { res.json(await KanbanView.get(req.params.kanbanViewId)); @@ -31,11 +32,13 @@ const router = Router({ mergeParams: true }); router.post( '/api/v1/db/meta/tables/:tableId/kanbans', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/KanbanReq'), ncMetaAclMw(kanbanViewCreate, 'kanbanViewCreate') ); router.patch( '/api/v1/db/meta/kanbans/:kanbanViewId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/KanbanUpdateReq'), ncMetaAclMw(kanbanViewUpdate, 'kanbanViewUpdate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/mapViewApis.ts b/packages/nocodb/src/lib/meta/api/mapViewApis.ts index ca0dcca4ed..5771284da4 100644 --- a/packages/nocodb/src/lib/meta/api/mapViewApis.ts +++ b/packages/nocodb/src/lib/meta/api/mapViewApis.ts @@ -28,6 +28,7 @@ export async function mapViewUpdate(req, res) { const router = Router({ mergeParams: true }); +// todo: add schema in swagger and use getAjvValidatorMw router.post( '/api/v1/db/meta/tables/:tableId/maps', metaApiMetrics, diff --git a/packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts b/packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts index 3504418a0a..26dc965bb1 100644 --- a/packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts +++ b/packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts @@ -4,6 +4,7 @@ import { Router } from 'express'; import { Tele } from 'nc-help'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; async function xcVisibilityMetaSetAll(req, res) { Tele.emit('evt', { evt_type: 'uiAcl:updated' }); for (const d of req.body) { @@ -122,6 +123,7 @@ router.get( router.post( '/api/v1/db/meta/projects/:projectId/visibility-rules', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/VisibilityRuleReq'), ncMetaAclMw(xcVisibilityMetaSetAll, 'modelVisibilitySet') ); export default router; diff --git a/packages/nocodb/src/lib/meta/api/orgLicenseApis.ts b/packages/nocodb/src/lib/meta/api/orgLicenseApis.ts index 7bbbd43106..ec13f4f9e7 100644 --- a/packages/nocodb/src/lib/meta/api/orgLicenseApis.ts +++ b/packages/nocodb/src/lib/meta/api/orgLicenseApis.ts @@ -5,6 +5,7 @@ import Store from '../../models/Store'; import Noco from '../../Noco'; import { metaApiMetrics } from '../helpers/apiMetrics'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; +import { getAjvValidatorMw } from './helpers'; async function licenseGet(_req, res) { const license = await Store.get(NC_LICENSE_KEY); @@ -30,6 +31,7 @@ router.get( router.post( '/api/v1/license', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/LicenseReq'), ncMetaAclMw(licenseSet, 'licenseSet', { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, diff --git a/packages/nocodb/src/lib/meta/api/orgTokenApis.ts b/packages/nocodb/src/lib/meta/api/orgTokenApis.ts index a9f1f9fc14..300a804c4e 100644 --- a/packages/nocodb/src/lib/meta/api/orgTokenApis.ts +++ b/packages/nocodb/src/lib/meta/api/orgTokenApis.ts @@ -8,6 +8,7 @@ import getHandler from '../helpers/getHandler'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { PagedResponseImpl } from '../helpers/PagedResponse'; import { apiTokenListEE } from './ee/orgTokenApis'; +import { getAjvValidatorMw } from './helpers'; async function apiTokenList(req, res) { const fk_user_id = req.user.id; @@ -65,6 +66,7 @@ router.get( router.post( '/api/v1/tokens', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ApiTokenReq'), ncMetaAclMw(apiTokenCreate, 'apiTokenCreate', { // allowedRoles: [OrgUserRoles.SUPER], blockApiTokenAccess: true, diff --git a/packages/nocodb/src/lib/meta/api/orgUserApis.ts b/packages/nocodb/src/lib/meta/api/orgUserApis.ts index f9d5e077f7..62c3cdf2aa 100644 --- a/packages/nocodb/src/lib/meta/api/orgUserApis.ts +++ b/packages/nocodb/src/lib/meta/api/orgUserApis.ts @@ -22,6 +22,7 @@ import { extractProps } from '../helpers/extractProps'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { PagedResponseImpl } from '../helpers/PagedResponse'; import { randomTokenString } from '../helpers/stringHelpers'; +import { getAjvValidatorMw } from './helpers'; import { sendInviteEmail } from './projectUserApis'; async function userList(req, res) { @@ -266,6 +267,7 @@ router.get( router.patch( '/api/v1/users/:userId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/OrgUserReq'), ncMetaAclMw(userUpdate, 'userUpdate', { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, @@ -282,6 +284,7 @@ router.delete( router.post( '/api/v1/users', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/OrgUserReq'), ncMetaAclMw(userAdd, 'userAdd', { allowedRoles: [OrgUserRoles.SUPER_ADMIN], blockApiTokenAccess: true, diff --git a/packages/nocodb/src/lib/meta/api/pluginApis.ts b/packages/nocodb/src/lib/meta/api/pluginApis.ts index e0a39646af..6934e17b41 100644 --- a/packages/nocodb/src/lib/meta/api/pluginApis.ts +++ b/packages/nocodb/src/lib/meta/api/pluginApis.ts @@ -6,6 +6,7 @@ import { PluginType } from 'nocodb-sdk'; import NcPluginMgrv2 from '../helpers/NcPluginMgrv2'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; export async function pluginList(_req: Request, res: Response) { res.json(new PagedResponseImpl(await Plugin.list())); @@ -43,6 +44,8 @@ router.get( router.post( '/api/v1/db/meta/plugins/test', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/PluginTestReq'), + ncMetaAclMw(pluginTest, 'pluginTest') ); router.get( @@ -53,6 +56,7 @@ router.get( router.patch( '/api/v1/db/meta/plugins/:pluginId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/PluginReq'), ncMetaAclMw(pluginUpdate, 'pluginUpdate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/projectApis.ts b/packages/nocodb/src/lib/meta/api/projectApis.ts index 7accf2d075..3c5b536e05 100644 --- a/packages/nocodb/src/lib/meta/api/projectApis.ts +++ b/packages/nocodb/src/lib/meta/api/projectApis.ts @@ -18,7 +18,7 @@ import { metaApiMetrics } from '../helpers/apiMetrics'; import { extractPropsAndSanitize } from '../helpers/extractProps'; import NcConfigFactory from '../../utils/NcConfigFactory'; import { promisify } from 'util'; -import { populateMeta } from './helpers'; +import { getAjvValidatorMw, populateMeta } from './helpers'; import Filter from '../../models/Filter'; const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 4); @@ -272,6 +272,7 @@ export default (router) => { router.post( '/api/v1/db/meta/projects', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ProjectReq'), ncMetaAclMw(projectCreate, 'projectCreate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/projectUserApis.ts b/packages/nocodb/src/lib/meta/api/projectUserApis.ts index e0165452ac..3f0610fee6 100644 --- a/packages/nocodb/src/lib/meta/api/projectUserApis.ts +++ b/packages/nocodb/src/lib/meta/api/projectUserApis.ts @@ -17,6 +17,7 @@ import Noco from '../../Noco'; import { PluginCategory } from 'nocodb-sdk'; import { metaApiMetrics } from '../helpers/apiMetrics'; import { randomTokenString } from '../helpers/stringHelpers'; +import { getAjvValidatorMw } from './helpers'; async function userList(req, res) { res.json({ @@ -310,11 +311,13 @@ router.get( router.post( '/api/v1/db/meta/projects/:projectId/users', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ProjectUserReq'), ncMetaAclMw(userInvite, 'userInvite') ); router.patch( '/api/v1/db/meta/projects/:projectId/users/:userId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/ProjectUserReq'), ncMetaAclMw(projectUserUpdate, 'projectUserUpdate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts b/packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts index b756424fdc..bb678b10f3 100644 --- a/packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts +++ b/packages/nocodb/src/lib/meta/api/publicApis/publicDataApis.ts @@ -28,7 +28,7 @@ export async function dataList(req: Request, res: Response) { if ( view.type !== ViewTypes.GRID && view.type !== ViewTypes.KANBAN && - view.type !== ViewTypes.GALLERY && + view.type !== ViewTypes.GALLERY && view.type !== ViewTypes.MAP ) { NcError.notFound('Not found'); diff --git a/packages/nocodb/src/lib/meta/api/sharedBaseApis.ts b/packages/nocodb/src/lib/meta/api/sharedBaseApis.ts index e1ce599a8f..c232327aa8 100644 --- a/packages/nocodb/src/lib/meta/api/sharedBaseApis.ts +++ b/packages/nocodb/src/lib/meta/api/sharedBaseApis.ts @@ -4,6 +4,7 @@ import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { v4 as uuidv4 } from 'uuid'; import Project from '../../models/Project'; import { NcError } from '../helpers/catchError'; +import { getAjvValidatorMw } from './helpers'; // todo: load from config const config = { dashboardPath: '/nc', @@ -96,10 +97,12 @@ router.get( ); router.post( '/api/v1/db/meta/projects/:projectId/shared', + getAjvValidatorMw('swagger.json#/components/schemas/SharedBaseReq'), ncMetaAclMw(createSharedBaseLink, 'createSharedBaseLink') ); router.patch( '/api/v1/db/meta/projects/:projectId/shared', + getAjvValidatorMw('swagger.json#/components/schemas/SharedBaseReq'), ncMetaAclMw(updateSharedBaseLink, 'updateSharedBaseLink') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/sortApis.ts b/packages/nocodb/src/lib/meta/api/sortApis.ts index 60cb02953e..5341d07cba 100644 --- a/packages/nocodb/src/lib/meta/api/sortApis.ts +++ b/packages/nocodb/src/lib/meta/api/sortApis.ts @@ -12,6 +12,7 @@ import Project from '../../models/Project'; import Sort from '../../models/Sort'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; import { metaApiMetrics } from '../helpers/apiMetrics'; +import { getAjvValidatorMw } from './helpers'; // @ts-ignore export async function sortGet(req: Request, res: Response) {} @@ -58,6 +59,7 @@ router.get( router.post( '/api/v1/db/meta/views/:viewId/sorts/', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/SortReq'), ncMetaAclMw(sortCreate, 'sortCreate') ); router.get( @@ -68,6 +70,7 @@ router.get( router.patch( '/api/v1/db/meta/sorts/:sortId', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/SortReq'), ncMetaAclMw(sortUpdate, 'sortUpdate') ); router.delete( diff --git a/packages/nocodb/src/lib/meta/api/tableApis.ts b/packages/nocodb/src/lib/meta/api/tableApis.ts index b47fa5e5e6..4c5d6856a5 100644 --- a/packages/nocodb/src/lib/meta/api/tableApis.ts +++ b/packages/nocodb/src/lib/meta/api/tableApis.ts @@ -8,6 +8,7 @@ import { AuditOperationTypes, isVirtualCol, ModelTypes, + NormalColumnRequestType, TableListType, TableReqType, TableType, @@ -17,6 +18,7 @@ import ProjectMgrv2 from '../../db/sql-mgr/v2/ProjectMgrv2'; import Project from '../../models/Project'; import Audit from '../../models/Audit'; import ncMetaAclMw from '../helpers/ncMetaAclMw'; +import { getAjvValidatorMw } from './helpers'; import { xcVisibilityMetaGet } from './modelVisibilityApis'; import View from '../../models/View'; import getColumnPropsFromUIDT from '../helpers/getColumnPropsFromUIDT'; @@ -216,10 +218,13 @@ export async function tableCreate(req: Request, res) { columns: columns.map((c, i) => { const colMetaFromReq = req.body?.columns?.find( (c1) => c.cn === c1.column_name - ); + ) as NormalColumnRequestType; return { ...colMetaFromReq, - uidt: colMetaFromReq?.uidt || c.uidt || getColumnUiType(base, c), + uidt: + (colMetaFromReq?.uidt as string) || + c.uidt || + getColumnUiType(base, c), ...c, dtxp: [UITypes.MultiSelect, UITypes.SingleSelect].includes( colMetaFromReq.uidt as any @@ -229,7 +234,7 @@ export async function tableCreate(req: Request, res) { title: colMetaFromReq?.title || getColumnNameAlias(c.cn, base), column_name: c.cn, order: i + 1, - }; + } as NormalColumnRequestType; }), order: +(tables?.pop()?.order ?? 0) + 1, }) @@ -410,11 +415,13 @@ router.get( router.post( '/api/v1/db/meta/projects/:projectId/tables', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/TableReq'), ncMetaAclMw(tableCreate, 'tableCreate') ); router.post( '/api/v1/db/meta/projects/:projectId/:baseId/tables', metaApiMetrics, + getAjvValidatorMw('swagger.json#/components/schemas/TableReq'), ncMetaAclMw(tableCreate, 'tableCreate') ); router.get( diff --git a/packages/nocodb/src/lib/meta/api/userApi/userApis.ts b/packages/nocodb/src/lib/meta/api/userApi/userApis.ts index 63aadfc393..4d5b5ce7c5 100644 --- a/packages/nocodb/src/lib/meta/api/userApi/userApis.ts +++ b/packages/nocodb/src/lib/meta/api/userApi/userApis.ts @@ -22,6 +22,7 @@ import extractProjectIdAndAuthenticate from '../../helpers/extractProjectIdAndAu import ncMetaAclMw from '../../helpers/ncMetaAclMw'; import { MetaTable } from '../../../utils/globals'; import Noco from '../../../Noco'; +import { getAjvValidatorMw } from '../helpers'; import { genJwt } from './helpers'; import { randomTokenString } from '../../helpers/stringHelpers'; @@ -523,15 +524,32 @@ async function renderPasswordReset(req, res): Promise { const mapRoutes = (router) => { // todo: old api - /auth/signup?tool=1 - router.post('/auth/user/signup', catchError(signup)); - router.post('/auth/user/signin', catchError(signin)); + router.post( + '/auth/user/signup', + getAjvValidatorMw('swagger.json#/components/schemas/SignUpReq'), + catchError(signup) + ); + router.post( + '/auth/user/signin', + getAjvValidatorMw('swagger.json#/components/schemas/SignInReq'), + catchError(signin) + ); router.get('/auth/user/me', extractProjectIdAndAuthenticate, catchError(me)); - router.post('/auth/password/forgot', catchError(passwordForgot)); + router.post( + '/auth/password/forgot', + getAjvValidatorMw('swagger.json#/components/schemas/ForgotPasswordReq'), + catchError(passwordForgot) + ); router.post('/auth/token/validate/:tokenId', catchError(tokenValidate)); - router.post('/auth/password/reset/:tokenId', catchError(passwordReset)); + router.post( + '/auth/password/reset/:tokenId', + getAjvValidatorMw('swagger.json#/components/schemas/PasswordResetReq'), + catchError(passwordReset) + ); router.post('/auth/email/validate/:tokenId', catchError(emailVerification)); router.post( '/user/password/change', + getAjvValidatorMw('swagger.json#/components/schemas/PasswordChangeReq'), ncMetaAclMw(passwordChange, 'passwordChange') ); router.post('/auth/token/refresh', catchError(refreshToken)); @@ -549,20 +567,33 @@ const mapRoutes = (router) => { ); // deprecated APIs - router.post('/api/v1/db/auth/user/signup', catchError(signup)); - router.post('/api/v1/db/auth/user/signin', catchError(signin)); + router.post( + '/api/v1/db/auth/user/signup', + getAjvValidatorMw('swagger.json#/components/schemas/SignUpReq'), + catchError(signup) + ); + router.post( + '/api/v1/db/auth/user/signin', + getAjvValidatorMw('swagger.json#/components/schemas/SignInReq'), + catchError(signin) + ); router.get( '/api/v1/db/auth/user/me', extractProjectIdAndAuthenticate, catchError(me) ); - router.post('/api/v1/db/auth/password/forgot', catchError(passwordForgot)); + router.post( + '/api/v1/db/auth/password/forgot', + getAjvValidatorMw('swagger.json#/components/schemas/ForgotPasswordReq'), + catchError(passwordForgot) + ); router.post( '/api/v1/db/auth/token/validate/:tokenId', catchError(tokenValidate) ); router.post( '/api/v1/db/auth/password/reset/:tokenId', + getAjvValidatorMw('swagger.json#/components/schemas/PasswordResetReq'), catchError(passwordReset) ); router.post( @@ -571,6 +602,7 @@ const mapRoutes = (router) => { ); router.post( '/api/v1/db/auth/password/change', + getAjvValidatorMw('swagger.json#/components/schemas/PasswordChangeReq'), ncMetaAclMw(passwordChange, 'passwordChange') ); router.post('/api/v1/db/auth/token/refresh', catchError(refreshToken)); @@ -580,14 +612,26 @@ const mapRoutes = (router) => { ); // new API - router.post('/api/v1/auth/user/signup', catchError(signup)); - router.post('/api/v1/auth/user/signin', catchError(signin)); + router.post( + '/api/v1/auth/user/signup', + getAjvValidatorMw('swagger.json#/components/schemas/SignUpReq'), + catchError(signup) + ); + router.post( + '/api/v1/auth/user/signin', + getAjvValidatorMw('swagger.json#/components/schemas/SignInReq'), + catchError(signin) + ); router.get( '/api/v1/auth/user/me', extractProjectIdAndAuthenticate, catchError(me) ); - router.post('/api/v1/auth/password/forgot', catchError(passwordForgot)); + router.post( + '/api/v1/auth/password/forgot', + getAjvValidatorMw('swagger.json#/components/schemas/ForgotPasswordReq'), + catchError(passwordForgot) + ); router.post( '/api/v1/auth/token/validate/:tokenId', catchError(tokenValidate) @@ -602,6 +646,7 @@ const mapRoutes = (router) => { ); router.post( '/api/v1/auth/password/change', + getAjvValidatorMw('swagger.json#/components/schemas/PasswordChangeReq'), ncMetaAclMw(passwordChange, 'passwordChange') ); router.post('/api/v1/auth/token/refresh', catchError(refreshToken)); diff --git a/packages/nocodb/src/lib/meta/api/viewApis.ts b/packages/nocodb/src/lib/meta/api/viewApis.ts index 996fe81de4..b062a2b2ef 100644 --- a/packages/nocodb/src/lib/meta/api/viewApis.ts +++ b/packages/nocodb/src/lib/meta/api/viewApis.ts @@ -89,7 +89,6 @@ async function showAllColumns(req: Request, res) { } async function hideAllColumns(req: Request, res) { - res.json( await View.hideAllColumns( req.params.viewId, diff --git a/packages/nocodb/src/lib/meta/helpers/catchError.ts b/packages/nocodb/src/lib/meta/helpers/catchError.ts index 95e2d94cea..1c3393ed0d 100644 --- a/packages/nocodb/src/lib/meta/helpers/catchError.ts +++ b/packages/nocodb/src/lib/meta/helpers/catchError.ts @@ -1,3 +1,371 @@ +enum DBError { + TABLE_EXIST = 'TABLE_EXIST', + TABLE_NOT_EXIST = 'TABLE_NOT_EXIST', + COLUMN_EXIST = 'COLUMN_EXIST', + COLUMN_NOT_EXIST = 'COLUMN_NOT_EXIST', + CONSTRAINT_EXIST = 'CONSTRAINT_EXIST', + CONSTRAINT_NOT_EXIST = 'CONSTRAINT_NOT_EXIST', +} + +// extract db errors using database error code +function extractDBError(error): { + type: DBError; + message: string; + info: any; + extra?: Record; +} | void { + if (!error.code) return; + + let message: string; + let extra: Record; + let type: DBError; + + switch (error.code) { + // sqlite errors + case 'SQLITE_BUSY': + message = 'The database is locked by another process or transaction.'; + break; + case 'SQLITE_CONSTRAINT': + { + const constraint = /FOREIGN KEY|UNIQUE/.test(error.message) + ? error.message.match(/FOREIGN KEY|UNIQUE/gi)?.join(' ') + : 'constraint'; + message = `A ${constraint} constraint was violated: ${error.message}`; + extra = { + constraint, + }; + } + break; + case 'SQLITE_CORRUPT': + message = 'The database file is corrupt.'; + break; + case 'SQLITE_ERROR': + message = 'A SQL error occurred.'; + + if (error.message) { + const noSuchTableMatch = error.message.match(/no such table: (\w+)/); + const tableAlreadyExistsMatch = error.message.match( + /SQLITE_ERROR: table `?(\w+)`? already exists/ + ); + + const duplicateColumnExistsMatch = error.message.match( + /SQLITE_ERROR: duplicate column name: (\w+)/ + ); + const unrecognizedTokenMatch = error.message.match( + /SQLITE_ERROR: unrecognized token: "(\w+)"/ + ); + const columnDoesNotExistMatch = error.message.match( + /SQLITE_ERROR: no such column: (\w+)/ + ); + const constraintFailedMatch = error.message.match( + /SQLITE_ERROR: constraint failed: (\w+)/ + ); + + if (noSuchTableMatch && noSuchTableMatch[1]) { + message = `The table '${noSuchTableMatch[1]}' does not exist.`; + type = DBError.TABLE_NOT_EXIST; + extra = { + table: noSuchTableMatch[1], + }; + } else if (tableAlreadyExistsMatch && tableAlreadyExistsMatch[1]) { + message = `The table '${tableAlreadyExistsMatch[1]}' already exists.`; + type = DBError.TABLE_EXIST; + extra = { + table: tableAlreadyExistsMatch[1], + }; + } else if (unrecognizedTokenMatch && unrecognizedTokenMatch[1]) { + message = `Unrecognized token: ${unrecognizedTokenMatch[1]}`; + extra = { + token: unrecognizedTokenMatch[1], + }; + } else if (columnDoesNotExistMatch && columnDoesNotExistMatch[1]) { + message = `The column ${columnDoesNotExistMatch[1]} does not exist.`; + type = DBError.COLUMN_NOT_EXIST; + extra = { + column: columnDoesNotExistMatch[1], + }; + } else if (constraintFailedMatch && constraintFailedMatch[1]) { + message = `A constraint failed: ${constraintFailedMatch[1]}`; + } else if ( + duplicateColumnExistsMatch && + duplicateColumnExistsMatch[1] + ) { + message = `The column '${duplicateColumnExistsMatch[1]}' already exists.`; + type = DBError.COLUMN_EXIST; + extra = { + column: duplicateColumnExistsMatch[1], + }; + } else { + const match = error.message.match(/SQLITE_ERROR:\s*(\w+)/); + if (match && match[1]) { + message = match[1]; + } + } + } + break; + case 'SQLITE_RANGE': + message = 'A column index is out of range.'; + break; + case 'SQLITE_SCHEMA': + message = 'The database schema has changed.'; + break; + + // mysql errors + case 'ER_TABLE_EXISTS_ERROR': + message = 'The table already exists.'; + + if (error.message) { + const extractTableNameMatch = error.message.match( + / Table '?(\w+)'? already exists/i + ); + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The table '${extractTableNameMatch[1]}' already exists.`; + type = DBError.TABLE_EXIST; + extra = { + table: extractTableNameMatch[1], + }; + } + } + break; + case 'ER_DUP_FIELDNAME': + message = 'The column already exists.'; + + if (error.message) { + const extractColumnNameMatch = error.message.match( + / Duplicate column name '(\w+)'/i + ); + if (extractColumnNameMatch && extractColumnNameMatch[1]) { + message = `The column '${extractColumnNameMatch[1]}' already exists.`; + type = DBError.COLUMN_EXIST; + extra = { + column: extractColumnNameMatch[1], + }; + } + } + + break; + case 'ER_NO_SUCH_TABLE': + message = 'The table does not exist.'; + + if (error.message) { + const missingTableMatch = error.message.match( + / Table '(?:\w+\.)?(\w+)' doesn't exist/i + ); + if (missingTableMatch && missingTableMatch[1]) { + message = `The table '${missingTableMatch[1]}' does not exist`; + type = DBError.TABLE_NOT_EXIST; + extra = { + table: missingTableMatch[1], + }; + } + } + + break; + case 'ER_DUP_ENTRY': + message = 'This record already exists.'; + break; + case 'ER_PARSE_ERROR': + message = 'There was a syntax error in your SQL query.'; + break; + case 'ER_NO_DEFAULT_FOR_FIELD': + message = 'A value is required for this field.'; + break; + case 'ER_BAD_NULL_ERROR': + message = 'A null value is not allowed for this field.'; + break; + case 'ER_DATA_TOO_LONG': + message = 'The data entered is too long for this field.'; + break; + case 'ER_BAD_FIELD_ERROR': + { + message = 'The field you are trying to access does not exist.'; + const extractColNameMatch = error.message.match( + / Unknown column '(\w+)' in 'field list'/i + ); + if (extractColNameMatch && extractColNameMatch[1]) { + message = `The column '${extractColNameMatch[1]}' does not exist.`; + type = DBError.COLUMN_NOT_EXIST; + extra = { + column: extractColNameMatch[1], + }; + } + } + break; + case 'ER_ACCESS_DENIED_ERROR': + message = 'You do not have permission to perform this action.'; + break; + case 'ER_LOCK_WAIT_TIMEOUT': + message = 'A timeout occurred while waiting for a table lock.'; + break; + case 'ER_NO_REFERENCED_ROW': + message = 'The referenced row does not exist.'; + break; + case 'ER_ROW_IS_REFERENCED': + message = 'This record is being referenced by other records.'; + break; + + // postgres errors + case '23505': + message = 'This record already exists.'; + break; + case '42601': + message = 'There was a syntax error in your SQL query.'; + break; + case '23502': + message = 'A value is required for this field.'; + break; + case '23503': + message = 'The referenced row does not exist.'; + break; + case '23514': + message = 'A null value is not allowed for this field.'; + break; + case '22001': + message = 'The data entered is too long for this field.'; + break; + case '28000': + message = 'You do not have permission to perform this action.'; + break; + case '40P01': + message = 'A timeout occurred while waiting for a table lock.'; + break; + case '23506': + message = 'This record is being referenced by other records.'; + break; + case '42P07': + message = 'The table already exists.'; + if (error.message) { + const extractTableNameMatch = error.message.match( + / relation "?(\w+)"? already exists/i + ); + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The table '${extractTableNameMatch[1]}' already exists.`; + type = DBError.TABLE_EXIST; + extra = { + table: extractTableNameMatch[1], + }; + } + } + break; + case '42701': + message = 'The column already exists.'; + if (error.message) { + const extractTableNameMatch = error.message.match( + / column "(\w+)" of relation "(\w+)" already exists/i + ); + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The column '${extractTableNameMatch[1]}' already exists.`; + type = DBError.COLUMN_EXIST; + extra = { + column: extractTableNameMatch[1], + }; + } + } + break; + case '42P01': + message = 'The table does not exist.'; + if (error.message) { + const extractTableNameMatch = error.message.match( + / relation "(\w+)" does not exist/i + ); + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The table '${extractTableNameMatch[1]}' does not exist.`; + type = DBError.TABLE_NOT_EXIST; + extra = { + table: extractTableNameMatch[1], + }; + } + } + break; + case '42703': + message = 'The column does not exist.'; + if (error.message) { + const extractTableNameMatch = error.message.match( + / column "(\w+)" does not exist/i + ); + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The column '${extractTableNameMatch[1]}' does not exist.`; + type = DBError.COLUMN_NOT_EXIST; + extra = { + column: extractTableNameMatch[1], + }; + } + } + break; + // mssql errors + case 'EREQUEST': + message = 'There was a syntax error in your SQL query.'; + if (error.message) { + const extractTableNameMatch = error.message.match( + / There is already an object named '(\w+)' in the database/i + ); + const extractDupColMatch = error.message.match( + / Column name '(\w+)' in table '(\w+)' is specified more than once/i + ); + const extractMissingTableMatch = error.message.match( + / Invalid object name '(\w+)'./i + ); + const extractMissingColMatch = error.message.match( + / Invalid column name '(\w+)'./i + ); + + if (extractTableNameMatch && extractTableNameMatch[1]) { + message = `The table '${extractTableNameMatch[1]}' already exists.`; + type = DBError.TABLE_EXIST; + extra = { + table: extractTableNameMatch[1], + }; + } else if (extractDupColMatch && extractDupColMatch[1]) { + message = `The column '${extractDupColMatch[1]}' already exists.`; + type = DBError.COLUMN_EXIST; + extra = { + column: extractDupColMatch[1], + }; + } else if (extractMissingTableMatch && extractMissingTableMatch[1]) { + message = `The table '${extractMissingTableMatch[1]}' does not exist`; + type = DBError.TABLE_NOT_EXIST; + extra = { + table: extractMissingTableMatch[1], + }; + } else if (extractMissingColMatch && extractMissingColMatch[1]) { + message = `The column '${extractMissingColMatch[1]}' does not exist`; + type = DBError.COLUMN_NOT_EXIST; + extra = { + column: extractMissingColMatch[1], + }; + } + } + break; + case 'ELOGIN': + message = 'You do not have permission to perform this action.'; + break; + case 'ETIMEOUT': + message = 'A timeout occurred while waiting for a table lock.'; + break; + case 'ECONNRESET': + message = 'The connection was reset.'; + break; + case 'ECONNREFUSED': + message = 'The connection was refused.'; + break; + case 'EHOSTUNREACH': + message = 'The host is unreachable.'; + break; + case 'EHOSTDOWN': + message = 'The host is down.'; + break; + } + + if (message) { + return { + message, + type, + extra, + info: { message: error.message, code: error.code }, + }; + } +} + export default function ( requestHandler: (req: any, res: any, next?: any) => any ) { @@ -8,6 +376,12 @@ export default function ( // todo: error log console.log(requestHandler.name ? `${requestHandler.name} ::` : '', e); + const dbError = extractDBError(e); + + if (dbError) { + return res.status(400).json(dbError); + } + if (e instanceof BadRequest) { return res.status(400).json({ msg: e.message }); } else if (e instanceof Unauthorized) { @@ -27,28 +401,38 @@ export default function ( } class BadRequest extends Error {} + class Unauthorized extends Error {} + class Forbidden extends Error {} + class NotFound extends Error {} + class InternalServerError extends Error {} + class NotImplemented extends Error {} export class NcError { static notFound(message = 'Not found') { throw new NotFound(message); } + static badRequest(message) { throw new BadRequest(message); } + static unauthorized(message) { throw new Unauthorized(message); } + static forbidden(message) { throw new Forbidden(message); } + static internalServerError(message = 'Internal server error') { throw new InternalServerError(message); } + static notImplemented(message = 'Not implemented') { throw new NotImplemented(message); } diff --git a/packages/nocodb/src/lib/models/Base.ts b/packages/nocodb/src/lib/models/Base.ts index 5ff4a4a5fd..9cd94bf75d 100644 --- a/packages/nocodb/src/lib/models/Base.ts +++ b/packages/nocodb/src/lib/models/Base.ts @@ -7,7 +7,7 @@ import { MetaTable, } from '../utils/globals'; import Model from './Model'; -import { BaseType, UITypes } from 'nocodb-sdk'; +import { BaseType, BoolType, UITypes } from 'nocodb-sdk'; import NocoCache from '../cache/NocoCache'; import CryptoJS from 'crypto-js'; import { extractProps } from '../meta/helpers/extractProps'; @@ -20,14 +20,14 @@ export default class Base implements BaseType { project_id?: string; alias?: string; type?: string; - is_meta?: boolean; + is_meta?: BoolType; config?: any; created_at?: any; updated_at?: any; inflection_column?: string; inflection_table?: string; order?: number; - enabled?: boolean; + enabled?: BoolType; constructor(base: Partial) { Object.assign(this, base); diff --git a/packages/nocodb/src/lib/models/Filter.ts b/packages/nocodb/src/lib/models/Filter.ts index 2f69aa66f3..86fb224028 100644 --- a/packages/nocodb/src/lib/models/Filter.ts +++ b/packages/nocodb/src/lib/models/Filter.ts @@ -9,7 +9,7 @@ import { MetaTable, } from '../utils/globals'; import View from './View'; -import { FilterType, UITypes } from 'nocodb-sdk'; +import { BoolType, FilterType, UITypes } from 'nocodb-sdk'; import NocoCache from '../cache/NocoCache'; import { NcError } from '../meta/helpers/catchError'; import { extractProps } from '../meta/helpers/extractProps'; @@ -78,7 +78,7 @@ export default class Filter { value?: string; logical_op?: string; - is_group?: boolean; + is_group?: BoolType; children?: Filter[]; project_id?: string; base_id?: string; diff --git a/packages/nocodb/src/lib/models/LinkToAnotherRecordColumn.ts b/packages/nocodb/src/lib/models/LinkToAnotherRecordColumn.ts index bbed654ea2..3a9056d9a7 100644 --- a/packages/nocodb/src/lib/models/LinkToAnotherRecordColumn.ts +++ b/packages/nocodb/src/lib/models/LinkToAnotherRecordColumn.ts @@ -1,3 +1,4 @@ +import { BoolType } from 'nocodb-sdk'; import Noco from '../Noco'; import Column from './Column'; import Model from './Model'; @@ -19,7 +20,7 @@ export default class LinkToAnotherRecordColumn { fk_index_name?: string; type: 'hm' | 'bt' | 'mm'; - virtual = false; + virtual: BoolType = false; mmModel?: Model; relatedTable?: Model; diff --git a/packages/nocodb/src/lib/models/MapView.ts b/packages/nocodb/src/lib/models/MapView.ts index d8d4c56e3e..fe4d5f2547 100644 --- a/packages/nocodb/src/lib/models/MapView.ts +++ b/packages/nocodb/src/lib/models/MapView.ts @@ -93,7 +93,6 @@ export default class MapView implements MapType { await View.updateColumn(body.fk_view_id, mapViewMappedByColumn.id, { show: true, }); - } // update meta diff --git a/packages/nocodb/src/lib/models/Model.ts b/packages/nocodb/src/lib/models/Model.ts index 5c214c7d1e..834e8025e4 100644 --- a/packages/nocodb/src/lib/models/Model.ts +++ b/packages/nocodb/src/lib/models/Model.ts @@ -7,6 +7,7 @@ import { BaseModelSqlv2 } from '../db/sql-data-mapper/lib/sql/BaseModelSqlv2'; import { isVirtualCol, ModelTypes, + BoolType, TableReqType, TableType, UITypes, @@ -25,17 +26,17 @@ import { sanitize } from '../db/sql-data-mapper/lib/sql/helpers/sanitize'; import { extractProps } from '../meta/helpers/extractProps'; export default class Model implements TableType { - copy_enabled: boolean; + copy_enabled: BoolType; created_at: Date | number | string; base_id: 'db' | string; - deleted: boolean; - enabled: boolean; - export_enabled: boolean; + deleted: BoolType; + enabled: BoolType; + export_enabled: BoolType; id: string; order: number; parent_id: string; password: string; - pin: boolean; + pin: BoolType; project_id: string; schema: any; show_all_fields: boolean; @@ -46,7 +47,7 @@ export default class Model implements TableType { table_name: string; title: string; - mm: boolean; + mm: BoolType; uuid: string; @@ -98,7 +99,7 @@ export default class Model implements TableType { projectId, baseId, model: Partial & { - mm?: boolean; + mm?: BoolType; created_at?: any; updated_at?: any; }, diff --git a/packages/nocodb/src/lib/models/Project.ts b/packages/nocodb/src/lib/models/Project.ts index ec69d51b88..5ee799d1ab 100644 --- a/packages/nocodb/src/lib/models/Project.ts +++ b/packages/nocodb/src/lib/models/Project.ts @@ -1,6 +1,6 @@ import Base from './/Base'; import Noco from '../Noco'; -import { ProjectType } from 'nocodb-sdk'; +import { BoolType, MetaType, ProjectType } from 'nocodb-sdk'; import { CacheDelDirection, CacheGetType, @@ -16,9 +16,9 @@ export default class Project implements ProjectType { public prefix: string; public status: string; public description: string; - public meta: string; + public meta: MetaType; public color: string; - public deleted: string; + public deleted: BoolType; public order: number; public is_meta = false; public bases?: Base[]; diff --git a/packages/nocodb/src/lib/utils/globals.ts b/packages/nocodb/src/lib/utils/globals.ts index f39a0efda7..efade2f1b0 100644 --- a/packages/nocodb/src/lib/utils/globals.ts +++ b/packages/nocodb/src/lib/utils/globals.ts @@ -42,7 +42,6 @@ export enum MetaTable { MAP_VIEW = 'nc_map_view_v2', MAP_VIEW_COLUMNS = 'nc_map_view_columns_v2', STORE = 'nc_store', - } export const orderedMetaTables = [ diff --git a/scripts/sdk/swagger.json b/packages/nocodb/src/schema/swagger.json similarity index 91% rename from scripts/sdk/swagger.json rename to packages/nocodb/src/schema/swagger.json index e6c4fed831..b28674f1dc 100644 --- a/scripts/sdk/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -138,19 +138,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "required": [ - "email", - "password" - ] + "$ref": "#/components/schemas/SignInReq" }, "examples": { "example-1": { @@ -234,12 +222,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } + "$ref": "#/components/schemas/PasswordForgotReq" } } }, @@ -311,15 +294,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "currentPassword": { - "type": "string" - }, - "newPassword": { - "type": "string" - } - } + "$ref": "#/components/schemas/PasswordChangeReq" }, "examples": { "example-1": { @@ -403,12 +378,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "new_password": { - "type": "string" - } - } + "$ref": "#/components/schemas/PasswordResetReq" } } } @@ -508,7 +478,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiToken" + "$ref": "#/components/schemas/ApiTokenReq" } } } @@ -557,12 +527,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "key": { - "type": "string" - } - } + "$ref": "#/components/schemas/LicenseReq" } } } @@ -748,7 +713,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/OrgUserReq" } } }, @@ -893,7 +858,8 @@ "description": "OK", "content": { "application/json": { - "schema": {} + "schema": { + } } } } @@ -901,7 +867,9 @@ "requestBody": { "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/ProjectUserReq" + } } } }, @@ -1012,7 +980,9 @@ "requestBody": { "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/ProjectUserReq" + } } } }, @@ -1087,7 +1057,9 @@ "description": "OK", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/VisibilityRuleReq" + } } } } @@ -1505,18 +1477,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "url": { - "type": "string" - }, - "roles": { - "type": "string" - } - } + "$ref": "#/components/schemas/SharedBaseReq" } } } @@ -1973,7 +1934,9 @@ "project_id": { "type": "string" }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } } } } @@ -2206,7 +2169,9 @@ "order": { "type": "number" }, - "meta": {}, + "meta": { + "$ref": "#/components/schemas/Meta" + }, "title": { "type": "string" }, @@ -2403,7 +2368,9 @@ "password": { "type": "string" }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } } } } @@ -2702,7 +2669,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Filter" + "$ref": "#/components/schemas/FilterReq" } } } @@ -2747,7 +2714,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Filter" + "$ref": "#/components/schemas/FilterReq" } } } @@ -2799,7 +2766,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Filter" + "$ref": "#/components/schemas/FilterReq" } } } @@ -2885,7 +2852,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Grid" + "$ref": "#/components/schemas/GridReq" } } } @@ -2926,7 +2893,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Form" + "$ref": "#/components/schemas/FormCreateReq" } } } @@ -2959,7 +2926,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Form" + "$ref": "#/components/schemas/FormReq" } } } @@ -3018,7 +2985,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FormColumn" + "$ref": "#/components/schemas/FormColumnReq" } } } @@ -3128,7 +3095,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GridColumn" + "$ref": "#/components/schemas/GridColumnReq" } } } @@ -3169,7 +3136,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Gallery" + "$ref": "#/components/schemas/GalleryReq" } } } @@ -3202,7 +3169,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Gallery" + "$ref": "#/components/schemas/GalleryReq" } } } @@ -3262,7 +3229,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Kanban" + "$ref": "#/components/schemas/KanbanReq" } } } @@ -3295,7 +3262,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Kanban" + "$ref": "#/components/schemas/KanbanUpdateReq" } } } @@ -5714,7 +5681,7 @@ "columns": { "allOf": [ { - "oneOf": [ + "anyOf": [ { "$ref": "#/components/schemas/GridColumn" }, @@ -5740,7 +5707,7 @@ "type": "object", "properties": { "view": { - "oneOf": [ + "anyOf": [ { "$ref": "#/components/schemas/Form" }, @@ -5827,23 +5794,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "row_id": { - "type": "string" - }, - "fk_model_id": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "row_id", - "fk_model_id", - "comment" - ] + "$ref": "#/components/schemas/CommentReq" } } } @@ -5980,24 +5931,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "fk_model_id": { - "type": "string" - }, - "column_name": { - "type": "string" - }, - "row_id": { - "type": "string" - }, - "value": { - "type": "string" - }, - "prev_value": { - "type": "string" - } - } + "$ref": "#/components/schemas/AuditRowUpdateReq" } } } @@ -6114,19 +6048,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "payload": { - "type": "object", - "properties": { - "data": {}, - "user": {} - } - }, - "hook": { - "$ref": "#/components/schemas/Hook" - } - } + "$ref": "#/components/schemas/HookTestReq" } } } @@ -6353,19 +6275,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "input": {}, - "category": { - "type": "string" - } - } + "$ref": "#/components/schemas/PluginTestReq" } } } @@ -6392,7 +6302,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Plugin" + "$ref": "#/components/schemas/PluginReq" } } } @@ -6976,7 +6886,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiToken" + "$ref": "#/components/schemas/ApiTokenReq" } } } @@ -7319,7 +7229,10 @@ "$ref": "#/components/schemas/BaseReq" } } - } + }, + "required": [ + "title" + ] }, "Project": { "title": "Project", @@ -7338,19 +7251,13 @@ "type": "string" }, "meta": { - "type": [ - "string", - "object" - ] + "$ref": "#/components/schemas/Meta" }, "color": { "type": "string" }, "deleted": { - "type": [ - "string", - "boolean" - ] + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -7362,7 +7269,7 @@ } }, "is_meta": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "prefix": { "type": "string" @@ -7437,8 +7344,7 @@ "type": "string" }, "is_meta": { - "type": "boolean", - "readOnly": true + "$ref": "#/components/schemas/Bool" }, "config": {}, "created_at": {}, @@ -7453,7 +7359,7 @@ "type": "number" }, "enabled": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" } } }, @@ -7633,7 +7539,7 @@ "type": "string" }, "enabled": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "parent_id": { "type": "string" @@ -7645,10 +7551,10 @@ "type": "string" }, "pinned": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -7666,12 +7572,11 @@ "type": "string" }, "mm": { - "type": [ - "boolean", - "number" - ] + "$ref": "#/components/schemas/Bool" }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } }, "required": [ "table_name", @@ -7755,7 +7660,7 @@ "type": "string" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -7769,9 +7674,11 @@ "uuid": { "type": "string" }, - "meta": {}, + "meta": { + "$ref": "#/components/schemas/Meta" + }, "show_system_fields": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "lock_type": { "type": "string", @@ -7785,7 +7692,7 @@ "type": "number" }, "view": { - "oneOf": [ + "anyOf": [ { "$ref": "#/components/schemas/Form" }, @@ -7932,10 +7839,10 @@ "type": "string" }, "pinned": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -7999,24 +7906,26 @@ "type": "string" }, "pinned": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" }, "mm": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "columns": { "type": "array", "items": { - "$ref": "#/components/schemas/Column" + "$ref": "#/components/schemas/NormalColumnRequest" } }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } }, "required": [ "table_name", @@ -8095,17 +8004,78 @@ "comparison_sub_op": { "type": "string" }, - "value": { - "type": [ - "string", - "number", - "integer", - "boolean", - "null" + "value": {}, + "is_group": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "null" + } ] }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Filter" + } + }, + "project_id": { + "type": "string", + "readOnly": true + }, + "base_id": { + "type": "string", + "readOnly": true + }, + "fk_parent_id": { + "type": "string" + }, + "fk_view_id": { + "$ref": "#/components/schemas/StringOrNull" + }, + "fk_hook_id": { + "$ref": "#/components/schemas/StringOrNull" + } + }, + "readOnly": true + }, + "FilterReq": { + "type": "object", + "title": "Filter", + "properties": { + "id": { + "type": "string" + }, + "fk_model_id": { + "type": "string" + }, + "fk_column_id": { + "type": "string" + }, + "logical_op": { + "type": "string" + }, + "comparison_op": { + "type": "string" + }, + "value": {}, "is_group": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "children": { "type": "array", @@ -8125,10 +8095,10 @@ "type": "string" }, "fk_view_id": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "fk_hook_id": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" } }, "readOnly": true @@ -8216,6 +8186,19 @@ } } }, + "SortReq": { + "title": "Sort", + "type": "object", + "properties": { + "fk_column_id": { + "type": "string" + }, + "direction": { + "type": "string" + } + }, + "minProperties": 1 + }, "SortList": { "description": "", "type": "object", @@ -8293,43 +8276,70 @@ "type": "string" }, "np": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "ns": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "clen": { - "type": [ - "string", - "integer" + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } ] }, "cop": { "type": "string" }, "pk": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "pv": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "rqd": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "column_name": { "type": "string" }, "un": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "ct": { "type": "string" }, "ai": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "unique": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "cdf": { "type": "string" @@ -8344,32 +8354,51 @@ "type": "string" }, "dtxp": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } + ] }, "dtxs": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } + ] }, "au": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "visible": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" }, "system": { - "type": [ - "number", - "boolean" - ] + "$ref": "#/components/schemas/Bool" + }, + "meta": { + "$ref": "#/components/schemas/Meta" }, - "meta": {}, "colOptions": { - "oneOf": [ + "anyOf": [ { "$ref": "#/components/schemas/LinkToAnotherRecord" }, @@ -8390,10 +8419,7 @@ } ] } - }, - "required": [ - "uidt" - ] + } }, "ColumnList": { "description": "", @@ -8460,7 +8486,7 @@ "type": "string" }, "virtual": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "fk_column_id": { "type": "string" @@ -8511,7 +8537,7 @@ "type": "string" }, "virtual": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "fk_column_id": { "type": "string" @@ -8541,7 +8567,7 @@ "type": "string" }, "virtual": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "fk_column_id": { "type": "string" @@ -8574,7 +8600,7 @@ "type": "string" }, "virtual": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "fk_column_id": { "type": "string" @@ -8665,7 +8691,7 @@ "type": "string" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -8684,6 +8710,33 @@ }, "description": "" }, + "GridReq": { + "title": "Grid", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "order": { + "type": "number" + }, + "lock_type": { + "type": "string", + "enum": [ + "collaborative", + "locked", + "personal" + ] + }, + "row_height": { + "type": "number" + } + }, + "description": "", + "required": [ + "title" + ] + }, "Gallery": { "title": "Gallery", "type": "object", @@ -8699,16 +8752,16 @@ "type": "string" }, "deleted": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" }, "next_enabled": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "prev_enabled": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "cover_image_idx": { "type": "integer" @@ -8747,6 +8800,51 @@ } } }, + "GalleryReq": { + "title": "Gallery", + "type": "object", + "description": "", + "properties": { + "title": { + "type": "string" + }, + "next_enabled": { + "$ref": "#/components/schemas/Bool" + }, + "prev_enabled": { + "$ref": "#/components/schemas/Bool" + }, + "cover_image_idx": { + "type": "integer" + }, + "cover_image": { + "type": "string" + }, + "restrict_types": { + "type": "string" + }, + "restrict_size": { + "type": "string" + }, + "restrict_number": { + "type": "string" + }, + "fk_cover_image_col_id": { + "type": "string" + }, + "lock_type": { + "type": "string", + "enum": [ + "collaborative", + "locked", + "personal" + ] + } + }, + "required": [ + "title" + ] + }, "GalleryColumn": { "title": "GalleryColumn", "type": "object", @@ -8769,6 +8867,28 @@ } } }, + "GridColumnReq": { + "title": "GridColumn", + "type": "object", + "description": "", + "properties": { + "label": { + "type": "string" + }, + "help": { + "type": "string" + }, + "fk_column_id": { + "type": "string" + }, + "fk_gallery_id": { + "type": "string" + }, + "width": { + "type": "string" + } + } + }, "GridColumn": { "title": "GridColumn", "type": "object", @@ -8840,19 +8960,13 @@ "type": "string" }, "fk_grp_col_id": { - "type": [ - "string", - "null" - ] + "$ref": "#/components/schemas/StringOrNull" }, "fk_cover_image_col_id": { "type": "string" }, "meta": { - "type": [ - "string", - "object" - ] + "$ref": "#/components/schemas/Meta" } } }, @@ -8896,10 +9010,7 @@ "minLength": 1 }, "fk_geo_data_col_id": { - "type": [ - "string", - "null" - ] + "$ref": "#/components/schemas/StringOrNull" }, "columns": { "type": "array", @@ -8908,10 +9019,7 @@ } }, "meta": { - "type": [ - "string", - "object" - ] + "$ref": "#/components/schemas/Meta" } } }, @@ -8937,6 +9045,42 @@ } } }, + "LicenseReq": { + "title": "License Key", + "type": "object", + "description": "", + "properties": { + "key": { + "type": "string" + } + } + }, + "KanbanReq": { + "title": "Kanban", + "type": "object", + "description": "", + "properties": { + "title": { + "type": "string" + }, + "fk_grp_col_id": { + "$ref": "#/components/schemas/StringOrNull" + } + }, + "required": [ + "title" + ] + }, + "KanbanUpdateReq": { + "title": "Kanban", + "type": "object", + "description": "", + "properties": { + "fk_grp_col_id": { + "$ref": "#/components/schemas/StringOrNull" + } + } + }, "Form": { "title": "Form", "type": "object", @@ -8958,25 +9102,25 @@ "type": "string" }, "redirect_url": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "redirect_after_secs": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "email": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "banner_image_url": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "logo_url": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "submit_another_form": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "show_blank_form": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "columns": { "type": "array", @@ -8995,9 +9139,75 @@ "personal" ] }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } + } + }, + "FormReq": { + "title": "Form", + "type": "object", + "description": "", + "properties": { + "title": { + "type": "string" + }, + "heading": { + "type": "string" + }, + "subheading": { + "type": "string" + }, + "success_msg": { + "type": "string" + }, + + "redirect_url": { + "$ref": "#/components/schemas/StringOrNull" + }, + "redirect_after_secs": { + "$ref": "#/components/schemas/StringOrNull" + }, + "email": { + "$ref": "#/components/schemas/StringOrNull" + }, + "banner_image_url": { + "$ref": "#/components/schemas/StringOrNull" + }, + "logo_url": { + "$ref": "#/components/schemas/StringOrNull" + }, + "submit_another_form": { + "$ref": "#/components/schemas/Bool" + }, + "show_blank_form": { + "$ref": "#/components/schemas/Bool" + }, + "lock_type": { + "type": "string", + "enum": [ + "collaborative", + "locked", + "personal" + ] + }, + "meta": { + "$ref": "#/components/schemas/Meta" + } } }, + "FormCreateReq": { + "allOf": [ + { + "$ref": "#/components/schemas/FormReq" + }, + { + "required": [ + "title" + ] + } + ] + }, "FormColumn": { "description": "", "type": "object", @@ -9039,10 +9249,10 @@ }, "help": {}, "required": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "show": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "order": { "type": "number" @@ -9059,30 +9269,82 @@ "type": "string", "minLength": 1 }, - "meta": {} + "meta": { + "$ref": "#/components/schemas/Meta" + } } }, - "Paginated": { - "title": "Paginated", + "FormColumnReq": { + "description": "", "type": "object", + "x-examples": { + "example-1": { + "_cn": "first_name", + "alias": "first_name", + "fk_column_id": "cl_yvyhsl9u81tokc", + "id": "fvc_8z1i7t8aswkqxx", + "fk_view_id": "vw_s1pf4umdnikoyn", + "uuid": null, + "label": "dsdsds", + "help": null, + "required": false, + "show": 1, + "order": 1, + "created_at": "2022-02-15 12:39:04", + "updated_at": "2022-02-15 12:39:16", + "description": "dsdsdsdsd" + } + }, "properties": { - "pageSize": { - "type": "integer" + "uuid": {}, + "label": { + "type": "string", + "minLength": 1 }, - "totalRows": { - "type": "integer" + "help": {}, + "required": { + "$ref": "#/components/schemas/Bool" }, - "sort": { - "type": [ - "string", - "array" - ], - "items": { - "$ref": "#/components/schemas/Sort" - } + "show": { + "$ref": "#/components/schemas/Bool" }, - "isFirstPage": { - "type": "boolean" + "order": { + "type": "number" + }, + "description": { + "type": "string", + "minLength": 1 + }, + "meta": { + "$ref": "#/components/schemas/Meta" + } + } + }, + "Paginated": { + "title": "Paginated", + "type": "object", + "properties": { + "pageSize": { + "type": "integer" + }, + "totalRows": { + "type": "integer" + }, + "sort": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sort" + } + } + ] + }, + "isFirstPage": { + "type": "boolean" }, "isLastPage": { "type": "boolean" @@ -9370,23 +9632,75 @@ ] }, "async": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, - "payload": { + "notification": { "type": "string" }, - "url": { + "retries": { + "type": "number" + }, + "retry_interval": { + "type": "number" + }, + "timeout": { + "type": "number" + }, + "active": { + "$ref": "#/components/schemas/Bool" + } + } + }, + "HookReq": { + "title": "AuditType", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "fk_model_id": { "type": "string" }, - "headers": { + "title": { "type": "string" }, - "condition": { - "type": "boolean" + "description": { + "$ref": "#/components/schemas/StringOrNull" }, - "notification": { + "env": { "type": "string" }, + "event": { + "type": "string", + "enum": [ + "after", + "before" + ] + }, + "operation": { + "type": "string", + "enum": [ + "insert", + "delete", + "update" + ] + }, + "async": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "notification": { + "type": "object" + }, "retries": { "type": "number" }, @@ -9397,7 +9711,103 @@ "type": "number" }, "active": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" + } + }, + "required": [ + "title", + "event", + "notification", + "operation" + ] + }, + "HookTestReq": { + "title": "Hook test request payload", + "type": "object", + "properties": { + "payload": {}, + "hook": { + "$ref": "#/components/schemas/HookReq" + } + }, + "required": [ + "payload", + "hook" + ] + }, + "SignUpReq": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "email", + "password" + ] + }, + "SignInReq": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "email", + "password" + ] + }, + "PasswordForgotReq": { + "type": "object", + "properties": { + "email": { + "type": "string" + } + }, + "required": [ + "email" + ] + }, + "PasswordResetReq": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + }, + "PasswordChangeReq": { + "type": "object", + "properties": { + "currentPassword": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + }, + "required": [ + "currentPassword", + "newPassword" + ] + }, + "ApiTokenReq": { + "title": "API Token Request", + "type": "object", + "properties": { + "description": { + "type": "string" } } }, @@ -9415,7 +9825,7 @@ "type": "string" }, "active": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "rating": { "type": "number" @@ -9448,9 +9858,13 @@ "type": "string" }, "input": { - "type": [ - "string", - "null" + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/StringOrNull" + } ] }, "creator": { @@ -9487,7 +9901,7 @@ "type": "string" }, "disabled": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" } } }, @@ -9511,6 +9925,15 @@ "updated_at": {} } }, + "ApiTokenReq": { + "title": "ApiToken", + "type": "object", + "properties": { + "description": { + "$ref": "#/components/schemas/StringOrNull" + } + } + }, "HookLog": { "title": "ApiToken", "type": "object", @@ -9525,7 +9948,7 @@ "type": "string" }, "fk_hook_id": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "type": { "type": "string" @@ -9537,11 +9960,9 @@ "type": "string" }, "test_call": { - "type": "boolean" - }, - "payload": { - "type": "string" + "$ref": "#/components/schemas/Bool" }, + "payload": {}, "conditions": { "type": "string" }, @@ -9628,46 +10049,51 @@ "type": "string" }, "np": { - "type": "string" + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/StringOrNull" + } + ] }, "ns": { - "type": "string" - }, - "clen": { - "type": [ - "string", - "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/StringOrNull" + } ] }, - "cop": { - "type": "string" - }, "pk": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "pv": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "rqd": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "column_name": { "type": "string" }, "un": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "ct": { "type": "string" }, "ai": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "unique": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "cdf": { - "type": "string" + "$ref": "#/components/schemas/StringOrNull" }, "cc": { "type": "string" @@ -9679,17 +10105,32 @@ "type": "string" }, "dtxp": { - "type": "string" + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/StringOrNull" + } + ] }, "dtxs": { - "type": "string" + "oneOf": [ + { + "type": "number" + }, + { + "$ref": "#/components/schemas/StringOrNull" + } + ] }, "au": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" } } }, "LinkToAnotherColumnReq": { + "type": "object", "properties": { "uidt": { "type": "string", @@ -9701,7 +10142,7 @@ "type": "string" }, "virtual": { - "type": "boolean" + "$ref": "#/components/schemas/Bool" }, "parentId": { "type": "string" @@ -9727,6 +10168,7 @@ ] }, "RollupColumnReq": { + "type": "object", "properties": { "uidt": { "type": "string", @@ -9786,10 +10228,7 @@ "ColumnReq": { "allOf": [ { - "oneOf": [ - { - "$ref": "#/components/schemas/NormalColumnRequest" - }, + "anyOf": [ { "$ref": "#/components/schemas/LinkToAnotherColumnReq" }, @@ -9801,6 +10240,9 @@ }, { "$ref": "#/components/schemas/LookupColumnReq" + }, + { + "$ref": "#/components/schemas/NormalColumnRequest" } ] }, @@ -9820,7 +10262,7 @@ "type": "string" }, "order": { - "type": "integer" + "type": "number" } } } @@ -9851,34 +10293,168 @@ }, "roles": {} } - } - }, - "requestBodies": { - "Signup": { - "content": { - "application/json": { - "schema": { - "description": "", + }, + "VisibilityRuleReq": { + "title": "Visibility Rule", + "type": "array", + "items": { + "type": "object", + "properties": { + "disabled": { "type": "object", - "x-examples": { - "example-1": { - "email": true - } - }, "properties": { - "email": { - "type": "string" + "commenter": { + "$ref": "#/components/schemas/Bool" + }, + "creator": { + "$ref": "#/components/schemas/Bool" + }, + "editor": { + "$ref": "#/components/schemas/Bool" }, - "password": { - "type": "string" + "guest": { + "$ref": "#/components/schemas/Bool" + }, + "owner": { + "$ref": "#/components/schemas/Bool" + }, + "viewer": { + "$ref": "#/components/schemas/Bool" } } } + } + } + }, + "Bool": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer" }, - "application/xml": { + { + "type": "null" + } + ] + }, + "StringOrNull": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "Meta": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "CommentReq": { + "type": "object", + "properties": { + "row_id": { + "type": "string" + }, + "fk_model_id": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "row_id", + "fk_model_id", + "comment" + ] + }, + "AuditRowUpdateReq": { + "type": "object", + "properties": { + "fk_model_id": { + "type": "string" + }, + "column_name": { + "type": "string" + }, + "row_id": { + "type": "string" + }, + "value": {}, + "prev_value": {} + } + }, + "OrgUserReq": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "roles": { + "type": "string" + } + } + }, + "ProjectUserReq": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "roles": { + "type": "string" + } + } + }, + "SharedBaseReq": { + "type": "object", + "properties": { + "uuid": { + "$ref": "#/components/schemas/StringOrNull" + }, + "roles": { + "$ref": "#/components/schemas/StringOrNull" + } + } + }, + "PluginTestReq": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "input": {} + } + }, + "PluginReq": { + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/Bool" + }, + "input": {} + } + } + }, + "requestBodies": { + "Signup": { + "content": { + "application/json": { "schema": { - "type": "object", - "properties": {} + "$ref": "#/components/schemas/SignUpReq" } } } @@ -10314,4 +10890,4 @@ } } } -} \ No newline at end of file +}