Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

540 B
Raw Blame
import { camelCase, startCase } from '@activepieces/pieces-framework';
import { ContentFields } from 'contentful-management';

export const getLinkHelperText = (
  validations: ContentFields['validations']
) => {
  const mimes: string[] =
    validations?.find((v) => v['linkMimetypeGroup'])?.['linkMimetypeGroup'] ||
    [];
  const entryTypes: string[] =
    validations?.find((v) => v['linkContentType'])?.['linkContentType'] || [];
  const parts: string[] = [...mimes, ...entryTypes];
  return startCase(camelCase(parts.join(',')));
};