> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Constant Contact

> 78 actions available for Constant Contact through StackOne. Use via Actions RPC, Toolset SDK, MCP, or A2A.

export const GettingStarted = ({connector}) => {
  const linkStyle = {
    textDecoration: 'none'
  };
  const authConfigGuides = connector?.authentication?.filter(a => a?.setupGuide) ?? [];
  const linkAccountGuides = connector?.authentication?.filter(a => a?.configGuide) ?? [];
  return <div style={{
    marginTop: '32px',
    paddingTop: '24px',
    borderTop: '1px solid #e2e8f0'
  }}>
      <div style={{
    fontSize: '20px',
    fontWeight: '600',
    marginBottom: '12px'
  }}>Getting Started</div>
      <Steps>
        <Step title="Create or Select a Project">
          Set up a new project or select an existing one. See the <a href="/guides/managing-projects" style={linkStyle}>Projects Guide</a>.
        </Step>
        <Step title="Configure the Connector">
          <>
            Enable the connector and set up auth configuration in your project. See <a href="/guides/explore-connectors" style={linkStyle}>Managing Connectors</a>.
            {authConfigGuides.length > 0 && <>
              <Columns cols={2}>
                {authConfigGuides.map(auth => <Card title="Auth Config" href={`/${auth.setupGuide}`} icon={connector.icon} horizontal>
                    {connector.name} - {auth.label}
                  </Card>)}
              </Columns> 
              </>}
          </>
        </Step>
        <Step title="Link an Account">
          <>
            Connect an account using <a href="/guides/embedding-stackone-hub" style={linkStyle}>StackOne Hub</a> or <a href="/guides/auth-link" style={linkStyle}>Auth Link</a>.
            {linkAccountGuides.length > 0 && <>
                <Columns cols={2}>
                  {linkAccountGuides.map(auth => <Card title="Link Account" href={`/${auth.configGuide}`} icon={connector.icon} horizontal>
                      {connector.name} - {auth.label}
                    </Card>)}
                </Columns>
              </>}
          </>
        </Step>
        <Step title="Use Actions">
          <>
            Invoke actions using one of the methods below:
            <ul style={{
    marginTop: '8px',
    paddingLeft: '20px'
  }}>
              <li style={{
    marginBottom: '4px'
  }}><a href="/mcp/quickstart" style={linkStyle}>MCP</a> – Model Context Protocol for AI assistants</li>
              <li style={{
    marginBottom: '4px'
  }}><a href="/a2a/quickstart" style={linkStyle}>A2A</a> – Agent-to-Agent protocol</li>
              <li style={{
    marginBottom: '4px'
  }}><a href="/agents/typescript/introduction" style={linkStyle}>AI Toolset (TypeScript)</a> – TypeScript SDK for AI agents</li>
              <li style={{
    marginBottom: '4px'
  }}><a href="/agents/python/introduction" style={linkStyle}>AI Toolset (Python)</a> – Python SDK for AI agents</li>
              <li style={{
    marginBottom: '4px'
  }}><a href="/platform/api-reference/actions/make-an-rpc-call-to-an-action" style={linkStyle}>Actions RPC</a> – Direct API calls</li>
              <li style={{
    marginBottom: '4px'
  }}><a href="/guides/playground" style={linkStyle}>Playground</a> – Test actions in the dashboard</li>
            </ul>
          </>
        </Step>
      </Steps>
    </div>;
};

