docs(skill): document sendNotification action (7 actions total) + CLI support
- skill: SKILL.md (7 actions in description + routing table entry), action-types.md (new section #4 sendNotification: config keys, variables, system-in-app semantics), automation-guide.md/cli-reference.md (--to-user/--title/--message/--severity/--path), development.md (7 actions), metadata.json abstract - cli: action add --type sendNotification now builds config from granular flags (toUserId/title/message/severity/path); ACTION_TYPES includes sendNotification; live-verified via workflow create + action add + delete
This commit is contained in:
@@ -417,6 +417,7 @@ const ACTION_TYPES = [
|
||||
'createRecord',
|
||||
'updateRecord',
|
||||
'getRecords',
|
||||
'sendNotification',
|
||||
] as const;
|
||||
|
||||
export function actionCommand(): Command {
|
||||
@@ -445,6 +446,11 @@ export function actionCommand(): Command {
|
||||
.option('--target-table <id>', 'Target table id (createRecord/updateRecord/getRecords)')
|
||||
.option('--records <json>', 'Records JSON array (createRecord/updateRecord)')
|
||||
.option('--query <json>', 'Query JSON (getRecords)')
|
||||
.option('--to-user <id>', 'Recipient user id (sendNotification)')
|
||||
.option('--title <s>', 'Notification title (sendNotification)')
|
||||
.option('--message <s>', 'Notification message (sendNotification)')
|
||||
.option('--severity <s>', 'Notification severity info|warning|critical (sendNotification)')
|
||||
.option('--path <s>', 'Click-through path, e.g. /base/xx/table/yy (sendNotification)')
|
||||
.option('--name <n>', 'Optional node display name')
|
||||
.option('--base-id <id>', 'Base id (overrides default)')
|
||||
.action(
|
||||
@@ -652,6 +658,14 @@ export function buildActionConfig(opts: Record<string, string>): Record<string,
|
||||
if (opts.query) config.query = JSON.parse(opts.query);
|
||||
break;
|
||||
}
|
||||
case 'sendNotification': {
|
||||
if (opts.toUser) config.toUserId = opts.toUser;
|
||||
if (opts.title) config.title = opts.title;
|
||||
if (opts.message) config.message = opts.message;
|
||||
if (opts.severity) config.severity = opts.severity;
|
||||
if (opts.path) config.path = opts.path;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user