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
48 changes: 48 additions & 0 deletions ww-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ export default {
getIsValid({ collectionId, data }) {
return !!collectionId && !!data;
},
aiDescription: {
description: 'Create a record in the selected collection.',
return: 'null',
syntax: `{
"args": {
"collectionId": "{{id of the collection as string}}",
"data": {
"fieldName": {{value as string, number or ACTION_VALUE}},
...other fields to update
}
}
}`,
},
/* wwEditor:end */
},
{
Expand All @@ -36,6 +49,21 @@ export default {
getIsValid({ collectionId, recordId, data }) {
return !!collectionId && !!recordId && !!data;
},
aiDescription: {
description: 'Update a record in the selected collection.',
return: 'null',
syntax: `{
"args": {
"collectionId": "{{id of the collection as string}}",
"recordId": "{{id of the record to update as string or ACTION_VALUE}}",
"fields": ["fieldName1", "fieldName2", ...],
"data": {
"fieldName": {{value as string, number or ACTION_VALUE}},
...other fields to update
}
}
}`,
},
/* wwEditor:end */
},
{
Expand All @@ -47,6 +75,16 @@ export default {
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
aiDescription: {
description: 'Delete a record in the selected collection.',
return: 'null',
syntax: `{
"args": {
"collectionId": "{{id of the collection as string}}",
"recordId": "{{id of the record to delete as string or ACTION_VALUE}}",
}
}`,
},
/* wwEditor:end */
},
{
Expand All @@ -58,6 +96,16 @@ export default {
getIsValid({ collectionId, recordId }) {
return !!collectionId && !!recordId;
},
aiDescription: {
description: 'Refresh the cache of a record if a collection is of type "cached".',
return: 'null',
syntax: `{
"args": {
"collectionId": "{{id of the collection as string}}",
"recordId": "{{id of the record to sync as string or ACTION_VALUE}}",
}
}`,
},
/* wwEditor:end */
},
],
Expand Down