export const ActionsLibrary = ({search, setSearch, filtered, sharedStyles = {}, KeyCell, ScopesCell, availableScopes, selectedScopes, setSelectedScopes}) => {
  const libraryStyles = {
    section: {
      marginTop: '24px',
      marginBottom: '16px'
    },
    sectionTitle: {
      fontSize: '18px',
      fontWeight: '600',
      marginBottom: '12px'
    },
    filterRow: {
      display: 'flex',
      gap: '12px',
      marginBottom: '12px',
      alignItems: 'stretch'
    },
    count: {
      color: '#64748b',
      fontSize: '12px',
      marginBottom: '8px'
    },
    scopesFilterRow: {
      marginBottom: '12px'
    },
    scopesDropdown: {
      display: 'inline-block',
      fontSize: '12px',
      color: '#475569'
    },
    scopesSummary: {
      cursor: 'pointer',
      padding: '6px 10px',
      borderRadius: '999px',
      border: '1px solid #e2e8f0',
      backgroundColor: '#ffffff',
      listStyle: 'none',
      display: 'inline-flex',
      alignItems: 'center',
      gap: '6px'
    },
    scopesSummaryLabel: {
      margin: 0,
      padding: 0
    },
    scopesChipsContainer: {
      marginTop: '8px',
      padding: '4px 2px 2px',
      display: 'flex',
      flexWrap: 'wrap',
      gap: '6px',
      maxHeight: '90px',
      overflowY: 'auto'
    },
    scopeChip: {
      borderRadius: '999px',
      border: '1px solid #e2e8f0',
      padding: '4px 8px',
      fontSize: '11px',
      backgroundColor: '#f8fafc',
      color: '#475569',
      cursor: 'pointer'
    },
    scopeChipActive: {
      backgroundColor: '#dbeafe',
      borderColor: '#2563eb',
      color: '#1d4ed8'
    },
    tableContainer: {
      maxHeight: '500px',
      overflowY: 'auto',
      overflowX: 'auto',
      border: '1px solid #e2e8f0',
      borderRadius: '8px',
      fontSize: '13px'
    },
    gridTable: {
      display: 'grid',
      minWidth: '600px',
      gridTemplateColumns: '200px 1fr'
    },
    gridTableWithScopes: {
      gridTemplateColumns: '200px 1fr 150px'
    },
    gridHeader: {
      display: 'contents'
    },
    gridHeaderCell: {
      position: 'sticky',
      top: 0,
      backgroundColor: '#f8fafc',
      padding: '10px 12px',
      fontWeight: '600',
      borderBottom: '1px solid #e2e8f0',
      zIndex: 1
    },
    gridRow: {
      display: 'contents'
    },
    gridCellAction: {
      padding: '10px 12px',
      fontWeight: '500',
      borderBottom: '1px solid #f1f5f9'
    },
    gridCellKey: {
      padding: '10px 12px',
      borderBottom: '1px solid #f1f5f9'
    },
    gridCellScopes: {
      padding: '10px 12px',
      borderBottom: '1px solid #f1f5f9',
      color: '#475569',
      fontSize: '12px'
    },
    gridCellDescription: {
      padding: '10px 12px',
      color: '#64748b',
      borderBottom: '1px solid #f1f5f9'
    }
  };
  const styles = {
    ...libraryStyles,
    ...sharedStyles
  };
  const safeAvailableScopes = Array.isArray(availableScopes) ? availableScopes : [];
  const safeSelectedScopes = Array.isArray(selectedScopes) ? selectedScopes : [];
  const hasScopesColumn = safeAvailableScopes.length > 0;
  const hasScopeFilter = safeAvailableScopes.length > 0 && typeof setSelectedScopes === 'function';
  const ScopesCellComponent = ScopesCell || (() => null);
  return <div style={styles.section}>
      <div style={styles.sectionTitle}>Actions</div>
      <div style={styles.filterRow}>
        <SearchBar value={search} onChange={setSearch} placeholder="Search actions" />
        {hasScopeFilter && <FilterDropdown label="Scopes" items={safeAvailableScopes} selectedItems={safeSelectedScopes} onChange={setSelectedScopes} searchPlaceholder="Search scopes..." emptyLabel="No scopes found" />}
      </div>
      <div style={styles.count}>
        {filtered.length === 0 ? '0 actions found' : `${filtered.length} action${filtered.length !== 1 ? 's' : ''}`}
      </div>
      {}
      <div className="not-prose" style={styles.tableContainer}>
        <div style={{
    ...hasScopesColumn ? {
      ...styles.gridTable,
      ...styles.gridTableWithScopes
    } : styles.gridTable
  }}>
          {}
          <div style={styles.gridHeader}>
            <div style={styles.gridHeaderCell}>Action</div>
            <div style={styles.gridHeaderCell}>Description</div>
            {hasScopesColumn && <div style={styles.gridHeaderCell}>Required scopes</div>}
          </div>
          {}
          {filtered.map(a => <div key={a.id} style={styles.gridRow}>
              <div style={styles.gridCellAction}>
                <div>{a.label}</div>
                <div style={{
    marginTop: '4px'
  }}>
                  <KeyCell id={a.id} />
                </div>
              </div>
              <div style={styles.gridCellDescription}>{a.description}</div>
              {hasScopesColumn && <div style={styles.gridCellScopes}>
                  <ScopesCellComponent scopes={a.requiredScopes} actionId={a.id} />
                </div>}
            </div>)}
        </div>
      </div>
    </div>;
};

