Skip to content
Open
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
57 changes: 57 additions & 0 deletions server/libs/modules/components/airtable/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,63 @@ paths:
application/json:
schema:
type: "object"
patch:
tags:
- "records"
summary: "Update Record"
description: "Update an existing record in an Airtable table"
operationId: "updateRecord"
x-ai-agent-tool: true
parameters:
- name: "baseId"
description: "ID of the base where table is located."
in: "path"
required: true
schema:
title: "Base ID"
type: "string"
x-dynamic-options: true
- name: "tableId"
description: "ID of the table where the record is located."
in: "path"
required: true
schema:
title: "Table ID"
type: "string"
x-dynamic-options: true
x-dynamic-options-dependency:
- "baseId"
- name: "recordId"
description: "ID of the record that will be retrieved."
in: "path"
required: true
schema:
title: "Row ID"
type: "string"
x-dynamic-options: true
x-dynamic-options-dependency:
- "baseId"
- "tableId"
requestBody:
content:
application/json:
schema:
type: "object"
properties:
fields:
x-dynamic-properties: true
x-dynamic-properties-dependency:
- "baseId"
- "tableId"
- "recordId"
responses:
"200":
description: "Successful operation"
x-dynamic-output: true
content:
application/json:
schema:
type: "object"
components:
securitySchemes:
api_key:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.bytechef.component.airtable.action.AirtableCreateRecordAction;
import com.bytechef.component.airtable.action.AirtableDeleteRecordAction;
import com.bytechef.component.airtable.action.AirtableGetRecordAction;
import com.bytechef.component.airtable.action.AirtableUpdateRecordAction;
import com.bytechef.component.airtable.connection.AirtableConnection;
import com.bytechef.component.definition.ComponentDefinition;

Expand All @@ -37,9 +38,11 @@ public abstract class AbstractAirtableComponentHandler implements OpenApiCompone
.title("Airtable")
.description("Airtable is a user-friendly and flexible cloud-based database management tool."))
.actions(modifyActions(AirtableCreateRecordAction.ACTION_DEFINITION,
AirtableDeleteRecordAction.ACTION_DEFINITION, AirtableGetRecordAction.ACTION_DEFINITION))
AirtableUpdateRecordAction.ACTION_DEFINITION, AirtableDeleteRecordAction.ACTION_DEFINITION,
AirtableGetRecordAction.ACTION_DEFINITION))
.connection(modifyConnection(AirtableConnection.CONNECTION_DEFINITION))
.clusterElements(modifyClusterElements(tool(AirtableCreateRecordAction.ACTION_DEFINITION),
tool(AirtableUpdateRecordAction.ACTION_DEFINITION),
tool(AirtableDeleteRecordAction.ACTION_DEFINITION),
tool(AirtableGetRecordAction.ACTION_DEFINITION)))
.triggers(getTriggers());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* 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.airtable.action;

import static com.bytechef.component.OpenApiComponentHandler.PropertyType;
import static com.bytechef.component.definition.ComponentDsl.action;
import static com.bytechef.component.definition.ComponentDsl.dynamicProperties;
import static com.bytechef.component.definition.ComponentDsl.string;
import static com.bytechef.component.definition.Context.Http.BodyContentType;
import static com.bytechef.component.definition.Context.Http.ResponseType;

import com.bytechef.component.airtable.util.AirtableUtils;
import com.bytechef.component.definition.ComponentDsl;
import com.bytechef.component.definition.OptionsDataSource;
import com.bytechef.component.definition.PropertiesDataSource;
import java.util.Map;

/**
* Provides a list of the component actions.
*
* @generated
*/
public class AirtableUpdateRecordAction {
public static final ComponentDsl.ModifiableActionDefinition ACTION_DEFINITION = action("updateRecord")
.title("Update Record")
.description("Update an existing record in an Airtable table")
.metadata(
Map.of(
"method", "PATCH",
"path", "/{baseId}/{tableId}/{recordId}", "bodyContentType", BodyContentType.JSON, "mimeType",
"application/json", "responseType", ResponseType.JSON

))
.properties(string("baseId").label("Base ID")
.description("ID of the base where table is located.")
.required(true)
.options((OptionsDataSource.ActionOptionsFunction<String>) AirtableUtils::getBaseIdOptions)
.metadata(
Map.of(
"type", PropertyType.PATH)),
string("tableId").label("Table ID")
.description("ID of the table where the record is located.")
.required(true)
.options((OptionsDataSource.ActionOptionsFunction<String>) AirtableUtils::getTableIdOptions)
.optionsLookupDependsOn("baseId")
.metadata(
Map.of(
"type", PropertyType.PATH)),
string("recordId").label("Row ID")
.description("ID of the record that will be retrieved.")
.required(true)
.options((OptionsDataSource.ActionOptionsFunction<String>) AirtableUtils::getRecordIdOptions)
.optionsLookupDependsOn("baseId", "tableId")
.metadata(
Map.of(
"type", PropertyType.PATH)),
dynamicProperties("fields")
.properties((PropertiesDataSource.ActionPropertiesFunction) AirtableUtils::getFieldsProperties)
.propertiesLookupDependsOn("baseId", "tableId", "recordId")
.required(false)
.metadata(
Map.of(
"type", PropertyType.BODY)))
.output();

private AirtableUpdateRecordAction() {
}
}