> ## 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.

# Qlik

> 100 actions available for Qlik 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": "qlik",
  "name": "Qlik",
  "icon": "https://stackone-logos.com/api/qlik/filled/png",
  "authentication": [{
    "label": "OAuth 2.0",
    "description": "Connect using OAuth 2.0 authorization code flow for user-delegated access to Qlik Cloud resources.",
    "configGuide": "connectors/qlik/guides/link-account/oauth-2-0",
    "setupGuide": "connectors/qlik/guides/auth-config/oauth-2-0"
  }, {
    "label": "API Key",
    "description": "Authenticate using a Qlik Cloud API key. API keys provide the same permissions as the user who created them.",
    "configGuide": "connectors/qlik/guides/link-account/api-key",
    "setupGuide": "connectors/qlik/guides/auth-config/api-key"
  }],
  "actions": [{
    "id": "qlik_list_users",
    "label": "List Users",
    "description": "Retrieve a paginated list of users in the Qlik Cloud tenant",
    "requiredScopes": ["admin.users:read"]
  }, {
    "id": "qlik_get_user",
    "label": "Get User",
    "description": "Retrieve details of a specific user by ID",
    "requiredScopes": ["admin.users:read"]
  }, {
    "id": "qlik_get_current_user",
    "label": "Get Current User",
    "description": "Retrieve the currently authenticated user's profile",
    "requiredScopes": ["users:read"]
  }, {
    "id": "qlik_create_user",
    "label": "Create User",
    "description": "Create a new user in the Qlik Cloud tenant",
    "requiredScopes": ["admin.users"]
  }, {
    "id": "qlik_delete_user",
    "label": "Delete User",
    "description": "Delete a user from the Qlik Cloud tenant",
    "requiredScopes": ["admin.users"]
  }, {
    "id": "qlik_count_users",
    "label": "Count Users",
    "description": "Get the total count of users in the tenant",
    "requiredScopes": ["admin.users:read"]
  }, {
    "id": "qlik_filter_users",
    "label": "Filter Users",
    "description": "Filter users using POST request with complex filter criteria",
    "requiredScopes": ["admin.users:read"]
  }, {
    "id": "qlik_invite_user",
    "label": "Invite Users",
    "description": "Send invitation emails to new users",
    "requiredScopes": ["admin.users"]
  }, {
    "id": "qlik_list_spaces",
    "label": "List Spaces",
    "description": "Retrieves spaces that the current user has access to and match the query",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_create_space",
    "label": "Create Space",
    "description": "Creates a space",
    "requiredScopes": ["spaces.shared:create"]
  }, {
    "id": "qlik_get_space",
    "label": "Get Space",
    "description": "Retrieves a single space by ID",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_update_space",
    "label": "Update Space",
    "description": "Updates a space",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_delete_space",
    "label": "Delete Space",
    "description": "Deletes a space",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_list_space_assignments",
    "label": "List Assignments For A Space",
    "description": "Retrieves the assignments of the space matching the query",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_create_space_assignment",
    "label": "Assign User Or Group To A Space",
    "description": "Creates an assignment for a user or group (assignee) to a space with the specified roles",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_get_space_assignment",
    "label": "Retrieve An Assignment For A Space",
    "description": "Retrieves a single assignment by assignment ID",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_update_space_assignment",
    "label": "Update An Assignment For A Space",
    "description": "Updates a single assignment by assignment ID",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_delete_space_assignment",
    "label": "Delete An Assignment",
    "description": "Deletes an assignment",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_list_space_shares",
    "label": "List Space Shares",
    "description": "Retrieves the shares of the space matching the query",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_create_space_share",
    "label": "Create A Space Share",
    "description": "Creates a share",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_get_space_share",
    "label": "Retrieve A Space Share",
    "description": "Retrieves a single space share by ID",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_delete_space_share",
    "label": "Delete A Space Share",
    "description": "Deletes a space share",
    "requiredScopes": ["admin.spaces"]
  }, {
    "id": "qlik_list_space_types",
    "label": "List Space Types",
    "description": "Gets a list of distinct space types available for use in the tenant",
    "requiredScopes": ["admin.spaces:read"]
  }, {
    "id": "qlik_list_groups",
    "label": "List Groups",
    "description": "Returns a list of groups with cursor-based pagination"
  }, {
    "id": "qlik_create_group",
    "label": "Create Group",
    "description": "Creates a new group"
  }, {
    "id": "qlik_get_group",
    "label": "Get Group",
    "description": "Returns the requested group"
  }, {
    "id": "qlik_update_group",
    "label": "Update Group",
    "description": "Updates the requested group"
  }, {
    "id": "qlik_delete_group",
    "label": "Delete Group",
    "description": "Deletes the requested group"
  }, {
    "id": "qlik_filter_groups",
    "label": "Filter Groups",
    "description": "Retrieves a list of groups matching the filter using advanced query string"
  }, {
    "id": "qlik_get_group_settings",
    "label": "Get Group Settings",
    "description": "Returns the tenant's group settings"
  }, {
    "id": "qlik_list_roles",
    "label": "List Roles",
    "description": "Returns a list of roles using cursor-based pagination"
  }, {
    "id": "qlik_create_role",
    "label": "Create Role",
    "description": "Creates a custom role"
  }, {
    "id": "qlik_get_role",
    "label": "Get Role",
    "description": "Returns the requested role"
  }, {
    "id": "qlik_update_role",
    "label": "Update Role",
    "description": "Updates the requested role"
  }, {
    "id": "qlik_delete_role",
    "label": "Delete Role",
    "description": "Deletes the requested role"
  }, {
    "id": "qlik_list_items",
    "label": "List Items",
    "description": "Lists items that the user has access to",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_get_item",
    "label": "Get Item",
    "description": "Finds and returns an item",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_update_item",
    "label": "Update Item",
    "description": "Updates an item",
    "requiredScopes": ["apps"]
  }, {
    "id": "qlik_delete_item",
    "label": "Delete Item",
    "description": "Deletes an item and removes the item from all collections",
    "requiredScopes": ["apps"]
  }, {
    "id": "qlik_list_item_collections",
    "label": "List Collections Of An Item",
    "description": "Finds and returns the collections (and tags) of an item",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_get_items_settings",
    "label": "Get Items Settings",
    "description": "Finds and returns the items service settings for the current tenant",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_list_collections",
    "label": "List Collections",
    "description": "Retrieves the collections that the user has access to",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_create_collection",
    "label": "Create Collection",
    "description": "Creates and returns a new collection",
    "requiredScopes": ["admin.collections.publicgoverned"]
  }, {
    "id": "qlik_get_collection",
    "label": "Get Collection",
    "description": "Finds and returns a collection",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_update_collection",
    "label": "Update Collection",
    "description": "Updates a collection's name and description",
    "requiredScopes": ["admin.collections.publicgoverned"]
  }, {
    "id": "qlik_delete_collection",
    "label": "Delete Collection",
    "description": "Deletes a collection and removes all items from the collection",
    "requiredScopes": ["admin.collections.publicgoverned"]
  }, {
    "id": "qlik_list_collection_items",
    "label": "List Items In A Collection",
    "description": "Retrieves items from a collection that the user has access to",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_add_item_to_collection",
    "label": "Add Item To Collection",
    "description": "Adds an item to a collection and returns the item",
    "requiredScopes": ["admin.collections.publicgoverned"]
  }, {
    "id": "qlik_get_collection_item",
    "label": "Get An Item",
    "description": "Finds and returns an item in a specific collection",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_remove_item_from_collection",
    "label": "Remove An Item",
    "description": "Removes an item from a collection",
    "requiredScopes": ["admin.collections.publicgoverned"]
  }, {
    "id": "qlik_get_favorites_collection",
    "label": "Get User's Favorites Collection",
    "description": "Lists the user's favorites collection",
    "requiredScopes": ["apps:read"]
  }, {
    "id": "qlik_list_automations",
    "label": "List Automations",
    "description": "Retrieves a list of the automations that the requesting user has access to.",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_get_automation",
    "label": "Get Automation",
    "description": "Retrieves the full definition of an automation. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_create_automation",
    "label": "Create Automation",
    "description": "Creates a new automation. The requesting user must be assigned the `AutomationCreator` role.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_update_automation",
    "label": "Update Automation",
    "description": "Updates the full definition of an automation. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_delete_automation",
    "label": "Delete Automation",
    "description": "Deletes an automation. The requesting user must be the owner of the automation, or be assigned the `TenantAdmin` role.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_change_automation_owner",
    "label": "Change Automation Owner",
    "description": "Changes the owner of an automation to another user. This action removes the history and change logs of this automation....",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_change_automation_space",
    "label": "Change Automation Space",
    "description": "Changes the space of an automation by specifying a new space.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_copy_automation",
    "label": "Duplicate Automation",
    "description": "Duplicates an existing automation. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_disable_automation",
    "label": "Disable Automation",
    "description": "Disables an automation so that it cannot be run. The requesting user must be the owner of the automation, or be assigned...",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_enable_automation",
    "label": "Enable Automation",
    "description": "Enables an automation so that it can be run. The requesting user must be the owner of the automation, or be assigned the...",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_move_automation",
    "label": "Move Automation",
    "description": "Changes the owner of an automation to another user. This action removes the history and change logs of this automation....",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_list_automation_runs",
    "label": "List Automation Runs",
    "description": "Retrieves a list of runs for a specific automation. The requesting user must be the owner of the automation, or be assig...",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_create_automation_run",
    "label": "Run Automation",
    "description": "Creates a runs for a specific automation. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_get_automation_run",
    "label": "Get Automation Run",
    "description": "Retrieves a specific run for an automation. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_export_automation_run_log",
    "label": "Export Automation Run Log",
    "description": "Retrieves the URL for the debug log of a specific automation run. The requesting user must be the owner of the automatio...",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_retry_automation_run",
    "label": "Retry Automation Run",
    "description": "Retries a specific run by creating a new run using the same inputs. The requesting user must be the owner of the automat...",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_stop_automation_run",
    "label": "Stop Automation Run",
    "description": "Forcefully stops an automation run immediately. The requesting user must be the owner of the automation.",
    "requiredScopes": ["admin.automations"]
  }, {
    "id": "qlik_get_automation_usage_metrics",
    "label": "Get Automation Usage Metrics",
    "description": "Retrieves paginated usage metrics for automations. The requesting user must be assigned the `TenantAdmin` role.",
    "requiredScopes": ["admin.automations:read"]
  }, {
    "id": "qlik_list_audit_events",
    "label": "List Audit Events",
    "description": "Retrieves list of events for subscribed services for your tenant. Stores events for 90 days, after which they can be acc..."
  }, {
    "id": "qlik_get_audit_event",
    "label": "Get Audit Event",
    "description": "Finds and returns a specific audit events for the given event ID."
  }, {
    "id": "qlik_list_archived_audit_events",
    "label": "List Archived Audit Events",
    "description": "Retrieves audit events from long-term storage. Returns all archived audit events for the specified date and tenant, form..."
  }, {
    "id": "qlik_get_audit_settings",
    "label": "Get Audit Settings",
    "description": "Returns the server configuration options. It includes options that represent the server configuration state and paramete..."
  }, {
    "id": "qlik_list_audit_sources",
    "label": "List Audit Sources",
    "description": "Finds and returns the list of possible event sources for this tenant."
  }, {
    "id": "qlik_list_audit_event_types",
    "label": "List Audit Event Types",
    "description": "Finds and returns the list of possible event types for this tenant."
  }, {
    "id": "qlik_list_api_keys",
    "label": "List API Keys",
    "description": "Lists API keys for the tenant with cursor-based pagination"
  }, {
    "id": "qlik_create_api_key",
    "label": "Create API Key",
    "description": "Creates an API key for a user or for configuring SCIM"
  }, {
    "id": "qlik_get_api_key",
    "label": "Get API Key",
    "description": "Returns an API key for a given ID"
  }, {
    "id": "qlik_delete_api_key",
    "label": "Delete API Key",
    "description": "Deletes or revokes an API key"
  }, {
    "id": "qlik_update_api_key",
    "label": "Update API Key",
    "description": "Updates an API key description using JSON Patch operations"
  }, {
    "id": "qlik_get_api_keys_config",
    "label": "Get API Keys Configuration",
    "description": "Retrieves the API key configuration for a tenant"
  }, {
    "id": "qlik_update_api_keys_config",
    "label": "Update API Keys Configuration",
    "description": "Updates the API keys configuration for a tenant using JSON Patch operations"
  }, {
    "id": "qlik_list_tasks",
    "label": "List Tasks",
    "description": "List tasks"
  }, {
    "id": "qlik_get_task",
    "label": "Get Task",
    "description": "Get a task"
  }, {
    "id": "qlik_delete_task",
    "label": "Delete Task",
    "description": "Delete a task"
  }, {
    "id": "qlik_start_task",
    "label": "Start Task",
    "description": "Start a task"
  }, {
    "id": "qlik_list_extensions",
    "label": "List Extensions",
    "description": "List all extensions",
    "requiredScopes": ["admin.extensions"]
  }, {
    "id": "qlik_get_extension",
    "label": "Get Extension",
    "description": "Get a specific extension",
    "requiredScopes": ["admin.extensions"]
  }, {
    "id": "qlik_delete_extension",
    "label": "Delete Extension",
    "description": "Delete a specific extension",
    "requiredScopes": ["admin.extensions"]
  }, {
    "id": "qlik_get_extension_archive",
    "label": "Get Extension Archive",
    "description": "Download extension as an archive",
    "requiredScopes": ["admin.extensions"]
  }, {
    "id": "qlik_get_extension_file",
    "label": "Get Extension File",
    "description": "Download file from extension archive",
    "requiredScopes": ["admin.extensions"]
  }, {
    "id": "qlik_list_brands",
    "label": "List Brands",
    "description": "List brands",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_get_brand",
    "label": "Get Brand",
    "description": "Retrieve a brand",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_update_brand",
    "label": "Update Brand",
    "description": "Update a brand",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_delete_brand",
    "label": "Delete Brand",
    "description": "Delete a brand",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_activate_brand",
    "label": "Activate Brand",
    "description": "Activate a brand",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_deactivate_brand",
    "label": "Deactivate Brand",
    "description": "Deactivate a brand",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_get_brand_file",
    "label": "Get Brand File",
    "description": "Download brand file",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_delete_brand_file",
    "label": "Delete Brand File",
    "description": "Delete a brand file",
    "requiredScopes": ["admin.themes"]
  }, {
    "id": "qlik_get_active_brand",
    "label": "Get Active Brand",
    "description": "Retrieve active brand",
    "requiredScopes": ["admin.themes"]
  }],
  "releaseStage": "ga",
  "categories": ["iam"],
  "scopeDefinitions": [{
    "name": "spaces.shared:create",
    "description": "Create shared spaces for collaboration",
    "includes": ["spaces.shared:read"]
  }, {
    "name": "spaces.shared:read",
    "description": "Read your shared spaces"
  }, {
    "name": "admin.spaces",
    "description": "Read and manage all spaces in the tenant",
    "includes": ["admin.spaces:read"]
  }, {
    "name": "admin.spaces:read",
    "description": "Read all spaces in the tenant"
  }, {
    "name": "users:read",
    "description": "Basic read access to users"
  }, {
    "name": "admin.users",
    "description": "Read and manage all users",
    "includes": ["admin.users:read"]
  }, {
    "name": "admin.users:read",
    "description": "Full read access to all users"
  }, {
    "name": "apps",
    "description": "Read and manage your apps",
    "includes": ["apps:read", "apps:export"]
  }, {
    "name": "apps:read",
    "description": "Read your apps"
  }, {
    "name": "apps:export",
    "description": "Export your apps"
  }, {
    "name": "admin.collections.publicgoverned",
    "description": "Create and update public collections"
  }, {
    "name": "admin.automations",
    "description": "Read and manage all automations in the tenant",
    "includes": ["admin.automations:read"]
  }, {
    "name": "admin.automations:read",
    "description": "Read all automations in the tenant"
  }, {
    "name": "admin.extensions",
    "description": "Create, read, update, delete, and download extensions"
  }, {
    "name": "admin.themes",
    "description": "Create, read, update, delete, and download themes"
  }]
};

<ConnectorPage connector={connector} />
