Skip to content
Open
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
71 changes: 70 additions & 1 deletion ww-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ export default {
getIsValid({ collectionId, data }) {
return !!collectionId && !!data;
},
copilot: {
description: "Creates a new record in an Airtable collection",
returns: "object - The newly created record",
schema: {
collectionId: {
type: "string",
description: "ID of the Airtable collection",
bindable: false
},
data: {
type: "object",
description: "Data object containing field values for the new record",
bindable: true
}
}
}
/* wwEditor:end */
},
{
Expand All @@ -39,6 +55,27 @@ export default {
getIsValid({ collectionId, recordId, data }) {
return !!collectionId && !!recordId && !!data;
},
copilot: {
description: "Updates an existing record in an Airtable collection",
returns: "object - The updated record",
schema: {
collectionId: {
type: "string",
description: "ID of the Airtable collection",
bindable: false
},
recordId: {
type: "string",
description: "ID of the record to update",
bindable: true
},
data: {
type: "object",
description: "Data object containing updated field values",
bindable: true
}
}
}
/* wwEditor:end */
},
{
Expand All @@ -50,6 +87,22 @@ export default {
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
copilot: {
description: "Deletes a record from an Airtable collection",
returns: "object - The deleted record",
schema: {
collectionId: {
type: "string",
description: "ID of the Airtable collection",
bindable: false
},
recordId: {
type: "string",
description: "ID of the record to delete",
bindable: true
}
}
}
/* wwEditor:end */
},
{
Expand All @@ -61,7 +114,23 @@ export default {
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
copilot: {
description: "Synchronizes a record with Airtable to get its latest data",
returns: "object - The synchronized record with updated data",
schema: {
collectionId: {
type: "string",
description: "ID of the Airtable collection",
bindable: false
},
recordId: {
type: "string",
description: "ID of the record to synchronize",
bindable: true
}
}
}
/* wwEditor:end */
},
],
};
};