Add Activepieces integration for workflow automation

- Add Activepieces fork with SmoothSchedule custom piece
- Create integrations app with Activepieces service layer
- Add embed token endpoint for iframe integration
- Create Automations page with embedded workflow builder
- Add sidebar visibility fix for embed mode
- Add list inactive customers endpoint to Public API
- Include SmoothSchedule triggers: event created/updated/cancelled
- Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-18 22:59:37 -05:00
parent 9848268d34
commit 3aa7199503
16292 changed files with 1284892 additions and 4708 deletions

View File

@@ -0,0 +1,35 @@
{
"NocoDB": "NocoDB",
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "NocoDB Basis-URL",
"API Token": "API Token",
"API Version": "API-Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Wird nur für selbstgehostete Instanzen benötigt. Nicht benötigt für die Cloud-Version.",
"Before v0.90.0": "Vor v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 bis v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Weiter",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Melden Sie sich bei Ihrem NocoDB Konto an.\n 2. Klicken Sie auf Ihr Profilbild (unten links) und navigieren Sie zu **Kontoeinstellungen->Tokens**.\n 3. Erstelle neues Token mit jedem Namen und kopiere API-Token.\n 4. Ihre Basis-URL ist der Ort, an dem Ihre App gehostet wird.",
"Create a Record": "Datensatz erstellen",
"Delete a Record": "Datensatz löschen",
"Update a Record": "Datensatz aktualisieren",
"Get a Record": "Datensatz abrufen",
"Search Records": "Datensätze suchen",
"Creates a new record in the given table.": "Erstellt einen neuen Datensatz in der angegebenen Tabelle.",
"Deletes a record with the given Record ID.": "Löscht einen Datensatz mit der angegebenen Datensatz-ID.",
"Updates an existing record with the given Record ID.": "Aktualisiert einen vorhandenen Datensatz mit der angegebenen Datensatz-ID.",
"Gets a record by the Record ID.": "Liefert einen Datensatz von der Datensatz-ID.",
"Returns a list of records matching the where condition.": "Gibt eine Liste von Datensätzen aus, die mit der Ausgangsbedingung übereinstimmen.",
"Workspace ID": "Arbeitsbereich-ID",
"Base ID": "Basis-ID",
"Table ID": "Table ID",
"Table Columns": "Tabellenspalten",
"Record ID": "Datensatz-ID",
"Fields": "Felder",
"Where": "Wo",
"Limit": "Limit",
"Sort": "Sortieren",
"For self-hosted instances,select \"No Workspace\".": "Für selbstgehostete Instanzen wählen Sie \"Kein Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Ermöglicht die Angabe der Felder, die Sie in Ihre API-Antwort aufnehmen möchten. Standardmäßig sind alle Felder in der Antwort enthalten.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Ermöglicht dir, bestimmte Bedingungen für das Filtern von Datensätzen zu definieren. Siehe Dokumentation [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Ermöglicht Ihnen, die Anzahl der Datensätze zu begrenzen, die Sie abrufen möchten.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Durch Komma getrennte Feldnamen ohne Leerzeichen.Beispiel: **field1,-field2** sortiert die Datensätze zuerst nach 'field1' in aufsteigender Reihenfolge und dann nach 'field2' in absteigender Reihenfolge."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "URL base de NocoDB",
"API Token": "API Token",
"API Version": "Versión de API",
"Required only for self-hosted instances. Not needed for the cloud version.": "Requerido sólo para instancias autoalojadas. No es necesario para la versión en la nube.",
"Before v0.90.0": "Antes de v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 a v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Crear un registro",
"Delete a Record": "Eliminar un registro",
"Update a Record": "Actualizar un registro",
"Get a Record": "Obtener un registro",
"Search Records": "Buscar registros",
"Creates a new record in the given table.": "Crea un nuevo registro en la tabla dada.",
"Deletes a record with the given Record ID.": "Elimina un registro con el ID de registro dado.",
"Updates an existing record with the given Record ID.": "Actualiza un registro existente con el ID de registro dado.",
"Gets a record by the Record ID.": "Obtiene un registro por el ID del registro.",
"Returns a list of records matching the where condition.": "Devuelve una lista de registros que coincidan con la condición de lugar.",
"Workspace ID": "ID del área de trabajo",
"Base ID": "ID base",
"Table ID": "Table ID",
"Table Columns": "Columnas de tabla",
"Record ID": "ID de registro",
"Fields": "Campos",
"Where": "Donde",
"Limit": "Límite",
"Sort": "Ordenar",
"For self-hosted instances,select \"No Workspace\".": "Para instancias autoalojadas, seleccione \"Sin espacio de trabajo\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Le permite especificar los campos que desea incluir en su respuesta API. De forma predeterminada, todos los campos están incluidos en la respuesta.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Permite definir condiciones específicas para filtrar registros. Ver documentos [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Le permite establecer un límite en el número de registros que desea recuperar.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Nombres de campo separados por comas sin espacio.Ejemplo: **campo1,-campo2** ordenará los registros primero por 'campo1' en orden ascendente y luego por 'campo2' en orden descendente."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "URL de base NocoDB",
"API Token": "API Token",
"API Version": "Version de l'API",
"Required only for self-hosted instances. Not needed for the cloud version.": "Requis uniquement pour les instances auto-hébergées. Pas nécessaire pour la version du cloud.",
"Before v0.90.0": "Avant la v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 à v0.199.0",
"v0.200.0 Onwards": "v0.200.0 en cours",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Créer un enregistrement",
"Delete a Record": "Supprimer un enregistrement",
"Update a Record": "Mettre à jour un enregistrement",
"Get a Record": "Obtenir un enregistrement",
"Search Records": "Rechercher des enregistrements",
"Creates a new record in the given table.": "Crée un nouvel enregistrement dans la table donnée.",
"Deletes a record with the given Record ID.": "Supprime un enregistrement avec l'ID d'enregistrement donné.",
"Updates an existing record with the given Record ID.": "Met à jour un enregistrement existant avec l'ID d'enregistrement donné.",
"Gets a record by the Record ID.": "Renvoie un enregistrement par l'ID de l'enregistrement.",
"Returns a list of records matching the where condition.": "Renvoie une liste des enregistrements correspondant à la condition où ils sont effectués.",
"Workspace ID": "ID de l'espace de travail",
"Base ID": "ID de base",
"Table ID": "Table ID",
"Table Columns": "Colonnes de table",
"Record ID": "ID de l'enregistrement",
"Fields": "Champs",
"Where": "Où se trouve",
"Limit": "Limite",
"Sort": "Trier",
"For self-hosted instances,select \"No Workspace\".": "Pour les instances auto-hébergées, sélectionnez \"Aucun espace de travail\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Permet de spécifier les champs que vous souhaitez inclure dans votre réponse API. Par défaut, tous les champs sont inclus dans la réponse.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Permet de définir des conditions spécifiques pour le filtrage des enregistrements.Voir la documentation [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Vous permet de définir une limite sur le nombre d'enregistrements que vous voulez récupérer.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Les noms de champs séparés par des virgules sans espace.Exemple: **field1,-field2** triera les enregistrements d'abord par 'field1' dans l'ordre ascendant puis par 'field2' dans l'ordre décroissant."
}

