docs(skill): update formSubmitted trigger docs for multi-form support
Reflect the formId(formId) -> formIds[] change across skill + CLI + docs: - skill api-reference/trigger-types.md: formIds array config + legacy note - skill guides (automation-guide.md, cli-reference.md): --form-ids <csv> - inkreach-cli: add --form-ids option (csv parse), keep --form-id legacy - docs/automation/triggers.md: P1 formSubmitted marked done - docs/automation/README.md: formSubmitted config fields updated
This commit is contained in:
@@ -261,7 +261,8 @@ export function triggerCommand(): Command {
|
||||
'--field-ids <json>',
|
||||
'Field ids JSON array, e.g. \'["fldXXX"]\' (recordUpdated, buttonClick)'
|
||||
)
|
||||
.option('--form-id <id>', 'Form view id (formSubmitted)')
|
||||
.option('--form-id <id>', 'Form view id (formSubmitted, legacy single). Prefer --form-ids.')
|
||||
.option('--form-ids <csv>', 'Comma-separated form view ids (formSubmitted, multi-select)')
|
||||
.option('--conditions <json>', 'Filter conditions JSON (recordCondition/recordCreated)')
|
||||
.option('--schedule <json>', 'Schedule JSON {timing:{type,interval}} (scheduledTime)')
|
||||
.option('--batch <json>', 'Batch config JSON {enabled,batchWindow,batchSize}')
|
||||
@@ -274,6 +275,7 @@ export function triggerCommand(): Command {
|
||||
tableId?: string;
|
||||
fieldIds?: string;
|
||||
formId?: string;
|
||||
formIds?: string;
|
||||
conditions?: string;
|
||||
schedule?: string;
|
||||
batch?: string;
|
||||
@@ -289,6 +291,7 @@ export function triggerCommand(): Command {
|
||||
tableId: opts.tableId,
|
||||
fieldIds: opts.fieldIds,
|
||||
formId: opts.formId,
|
||||
formIds: opts.formIds,
|
||||
conditions: opts.conditions,
|
||||
schedule: opts.schedule,
|
||||
batch: opts.batch,
|
||||
@@ -332,6 +335,7 @@ export function buildTriggerConfig(
|
||||
tableId?: string;
|
||||
fieldIds?: string;
|
||||
formId?: string;
|
||||
formIds?: string;
|
||||
conditions?: string;
|
||||
schedule?: string;
|
||||
batch?: string;
|
||||
@@ -362,7 +366,16 @@ export function buildTriggerConfig(
|
||||
}
|
||||
case 'formSubmitted': {
|
||||
if (opts.tableId) config.tableId = opts.tableId;
|
||||
if (opts.formId) config.formId = opts.formId;
|
||||
// Prefer --form-ids (csv) which populates formIds:string[]. Fall back to
|
||||
// legacy --form-id (single string) for backward compatibility.
|
||||
if (opts.formIds) {
|
||||
config.formIds = opts.formIds
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter((s) => s.length > 0);
|
||||
} else if (opts.formId) {
|
||||
config.formId = opts.formId;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'scheduledTime': {
|
||||
|
||||
Reference in New Issue
Block a user