1'use strict';23// The forms import's cutover items, in the two durable shapes cutover reads today:4// structured completion-report `operatorActions` (merge by `code` into createCompletionReport()5// input; copied to execution/review/migration-handoff.json) and migration-review/1 tasks in6// group Manual, requirement optional, each dismissable with its consequence acknowledgment. The7// generated importer collects the ids while it writes. Ids only; no form names, field values or8// submitter details.910const PAUSE_LEDGER = 'execution/forms/automation-pause.json';11const CMS_OVERRIDE = 'mappingTargetOverride:content.form-submissions=cms';12
16 action: 'The source form sent owner or submitter emails; those templates do not carry over. In Wix Forms → Automations, set each listed form\'s emails as the merchant wants them, or dismiss.',
17 consequence: 'New entries send no email, or only Wix\'s default one, until this is set up.',
18 deadlineReason: 'After the form exists; before the DNS switch.',
19 resolutionEvidence: 'The operator resolves it after setting the emails, or dismisses it accepting the consequence.',
37 action: 'The operator chose a private CMS archive for these forms\' old entries. They are in the CMS collection, not the Wix Forms inbox. Review; dismiss if fine.',
38 consequence: 'Old entries are in CMS, not in the Forms inbox.',
39 deadlineReason: 'At cutover.',
40 resolutionEvidence: 'The operator dismisses it.',
44 action: 'Wix\'s spam filter moved these imported entries to the form\'s spam tab. In Wix Forms → spam tab, restore the real ones, or dismiss. Restoring runs the form\'s automations like a new entry, so do it after the form\'s emails are set as wanted.',
45 consequence: 'These old entries are not in the Forms inbox.',
46 deadlineReason: 'After the import is done.',
47 resolutionEvidence: 'The entries are restored, or the operator dismisses it.',
58 action: 'Wix shows the import date as each imported entry\'s date. The original date is in the hidden "Original submission date" field of each listed form. Review; dismiss if fine.',
59 consequence: 'The Forms inbox shows the import date, not the original date.',
60 deadlineReason: 'At cutover.',
61 resolutionEvidence: 'The operator dismisses it.',
87 action: 'Requires Import Operator: Wix\'s spam filter removed these imported entries and kept no spam copy, so they are not on the site.',
88 importOperatorPrompt: `Re-import the listed form entries for form ${forms.map(id => `\`${id}\``).join(', ')} to the private CMS archive with \`${CMS_OVERRIDE}\` and resume the forms task.`,
89 deadlineReason: 'After the import is done; before cutover.',
98 action: `The import could not pause the submission automations of form ${formIdsOf(notPaused).map(id => `\`${id}\``).join(', ')}, and imported its entries anyway. The owner may have received one email per imported entry for that form. Review; dismiss if fine.`,
108 action: `The import paused these submission automations of form ${formIdsOf(notRestored).map(id => `\`${id}\``).join(', ')} and could not turn them back on. In Wix → Automations, turn each listed automation back on (ids below; ${PAUSE_LEDGER} names each), or have the Import Operator resume the restore.`,
109 importOperatorPrompt: `Requires Import Operator: resume the forms task in the original migration project; it restores every automation in ${PAUSE_LEDGER} that has no restoredAt to its statusBefore and reads it back.`,
110 deadlineReason: 'Before the DNS switch: until then new visitor entries send no email.', affectedCount: automationIds(notRestored).length,
121 action: `The import lowered the spam filter of form ${forms.map(id => `\`${id}\``).join(', ')} to None while it wrote the old entries and could not set it back. In Wix Forms → the form's settings → spam protection, set it back to ${levels} (${PAUSE_LEDGER} records each form's level before).`,
122 deadlineReason: 'Before the form is on a public page: until then visitor spam is not filtered.', affectedCount: forms.length,
133 action: `The import could not read its pause record (${PAUSE_LEDGER}) for form ${ledgerForms.map(id => `\`${id}\``).join(', ')}, so it cannot tell whether an earlier run left this form's submission automations off or its spam filter lowered. In Wix → Automations, check that the form's "New submission received" and "Receive notification when a form is submitted" automations are on, and in Wix Forms → the form's settings, that spam protection is set.`,
134 deadlineReason: 'Before the DNS switch: an automation left off sends no email for new visitor entries.', affectedCount: ledgerForms.length,