export const FilterDropdown = ({label, items, selectedItems, onChange, searchPlaceholder = 'Search...', emptyLabel = 'No items found', formatLabel}) => {
  const [dropdownOpen, setDropdownOpen] = React.useState(false);
  const [search, setSearch] = React.useState('');
  const [hoveredItem, setHoveredItem] = React.useState(null);
  const dropdownRef = React.useRef(null);
  const styles = {
    dropdownContainer: {
      position: 'relative'
    },
    dropdownTrigger: {
      display: 'flex',
      alignItems: 'center',
      gap: '8px',
      padding: '10px 14px',
      borderRadius: '8px',
      border: '1px solid #e2e8f0',
      fontSize: '14px',
      backgroundColor: 'white',
      cursor: 'pointer',
      whiteSpace: 'nowrap',
      minWidth: '160px',
      justifyContent: 'space-between'
    },
    dropdownTriggerActive: {
      borderColor: '#068F56',
      backgroundColor: '#f0fdf4'
    },
    dropdownMenu: {
      position: 'absolute',
      top: '100%',
      right: 0,
      marginTop: '4px',
      backgroundColor: 'white',
      border: '1px solid #e2e8f0',
      borderRadius: '8px',
      boxShadow: '0 4px 12px rgba(0,0,0,0.1)',
      zIndex: 50,
      minWidth: '220px',
      maxHeight: '320px',
      display: 'flex',
      flexDirection: 'column'
    },
    dropdownHeader: {
      padding: '8px 12px',
      borderBottom: '1px solid #e2e8f0'
    },
    selectActions: {
      display: 'flex',
      alignItems: 'center',
      gap: '8px',
      marginTop: '6px',
      fontSize: '12px'
    },
    selectActionBtn: {
      background: 'none',
      border: 'none',
      color: '#64748b',
      cursor: 'pointer',
      padding: '2px 4px',
      fontSize: '12px'
    },
    dropdownSearchInput: {
      width: '100%',
      padding: '8px 10px',
      borderRadius: '6px',
      border: '1px solid #e2e8f0',
      fontSize: '13px',
      outline: 'none',
      backgroundColor: '#ffffff'
    },
    dropdownList: {
      overflowY: 'auto',
      maxHeight: '220px',
      padding: '4px 0'
    },
    dropdownItem: {
      display: 'flex',
      alignItems: 'center',
      gap: '10px',
      padding: '8px 12px',
      cursor: 'pointer',
      fontSize: '13px',
      color: '#374151',
      transition: 'background-color 0.1s'
    },
    dropdownItemHover: {
      backgroundColor: '#f8fafc'
    },
    checkbox: {
      width: '16px',
      height: '16px',
      borderRadius: '4px',
      border: '2px solid #d1d5db',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center',
      flexShrink: 0
    },
    checkboxChecked: {
      backgroundColor: '#068F56',
      borderColor: '#068F56'
    },
    checkmark: {
      color: 'white',
      fontSize: '10px',
      fontWeight: 'bold'
    },
    dropdownFooter: {
      padding: '8px 12px',
      borderTop: '1px solid #e2e8f0',
      display: 'flex',
      justifyContent: 'space-between',
      alignItems: 'center'
    },
    clearButton: {
      fontSize: '12px',
      color: '#64748b',
      cursor: 'pointer',
      padding: '4px 8px',
      borderRadius: '4px',
      border: 'none',
      background: 'none'
    },
    badge: {
      backgroundColor: '#068F56',
      color: 'white',
      fontSize: '11px',
      fontWeight: '600',
      padding: '2px 6px',
      borderRadius: '10px',
      marginLeft: '4px'
    },
    chevron: {
      fontSize: '10px',
      color: '#64748b',
      transition: 'transform 0.15s'
    },
    noResults: {
      padding: '12px',
      textAlign: 'center',
      color: '#64748b',
      fontSize: '13px'
    }
  };
  const safeSelected = Array.isArray(selectedItems) ? selectedItems : [];
  const formatItemLabel = item => {
    if (typeof formatLabel === 'function') {
      return formatLabel(item);
    }
    return item;
  };
  const filteredItems = React.useMemo(() => {
    if (!search) return items;
    const searchLower = search.toLowerCase();
    return items.filter(item => {
      const labelText = formatItemLabel(item);
      return labelText.toLowerCase().includes(searchLower);
    });
  }, [items, search, formatLabel]);
  const isSelected = item => safeSelected.includes(item);
  const toggleItem = item => {
    const next = isSelected(item) ? safeSelected.filter(v => v !== item) : [...safeSelected, item];
    onChange(next);
  };
  const clearFilters = () => {
    onChange([]);
  };
  const selectAll = () => {
    onChange(items);
  };
  React.useEffect(() => {
    const handleClickOutside = e => {
      if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
        setDropdownOpen(false);
        setSearch('');
        setHoveredItem(null);
      }
    };
    document.addEventListener('mousedown', handleClickOutside);
    return () => document.removeEventListener('mousedown', handleClickOutside);
  }, []);
  return <div style={styles.dropdownContainer} ref={dropdownRef}>
      <button type="button" onClick={() => setDropdownOpen(!dropdownOpen)} style={{
    ...styles.dropdownTrigger,
    ...safeSelected.length > 0 ? styles.dropdownTriggerActive : {}
  }}>
        <span>
          {label}
          {safeSelected.length > 0 && <span style={styles.badge}>{safeSelected.length}</span>}
        </span>
        <span style={{
    ...styles.chevron,
    transform: dropdownOpen ? 'rotate(180deg)' : 'rotate(0deg)'
  }}>
          ▼
        </span>
      </button>
      {dropdownOpen && <div style={styles.dropdownMenu}>
          <div style={styles.dropdownHeader}>
            <input type="text" placeholder={searchPlaceholder} value={search} onChange={e => setSearch(e.target.value)} style={styles.dropdownSearchInput} autoFocus />
            <div style={styles.selectActions}>
              <button type="button" onClick={selectAll} style={styles.selectActionBtn} onMouseEnter={e => {
    e.target.style.color = '#1e293b';
  }} onMouseLeave={e => {
    e.target.style.color = '#64748b';
  }}>
                Select all
              </button>
              <span style={{
    color: '#e2e8f0'
  }}>|</span>
              <button type="button" onClick={clearFilters} style={styles.selectActionBtn} onMouseEnter={e => {
    e.target.style.color = '#1e293b';
  }} onMouseLeave={e => {
    e.target.style.color = '#64748b';
  }}>
                Clear
              </button>
            </div>
          </div>
          <div style={styles.dropdownList}>
            {filteredItems.length === 0 ? <div style={styles.noResults}>{emptyLabel}</div> : filteredItems.map(item => <div key={item} onClick={() => toggleItem(item)} onMouseEnter={() => setHoveredItem(item)} onMouseLeave={() => setHoveredItem(null)} style={{
    ...styles.dropdownItem,
    ...hoveredItem === item ? styles.dropdownItemHover : {}
  }}>
                  <div style={{
    ...styles.checkbox,
    ...isSelected(item) ? styles.checkboxChecked : {}
  }}>
                    {isSelected(item) && <span style={styles.checkmark}>✓</span>}
                  </div>
                  <span>{formatItemLabel(item)}</span>
                </div>)}
          </div>
        </div>}
    </div>;
};

