Add Activepieces integration for workflow automation

- Add Activepieces fork with SmoothSchedule custom piece
- Create integrations app with Activepieces service layer
- Add embed token endpoint for iframe integration
- Create Automations page with embedded workflow builder
- Add sidebar visibility fix for embed mode
- Add list inactive customers endpoint to Public API
- Include SmoothSchedule triggers: event created/updated/cancelled
- Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-18 22:59:37 -05:00
parent 9848268d34
commit 3aa7199503
16292 changed files with 1284892 additions and 4708 deletions

View File

@@ -0,0 +1,37 @@
{
"extends": [
"../../../../.eslintrc.json"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {},
"extends": [
"plugin:prettier/recommended"
],
"plugins": ["prettier"]
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
]
}

View File

@@ -0,0 +1,7 @@
# pieces-captain-data
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build pieces-captain-data` to build the library.

View File

@@ -0,0 +1,4 @@
{
"name": "@activepieces/piece-captain-data",
"version": "0.0.6"
}

View File

@@ -0,0 +1,65 @@
{
"name": "pieces-captain-data",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/captain-data/src",
"projectType": "library",
"release": {
"version": {
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": [
"dist/{projectRoot}"
]
}
},
"tags": [],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/pieces/community/captain-data",
"tsConfig": "packages/pieces/community/captain-data/tsconfig.lib.json",
"packageJson": "packages/pieces/community/captain-data/package.json",
"main": "packages/pieces/community/captain-data/src/index.ts",
"assets": [
"packages/pieces/community/captain-data/*.md",
{
"input": "packages/pieces/community/captain-data/src/i18n",
"output": "./src/i18n",
"glob": "**/!(i18n.json)"
}
],
"buildableProjectDepsInPackageJsonType": "dependencies",
"updateBuildableProjectDepsInPackageJson": true
},
"dependsOn": [
"^build",
"prebuild"
]
},
"nx-release-publish": {
"options": {
"packageRoot": "dist/{projectRoot}"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
},
"prebuild": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/pieces/community/captain-data",
"command": "bun install --no-save --silent"
},
"dependsOn": [
"^build"
]
}
}
}

View File

@@ -0,0 +1,32 @@
{
"API key": "API-Schlüssel",
"Project ID": "Projekt-ID",
"Launch a workflow": "Workflow starten",
"Get job results": "Job-Ergebnisse erhalten",
"Custom API Call": "Eigener API-Aufruf",
"Get all results for a specific job": "Alle Ergebnisse für einen bestimmten Job erhalten",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"Workflow": "Workflow",
"Job name": "Job Name",
"Inputs": "Eingaben",
"Steps": "Schritte",
"Delay (seconds)": "Verzögerung (Sekunden)",
"Job": "Job",
"Method": "Methode",
"Headers": "Kopfzeilen",
"Query Parameters": "Abfrageparameter",
"Body": "Körper",
"Response is Binary ?": "Antwort ist binär?",
"No Error on Failure": "Kein Fehler bei Fehler",
"Timeout (in seconds)": "Timeout (in Sekunden)",
"Inputs are the starting point of your workflow.": "Eingaben sind der Ausgangspunkt Ihres Workflows.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "Sie müssen jeden Schritt mit\n- Konten konfigurieren: Die Identifikatoren der Konten, die Sie für diesen Schritt verwenden möchten. Die angegebenen Konten müssen mit der im Schritt verwendeten Integration übereinstimmen (z. Ein Linkedin-Konto für einen Such-Linkedin-Personenprofil). Die UIDs finden Sie in der Registerkarte \"Integration\" auf der Plattform, indem Sie auf die Schaltfläche \"Aktion\" (Kopierkonto UID) klicken.\n- accounts_rotation_enabled: (Optional) Unabhängig davon, ob Sie die Funktion \"Accounts Rotation aktivieren\" für diesen Schritt aktivieren möchten (nur bestimmte LinkedIn & Outlook Automatisierungen sind für diese Funktion anwendbar).\n- Parameter: Die spezifischen Parameter für diesen Schritt - (leer sein, aber erforderlich)\n- step_uid: Die UID des zu konfigurierenden Schritts. Du findest es im API Playground, auf der Plattform von Captain Data, indem du auf \"Body anzeigen\" klickst.\n.Siehe https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a für Details",
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "Clave API",
"Project ID": "ID del proyecto",
"Launch a workflow": "Iniciar un flujo de trabajo",
"Get job results": "Obtener resultados de trabajo",
"Custom API Call": "Llamada API personalizada",
"Get all results for a specific job": "Obtener todos los resultados para un trabajo específico",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"Workflow": "Flujo trabajo",
"Job name": "Nombre del trabajo",
"Inputs": "Inputs",
"Steps": "Pasos",
"Delay (seconds)": "Retraso (segundos)",
"Job": "Job",
"Method": "Método",
"Headers": "Encabezados",
"Query Parameters": "Parámetros de consulta",
"Body": "Cuerpo",
"Response is Binary ?": "¿Respuesta es binaria?",
"No Error on Failure": "No hay ningún error en fallo",
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
"Inputs are the starting point of your workflow.": "Las entradas son el punto de partida de su flujo de trabajo.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "Necesitas configurar cada paso con:\n- cuentas: Los identificadores de las cuentas que quieres usar para este paso. Las cuentas indicadas deben coincidir con la integración utilizada en el paso (e. Una cuenta de Linkedin para un paso del Perfil de Personas de Buscar en Linkedin). Puede encontrar los UIDs en la pestaña \"Integraciones\" de la plataforma haciendo clic en el botón de una cuenta específica \"Acción\" (copiar UID de cuenta).\n- accounts_rotation_enabled: (Opcional) Si desea o no activar la función de Rotación de Cuentas para este paso (sólo ciertas automatizaciones de Linkedin y Outlook son aplicables para esta característica).\n- parámetros: Los parámetros específicos para este paso dado - (Puede estar vacío pero es requerido)\n- step_uid: el UID del paso a configurar. Puedes encontrarlo en el campo de juego API, en la plataforma del capitán Datos haciendo clic en \"ver cuerpo a programar\".\n.Ver https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a para más detalles",
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDFs, imágenes, etc.",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "Clé API",
"Project ID": "ID du projet",
"Launch a workflow": "Lancer un workflow",
"Get job results": "Obtenir les résultats de la tâche",
"Custom API Call": "Appel API personnalisé",
"Get all results for a specific job": "Obtenir tous les résultats pour une tâche spécifique",
"Make a custom API call to a specific endpoint": "Passez un appel API personnalisé à un point de terminaison spécifique",
"Workflow": "Flux de travail",
"Job name": "Nom du poste",
"Inputs": "Entrées",
"Steps": "Steps",
"Delay (seconds)": "Délai (secondes)",
"Job": "Tâche",
"Method": "Méthode",
"Headers": "En-têtes",
"Query Parameters": "Paramètres de requête",
"Body": "Corps",
"Response is Binary ?": "La réponse est Binaire ?",
"No Error on Failure": "Aucune erreur en cas d'échec",
"Timeout (in seconds)": "Délai d'attente (en secondes)",
"Inputs are the starting point of your workflow.": "Les entrées sont le point de départ de votre workflow.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n- parameters: The specific parameters for this given step - (Can be empty but is required)\n- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data's platform by clicking on \"view body to schedule\".\n.See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details",
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
"GET": "OBTENIR",
"POST": "POSTER",
"PATCH": "PATCH",
"PUT": "EFFACER",
"DELETE": "SUPPRIMER",
"HEAD": "TÊTE"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "API キー",
"Project ID": "プロジェクトID",
"Launch a workflow": "ワークフローを起動",
"Get job results": "仕事の結果を取得する",
"Custom API Call": "カスタムAPI通話",
"Get all results for a specific job": "特定のジョブのすべての結果を取得します",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"Workflow": "ワークフロー",
"Job name": "ジョブ名",
"Inputs": "Inputs",
"Steps": "歩数",
"Delay (seconds)": "遅延 (秒)",
"Job": "ジョブ",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"Inputs are the starting point of your workflow.": "入力はワークフローの出発点です。",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n- parameters: The specific parameters for this given step - (Can be empty but is required)\n- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data's platform by clicking on \"view body to schedule\".\n.See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "API sleutel",
"Project ID": "Project ID",
"Launch a workflow": "Start een workflow",
"Get job results": "Krijg vacatureresultaten",
"Custom API Call": "Custom API Call",
"Get all results for a specific job": "Krijg alle resultaten voor een specifieke taak",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"Workflow": "Werkstroom",
"Job name": "Job naam",
"Inputs": "Invoer",
"Steps": "Stappen",
"Delay (seconds)": "Vertraging (seconden)",
"Job": "Vacature",
"Method": "Methode",
"Headers": "Kopteksten",
"Query Parameters": "Query parameters",
"Body": "Lichaam",
"Response is Binary ?": "Antwoord is binair?",
"No Error on Failure": "Geen fout bij fout",
"Timeout (in seconds)": "Time-out (in seconden)",
"Inputs are the starting point of your workflow.": "Invoer is het startpunt van uw workflow.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "U moet elke stap configureren met:\n- account: de account-id's van de accounts die u wilt gebruiken voor deze stap. De aangeduide rekeningen moeten overeenkomen met de integratie in de stap (bv. Een Linkedin account voor een Zoek Linkedin People profiel stap). Je kunt de UIDs vinden op het platform op het tabblad \"Integraties\" door te klikken op een specifieke account \"Actie\" knop (kopieer account UID).\n- accounts_rotation_enabled: (Optioneel) Of u de klanten rotatie functie voor deze stap wilt inschakelen (alleen bepaalde Linkedin & Outlook automaties zijn van toepassing).\n- parameters: De specifieke parameters voor deze gegeven stap - (is leeg maar vereist)\n- stap_uid: de UID van de stap om te configureren. U kunt het vinden op de API Playground, op het platform van Captain Data's door te klikken op \"bekijk inhoud naar schema\".\n.Zie https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a voor details",
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "Chave da API",
"Project ID": "ID do Projeto",
"Launch a workflow": "Iniciar um workflow",
"Get job results": "Obter resultados de trabalho",
"Custom API Call": "Chamada de API personalizada",
"Get all results for a specific job": "Obter todos os resultados para um trabalho específico",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"Workflow": "Workflow",
"Job name": "Nome do trabalho",
"Inputs": "Entradas",
"Steps": "Passos",
"Delay (seconds)": "Atraso (segundos)",
"Job": "Trabalho",
"Method": "Método",
"Headers": "Cabeçalhos",
"Query Parameters": "Parâmetros da consulta",
"Body": "Conteúdo",
"Response is Binary ?": "A resposta é binária ?",
"No Error on Failure": "Nenhum erro no Failure",
"Timeout (in seconds)": "Tempo limite (em segundos)",
"Inputs are the starting point of your workflow.": "Entradas são o ponto de partida do seu fluxo de trabalho.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "Você precisa configurar cada passo com:\n- contas: Os identificadores das contas que você deseja usar nesta etapa. As contas indicadas devem corresponder à integração usada na etapa (e. Uma conta Linkedin para uma etapa de perfil Search Linkedin People ). Você pode encontrar os UIDs na guia \"Integrações\" na plataforma clicando em uma conta específica \"Ação\" (copiar conta UID).\n- accounts_rotation_enabled: (Opcional) Se você deseja ou não habilitar o recurso de Rotação de Contas para esta etapa (apenas certas automações Linkedin e Outlook são aplicáveis para este recurso).\n- parâmetros: Os parâmetros específicos para esta etapa - (Pode estar vazio, mas é obrigatório)\n- step_uid: O UID da etapa para configurar. Você pode encontrá-lo no centro da API, na plataforma do Capitão Dados, clicando em \"ver corpo para agendar\".\n.Veja https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a para detalhes",
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA"
}

View File

@@ -0,0 +1,31 @@
{
"Captain-data": "Капитан-данные",
"API key": "API ключ",
"Project ID": "ID проекта",
"Launch a workflow": "Запуск рабочего процесса",
"Get job results": "Получить результаты работы",
"Custom API Call": "Пользовательский вызов API",
"Get all results for a specific job": "Получить все результаты по конкретной вакансии",
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
"Workflow": "Рабочий процесс",
"Job name": "Имя Вакансии",
"Inputs": "Inputs",
"Steps": "Шаги",
"Delay (seconds)": "Задержка (секунды)",
"Job": "Работа",
"Method": "Метод",
"Headers": "Заголовки",
"Query Parameters": "Параметры запроса",
"Body": "Тело",
"No Error on Failure": "Нет ошибок при ошибке",
"Timeout (in seconds)": "Таймаут (в секундах)",
"Inputs are the starting point of your workflow.": "Входы являются отправной точкой вашего рабочего процесса.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "Вам нужно настроить каждый шаг с:\n- аккаунты : Идентификаторы учетных записей, которые вы хотите использовать для этого шага. Указанные счета должны соответствовать интеграции, используемой на этапе (e. Учётная запись Linkedin для перехода к поиску в профиле людей). UID можно найти на вкладке \"Интеграции\" на платформе, нажав на кнопку \"Действия\" (скопировать UID).\n- accounts_rotation_enabled: (Необязательно) Не хотите ли вы включить функцию ротации клиентов для этого шага (только некоторые автоматизации Linkedin и Outlook применимы для этой функции).\n- параметры: Конкретные параметры для этого шага - (может быть пустым, но требуется)\n- step_uid: UID шага для настройки. Вы можете найти его на платформе API, нажав на кнопку «просмотреть тело по расписанию».\n. Смотрите https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a для получения подробностей",
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
"GET": "ПОЛУЧИТЬ",
"POST": "ПОСТ",
"PATCH": "ПАТЧ",
"PUT": "ПОКУПИТЬ",
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "API key",
"Project ID": "Project ID",
"Launch a workflow": "Launch a workflow",
"Get job results": "Get job results",
"Custom API Call": "Custom API Call",
"Get all results for a specific job": "Get all results for a specific job",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Workflow": "Workflow",
"Job name": "Job name",
"Inputs": "Inputs",
"Steps": "Steps",
"Delay (seconds)": "Delay (seconds)",
"Job": "Job",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"Inputs are the starting point of your workflow.": "Inputs are the starting point of your workflow.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n- parameters: The specific parameters for this given step - (Can be empty but is required)\n- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data's platform by clicking on \"view body to schedule\".\n.See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,31 @@
{
"Captain-data": "Captain-data",
"API key": "API key",
"Project ID": "Project ID",
"Launch a workflow": "Launch a workflow",
"Get job results": "Get job results",
"Custom API Call": "Custom API Call",
"Get all results for a specific job": "Get all results for a specific job",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Workflow": "Workflow",
"Job name": "Job name",
"Inputs": "Inputs",
"Steps": "Bước",
"Delay (seconds)": "Delay (seconds)",
"Job": "Job",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"Inputs are the starting point of your workflow.": "Inputs are the starting point of your workflow.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n- parameters: The specific parameters for this given step - (Can be empty but is required)\n- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data's platform by clicking on \"view body to schedule\".\n.See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,32 @@
{
"API key": "API key",
"Project ID": "Project ID",
"Launch a workflow": "Launch a workflow",
"Get job results": "Get job results",
"Custom API Call": "自定义 API 呼叫",
"Get all results for a specific job": "Get all results for a specific job",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"Workflow": "Workflow",
"Job name": "Job name",
"Inputs": "Inputs",
"Steps": "Steps",
"Delay (seconds)": "Delay (seconds)",
"Job": "Job",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"Inputs are the starting point of your workflow.": "Inputs are the starting point of your workflow.",
"You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only cert": "You need to configure each steps with:\n- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the \"Integrations' tab on the platform by clicking on a specific account \"Action\" button (copy account UID).\n- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n- parameters: The specific parameters for this given step - (Can be empty but is required)\n- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data's platform by clicking on \"view body to schedule\".\n.See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色"
}

View File

@@ -0,0 +1,50 @@
import {
createPiece,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { launchWorkflow } from './lib/actions/launch-workflow';
import { getJobResults } from './lib/actions/get-job-results';
export const CAPTAIN_DATA_BASE_URL = 'https://api.captaindata.co/v3';
export const captainDataAuth = PieceAuth.CustomAuth({
required: true,
props: {
apiKey: PieceAuth.SecretText({
displayName: 'API key',
required: true,
}),
projectId: Property.ShortText({
displayName: 'Project ID',
required: true,
}),
},
});
export type CaptainDataAuthType = {
apiKey: string;
projectId: string;
};
export const captainData = createPiece({
displayName: 'Captain-data',
auth: captainDataAuth,
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/captain-data.png',
authors: ['AdamSelene'],
actions: [
launchWorkflow,
getJobResults,
createCustomApiCallAction({
auth: captainDataAuth,
baseUrl: () => CAPTAIN_DATA_BASE_URL,
authMapping: async (auth) => ({
Authorization: `x-api-key ${auth.props.apiKey}`,
'x-project-id': auth.props.projectId,
}),
}),
],
triggers: [],
});

View File

@@ -0,0 +1,71 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import {
CAPTAIN_DATA_BASE_URL,
captainDataAuth,
CaptainDataAuthType,
} from '../..';
import { workflowProp } from '../common';
export const getJobResults = createAction({
// auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,
name: 'getJobResults',
displayName: 'Get job results',
description: 'Get all results for a specific job',
auth: captainDataAuth,
props: {
workflow: workflowProp,
job: Property.Dropdown({
auth: captainDataAuth,
displayName: 'Job',
required: true,
refreshers: ['workflow'],
options: async ({ auth, workflow }) => {
if (!auth || !workflow) {
return {
disabled: true,
options: [],
};
}
const response = await httpClient.sendRequest({
url: `${CAPTAIN_DATA_BASE_URL}/workflows/${workflow}/jobs`,
method: HttpMethod.GET,
headers: {
Authorization: `x-api-key ${auth.props.apiKey}`,
'x-project-id': auth.props.projectId,
},
});
return {
disabled: false,
options: response.body.map(
(job: {
uid: string;
name: string;
workflow_name: string;
status: string;
start_time: string;
}) => {
return {
value: job.uid,
label: job.start_time,
};
}
),
};
},
}),
},
async run({ auth, propsValue }) {
// We don't do pagination because Captain Data's API doc does provide details nor even examples :shrug:
const response = await httpClient.sendRequest({
url: `${CAPTAIN_DATA_BASE_URL}/jobs/${propsValue.job}/results`,
method: HttpMethod.GET,
headers: {
Authorization: `x-api-key ${auth.props.apiKey}`,
'x-project-id': auth.props.projectId,
},
});
return response.body;
},
});

View File

@@ -0,0 +1,60 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { CAPTAIN_DATA_BASE_URL, captainDataAuth } from '../..';
import { workflowProp } from '../common';
export const launchWorkflow = createAction({
// auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,
name: 'launchWorkflow',
displayName: 'Launch a workflow',
description: '',
auth: captainDataAuth,
props: {
workflow: workflowProp,
jobName: Property.ShortText({
displayName: 'Job name',
required: false,
}),
inputs: Property.Json({
displayName: 'Inputs',
description: 'Inputs are the starting point of your workflow.',
defaultValue: [],
required: false,
}),
steps: Property.Json({
displayName: 'Steps',
description:
'You need to configure each steps with:\n' +
'- accounts : The identifiers of the accounts you want to use for this step. The accounts indicated must match the integration used in the step (e.g A Linkedin account for a Search Linkedin People Profile step). You can find the UIDs in the "Integrations\' tab on the platform by clicking on a specific account "Action" button (copy account UID).\n' +
'- accounts_rotation_enabled: (Optional) Whether or not you want to enable the Accounts Rotation feature for this step (only certain Linkedin & Outlook automations are applicable for this feature).\n' +
'- parameters: The specific parameters for this given step - (Can be empty but is required)\n' +
'- step_uid: The UID of the step to configure. You can find it in the API Playground, on Captain Data\'s platform by clicking on "view body to schedule".\n.' +
'See https://docs.captaindata.co/#36e905b6-3a31-4bcd-8c6f-0eb6093b5a8a for details',
defaultValue: [],
required: false,
}),
delay: Property.Number({
displayName: 'Delay (seconds)',
required: false,
}),
},
async run({ auth, propsValue }) {
const payload = {
job_name: propsValue.jobName,
inputs: propsValue.inputs,
steps: propsValue.steps,
delay: propsValue.delay,
};
const response = await httpClient.sendRequest({
url: `${CAPTAIN_DATA_BASE_URL}/workflows/${propsValue.workflow}/schedule`,
method: HttpMethod.POST,
headers: {
'Content-Type': 'application/json',
Authorization: `x-api-key ${auth.props.apiKey}`,
'x-project-id': auth.props.projectId,
},
body: JSON.stringify(payload),
});
return response.body;
},
});

View File

@@ -0,0 +1,32 @@
import { Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { CAPTAIN_DATA_BASE_URL, captainDataAuth } from '..';
export const workflowProp = Property.Dropdown({
auth: captainDataAuth,
displayName: 'Workflow',
required: true,
refreshers: [],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
options: [],
};
}
const response = await httpClient.sendRequest({
url: `${CAPTAIN_DATA_BASE_URL}/workflows`,
method: HttpMethod.GET,
headers: {
Authorization: `x-api-key ${auth.props.apiKey}`,
'x-project-id': auth.props.projectId,
},
});
return {
disabled: false,
options: response.body.map((workflow: { uid: string; name: string }) => {
return { label: workflow.name, value: workflow.uid };
}),
};
},
});

View File

@@ -0,0 +1,19 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
]
}

View File

@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}