View File

@@ -0,0 +1,35 @@
{
"NocoDB": "NocoDB",
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,35 @@
{
"NocoDB": "NocoDB",
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "NocoDB ベース URL",
"API Token": "API Token",
"API Version": "API バージョン",
"Required only for self-hosted instances. Not needed for the cloud version.": "自己ホストインスタンスにのみ必要です。クラウドバージョンでは必要ありません。",
"Before v0.90.0": "v0.90.0より前",
"v0.90.0 to v0.199.0": "v0.90.0 から v0.199.0",
"v0.200.0 Onwards": "v0.200.0 以降",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "レコードを作成",
"Delete a Record": "レコードを削除",
"Update a Record": "レコードを更新",
"Get a Record": "レコードを取得する",
"Search Records": "レコードを検索",
"Creates a new record in the given table.": "指定されたテーブルに新しいレコードを作成します。",
"Deletes a record with the given Record ID.": "指定したレコード ID のレコードを削除します。",
"Updates an existing record with the given Record ID.": "指定したレコードIDを持つ既存のレコードを更新します。",
"Gets a record by the Record ID.": "レコード ID によってレコードを取得します。",
"Returns a list of records matching the where condition.": "ここで条件に一致するレコードのリストを返します。",
"Workspace ID": "ワークスペース ID",
"Base ID": "ベースID",
"Table ID": "Table ID",
"Table Columns": "表の列",
"Record ID": "レコードID",
"Fields": "フィールド",
"Where": "場所",
"Limit": "制限",
"Sort": "並べ替え",
"For self-hosted instances,select \"No Workspace\".": "自己ホストインスタンスの場合は、「ワークスペースなし」を選択します。",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "API レスポンスに含めたい項目を指定できます。デフォルトでは、すべての項目がレスポンスに含まれます。",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "レコードをフィルタリングするための特定の条件を定義することができます。ドキュメント [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators ) を参照してください。",
"Enables you to set a limit on the number of records you want to retrieve.": "取得したいレコード数の上限を設定できます。",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "例: **field1,-field2** はレコードを昇順で'field1'でソートし、'field2'で降順にソートします。"
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "NocoDB basis-URL",
"API Token": "API Token",
"API Version": "API versie",
"Required only for self-hosted instances. Not needed for the cloud version.": "Verplicht alleen voor zelf gehoste instanties. Niet nodig voor de cloud versie.",
"Before v0.90.0": "Vóór v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 tot v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onderwaarts",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in op uw NocoDB account.\n 2. Klik op uw profile-picle-picle-(bottom-left) en navigeer naar **Accountinstellingen->Tokens**.\n 3. Maak een nieuw token aan met elke naam en kopieer API Token.\n 4. Uw basis-URL is waar uw app wordt gehost.",
"Create a Record": "Een record maken",
"Delete a Record": "Een record verwijderen",
"Update a Record": "Een record bijwerken",
"Get a Record": "Krijg een record",
"Search Records": "Records zoeken",
"Creates a new record in the given table.": "Maakt een nieuw record aan in de gegeven tabel.",
"Deletes a record with the given Record ID.": "Verwijdert een record met het gegeven Record ID.",
"Updates an existing record with the given Record ID.": "Werkt een bestaand record met het gegeven Record ID bij.",
"Gets a record by the Record ID.": "Haalt een record op van de Record ID.",
"Returns a list of records matching the where condition.": "Geeft een lijst van records die voldoen aan de waar conditie.",
"Workspace ID": "Werkruimte ID",
"Base ID": "Basis ID",
"Table ID": "Table ID",
"Table Columns": "Tabel kolommen",
"Record ID": "Record ID",
"Fields": "Velden",
"Where": "Waar",
"Limit": "Limiet",
"Sort": "Sorteren",
"For self-hosted instances,select \"No Workspace\".": "Selecteer voor zelf gehoste instanties, \"Geen Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Hiermee kunt u de velden opgeven die u wenst op te nemen in uw API-antwoord. Standaard zijn alle velden opgenomen in het antwoord.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Maakt het mogelijk om een limiet in te stellen op het aantal records dat u wilt ophalen.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Komma gescheiden veldnamen zonder spatie. Voorbeeld: **field1,-field2** zal eerst records sorteren op 'field1' in oplopende volgorde en vervolgens door 'field2' in aflopende volgorde."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "URL base do NocoDB",
"API Token": "API Token",
"API Version": "Versão da API",
"Required only for self-hosted instances. Not needed for the cloud version.": "Necessário apenas para instâncias auto-hospedadas. Não necessário para a versão em nuvem.",
"Before v0.90.0": "Antes da versão 0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 a v0.199.0",
"v0.200.0 Onwards": "v0.200,0 Avançados",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Entre na sua conta do NocoDB.\n 2. Clique no seu perfil-pic(parte inferior-esquerda) e navegue para **Configurações da conta->Tokens**.\n 3. Crie um novo token com qualquer nome e copie API Token.\n 4. Sua URL Base é onde o seu aplicativo está hospedado.",
"Create a Record": "Criar um Registro",
"Delete a Record": "Apagar um registro",
"Update a Record": "Atualizar um Registro",
"Get a Record": "Obter um Registro",
"Search Records": "Buscar Registros",
"Creates a new record in the given table.": "Cria um novo registro na tabela indicada.",
"Deletes a record with the given Record ID.": "Exclui um registro com o ID do Registro fornecido.",
"Updates an existing record with the given Record ID.": "Atualiza um registro existente com o ID do Registro fornecido.",
"Gets a record by the Record ID.": "Obtém um registro usando o ID do registo.",
"Returns a list of records matching the where condition.": "Retorna uma lista de registros que correspondem à condição de residência.",
"Workspace ID": "ID do workspace",
"Base ID": "ID Base",
"Table ID": "Table ID",
"Table Columns": "Colunas da Tabela",
"Record ID": "ID do Registro",
"Fields": "campos",
"Where": "Onde",
"Limit": "Limitar",
"Sort": "Ordenar",
"For self-hosted instances,select \"No Workspace\".": "Para instâncias auto-hospedadas, selecione \"Sem espaço de trabalho\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Permite que você especifique os campos que você deseja incluir na sua resposta da API. Por padrão, todos os campos estão incluídos na resposta.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Permite que você defina condições específicas para filtragem de registros. Veja a documentação [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Permite que você defina um limite para o número de registros que deseja recuperar.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Nome de campo separado por vírgulas sem espaço.Exemplo: **field1,-field2** irá classificar os registros primeiro por 'field1' na ordem ascendente e depois por 'field2' na ordem decrescente."
}

View File

@@ -0,0 +1,35 @@
{
"NocoDB": "NocoDB",
"NocoDB Base URL": "Базовый URL-адрес NocoDB",
"API Token": "API Token",
"API Version": "Версия API",
"Required only for self-hosted instances. Not needed for the cloud version.": "Требуется только для экземпляров самообслуживания. Не требуется для использования в облачной версии.",
"Before v0.90.0": "До версии 0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 - v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Вперед",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Войдите в свою учетную запись NocoDB.\n 2. Нажмите на фотографию профиля (слева снизу) и перейдите в **Настройки учетной записи->Токен**.\n 3. Создайте новый токен с любым именем и скопируйте API Token.\n 4. Ваш базовый URL-адрес - это место, где находится ваше приложение.",
"Create a Record": "Создать запись",
"Delete a Record": "Удалить запись",
"Update a Record": "Обновить запись",
"Get a Record": "Получить запись",
"Search Records": "Поиск записей",
"Creates a new record in the given table.": "Создает новую запись в данной таблице.",
"Deletes a record with the given Record ID.": "Удаляет запись с заданным ID записи.",
"Updates an existing record with the given Record ID.": "Обновляет существующую запись с заданным ID записи.",
"Gets a record by the Record ID.": "Получает запись по идентификатору записи.",
"Returns a list of records matching the where condition.": "Возвращает список записей, соответствующих условию.",
"Workspace ID": "ID проекта",
"Base ID": "Базовый ID",
"Table ID": "Table ID",
"Table Columns": "Столбцы таблицы",
"Record ID": "ID записи",
"Fields": "Поля",
"Where": "Где",
"Limit": "Лимит",
"Sort": "Сортировка",
"For self-hosted instances,select \"No Workspace\".": "Для экземпляров самохостинга выберите «Нет рабочей области».",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Позволяет указать поля, которые вы хотите включить в ответ API. По умолчанию все поля включены в ответ.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Позволяет установить ограничение на количество записей, которые вы хотите получить.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Названия, разделенные запятыми без пробелов. Пример: **поля, 1,-поля, 2** будут сортировать записи сначала по 'полю 1' в порядке возрастания, а затем по 'полю 2' в порядке убывания."
}

View File

@@ -0,0 +1,35 @@
{
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"v0.260.0 Onwards": "v0.260.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,35 @@
{
"NocoDB": "NocoDB",
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,34 @@
{
"NocoDB Base URL": "NocoDB Base URL",
"API Token": "API Token",
"API Version": "API Version",
"Required only for self-hosted instances. Not needed for the cloud version.": "Required only for self-hosted instances. Not needed for the cloud version.",
"Before v0.90.0": "Before v0.90.0",
"v0.90.0 to v0.199.0": "v0.90.0 to v0.199.0",
"v0.200.0 Onwards": "v0.200.0 Onwards",
"\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.": "\n 1. Log in to your NocoDB Account.\n 2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.\n 3. Create new token with any name and copy API Token.\n 4. Your Base URL is where your app is hosted.",
"Create a Record": "Create a Record",
"Delete a Record": "Delete a Record",
"Update a Record": "Update a Record",
"Get a Record": "Get a Record",
"Search Records": "Search Records",
"Creates a new record in the given table.": "Creates a new record in the given table.",
"Deletes a record with the given Record ID.": "Deletes a record with the given Record ID.",
"Updates an existing record with the given Record ID.": "Updates an existing record with the given Record ID.",
"Gets a record by the Record ID.": "Gets a record by the Record ID.",
"Returns a list of records matching the where condition.": "Returns a list of records matching the where condition.",
"Workspace ID": "Workspace ID",
"Base ID": "Base ID",
"Table ID": "Table ID",
"Table Columns": "Table Columns",
"Record ID": "Record ID",
"Fields": "Fields",
"Where": "Where",
"Limit": "Limit",
"Sort": "Sort",
"For self-hosted instances,select \"No Workspace\".": "For self-hosted instances,select \"No Workspace\".",
"Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.": "Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.",
"Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).": "Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).",
"Enables you to set a limit on the number of records you want to retrieve.": "Enables you to set a limit on the number of records you want to retrieve.",
"Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.": "Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order."
}

View File

@@ -0,0 +1,56 @@
import { createPiece, PieceAuth, Property } from '@activepieces/pieces-framework';
import { createRecordAction } from './lib/actions/create-record';
import { deleteRecordAction } from './lib/actions/delete-record';
import { updateRecordAction } from './lib/actions/update-record';
import { getRecordAction } from './lib/actions/get-record';
import { searchRecordsAction } from './lib/actions/search-records';
export const nocodbAuth = PieceAuth.CustomAuth({
description: `
1. Log in to your NocoDB Account.
2. Click on your profile-pic(bottom-left) and navigate to **Account Settings->Tokens**.
3. Create new token with any name and copy API Token.
4. Your Base URL is where your app is hosted.`,
props: {
baseUrl: Property.ShortText({
displayName: 'NocoDB Base URL',
required: true,
defaultValue: 'https://app.nocodb.com',
}),
apiToken: PieceAuth.SecretText({
displayName: 'API Token',
required: true,
}),
version: Property.StaticDropdown({
displayName: 'API Version',
description: 'Required only for self-hosted instances. Not needed for the cloud version.',
required: false,
defaultValue: 0,
options: {
options: [
{ label: 'Before v0.90.0', value: 1 },
{ label: 'v0.90.0 to v0.199.0', value: 2 },
{ label: 'v0.200.0 Onwards', value: 3 },
{ label: 'v0.260.0 Onwards', value: 4 },
]
}
}),
},
required: true,
});
export const nocodb = createPiece({
displayName: 'NocoDB',
auth: nocodbAuth,
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/nocodb.png',
authors: ['kishanprmr'],
actions: [
createRecordAction,
deleteRecordAction,
updateRecordAction,
getRecordAction,
searchRecordsAction,
],
triggers: [],
});

View File

@@ -0,0 +1,31 @@
import { nocodbAuth } from '../../';
import { createAction, DynamicPropsValue } from '@activepieces/pieces-framework';
import { makeClient, nocodbCommon } from '../common';
export const createRecordAction = createAction({
auth: nocodbAuth,
name: 'nocodb-create-record',
displayName: 'Create a Record',
description: 'Creates a new record in the given table.',
props: {
workspaceId: nocodbCommon.workspaceId,
baseId: nocodbCommon.baseId,
tableId: nocodbCommon.tableId,
tableColumns: nocodbCommon.tableColumns,
},
async run(context) {
const { baseId, tableId, tableColumns } = context.propsValue;
const recordInput: DynamicPropsValue = {};
Object.entries(tableColumns).forEach(([key, value]) => {
if (Array.isArray(value)) {
recordInput[key] = value.join(',');
} else {
recordInput[key] = value;
}
});
const client = makeClient(context.auth);
return await client.createRecord(baseId, tableId, recordInput, context.auth.props.version || 3);
},
});

View File

@@ -0,0 +1,25 @@
import { nocodbAuth } from '../../';
import { createAction, Property } from '@activepieces/pieces-framework';
import { makeClient, nocodbCommon } from '../common';
export const deleteRecordAction = createAction({
auth: nocodbAuth,
name: 'nocodb-delete-record',
displayName: 'Delete a Record',
description: 'Deletes a record with the given Record ID.',
props: {
workspaceId: nocodbCommon.workspaceId,
baseId: nocodbCommon.baseId,
tableId: nocodbCommon.tableId,
recordId: Property.Number({
displayName: 'Record ID',
required: true,
}),
},
async run(context) {
const { baseId, tableId, recordId } = context.propsValue;
const client = makeClient(context.auth);
return await client.deleteRecord(baseId, tableId, recordId, context.auth.props.version || 3);
},
});

View File

@@ -0,0 +1,25 @@
import { nocodbAuth } from '../../';
import { createAction, Property } from '@activepieces/pieces-framework';
import { makeClient, nocodbCommon } from '../common';
export const getRecordAction = createAction({
auth: nocodbAuth,
name: 'nocodb-get-record',
displayName: 'Get a Record',
description: 'Gets a record by the Record ID.',
props: {
workspaceId: nocodbCommon.workspaceId,
baseId: nocodbCommon.baseId,
tableId: nocodbCommon.tableId,
recordId: Property.Number({
displayName: 'Record ID',
required: true,
}),
},
async run(context) {
const { baseId, tableId, recordId } = context.propsValue;
const client = makeClient(context.auth);
return await client.getRecord(baseId, tableId, recordId, context.auth.props.version || 3);
},
});

View File

@@ -0,0 +1,56 @@
import { nocodbAuth } from '../../';
import { createAction, Property } from '@activepieces/pieces-framework';
import { makeClient, nocodbCommon } from '../common';
import { ListAPIResponse, ListAPIV3Response } from '../common/types';
export const searchRecordsAction = createAction({
auth: nocodbAuth,
name: 'nocodb-search-records',
displayName: 'Search Records',
description: 'Returns a list of records matching the where condition.',
props: {
workspaceId: nocodbCommon.workspaceId,
baseId: nocodbCommon.baseId,
tableId: nocodbCommon.tableId,
columnId: nocodbCommon.columnId,
whereCondition: Property.LongText({
displayName: 'Where',
required: false,
description: `Enables you to define specific conditions for filtering records.See docs [here](https://docs.nocodb.com/0.109.7/developer-resources/rest-apis/#comparison-operators).`,
}),
limit: Property.Number({
displayName: 'Limit',
required: true,
defaultValue: 10,
description:
'Enables you to set a limit on the number of records you want to retrieve.',
}),
sort: Property.LongText({
displayName: 'Sort',
required: false,
description: `Comma separated field names without space.Example: **field1,-field2** will sort the records first by 'field1' in ascending order and then by 'field2' in descending order.`,
}),
},
async run(context) {
const { baseId, tableId, columnId, limit, whereCondition, sort } =
context.propsValue;
const client = makeClient(context.auth);
const authVersion = context.auth.props.version || 3;
const response = await client.listRecords(
baseId,
tableId,
{
fields: columnId ? columnId.join(',') : undefined,
where: whereCondition,
sort,
offset: 0,
limit,
},
authVersion
);
return authVersion === 4
? (response as ListAPIV3Response<Record<string, unknown>>).records
: (response as ListAPIResponse<Record<string, unknown>>).list;
},
});

View File

@@ -0,0 +1,53 @@
import { nocodbAuth } from '../../';
import {
createAction,
DynamicPropsValue,
Property,
} from '@activepieces/pieces-framework';
import { makeClient, nocodbCommon } from '../common';
export const updateRecordAction = createAction({
auth: nocodbAuth,
name: 'nocodb-update-record',
displayName: 'Update a Record',
description: 'Updates an existing record with the given Record ID.',
props: {
workspaceId: nocodbCommon.workspaceId,
baseId: nocodbCommon.baseId,
tableId: nocodbCommon.tableId,
recordId: Property.Number({
displayName: 'Record ID',
required: true,
}),
tableColumns: nocodbCommon.tableColumns,
},
async run(context) {
const { baseId, tableId, recordId, tableColumns } = context.propsValue;
const authVersion = context.auth.props.version || 3;
let recordInput: DynamicPropsValue = {};
if (authVersion === 4) {
recordInput['id'] = recordId;
recordInput['fields'] = {};
} else {
recordInput = {
Id: recordId,
};
}
Object.entries(tableColumns).forEach(([key, value]) => {
if(authVersion === 4) {
recordInput['fields'][key] = value;
} else {
if (Array.isArray(value)) {
recordInput[key] = value.join(',');
} else {
recordInput[key] = value;
}
}
});
const client = makeClient(context.auth);
return await client.updateRecord(baseId, tableId, recordInput, authVersion);
},
});

View File

@@ -0,0 +1,266 @@
import {
HttpMessageBody,
HttpMethod,
QueryParams,
httpClient,
HttpRequest,
} from '@activepieces/pieces-common';
import {
BaseResponse,
DataOperationResponse,
DataOperationV3Response,
GetTableResponse,
GetTableV3Response,
ListAPIResponse,
ListAPIV3Response,
ListRecordsParams,
TableResponse,
WorkspaceResponse,
} from './types';
export class NocoDBClient {
constructor(private hostUrl: string, private apiToken: string) {}
async makeRequest<T extends HttpMessageBody>(
method: HttpMethod,
resourceUri: string,
query?: Record<string, string | number | string[] | undefined>,
body: Record<string, unknown> | undefined = undefined
): Promise<T> {
const baseUrl = this.hostUrl.replace(/\/$/, '');
const params: QueryParams = {};
if (query) {
for (const [key, value] of Object.entries(query)) {
if (value !== null && value !== undefined) {
params[key] = String(value);
}
}
}
const request: HttpRequest = {
method: method,
url: baseUrl + '/api' + resourceUri,
headers: {
'xc-token': this.apiToken,
},
queryParams: params,
body: body,
};
const response = await httpClient.sendRequest<T>(request);
return response.body;
}
async listWorkspaces(): Promise<ListAPIResponse<WorkspaceResponse>> {
return await this.makeRequest<ListAPIResponse<WorkspaceResponse>>(
HttpMethod.GET,
'/v1/workspaces/'
);
}
async listBases(
workspaceId?: string,
version = 3
): Promise<ListAPIResponse<BaseResponse>> {
if (workspaceId && workspaceId !== 'none') {
// Cloud version
const endpoint =
version === 4
? `/v3/meta/workspaces/${workspaceId}/bases/`
: `/v1/workspaces/${workspaceId}/bases/`;
return await this.makeRequest<ListAPIResponse<BaseResponse>>(
HttpMethod.GET,
endpoint
);
} else {
// Self-hosted version
const endpoint =
version === 4
? '/v3/meta/workspaces/nc/bases/'
: version === 3
? '/v2/meta/bases/'
: '/v1/db/meta/projects/';
return await this.makeRequest<ListAPIResponse<BaseResponse>>(
HttpMethod.GET,
endpoint
);
}
}
async listTables(
baseId: string,
version = 3
): Promise<ListAPIResponse<TableResponse>> {
const endpoint =
version === 4
? `/v3/meta/bases/${baseId}/tables`
: version === 3
? `/v2/meta/bases/${baseId}/tables`
: `/v1/db/meta/projects/${baseId}/tables`;
return await this.makeRequest<ListAPIResponse<TableResponse>>(
HttpMethod.GET,
endpoint
);
}
async getTable(
_baseId: string,
tableId: string,
version = 3
): Promise<GetTableResponse> {
const endpoint =
version === 3
? `/v2/meta/tables/${tableId}/`
: `/v1/db/meta/tables/${tableId}/`;
return await this.makeRequest<GetTableResponse>(HttpMethod.GET, endpoint);
}
async getTableV3(
baseId: string,
tableId: string,
_version = 4
): Promise<GetTableV3Response> {
const endpoint = `/v3/meta/bases/${baseId}/tables/${tableId}`;
return await this.makeRequest<GetTableV3Response>(HttpMethod.GET, endpoint);
}
async createRecord(
baseId: string,
tableId: string,
recordInput: Record<string, unknown>,
version = 3
) {
const endpoint =
version === 4
? `/v3/data/${baseId}/${tableId}/records`
: version === 3
? `/v2/tables/${tableId}/records`
: `/v1/db/data/noco/${tableId}`;
const response = await this.makeRequest<DataOperationResponse>(
HttpMethod.POST,
endpoint,
undefined,
version === 4 ? { fields: recordInput } : recordInput
);
if (version === 4) {
return (response as DataOperationV3Response).records?.[0] ?? response;
} else {
return response;
}
}
async getRecord(
baseId: string,
tableId: string,
recordId: number,
version = 3
) {
const endpoint =
version === 4
? `/v3/data/${baseId}/${tableId}/records/${recordId}`
: version === 3
? `/v2/tables/${tableId}/records/${recordId}`
: `/v1/db/data/noco/${tableId}/${recordId}`;
return await this.makeRequest(HttpMethod.GET, endpoint);
}
async updateRecord(
baseId: string,
tableId: string,
recordInput: Record<string, unknown>,
version = 3
) {
const endpoint =
version === 4
? `/v3/data/${baseId}/${tableId}/records`
: version === 3
? `/v2/tables/${tableId}/records/`
: `/v1/db/data/noco/${tableId}`;
const response = await this.makeRequest<DataOperationResponse>(
HttpMethod.PATCH,
endpoint,
undefined,
recordInput
);
if (version === 4) {
return (response as DataOperationV3Response).records?.[0] ?? response;
} else {
return response;
}
}
async deleteRecord(
baseId: string,
tableId: string,
recordId: number,
version = 3
) {
const endpoint =
version === 4
? `/v3/data/${baseId}/${tableId}/records/`
: version === 3
? `/v2/tables/${tableId}/records/`
: `/v1/db/data/noco/${tableId}/${recordId}`;
const body =
version === 4
? { id: recordId }
: version === 3
? { Id: recordId }
: undefined;
const response = await this.makeRequest<DataOperationResponse>(HttpMethod.DELETE, endpoint, undefined, body);
if (version === 4) {
return (response as DataOperationV3Response).records?.[0] ?? response;
} else {
return response;
}
}
async listRecords(
baseId: string,
tableId: string,
params: ListRecordsParams,
version = 3
): Promise<
| ListAPIResponse<Record<string, unknown>>
| ListAPIV3Response<Record<string, unknown>>
> {
const endpoint =
version === 4
? `/v3/data/${baseId}/${tableId}/records`
: version === 3
? `/v2/tables/${tableId}/records/`
: `/v1/db/data/noco/${tableId}`;
if (version === 4 && params.sort && typeof params.sort === 'string') {
const sortItems = params.sort.split(',');
// format to v3
params.sort = JSON.stringify(
sortItems.map((item) => {
if (item.startsWith('-')) {
return {
field: item.substring(1),
direction: 'desc',
};
} else {
return {
field: item,
direction: 'asc',
};
}
})
);
}
const makeRequest = async <T>() => {
return await this.makeRequest<T>(HttpMethod.GET, endpoint, params);
};
if (version === 4) {
return makeRequest<ListAPIV3Response<Record<string, unknown>>>();
} else {
return makeRequest<ListAPIResponse<Record<string, unknown>>>();
}
}
}

View File

@@ -0,0 +1,370 @@
import { nocodbAuth } from '../../';
import {
DynamicPropsValue,
AppConnectionValueForAuthProperty,
Property,
} from '@activepieces/pieces-framework';
import { NocoDBClient } from './client';
import {
ColumnResponse,
ColumnV3Response,
GetTableResponse,
GetTableV3Response,
} from './types';
export function makeClient(auth: AppConnectionValueForAuthProperty<typeof nocodbAuth>) {
return new NocoDBClient(auth.props.baseUrl, auth.props.apiToken);
}
export const nocodbCommon = {
workspaceId: Property.Dropdown({
auth:nocodbAuth,
displayName: 'Workspace ID',
refreshers: [],
required: false,
description: 'For self-hosted instances,select "No Workspace".',
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Please connect your account first.',
options: [],
};
}
const client = makeClient(
auth
);
try {
const response = await client.listWorkspaces();
return {
disabled: false,
options: response.list.map((workspace) => {
return {
label: workspace.title,
value: workspace.id,
};
}),
};
} catch (error) {
return {
disabled: false,
options: [
{
label: 'No Workspace',
value: 'none',
},
],
};
}
},
}),
baseId: Property.Dropdown({
auth:nocodbAuth,
displayName: 'Base ID',
refreshers: ['workspaceId'],
required: true,
options: async ({ auth, workspaceId }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Please connect your account first.',
options: [],
};
}
try {
const client = makeClient(
auth
);
const response = await client.listBases(
(workspaceId as string) || undefined,
(auth).props.version || 3
);
return {
disabled: false,
options: response.list.map((base) => {
return {
label: base.title,
value: base.id,
};
}),
};
} catch (error) {
console.error('Error fetching bases:', error);
return {
disabled: true,
placeholder:
'Error fetching bases. Please check your connection and version.',
options: [],
};
}
},
}),
tableId: Property.Dropdown({
auth:nocodbAuth,
displayName: 'Table ID',
refreshers: ['workspaceId', 'baseId'],
required: true,
options: async ({ auth, baseId }) => {
if (!auth || !baseId) {
return {
disabled: true,
placeholder: 'Please connect your account first and select base.',
options: [],
};
}
const client = makeClient(
auth
);
const response = await client.listTables(
baseId as string,
(auth ).props.version || 3
);
return {
disabled: false,
options: response.list.map((table) => {
return {
label: table.title,
value: table.id,
};
}),
};
},
}),
columnId: Property.MultiSelectDropdown({
auth:nocodbAuth,
displayName: 'Fields',
description:
'Allows you to specify the fields that you wish to include in your API response. By default, all the fields are included in the response.',
refreshers: ['workspaceId', 'baseId', 'tableId'],
required: false,
options: async ({ auth, baseId, tableId }) => {
if (!auth || !baseId || !tableId) {
return {
disabled: true,
placeholder: 'Please connect your account first and select base.',
options: [],
};
}
const client = makeClient(
auth
);
const authVersion =
(auth ).props.version || 3;
const response =
authVersion === 4
? await client.getTableV3(
baseId as unknown as string,
tableId as unknown as string,
authVersion
)
: await client.getTable(
baseId as unknown as string,
tableId as unknown as string,
authVersion
);
return {
disabled: false,
options:
authVersion === 4
? (response as GetTableV3Response).fields.map((field) => {
return {
label: field.title,
value: field.title,
};
})
: (response as GetTableResponse).columns.map((column) => {
return {
label: column.title,
value: column.title,
};
}),
};
},
}),
tableColumns: Property.DynamicProperties({
auth:nocodbAuth,
displayName: 'Table Columns',
refreshers: ['baseId', 'tableId'],
required: true,
props: async ({ auth, baseId, tableId }) => {
if (!auth) return {};
if (!baseId) return {};
if (!tableId) return {};
const fields: DynamicPropsValue = {};
const client = makeClient(
auth
);
const authVersion =
(auth ).props.version || 3;
const response =
authVersion === 4
? await client.getTableV3(
baseId as unknown as string,
tableId as unknown as string,
authVersion
)
: await client.getTable(
baseId as unknown as string,
tableId as unknown as string,
authVersion
);
const columns =
authVersion === 4
? (response as GetTableV3Response).fields
: (response as GetTableResponse).columns;
for (const column of (columns ?? [])) {
const uidt =
authVersion === 4
? (column as ColumnV3Response).type
: (column as ColumnResponse).uidt;
switch (uidt) {
case 'SingleLineText':
case 'PhoneNumber':
case 'Email':
case 'URL':
fields[column.title] = Property.ShortText({
displayName: column.title,
required: false,
});
break;
case 'LongText':
fields[column.title] = Property.LongText({
displayName: column.title,
required: false,
});
break;
case 'Number':
case 'Decimal':
case 'Percent':
case 'Rating':
case 'Currency':
case 'Year':
fields[column.title] = Property.Number({
displayName: column.title,
required: false,
});
break;
case 'Checkbox':
fields[column.title] = Property.Checkbox({
displayName: column.title,
required: true,
});
break;
case 'MultiSelect': {
const getOptionsForAuthVersion4 = () => {
const colOptions = (column as ColumnV3Response).options;
return (colOptions?.['choices'] as any[])?.map((option) => {
return {
label: option.title,
value: option.title,
};
});
};
const options =
authVersion === 4
? getOptionsForAuthVersion4()
: (column as ColumnResponse).colOptions?.options?.map(
(option) => {
return {
label: option.title,
value: option.title,
};
}
);
fields[column.title] = Property.StaticMultiSelectDropdown({
displayName: column.title,
required: false,
options: {
disabled: false,
options: options ?? [],
},
});
break;
}
case 'SingleSelect': {
const getOptionsForAuthVersion4 = () => {
const colOptions = (column as ColumnV3Response).options;
return (colOptions?.['choices'] as any[])?.map((option) => {
return {
label: option.title,
value: option.title,
};
});
};
const options =
authVersion === 4
? getOptionsForAuthVersion4()
: (column as ColumnResponse).colOptions?.options?.map(
(option) => {
return {
label: option.title,
value: option.title,
};
}
);
fields[column.title] = Property.StaticDropdown({
displayName: column.title,
required: false,
options: {
disabled: false,
options: options ?? [],
},
});
break;
}
case 'Date':{
const columnMeta = authVersion === 4 ?
(column as ColumnV3Response).options:
(column as ColumnResponse).meta;
fields[column.title] = Property.ShortText({
displayName: column.title,
required: false,
description: columnMeta?.['date_format']
? `Please provide date in ${columnMeta['date_format']} format.`
: '',
});
break;}
case 'Time':
fields[column.title] = Property.ShortText({
displayName: column.title,
required: false,
description: 'Please provide time in HH:mm:ss format.',
});
break;
case 'DateTime':
fields[column.title] = Property.DateTime({
displayName: column.title,
required: false,
});
break;
case 'JSON':
fields[column.title] = Property.Json({
displayName: column.title,
required: false,
});
break;
default:
fields[column.title] = Property.ShortText({
displayName: column.title,
required: false,
});
break;
}
}
return fields;
},
}),
};