export const SearchBar = ({value, onChange, placeholder = 'Search...'}) => {
  const baseStyle = {
    padding: '10px 14px',
    borderRadius: '8px',
    border: '1px solid #e2e8f0',
    fontSize: '14px',
    outline: 'none',
    backgroundColor: '#fafafa',
    flex: 1,
    minWidth: 0
  };
  return <input type="text" placeholder={placeholder} value={value} onChange={e => onChange(e.target.value)} style={baseStyle} />;
};

export const ConnectorPage = ({connector}) => {
  const styles = {
    header: {
      display: 'flex',
      alignItems: 'center',
      gap: '12px',
      marginBottom: '24px'
    },
    tagsRow: {
      display: 'flex',
      flexWrap: 'wrap',
      gap: '6px',
      marginTop: '8px'
    },
    releaseTag: {
      display: 'inline-block',
      padding: '2px 8px',
      borderRadius: '4px',
      fontSize: '11px',
      fontWeight: '500'
    },
    betaTag: {
      backgroundColor: '#fef3c7',
      color: '#b45309'
    },
    previewTag: {
      backgroundColor: '#E1E9F4',
      color: '#0D58AE',
      border: '1px solid #BFD5F1'
    },
    categoryTag: {
      display: 'inline-block',
      padding: '2px 8px',
      borderRadius: '4px',
      fontSize: '11px',
      fontWeight: '500',
      backgroundColor: '#f1f5f9',
      color: '#475569'
    },
    icon: {
      width: '48px',
      height: '48px',
      borderRadius: '10px',
      backgroundColor: '#f8fafc',
      padding: '2px'
    },
    title: {
      fontSize: '24px',
      fontWeight: '600'
    },
    subtitle: {
      fontSize: '14px',
      color: '#64748b'
    },
    authDescription: {
      fontSize: '14px',
      color: '#64748b',
      marginTop: 0
    },
    sectionTitle: {
      fontSize: '18px',
      fontWeight: '600',
      marginBottom: '12px'
    },
    authList: {
      paddingLeft: '20px',
      color: '#374151'
    },
    codeWrapper: {
      position: 'relative',
      display: 'inline-flex',
      alignItems: 'center',
      maxWidth: '100%',
      cursor: 'pointer',
      overflowX: 'auto',
      overflowY: 'hidden',
      msOverflowStyle: 'none',
      scrollbarWidth: 'none'
    },
    code: {
      backgroundColor: '#f1f5f9',
      padding: '4px 8px',
      borderRadius: '4px',
      fontSize: '11px',
      color: '#475569',
      display: 'inline-block',
      whiteSpace: 'nowrap',
      transition: 'background-color 0.15s'
    },
    codeHover: {
      backgroundColor: '#e2e8f0'
    },
    codeCopied: {
      backgroundColor: '#d1fae5',
      color: '#065f46'
    },
    tooltip: {
      position: 'absolute',
      top: '100%',
      left: '50%',
      transform: 'translateX(-50%)',
      backgroundColor: '#1e293b',
      color: 'white',
      padding: '6px 10px',
      borderRadius: '6px',
      fontSize: '11px',
      whiteSpace: 'nowrap',
      marginTop: '6px',
      zIndex: 50,
      maxWidth: '300px',
      wordBreak: 'break-all'
    },
    tooltipArrow: {
      position: 'absolute',
      bottom: '100%',
      left: '50%',
      transform: 'translateX(-50%)',
      borderWidth: '5px',
      borderStyle: 'solid',
      borderColor: 'transparent transparent #1e293b transparent',
      zIndex: 50
    },
    tdDescription: {
      padding: '10px 12px',
      color: '#64748b',
      verticalAlign: 'top',
      maxWidth: '400px'
    }
  };
  const [search, setSearch] = React.useState('');
  const [copiedId, setCopiedId] = React.useState(null);
  const [selectedScopes, setSelectedScopes] = React.useState([]);
  const availableScopes = React.useMemo(() => {
    const set = new Set();
    connector.actions.forEach(a => {
      if (Array.isArray(a.requiredScopes)) {
        a.requiredScopes.forEach(s => {
          if (s) set.add(s);
        });
      }
    });
    return Array.from(set).sort();
  }, [connector.actions]);
  const filtered = React.useMemo(() => {
    const searchLower = search.toLowerCase();
    return connector.actions.filter(a => {
      const matchesSearch = a.label.toLowerCase().includes(searchLower) || a.description.toLowerCase().includes(searchLower) || a.id.toLowerCase().includes(searchLower);
      if (!matchesSearch) return false;
      if (selectedScopes.length === 0) return true;
      const scopes = Array.isArray(a.requiredScopes) ? a.requiredScopes : [];
      if (scopes.length === 0) return false;
      return selectedScopes.some(scope => scopes.includes(scope));
    });
  }, [connector.actions, search, selectedScopes]);
  const handleImageError = e => {
    e.target.style.display = 'none';
  };
  const formatCategoryLabel = cat => {
    const acronyms = ['ats', 'crm', 'hris', 'iam', 'lms'];
    if (acronyms.includes(cat.toLowerCase())) {
      return cat.toUpperCase();
    }
    return cat.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
  };
  const ReleaseTag = () => {
    if (!connector.releaseStage || connector.releaseStage === 'ga') return null;
    const tagStyle = connector.releaseStage === 'beta' ? {
      ...styles.releaseTag,
      ...styles.betaTag
    } : {
      ...styles.releaseTag,
      ...styles.previewTag
    };
    return <span style={tagStyle}>
        {connector.releaseStage.charAt(0).toUpperCase() + connector.releaseStage.slice(1)}
      </span>;
  };
  const CategoryTags = () => {
    if (!connector.categories || connector.categories.length === 0) return null;
    return <>
        {connector.categories.map(cat => <span key={cat} style={styles.categoryTag}>
            {formatCategoryLabel(cat)}
          </span>)}
      </>;
  };
  const copyToClipboard = async (text, id) => {
    try {
      await navigator.clipboard.writeText(text);
      setCopiedId(id);
      setTimeout(() => setCopiedId(null), 1500);
    } catch (err) {
      console.error('Failed to copy:', err);
    }
  };
  const CopyChip = ({text, copyId}) => {
    const [isHovered, setIsHovered] = React.useState(false);
    const isCopied = copiedId === copyId;
    if (!text) {
      return null;
    }
    const codeStyle = {
      ...styles.code,
      ...isCopied ? styles.codeCopied : isHovered ? styles.codeHover : {}
    };
    return <div style={styles.codeWrapper} onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} onClick={() => copyToClipboard(text, copyId)} title="">
        {(isHovered || isCopied) && <div style={styles.tooltip}>
            {isCopied ? '✓ Copied!' : 'Click to copy'}
            <div style={styles.tooltipArrow} />
          </div>}
        <code style={codeStyle}>
          {text}
        </code>
      </div>;
  };
  const KeyCell = ({id}) => <CopyChip text={id} copyId={id} />;
  const ScopesCell = ({scopes, actionId}) => {
    const scopeList = Array.isArray(scopes) ? scopes.filter(Boolean) : [];
    if (scopeList.length === 0) return null;
    return <div style={{
      display: 'flex',
      flexWrap: 'wrap',
      gap: '6px'
    }}>
        {scopeList.map(scope => <CopyChip key={scope} text={scope} copyId={`scopes:${actionId}:${scope}`} />)}
      </div>;
  };
  return <div>
      {}
      <div style={styles.header}>
        <img src={connector.icon} alt={connector.name} style={styles.icon} onError={handleImageError} />
        <div>
          <div style={styles.title}>{connector.name}</div>
          <div style={styles.subtitle}>
            {connector.actions.length} actions · {connector.authentication.length} auth method{connector.authentication.length !== 1 ? 's' : ''}
          </div>
          {connector.releaseStage && connector.releaseStage !== 'ga' || connector.categories && connector.categories.length > 0 ? <div style={styles.tagsRow}>
              <ReleaseTag />
              <CategoryTags />
            </div> : null}
        </div>
      </div>

      {}
      <div style={styles.sectionTitle}>Authentication</div>
      <Columns cols={2}>        
        {connector.authentication.length > 0 ? connector.authentication.map(auth => {
    const authLabel = auth?.label || '';
    const authDescription = auth?.description;
    const configGuide = auth?.configGuide;
    const setupGuide = auth?.setupGuide;
    const hasConfigGuide = !!configGuide;
    const hasSetupGuide = !!setupGuide;
    const hasAnyGuide = hasConfigGuide || hasSetupGuide;
    return <Card key={authLabel} title={authLabel}>
                {authDescription && <p style={{
      ...styles.authDescription,
      marginBottom: hasAnyGuide ? '8px' : 0
    }}>
                    {authDescription}
                  </p>}
                {hasAnyGuide && <span style={{
      fontSize: '14px'
    }}>
                    Guides: {hasSetupGuide && <a href={`/${setupGuide}`} style={{
      textDecoration: 'none'
    }}>Auth Config</a>}
                    {hasConfigGuide && hasSetupGuide && ', '}
                    {hasConfigGuide && <a href={`/${configGuide}`} style={{
      textDecoration: 'none'
    }}>Link Account</a>}
                  </span>}
              </Card>;
  }) : <>
            Contact StackOne for authentication details.
          </>}
      </Columns>

      {connector.documentation?.references?.length > 0 && <>
          <div style={styles.sectionTitle}>References</div>
          <Columns cols={2}>
            {connector.documentation.references.map(ref => {
    let safeHref;
    try {
      const parsed = new URL(ref.url);
      safeHref = parsed.protocol === 'http:' || parsed.protocol === 'https:' ? ref.url : undefined;
    } catch {
      safeHref = undefined;
    }
    return <Card key={`${ref.title}-${ref.url}`} title={ref.title} href={safeHref}>
                  {ref.description}
                </Card>;
  })}
          </Columns>
        </>}

      <ActionsLibrary search={search} setSearch={setSearch} filtered={filtered} sharedStyles={{
    sectionTitle: styles.sectionTitle
  }} KeyCell={KeyCell} ScopesCell={ScopesCell} availableScopes={availableScopes} selectedScopes={selectedScopes} setSelectedScopes={setSelectedScopes} />

      <GettingStarted connector={connector} />

    </div>;
};

