Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 217 additions & 0 deletions docs/content/docs/reference/components/retable.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
---
title: "Retable"
description: "Retable is a online database and spreadsheet platform designed for teams and individuals who want to organize, manage, and collaborate on structured data."
---


Categories: Productivity and Collaboration


Type: retable/v1

<hr />



## Connections

Version: 1


### API Key

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| key | Key | STRING | | true |
| value | API key | STRING | | true |





<hr />



## Actions


### Delete Row
Name: deleteRow

`Delete a row.`

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| workspace_id | Workspace ID | STRING | `ID of the workspace.` | true |
| project_id | Project ID | STRING <details> <summary> Depends On </summary> workspace_id </details> | `ID of the project.` | true |
| retable_id | Retable ID | STRING <details> <summary> Depends On </summary> project_id </details> | `ID of the retable.` | true |
| row_ids | Rows IDs | ARRAY <details> <summary> Items </summary> [INTEGER] </details> | `ID of the rows to delete.` | true |

#### Example JSON Structure
```json
{
"label" : "Delete Row",
"name" : "deleteRow",
"parameters" : {
"workspace_id" : "",
"project_id" : "",
"retable_id" : "",
"row_ids" : [ 1 ]
},
"type" : "retable/v1/deleteRow"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> &#123;INTEGER\(deleted_row_count)&#125; </details> | |




#### Output Example
```json
{
"data" : {
"deleted_row_count" : 1
}
}
```


### Insert Row
Name: insertRow

`Insert a row.`

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| workspace_id | Workspace ID | STRING | `ID of the workspace.` | true |
| project_id | Project ID | STRING <details> <summary> Depends On </summary> workspace_id </details> | `ID of the project.` | true |
| retable_id | Retable ID | STRING <details> <summary> Depends On </summary> project_id </details> | `ID of the retable.` | true |
| row_ids | | DYNAMIC_PROPERTIES <details> <summary> Depends On </summary> project_id </details> | | false |

#### Example JSON Structure
```json
{
"label" : "Insert Row",
"name" : "insertRow",
"parameters" : {
"workspace_id" : "",
"project_id" : "",
"retable_id" : "",
"row_ids" : { }
},
"type" : "retable/v1/insertRow"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | OBJECT <details> <summary> Properties </summary> &#123;[INTEGER\($row_id), STRING\($created_at), STRING\($updated_at), &#123;STRING\(id), STRING\(name), STRING\(surname), STRING\(email)&#125;\($created_by), &#123;STRING\(id), STRING\(name), STRING\(surname), STRING\(email)&#125;\($updated_by), [STRING\($column_id), STRING\($title), STRING\($cell_value)]\($columns)]\(rows)&#125; </details> | |




#### Output Example
```json
{
"data" : {
"rows" : [ 1, "", "", {
"id" : "",
"name" : "",
"surname" : "",
"email" : ""
}, {
"id" : "",
"name" : "",
"surname" : "",
"email" : ""
}, [ "", "", "" ] ]
}
}
```


### Update Row
Name: updateRow

`Update a row.`

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| workspace_id | Workspace ID | STRING | `ID of the workspace.` | true |
| project_id | Project ID | STRING <details> <summary> Depends On </summary> workspace_id </details> | `ID of the project.` | true |
| retable_id | Retable ID | STRING <details> <summary> Depends On </summary> project_id </details> | `ID of the retable.` | true |
| row_id | Row ID | INTEGER | `ID of the row to update.` | true |
| row_ids | | DYNAMIC_PROPERTIES <details> <summary> Depends On </summary> project_id </details> | | false |

#### Example JSON Structure
```json
{
"label" : "Update Row",
"name" : "updateRow",
"parameters" : {
"workspace_id" : "",
"project_id" : "",
"retable_id" : "",
"row_id" : 1,
"row_ids" : { }
},
"type" : "retable/v1/updateRow"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| data | ARRAY <details> <summary> Items </summary> [INTEGER] </details> | Row IDs. |




#### Output Example
```json
{
"data" : [ 1 ]
}
```




1 change: 1 addition & 0 deletions server/apps/server-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ dependencies {
implementation(project(":server:libs:modules:components:reddit"))
implementation(project(":server:libs:modules:components:resend"))
implementation(project(":server:libs:modules:components:request"))
implementation(project(":server:libs:modules:components:retable"))
implementation(project(":server:libs:modules:components:rocketchat"))
implementation(project(":server:libs:modules:components:salesflare"))
implementation(project(":server:libs:modules:components:salesforce"))
Expand Down
1 change: 1 addition & 0 deletions server/ee/apps/worker-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ dependencies {
implementation(project(":server:libs:modules:components:reddit"))
implementation(project(":server:libs:modules:components:resend"))
implementation(project(":server:libs:modules:components:request"))
implementation(project(":server:libs:modules:components:retable"))
implementation(project(":server:libs:modules:components:rocketchat"))
implementation(project(":server:libs:modules:components:salesflare"))
implementation(project(":server:libs:modules:components:salesforce"))
Expand Down
2 changes: 2 additions & 0 deletions server/libs/modules/components/retable/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version="1.0"

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright 2025 ByteChef
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.bytechef.component.retable;

import static com.bytechef.component.definition.ComponentDsl.component;
import static com.bytechef.component.definition.ComponentDsl.tool;

import com.bytechef.component.ComponentHandler;
import com.bytechef.component.definition.ComponentCategory;
import com.bytechef.component.definition.ComponentDefinition;
import com.bytechef.component.retable.action.RetableDeleteRowAction;
import com.bytechef.component.retable.action.RetableInsertRowAction;
import com.bytechef.component.retable.action.RetableUpdateRowAction;
import com.bytechef.component.retable.connection.RetableConnection;
import com.google.auto.service.AutoService;

/**
* @author Marija Horvat
*/

@AutoService(ComponentHandler.class)
public class RetableComponentHandler implements ComponentHandler {

private static final ComponentDefinition COMPONENT_DEFINITION = component("retable")
.title("Retable")
.description(
"Retable is a online database and spreadsheet platform designed for teams and individuals who want to " +
"organize, manage, and collaborate on structured data.")
.icon("path:assets/retable.svg")
.customAction(true)
.categories(ComponentCategory.PRODUCTIVITY_AND_COLLABORATION)
.connection(RetableConnection.CONNECTION_DEFINITION)
.actions(
RetableDeleteRowAction.ACTION_DEFINITION,
RetableInsertRowAction.ACTION_DEFINITION,
RetableUpdateRowAction.ACTION_DEFINITION)
.clusterElements(
tool(RetableDeleteRowAction.ACTION_DEFINITION),
tool(RetableInsertRowAction.ACTION_DEFINITION),
tool(RetableUpdateRowAction.ACTION_DEFINITION));

@Override
public ComponentDefinition getDefinition() {
return COMPONENT_DEFINITION;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* Copyright 2025 ByteChef
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.bytechef.component.retable.action;

import static com.bytechef.component.definition.ComponentDsl.action;
import static com.bytechef.component.definition.ComponentDsl.array;
import static com.bytechef.component.definition.ComponentDsl.integer;
import static com.bytechef.component.definition.ComponentDsl.object;
import static com.bytechef.component.definition.ComponentDsl.outputSchema;
import static com.bytechef.component.definition.ComponentDsl.string;
import static com.bytechef.component.definition.Context.Http.Body;
import static com.bytechef.component.definition.Context.Http.ResponseType;
import static com.bytechef.component.definition.Context.Http.responseType;
import static com.bytechef.component.retable.constant.RetableConstants.PROJECT_ID;
import static com.bytechef.component.retable.constant.RetableConstants.RETABLE_ID;
import static com.bytechef.component.retable.constant.RetableConstants.ROWS_IDS;
import static com.bytechef.component.retable.constant.RetableConstants.WORKSPACE_ID;

import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition;
import com.bytechef.component.definition.Context;
import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction;
import com.bytechef.component.definition.Parameters;
import com.bytechef.component.retable.util.RetableUtils;

/**
* @author Marija Horvat
*/
public class RetableDeleteRowAction {

public static final ModifiableActionDefinition ACTION_DEFINITION = action("deleteRow")
.title("Delete Row")
.description("Delete a row.")
.properties(
string(WORKSPACE_ID)
.label("Workspace ID")
.description("ID of the workspace.")
.options((ActionOptionsFunction<String>) RetableUtils::getWorkspaceIdOptions)
.required(true),
string(PROJECT_ID)
.label("Project ID")
.description("ID of the project.")
.optionsLookupDependsOn(WORKSPACE_ID)
.options((ActionOptionsFunction<String>) RetableUtils::getProjectIdOptions)
.required(true),
string(RETABLE_ID)
.label("Retable ID")
.description("ID of the retable.")
.optionsLookupDependsOn(PROJECT_ID)
.options((ActionOptionsFunction<String>) RetableUtils::getRetableIdOptions)
.required(true),
array(ROWS_IDS)
.label("Rows IDs")
.description("ID of the rows to delete.")
.required(true)
.items(integer()))
.output(
outputSchema(
object()
.properties(
object("data")
.properties(
integer("deleted_row_count")
.description("Number of rows deleted.")))))
.perform(RetableDeleteRowAction::perform);

private RetableDeleteRowAction() {
}

public static Object perform(Parameters inputParameters, Parameters connectionParameters, Context context) {
return context
.http(http -> http.delete("/retable/" + inputParameters.getRequiredString(RETABLE_ID) + "/data"))
.configuration(responseType(ResponseType.JSON))
.body(Body.of(ROWS_IDS, inputParameters.getList(ROWS_IDS)))
.execute()
.getBody();
}
}
Loading