# GENERATED. Do not change this line unless the file contains project specific changes.
# DO NOT EDIT THIS FILE. Changes are overwritten on the next build.
# Owner command: archetype.registry.build
# Edit instead: the archetype.registry.build generator source (not this file).
# Regenerate:   pnpm exec werkstatt run archetype.registry.build
id: send-message
displayName: Send message
version: 1.3.0
semanticRole: lead-message-capture
description: |
  Single-field message capture section with runtime-routed outbound delivery.
  Requires the visitor to include contact details in the free-text message before submit.
expectedIntents:
  - drive-contact
  - capture-lead
  - convert-visitor
expectedIndustryFit:
  - trades-and-construction
  - consulting-and-coaching
  - legal-services
layoutHint: single-column
bodyKind: composite
propsSchema:
  $shape: zod
  compose:
    - section-visual
    - section-header
  shape: |
    z.object({
      body: z.object({
        paragraphs: z.array(z.string().min(1)).min(1),
        align: z.enum(["left", "center", "right"]).optional(),
      }).strict().optional(),
      formId: z.string().min(1).optional(),
      endpoint: z.string().min(1).optional(),
      placeholder: z.string().min(1),
      buttonLabel: z.string().min(1),
      sendingLabel: z.string().min(1).optional(),
      successMessage: z.string().min(1),
      errorMessage: z.string().min(1),
      contactRequirementMessage: z.string().min(1),
      emptyMessage: z.string().min(1).optional(),
      minMessageLength: z.number().int().positive().optional(),
      fallbackEmail: z.string().min(1).optional(),
      fallbackEmailLabel: z.string().min(1).optional(),
      fallbackBodyLabel: z.string().min(1).optional(),
      copyMessageLabel: z.string().min(1).optional(),
      checklistTitle: z.string().min(1).optional(),
      checklistReadyLabel: z.string().min(1).optional(),
      checklistLengthLabel: z.string().min(1).optional(),
      checklistContactLabel: z.string().min(1).optional(),
      checklistItems: z.array(z.object({
        id: z.string().min(1),
        label: z.string().min(1),
        rule: z.enum(["min-length", "contact-details", "url-presence", "keyword-match"]),
        value: z.number().int().positive().optional(),
        keywords: z.array(z.string().min(1)).min(1).optional(),
      })).optional(),
      referrerField: z.object({
        enabled: z.boolean(),
        required: z.boolean(),
        label: z.string().min(1).optional(),
        placeholder: z.string().min(1).optional(),
      }).optional(),
      scenarioField: z.object({
        param: z.string().regex(/^[a-zA-Z0-9_-]{1,32}$/).optional(),
        label: z.string().min(1),
        help: z.string().min(1).optional(),
        options: z.array(z.object({
          id: z.string().regex(/^[a-z0-9-]{1,32}$/),
          label: z.string().min(1),
          help: z.string().min(1).optional(),
          heading: z.string().min(1).optional(),
          placeholder: z.string().min(1).optional(),
          footnote: z.string().min(1).optional(),
          footnoteLink: z.object({
            label: z.string().min(1),
            pageId: z.string().min(1).optional(),
            href: z.string().min(1).optional(),
          }).strict().optional(),
        }).strict()).min(2),
      }).strict().optional(),
    }).strict()
acceptedCosmicNames:
  - Ceres
constraints: {}