export const connector = {
  "key": "constantcontact",
  "name": "Constant Contact",
  "icon": "https://stackone-logos.com/api/constant-contact/filled/png",
  "authentication": [{
    "label": "OAuth 2.0",
    "description": "OAuth 2.0 provides secure delegated access to Constant Contact resources. You need a Constant Contact developer account...",
    "configGuide": "connectors/constantcontact/guides/link-account/oauth-2-0",
    "setupGuide": "connectors/constantcontact/guides/auth-config/oauth-2-0"
  }],
  "actions": [{
    "id": "constantcontact_get_account_summary",
    "label": "Get Account Summary",
    "description": "Retrieve details about the Constant Contact account",
    "requiredScopes": ["account_read"]
  }, {
    "id": "constantcontact_update_account_summary",
    "label": "Update Account Summary",
    "description": "Update account details such as name, website, and contact information",
    "requiredScopes": ["account_update"]
  }, {
    "id": "constantcontact_get_account_physical_address",
    "label": "Get Account Physical Address",
    "description": "Retrieve the organization's physical address on file",
    "requiredScopes": ["account_read"]
  }, {
    "id": "constantcontact_list_account_emails",
    "label": "List Account Emails",
    "description": "List email addresses associated with the Constant Contact account",
    "requiredScopes": ["account_read"]
  }, {
    "id": "constantcontact_create_account_physical_address",
    "label": "Create Account Physical Address",
    "description": "Add the organization's physical address to the Constant Contact account",
    "requiredScopes": ["account_update"]
  }, {
    "id": "constantcontact_update_account_physical_address",
    "label": "Update Account Physical Address",
    "description": "Update the organization's physical address on the Constant Contact account",
    "requiredScopes": ["account_update"]
  }, {
    "id": "constantcontact_create_account_email",
    "label": "Create Account Email",
    "description": "Add a new email address to the Constant Contact account",
    "requiredScopes": ["account_update"]
  }, {
    "id": "constantcontact_get_user_privileges",
    "label": "Get User Privileges",
    "description": "Retrieve the privileges associated with the authenticated user",
    "requiredScopes": ["account_read"]
  }, {
    "id": "constantcontact_list_contacts",
    "label": "List Contacts",
    "description": "Retrieve a paginated list of contacts with optional filtering",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_contact",
    "label": "Get Contact",
    "description": "Retrieve a specific contact by their unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_contact",
    "label": "Create Contact",
    "description": "Create a new contact in Constant Contact",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_update_contact",
    "label": "Update Contact",
    "description": "Update an existing contact's information by ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_delete_contact",
    "label": "Delete Contact",
    "description": "Delete a contact by their unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_or_update_contact",
    "label": "Create Or Update Contact",
    "description": "Create a new contact or update an existing one via sign-up form",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_resubscribe_contact",
    "label": "Resubscribe Contact",
    "description": "Send a resubscribe confirmation email to an unsubscribed contact",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_contact_lists",
    "label": "List Contact Lists",
    "description": "Retrieve all contact lists in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_contact_list",
    "label": "Get Contact List",
    "description": "Retrieve a specific contact list by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_contact_list",
    "label": "Create Contact List",
    "description": "Create a new contact list in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_update_contact_list",
    "label": "Update Contact List",
    "description": "Update the name, description, or favorite status of a contact list",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_delete_contact_list",
    "label": "Delete Contact List",
    "description": "Delete a contact list by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_custom_fields",
    "label": "List Custom Fields",
    "description": "Retrieve all custom field definitions in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_custom_field",
    "label": "Get Custom Field",
    "description": "Retrieve a specific custom field definition by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_custom_field",
    "label": "Create Custom Field",
    "description": "Create a new custom field definition for contacts",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_update_custom_field",
    "label": "Update Custom Field",
    "description": "Update an existing custom field's label or choices",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_delete_custom_field",
    "label": "Delete Custom Field",
    "description": "Delete a custom field definition by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_events",
    "label": "List Events",
    "description": "Retrieve a collection of events with event details",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_create_event",
    "label": "Create Event",
    "description": "Create a new event with default settings, registration form, and landing page",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_event",
    "label": "Get Event",
    "description": "Retrieve details for a specific event by its unique ID",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_update_event",
    "label": "Update Event",
    "description": "Partially update an event with the provided fields",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_copy_event",
    "label": "Copy Event",
    "description": "Create a deep copy of an existing event",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_list_segments",
    "label": "List Segments",
    "description": "Retrieve all segments defined in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_segment",
    "label": "Get Segment",
    "description": "Retrieve a specific segment by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_segment",
    "label": "Create Segment",
    "description": "Create a new segment with filter criteria",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_update_segment",
    "label": "Update Segment",
    "description": "Update an existing segment's name and filter criteria",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_rename_segment",
    "label": "Rename Segment",
    "description": "Rename an existing segment without modifying its criteria",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_delete_segment",
    "label": "Delete Segment",
    "description": "Delete a segment by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_email_campaigns",
    "label": "List Email Campaigns",
    "description": "Retrieve all email campaigns in the account",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_campaign",
    "label": "Get Email Campaign",
    "description": "Retrieve a specific email campaign by its unique ID",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_create_email_campaign",
    "label": "Create Email Campaign",
    "description": "Create a new email campaign",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_delete_email_campaign",
    "label": "Delete Email Campaign",
    "description": "Delete an email campaign by its unique ID",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_update_email_campaign_name",
    "label": "Update Email Campaign Name",
    "description": "Rename an email campaign",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_campaign_activity",
    "label": "Get Campaign Activity",
    "description": "Retrieve a specific email campaign activity by its unique ID",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_update_campaign_activity",
    "label": "Update Campaign Activity",
    "description": "Update the content and settings of an email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_schedule_campaign_activity",
    "label": "Schedule Campaign Activity",
    "description": "Schedule an email campaign activity to send at a specific date or immediately",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_campaign_activity_schedule",
    "label": "Get Campaign Activity Schedule",
    "description": "Retrieve the current schedule for an email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_unschedule_campaign_activity",
    "label": "Unschedule Campaign Activity",
    "description": "Unschedule a scheduled email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_test_send_email_campaign",
    "label": "Test Send Email Campaign",
    "description": "Send a test email to specific email addresses before scheduling",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_campaign_preview",
    "label": "Get Email Campaign Preview",
    "description": "Get the HTML preview of an email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_send_history",
    "label": "Get Send History",
    "description": "Get the send history of an email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_list_bulk_activities",
    "label": "List Bulk Activities",
    "description": "Retrieve the status of all bulk activities (async jobs) in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_bulk_activity",
    "label": "Get Bulk Activity",
    "description": "Retrieve the status and details of a specific bulk activity by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_import_contacts_json",
    "label": "Bulk Import Contacts (JSON)",
    "description": "Import contacts in bulk using a JSON payload",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_export_contacts",
    "label": "Bulk Export Contacts",
    "description": "Export contacts to a CSV file",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_delete_contacts",
    "label": "Bulk Delete Contacts",
    "description": "Delete contacts in bulk by contact IDs or list membership",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_add_list_memberships",
    "label": "Bulk Add Contacts To Lists",
    "description": "Add contacts to one or more lists in bulk",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_remove_list_memberships",
    "label": "Bulk Remove Contacts From Lists",
    "description": "Remove contacts from one or more lists in bulk",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_add_contact_tags",
    "label": "Bulk Add Tags To Contacts",
    "description": "Add one or more tags to contacts in bulk",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_bulk_remove_contact_tags",
    "label": "Bulk Remove Tags From Contacts",
    "description": "Remove one or more tags from contacts in bulk",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_email_campaign_summaries",
    "label": "List Email Campaign Summary Reports",
    "description": "Retrieve aggregate statistics for email campaigns",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_campaign_stats",
    "label": "Get Email Campaign Stats",
    "description": "Retrieve performance tracking statistics for one or more email campaigns",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_campaign_activity_stats",
    "label": "Get Email Campaign Activity Stats",
    "description": "Retrieve performance tracking statistics for up to ten email campaign activities",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_links_report",
    "label": "Get Email Links Report",
    "description": "Retrieve link click counts for a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_sends_report",
    "label": "Get Email Sends Report",
    "description": "Retrieve a list of contacts that were sent a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_opens_report",
    "label": "Get Email Opens Report",
    "description": "Retrieve each time a contact opened a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_unique_opens_report",
    "label": "Get Email Unique Opens Report",
    "description": "Retrieve the last time each contact opened a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_did_not_opens_report",
    "label": "Get Email Did Not Opens Report",
    "description": "Retrieve contacts that were sent but did not open a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_clicks_report",
    "label": "Get Email Clicks Report",
    "description": "Retrieve each time a contact clicked a link in a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_forwards_report",
    "label": "Get Email Forwards Report",
    "description": "Retrieve each time a contact forwarded a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_optouts_report",
    "label": "Get Email Opt-outs Report",
    "description": "Retrieve contacts that unsubscribed via a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_get_email_bounces_report",
    "label": "Get Email Bounces Report",
    "description": "Retrieve contact bounce data for a specific email campaign activity",
    "requiredScopes": ["campaign_data"]
  }, {
    "id": "constantcontact_list_contact_activities_report",
    "label": "List Contact Activity Reports",
    "description": "Retrieve a contact's tracking activities across all campaigns",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_contact_activity_summary",
    "label": "Get Contact Activity Summary",
    "description": "Get a summary of campaign actions for a specific contact",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_contact_open_click_rates",
    "label": "Get Contact Open And Click Rates",
    "description": "Get average open and click rates for a specific contact over a date range",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_list_tags",
    "label": "List Tags",
    "description": "Retrieve all contact tags in the account",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_get_tag",
    "label": "Get Tag",
    "description": "Retrieve details for a specific contact tag by its unique ID",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_create_tag",
    "label": "Create Tag",
    "description": "Create a new contact tag with a unique name",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_update_tag",
    "label": "Update Tag",
    "description": "Rename an existing contact tag",
    "requiredScopes": ["contact_data"]
  }, {
    "id": "constantcontact_delete_tag",
    "label": "Delete Tag",
    "description": "Delete a contact tag and unassign it from all contacts",
    "requiredScopes": ["contact_data"]
  }],
  "releaseStage": "preview",
  "categories": ["account", "contacts", "events", "campaigns", "reports"],
  "scopeDefinitions": [{
    "name": "account_read",
    "description": "Read account details, email addresses, and user privileges"
  }, {
    "name": "account_update",
    "description": "Update account details and email addresses",
    "includes": ["account_read"]
  }, {
    "name": "contact_data",
    "description": "Read and write contacts, contact lists, custom fields, segments, and bulk activities"
  }, {
    "name": "campaign_data",
    "description": "Read and write email campaigns and campaign reports"
  }, {
    "name": "offline_access",
    "description": "Required to obtain a refresh token for long-lived access"
  }]
};

<ConnectorPage connector={connector} />
