diff --git a/ww-config.js b/ww-config.js index aab23ae..d15c5e7 100644 --- a/ww-config.js +++ b/ww-config.js @@ -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 */ }, { @@ -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 */ }, { @@ -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 */ }, { @@ -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 */ }, ],