View File

@@ -0,0 +1,150 @@
export interface ListAPIV3Response<T> {
records: T[];
next?: string;
prev?: string;
}
export interface ListAPIResponse<T> {
list: T[];
pageInfo: {
totalRows: number;
page: number;
pageSize: number;
isFirstPage: boolean;
isLastPage: boolean;
};
}
export interface WorkspaceResponse {
id: string;
title: string;
description: string;
deleted: boolean;
deleted_at: string;
status: number;
order: number;
}
export interface BaseResponse {
id: string;
title: string;
description: string;
deleted: boolean;
created_at: string;
updated_at: string;
status: number;
order: number;
type: string;
}
export interface TableResponse {
id: string;
source_id: string;
description: string;
base_id: string;
table_name: string;
title: string;
type: string;
created_at: string;
updated_at: string;
order: number;
enabled: boolean;
}
type ColumnType =
| 'Attachment'
| 'AutoNumber'
| 'Barcode'
| 'Button'
| 'Checkbox'
| 'Collaborator'
| 'Count'
| 'CreatedTime'
| 'Currency'
| 'Date'
| 'DateTime'
| 'Decimal'
| 'Duration'
| 'Email'
| 'Formula'
| 'ForeignKey'
| 'GeoData'
| 'Geometry'
| 'ID'
| 'JSON'
| 'LastModifiedTime'
| 'LongText'
| 'LinkToAnotherRecord'
| 'Lookup'
| 'MultiSelect'
| 'Number'
| 'Percent'
| 'PhoneNumber'
| 'Rating'
| 'Rollup'
| 'SingleLineText'
| 'SingleSelect'
| 'SpecificDBType'
| 'Time'
| 'URL'
| 'Year'
| 'QrCode'
| 'Links'
| 'User'
| 'CreatedBy'
| 'LastModifiedBy';
export interface ColumnResponse {
id: string;
title: string;
column_name: string;
uidt: ColumnType;
colOptions?: {
options: Array<{ title: string; id: string }>;
};
meta: Record<string, unknown> | null;
}
export interface ColumnV3Response {
id: string;
title: string;
type: ColumnType;
options: Record<string, unknown> | null;
}
export interface GetTableV3Response {
id: string;
title: string;
fields: Array<ColumnV3Response>;
}
export interface GetTableResponse {
id: string;
source_id: string;
table_name: string;
title: string;
type: string;
created_at: string;
updated_at: string;
order: number;
enabled: boolean;
columns: Array<ColumnResponse>;
}
export interface ListRecordsParams
extends Record<string, string | number | string[] | undefined> {
fields?: string;
sort?: string;
where?: string;
offset: number;
limit: number;
viewId?: string;
filter?: string;
}
export interface DataOperationV3Response {
records: { id?: string | number; fields: Record<string, unknown> }[];
}
export type DataOperationResponse =
| Record<string, unknown>
| DataOperationV3Response;