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:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-magical-api
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-magical-api` to build the library.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@activepieces/piece-magical-api",
|
||||
"version": "0.0.2",
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-magical-api",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/magical-api/src",
|
||||
"projectType": "library",
|
||||
"release": {
|
||||
"version": {
|
||||
"manifestRootsToUpdate": [
|
||||
"dist/{projectRoot}"
|
||||
],
|
||||
"currentVersionResolver": "git-tag",
|
||||
"fallbackCurrentVersionResolver": "disk"
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/magical-api",
|
||||
"tsConfig": "packages/pieces/community/magical-api/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/magical-api/package.json",
|
||||
"main": "packages/pieces/community/magical-api/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/magical-api/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/magical-api/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/magical-api",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automatisieren Sie das Parsing, Überprüfung, Score und LinkedIn-Profil/Firmendaten mit Magical API.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Geben Sie Ihren Magical API Key von Ihrem MagicalAPI Dashboard ein.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Rezension fortsetzen",
|
||||
"Get Profile Data": "Profildaten abrufen",
|
||||
"Get Company Data": "Unternehmensdaten abrufen",
|
||||
"Score Resume": "Punktestand fortsetzen",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extrahieren Sie strukturierte Daten (Name, E-Mail, Erfahrung, Fähigkeiten, etc.) aus einer Lebenslaufdatei.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analysieren Sie den analysierten Lebenslauf anhand vordefinierter Kriterien.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Mit einem LinkedIn-Profil-Benutzernamen erhalten Sie umfassende Profildaten.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Geben Sie einen Firmennamen, LinkedIn-Benutzernamen oder eine Website ein, holen Sie sich umfassende Unternehmensinformationen.",
|
||||
"Scores a resume against a job description and provides a reason.": "Bewertet einen Lebenslauf gegen eine Jobbeschreibung und gibt einen Grund.",
|
||||
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
||||
"Resume URL": "Lebenslauf-URL",
|
||||
"Request ID (for retries)": "Request-ID (für Wiederholung)",
|
||||
"LinkedIn Profile Username": "LinkedIn-Profil-Benutzername",
|
||||
"Company Name": "Firmenname",
|
||||
"Company LinkedIn Username": "Firma LinkedIn-Benutzername",
|
||||
"Company Website": "Firmen-Webseite",
|
||||
"Job Description": "Jobbeschreibung",
|
||||
"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)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Geben Sie den direkten Link zu einer öffentlich zugänglichen Lebenslaufdatei (PDF, DOC oder DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "Wenn eine vorherige Auslaufzeit abgelaufen ist, fügen Sie die Request-ID hier ein, um das Ergebnis zu erhalten.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Geben Sie eine direkte URL zu einer öffentlich zugänglichen Lebenslaufdatei (PDF, DOC oder DOCX) an.",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Geben Sie den Benutzernamen der LinkedIn-Profil-URL an (z.B. 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Geben Sie den rechtlichen Namen des Unternehmens an (z.B. 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Geben Sie den Benutzernamen von der LinkedIn-URL des Unternehmens an (z.B. 'microsoft').",
|
||||
"Provide the company's official website URL.": "Geben Sie die offizielle Website-URL des Unternehmens an.",
|
||||
"Provide the job description to score the resume against.": "Geben Sie die Jobbeschreibung an, um den Lebenslauf zu bewerten.",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automatiza el análisis de currículum vitae, revisión, puntuación y recuperación de datos de LinkedIn con API mágica.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Introduzca su clave mágica API desde su tablero de comandos MagicalAPI.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Revisar Reanudar",
|
||||
"Get Profile Data": "Obtener datos de perfil",
|
||||
"Get Company Data": "Obtener datos de la empresa",
|
||||
"Score Resume": "Reanudar puntuación",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extraer datos estructurados (nombre, correo electrónico, experiencia, habilidades, etc.) de un archivo de currículum.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analizar el currículum analizado utilizando criterios predefinidos.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Dado un nombre de usuario de perfil de LinkedIn, recupera los datos completos del perfil.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Con el nombre de una empresa, nombre de usuario de LinkedIn o sitio web, obtenga información completa de la empresa.",
|
||||
"Scores a resume against a job description and provides a reason.": "Acoge un currículo en contra de una descripción del trabajo y proporciona una razón.",
|
||||
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
||||
"Resume URL": "Reanudar URL",
|
||||
"Request ID (for retries)": "Solicitud de ID (para reintentos)",
|
||||
"LinkedIn Profile Username": "Nombre de usuario del perfil de LinkedIn",
|
||||
"Company Name": "Nombre De La Empresa",
|
||||
"Company LinkedIn Username": "Usuario LinkedIn de la empresa",
|
||||
"Company Website": "Sitio web de la empresa",
|
||||
"Job Description": "Descripción del trabajo",
|
||||
"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)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Proporciona el enlace directo a un archivo de currículum accesible públicamente (PDF, DOC o DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "Si se ha agotado el tiempo de ejecución anterior, pegue el ID de la solicitud aquí para obtener el resultado.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Proporcione una URL directa a un archivo de currículo accesible públicamente (PDF, DOC o DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Proporcione el nombre de usuario de la URL del perfil de LinkedIn (por ejemplo, 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Proporcione el nombre legal de la empresa (por ejemplo, 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Proporcione el nombre de usuario de la URL de LinkedIn de la empresa (por ejemplo, 'microsoft').",
|
||||
"Provide the company's official website URL.": "Proporcione la URL oficial del sitio web de la empresa.",
|
||||
"Provide the job description to score the resume against.": "Proporcione la descripción de la tarea para marcar el currículum vitae.",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automatiser l'analyse de la reprise, la revue, le pointage et la récupération des données du profil LinkedIn avec l'API Magique.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Entrez votre clé Magical API depuis votre tableau de bord MagicalAPI.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Reprendre la revue",
|
||||
"Get Profile Data": "Obtenir les données du profil",
|
||||
"Get Company Data": "Obtenir les données de la société",
|
||||
"Score Resume": "Reprise de score",
|
||||
"Custom API Call": "Appel d'API personnalisé",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extraire les données structurées (nom, courriel, expérience, compétences, etc.) d'un fichier de résumé.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analyser la reprise analysée en utilisant des critères prédéfinis.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Donné un nom d'utilisateur de profil LinkedIn, récupérer les données de profil détaillées.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Donné le nom d'une entreprise, nom d'utilisateur LinkedIn ou site Web, récupérez des informations complètes sur l'entreprise.",
|
||||
"Scores a resume against a job description and provides a reason.": "Cote un curriculum vitae par rapport à une description d'emploi et donne une raison.",
|
||||
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
||||
"Resume URL": "Reprendre l'URL",
|
||||
"Request ID (for retries)": "ID de la requête (pour les tentatives)",
|
||||
"LinkedIn Profile Username": "Nom d'utilisateur du profil LinkedIn",
|
||||
"Company Name": "Nom de l’entreprise",
|
||||
"Company LinkedIn Username": "Nom d'utilisateur LinkedIn de la société",
|
||||
"Company Website": "Site Web de la société",
|
||||
"Job Description": "Description du poste",
|
||||
"Method": "Méthode",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "La réponse est Binaire ?",
|
||||
"No Error on Failure": "Aucune erreur en cas d'échec",
|
||||
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Fournir le lien direct vers un fichier de CV accessible au public (PDF, DOC ou DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "Si une exécution précédente a expiré, collez l'ID de requête ici pour obtenir le résultat.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Fournir une URL directe à un fichier de CV accessible au public (PDF, DOC ou DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Fournir le nom d'utilisateur à partir de l'URL du profil LinkedIn (par exemple, 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Indiquez le nom légal de la société (par exemple, 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Fournir le nom d'utilisateur à partir de l'URL LinkedIn de la société (par exemple, 'microsoft').",
|
||||
"Provide the company's official website URL.": "Fournir l'URL officielle du site Web de la société.",
|
||||
"Provide the job description to score the resume against.": "Fournissez la description du poste pour marquer le curriculum vitae.",
|
||||
"Authorization headers are injected automatically from your connection.": "Les Headers 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": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Magical APIを使用して、レビュー、スコアリング、およびLinkedInのプロファイル/企業データ検索を再開します。",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "MagicalAPIダッシュボードからMagical APIキーを入力します。",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "レビューの再開",
|
||||
"Get Profile Data": "プロフィールデータを取得する",
|
||||
"Get Company Data": "会社データを取得する",
|
||||
"Score Resume": "スコア再開",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "構造化されたデータ(名前、電子メール、経験、スキルなど)を履歴書ファイルから抽出します。",
|
||||
"Analyze parsed resume using predefined criteria.": "定義済みの条件を使用して解析された履歴書を分析します。",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "LinkedInのプロフィールユーザー名を与えられ、包括的なプロフィールデータを取得します。",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "会社名、LinkedIn のユーザー名、または Web サイトを指定して、包括的な会社情報を取得します。",
|
||||
"Scores a resume against a job description and provides a reason.": "ジョブの説明に対して履歴書を取得し、理由を提供します。",
|
||||
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
||||
"Resume URL": "URLを再開",
|
||||
"Request ID (for retries)": "リクエストID(再試行用)",
|
||||
"LinkedIn Profile Username": "LinkedIn プロフィール ユーザー名",
|
||||
"Company Name": "会社名",
|
||||
"Company LinkedIn Username": "会社のLinkedInユーザー名",
|
||||
"Company Website": "会社のウェブサイト",
|
||||
"Job Description": "作業の説明",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "一般にアクセス可能な履歴書ファイル(PDF、DOC、DOCX)への直接リンクを提供します",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "以前の実行がタイムアウトした場合は、リクエストIDをここに貼り付け、結果を取得します。",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "一般にアクセス可能な履歴書ファイル(PDF、DOC、またはDOCX)に直接URLを提供します。",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "LinkedIn プロファイル URL (例: 'williamhgates')からユーザー名を入力します。",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "会社の法的な名前を入力してください(例: 'Microsoft')。",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "会社の LinkedIn URL (例えば 'microsoft') からユーザー名を入力します。",
|
||||
"Provide the company's official website URL.": "会社の公式ウェブサイトのURLを提供します。",
|
||||
"Provide the job description to score the resume against.": "履歴書に対してスコアするジョブの説明を提供します。",
|
||||
"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": "頭"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automatiseer herlezen van analyses, beoordelingen, scoren en LinkedIn profiel/bedrijfs-gegevens ophalen met magische API.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Voer uw MagicalAPI sleutel in vanuit uw MagicalAPI dashboard.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Hervatten beoordelen",
|
||||
"Get Profile Data": "Profielgegevens ophalen",
|
||||
"Get Company Data": "Bedrijfsgegevens ophalen",
|
||||
"Score Resume": "Score hervatten",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Haal gestructureerde gegevens uit (naam, e-mail, ervaring, vaardigheden, etc.) uit een hervat bestand.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analyseer afgeleid hervatten met behulp van vooraf gedefinieerde criteria.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Gebaseerd op een LinkedIn profielgebruikersnaam, haal de uitgebreide profielgegevens op.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Met de bedrijfsnaam, LinkedIn gebruikersnaam, of website, haal je uitgebreide bedrijfsinformatie op.",
|
||||
"Scores a resume against a job description and provides a reason.": "Scort een hervatting tegen een taakbeschrijving en geeft een reden.",
|
||||
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
||||
"Resume URL": "URL hervatten",
|
||||
"Request ID (for retries)": "Aanvraag ID (voor herhalen)",
|
||||
"LinkedIn Profile Username": "LinkedIn profiel gebruikersnaam",
|
||||
"Company Name": "Bedrijfsnaam",
|
||||
"Company LinkedIn Username": "LinkedIn gebruikersnaam van bedrijf",
|
||||
"Company Website": "Bedrijfs website",
|
||||
"Job Description": "Job omschrijving",
|
||||
"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)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Voorzie de directe link naar een openbaar toegankelijk hervattingsbestand (PDF, DOC of DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "Als een eerdere run is verlopen, plak dan hier het verzoek-ID om het resultaat te krijgen.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Geef een directe URL op voor een openbaar toegankelijk hervattingsbestand (PDF, DOC of DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Geef de gebruikersnaam van de LinkedIn-profiel-URL (bijv. 'williamhates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Geef de wettelijke naam van het bedrijf (bijvoorbeeld 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Geef de gebruikersnaam van de LinkedIn URL van het bedrijf (bijv. 'microsoft').",
|
||||
"Provide the company's official website URL.": "Geef de URL van de officiële website van het bedrijf op.",
|
||||
"Provide the job description to score the resume against.": "Geef de functiebeschrijving om het volgende te scoren.",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automatize a análise de currículo, revisão, pontuação e obtenção de dados do LinkedIn/empresa com API mágica.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Digite sua chave mágica da API do seu painel MagicalAPI.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Retomar avaliação",
|
||||
"Get Profile Data": "Obter dados do perfil",
|
||||
"Get Company Data": "Obter dados da empresa",
|
||||
"Score Resume": "Pontuação Retomada",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extraia os dados estruturados (nome, e-mail, experiência, habilidades, etc.) de um arquivo retomado.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analisar a análise usando critérios predefinidos.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Nome de usuário do LinkedIn, recupere dados de perfil abrangentes.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Dado um nome de usuário da empresa, LinkedIn ou site, busque informações abrangentes da empresa.",
|
||||
"Scores a resume against a job description and provides a reason.": "Faz um currículo contra uma descrição de um cargo e fornece um motivo.",
|
||||
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
||||
"Resume URL": "Retomar URL",
|
||||
"Request ID (for retries)": "ID da solicitação (para tentativas)",
|
||||
"LinkedIn Profile Username": "Usuário do perfil LinkedIn",
|
||||
"Company Name": "Nome da Empresa",
|
||||
"Company LinkedIn Username": "Nome LinkedIn Empresa",
|
||||
"Company Website": "Site da Companhia",
|
||||
"Job Description": "Descrição do 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)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Forneça o link direto para um arquivo de currículo de acesso público (PDF, DOC, ou DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "Se a execução anterior tiver expirado, cole o ID da solicitação aqui para obter o resultado.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Forneça uma URL direta para um arquivo de resumo de acesso público (PDF, DOC, ou DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Forneça o nome de usuário a partir da URL do perfil do LinkedIn (ex.: 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Forneça o nome legal da empresa (por exemplo, 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Forneça o nome de usuário a partir da URL do LinkedIn da empresa (por exemplo, 'microsoft').",
|
||||
"Provide the company's official website URL.": "Forneça a URL oficial do site da empresa.",
|
||||
"Provide the job description to score the resume against.": "Forneça a descrição do job para marcar o currículo contra.",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Enter your Magical API key from your MagicalAPI dashboard.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Review Resume",
|
||||
"Get Profile Data": "Get Profile Data",
|
||||
"Get Company Data": "Get Company Data",
|
||||
"Score Resume": "Score Resume",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extract structured data (name, email, experience, skills, etc.) from a resume file.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analyze parsed resume using predefined criteria.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Given a LinkedIn profile username, retrieve comprehensive profile data.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Given a company name, LinkedIn username, or website, fetch comprehensive company info.",
|
||||
"Scores a resume against a job description and provides a reason.": "Scores a resume against a job description and provides a reason.",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Resume URL": "Resume URL",
|
||||
"Request ID (for retries)": "Request ID (for retries)",
|
||||
"LinkedIn Profile Username": "LinkedIn Profile Username",
|
||||
"Company Name": "Company Name",
|
||||
"Company LinkedIn Username": "Company LinkedIn Username",
|
||||
"Company Website": "Company Website",
|
||||
"Job Description": "Job Description",
|
||||
"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)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Provide the company's legal name (e.g., 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Provide the username from the company's LinkedIn URL (e.g., 'microsoft').",
|
||||
"Provide the company's official website URL.": "Provide the company's official website URL.",
|
||||
"Provide the job description to score the resume against.": "Provide the job description to score the resume against.",
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.": "Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.",
|
||||
"Enter your Magical API key from your MagicalAPI dashboard.": "Enter your Magical API key from your MagicalAPI dashboard.",
|
||||
"Parse Resume": "Parse Resume",
|
||||
"Review Resume": "Review Resume",
|
||||
"Get Profile Data": "Get Profile Data",
|
||||
"Get Company Data": "Get Company Data",
|
||||
"Score Resume": "Score Resume",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"Extract structured data (name, email, experience, skills, etc.) from a resume file.": "Extract structured data (name, email, experience, skills, etc.) from a resume file.",
|
||||
"Analyze parsed resume using predefined criteria.": "Analyze parsed resume using predefined criteria.",
|
||||
"Given a LinkedIn profile username, retrieve comprehensive profile data.": "Given a LinkedIn profile username, retrieve comprehensive profile data.",
|
||||
"Given a company name, LinkedIn username, or website, fetch comprehensive company info.": "Given a company name, LinkedIn username, or website, fetch comprehensive company info.",
|
||||
"Scores a resume against a job description and provides a reason.": "Scores a resume against a job description and provides a reason.",
|
||||
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
||||
"Resume URL": "Resume URL",
|
||||
"Request ID (for retries)": "Request ID (for retries)",
|
||||
"LinkedIn Profile Username": "LinkedIn Profile Username",
|
||||
"Company Name": "Company Name",
|
||||
"Company LinkedIn Username": "Company LinkedIn Username",
|
||||
"Company Website": "Company Website",
|
||||
"Job Description": "Job Description",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)": "Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)",
|
||||
"If a previous run timed out, paste the Request ID here to get the result.": "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
"Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).": "Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).",
|
||||
"Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').": "Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').",
|
||||
"Provide the company's legal name (e.g., 'Microsoft').": "Provide the company's legal name (e.g., 'Microsoft').",
|
||||
"Provide the username from the company's LinkedIn URL (e.g., 'microsoft').": "Provide the username from the company's LinkedIn URL (e.g., 'microsoft').",
|
||||
"Provide the company's official website URL.": "Provide the company's official website URL.",
|
||||
"Provide the job description to score the resume against.": "Provide the job description to score the resume against.",
|
||||
"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": "黑色"
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
import { magicalApiAuth } from './lib/common/auth';
|
||||
import { BASE_URL } from './lib/common/client';
|
||||
import { reviewResume } from './lib/actions/review-resume';
|
||||
import { parseResume } from './lib/actions/parse-resume';
|
||||
import { getProfileData } from './lib/actions/get-profile-data';
|
||||
import { getCompanyData } from './lib/actions/get-company-data';
|
||||
import { scoreResume } from './lib/actions/score-resume';
|
||||
|
||||
export const magicalApi = createPiece({
|
||||
displayName: 'Magical API',
|
||||
description: 'Automate resume parsing, review, scoring, and LinkedIn profile/company data retrieval with Magical API.',
|
||||
auth: magicalApiAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/magical-api.png',
|
||||
authors: ['Pranith124', 'sanket-a11y'],
|
||||
categories: [
|
||||
PieceCategory.HUMAN_RESOURCES,
|
||||
PieceCategory.SALES_AND_CRM,
|
||||
PieceCategory.BUSINESS_INTELLIGENCE,
|
||||
],
|
||||
actions: [
|
||||
parseResume,
|
||||
reviewResume,
|
||||
getProfileData,
|
||||
getCompanyData,
|
||||
scoreResume,
|
||||
createCustomApiCallAction({
|
||||
auth: magicalApiAuth,
|
||||
baseUrl: () => BASE_URL,
|
||||
authMapping: async (auth) => {
|
||||
return {
|
||||
'api-key': auth.secret_text,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,87 @@
|
||||
import { createAction, Property } from "@activepieces/pieces-framework";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { magicalApiAuth } from "../common/auth";
|
||||
import { makeRequest } from "../common/client";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const getCompanyData = createAction({
|
||||
auth: magicalApiAuth,
|
||||
name: 'get_company_data',
|
||||
displayName: 'Get Company Data',
|
||||
description: 'Given a company name, LinkedIn username, or website, fetch comprehensive company info.',
|
||||
props: {
|
||||
company_name: Property.ShortText({
|
||||
displayName: 'Company Name',
|
||||
description: "Provide the company's legal name (e.g., 'Microsoft').",
|
||||
required: false,
|
||||
}),
|
||||
company_username: Property.ShortText({
|
||||
displayName: 'Company LinkedIn Username',
|
||||
description: "Provide the username from the company's LinkedIn URL (e.g., 'microsoft').",
|
||||
required: false,
|
||||
}),
|
||||
company_website: Property.ShortText({
|
||||
displayName: 'Company Website',
|
||||
description: "Provide the company's official website URL.",
|
||||
required: false,
|
||||
}),
|
||||
request_id: Property.ShortText({
|
||||
displayName: 'Request ID (for retries)',
|
||||
description: "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { company_name, company_username, company_website, request_id } = context.propsValue;
|
||||
const apiKey = context.auth;
|
||||
const COMPANY_DATA_ENDPOINT = '/company-data';
|
||||
let requestIdToPoll = request_id;
|
||||
let response;
|
||||
|
||||
if (!requestIdToPoll) {
|
||||
if (!company_name && !company_username && !company_website) {
|
||||
throw new Error("To start a new request, you must provide a Company Name, LinkedIn Username, or Website.");
|
||||
}
|
||||
|
||||
const initialBody: { [key: string]: string } = {};
|
||||
if (company_name) initialBody['company_name'] = company_name;
|
||||
if (company_username) initialBody['company_username'] = company_username;
|
||||
if (company_website) initialBody['company_website'] = company_website;
|
||||
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, COMPANY_DATA_ENDPOINT, initialBody);
|
||||
} else {
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, COMPANY_DATA_ENDPOINT, { request_id: requestIdToPoll });
|
||||
}
|
||||
|
||||
|
||||
if (response.data?.company_name) {
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
requestIdToPoll = response.data?.request_id;
|
||||
if (!requestIdToPoll) {
|
||||
throw new Error('Failed to start or retrieve the request. The API did not return a request_id or the final data.');
|
||||
}
|
||||
|
||||
|
||||
const maxAttempts = 20;
|
||||
const pollInterval = 3000;
|
||||
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
||||
await sleep(pollInterval);
|
||||
const pollResponse = await makeRequest(apiKey, HttpMethod.POST, COMPANY_DATA_ENDPOINT, { request_id: requestIdToPoll });
|
||||
|
||||
|
||||
if (pollResponse.data?.company_name) {
|
||||
|
||||
return pollResponse.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
throw new Error(
|
||||
'Timeout: The request is still processing. You can try again later with this Request ID: ' + requestIdToPoll
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
import { createAction, Property } from "@activepieces/pieces-framework";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { magicalApiAuth } from "../common/auth";
|
||||
import { makeRequest } from "../common/client";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const getProfileData = createAction({
|
||||
auth: magicalApiAuth,
|
||||
name: 'get_profile_data',
|
||||
displayName: 'Get Profile Data',
|
||||
description: 'Given a LinkedIn profile username, retrieve comprehensive profile data.',
|
||||
props: {
|
||||
profile_name: Property.ShortText({
|
||||
displayName: 'LinkedIn Profile Username',
|
||||
description: "Provide the username from the LinkedIn profile URL (e.g., 'williamhgates').",
|
||||
required: false,
|
||||
}),
|
||||
request_id: Property.ShortText({
|
||||
displayName: 'Request ID (for retries)',
|
||||
description: "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { profile_name, request_id } = context.propsValue;
|
||||
const apiKey = context.auth;
|
||||
const PROFILE_DATA_ENDPOINT = '/profile-data';
|
||||
let requestIdToPoll = request_id;
|
||||
let response;
|
||||
|
||||
if (!requestIdToPoll) {
|
||||
|
||||
if (!profile_name) {
|
||||
throw new Error("To start a new request, you must provide a LinkedIn Profile Username.");
|
||||
}
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, PROFILE_DATA_ENDPOINT, { profile_name });
|
||||
} else {
|
||||
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, PROFILE_DATA_ENDPOINT, { request_id });
|
||||
}
|
||||
|
||||
if (response.data?.profile) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
requestIdToPoll = response.data?.request_id;
|
||||
if (!requestIdToPoll) {
|
||||
throw new Error('Failed to start or retrieve the request. The API did not return a request_id or the final data.');
|
||||
}
|
||||
|
||||
|
||||
const maxAttempts = 20;
|
||||
const pollInterval = 3000;
|
||||
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
||||
await sleep(pollInterval);
|
||||
const pollResponse = await makeRequest(apiKey, HttpMethod.POST, PROFILE_DATA_ENDPOINT, { request_id: requestIdToPoll });
|
||||
|
||||
if (pollResponse.data?.profile) {
|
||||
return pollResponse.data;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('Timeout: The request is still processing. You can try again later with this Request ID: ' + requestIdToPoll);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,70 @@
|
||||
import { createAction, Property } from "@activepieces/pieces-framework";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { magicalApiAuth } from "../common/auth";
|
||||
import { makeRequest } from "../common/client";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const parseResume = createAction({
|
||||
auth: magicalApiAuth,
|
||||
name: 'parse_resume',
|
||||
displayName: 'Parse Resume',
|
||||
description: 'Extract structured data (name, email, experience, skills, etc.) from a resume file.',
|
||||
props: {
|
||||
url: Property.ShortText({
|
||||
displayName: 'Resume URL',
|
||||
description: 'Provide the direct link to a publicly accessible resume file (PDF, DOC, or DOCX)',
|
||||
required: false,
|
||||
}),
|
||||
request_id: Property.ShortText({
|
||||
displayName: 'Request ID (for retries)',
|
||||
description: "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { url, request_id } = context.propsValue;
|
||||
const apiKey = context.auth;
|
||||
const RESUME_PARSER_ENDPOINT = '/resume-parser';
|
||||
let requestIdToPoll = request_id;
|
||||
let response;
|
||||
|
||||
|
||||
if (!requestIdToPoll) {
|
||||
if (!url) {
|
||||
throw new Error("To start a new request, you must provide a Resume URL.");
|
||||
}
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, RESUME_PARSER_ENDPOINT, { url });
|
||||
} else {
|
||||
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, RESUME_PARSER_ENDPOINT, { request_id: requestIdToPoll });
|
||||
}
|
||||
|
||||
|
||||
if (response.data?.basic) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
requestIdToPoll = response.data?.request_id;
|
||||
if (!requestIdToPoll) {
|
||||
throw new Error('Failed to start or retrieve the request. The API did not return a request_id or the final data.');
|
||||
}
|
||||
|
||||
|
||||
const maxAttempts = 20;
|
||||
const pollInterval = 3000;
|
||||
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
||||
await sleep(pollInterval);
|
||||
const pollResponse = await makeRequest(apiKey, HttpMethod.POST, RESUME_PARSER_ENDPOINT, { request_id: requestIdToPoll });
|
||||
|
||||
if (pollResponse.data?.basic) {
|
||||
return pollResponse.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
throw new Error(
|
||||
'Timeout: Resume parsing is taking longer than expected. You can check the status later with this Request ID: ' + requestIdToPoll
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,72 @@
|
||||
import { createAction, Property } from "@activepieces/pieces-framework";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { magicalApiAuth } from "../common/auth";
|
||||
import { makeRequest } from "../common/client";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const reviewResume = createAction({
|
||||
auth: magicalApiAuth,
|
||||
name: 'review_resume',
|
||||
displayName: 'Review Resume',
|
||||
description: 'Analyze parsed resume using predefined criteria.',
|
||||
props: {
|
||||
url: Property.ShortText({
|
||||
displayName: 'Resume URL',
|
||||
description: 'Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).',
|
||||
required: false,
|
||||
}),
|
||||
request_id: Property.ShortText({
|
||||
displayName: 'Request ID (for retries)',
|
||||
description: "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { url, request_id } = context.propsValue;
|
||||
const apiKey = context.auth;
|
||||
const REVIEW_RESUME_ENDPOINT = '/resume-review';
|
||||
let requestIdToPoll = request_id;
|
||||
let response;
|
||||
|
||||
|
||||
if (!requestIdToPoll) {
|
||||
if (!url) {
|
||||
throw new Error("To start a new request, you must provide a Resume URL.");
|
||||
}
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, REVIEW_RESUME_ENDPOINT, { url });
|
||||
} else {
|
||||
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, REVIEW_RESUME_ENDPOINT, { request_id: requestIdToPoll });
|
||||
}
|
||||
|
||||
|
||||
if (response.data?.score !== undefined) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
requestIdToPoll = response.data?.request_id;
|
||||
if (!requestIdToPoll) {
|
||||
throw new Error('Failed to start or retrieve the request. The API did not return a request_id or the final data.');
|
||||
}
|
||||
|
||||
|
||||
const maxAttempts = 20;
|
||||
const pollInterval = 3000;
|
||||
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
||||
await sleep(pollInterval);
|
||||
const pollResponse = await makeRequest(apiKey, HttpMethod.POST, REVIEW_RESUME_ENDPOINT, { request_id: requestIdToPoll });
|
||||
|
||||
|
||||
if (pollResponse.data?.score !== undefined) {
|
||||
|
||||
return pollResponse.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
throw new Error(
|
||||
'Timeout: Resume review is taking longer than expected. You can check the status later with this Request ID: ' + requestIdToPoll
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,76 @@
|
||||
import { createAction, Property } from "@activepieces/pieces-framework";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { magicalApiAuth } from "../common/auth";
|
||||
import { makeRequest } from "../common/client";
|
||||
|
||||
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const scoreResume = createAction({
|
||||
auth: magicalApiAuth,
|
||||
name: 'score_resume',
|
||||
displayName: 'Score Resume',
|
||||
description: 'Scores a resume against a job description and provides a reason.',
|
||||
props: {
|
||||
url: Property.ShortText({
|
||||
displayName: 'Resume URL',
|
||||
description: 'Provide a direct URL to a publicly accessible resume file (PDF, DOC, or DOCX).',
|
||||
required: false,
|
||||
}),
|
||||
job_description: Property.LongText({
|
||||
displayName: 'Job Description',
|
||||
description: 'Provide the job description to score the resume against.',
|
||||
required: false,
|
||||
}),
|
||||
request_id: Property.ShortText({
|
||||
displayName: 'Request ID (for retries)',
|
||||
description: "If a previous run timed out, paste the Request ID here to get the result.",
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { url, job_description, request_id } = context.propsValue;
|
||||
const apiKey = context.auth;
|
||||
const RESUME_SCORE_ENDPOINT = '/resume-score';
|
||||
let requestIdToPoll = request_id;
|
||||
let response;
|
||||
|
||||
|
||||
if (!requestIdToPoll) {
|
||||
if (!url || !job_description) {
|
||||
throw new Error("To start a new request, you must provide both a Resume URL and a Job Description.");
|
||||
}
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, RESUME_SCORE_ENDPOINT, { url, job_description });
|
||||
} else {
|
||||
|
||||
response = await makeRequest(apiKey, HttpMethod.POST, RESUME_SCORE_ENDPOINT, { request_id: requestIdToPoll });
|
||||
}
|
||||
|
||||
|
||||
if (response.data?.score !== undefined) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
requestIdToPoll = response.data?.request_id;
|
||||
if (!requestIdToPoll) {
|
||||
throw new Error('Failed to start or retrieve the request. The API did not return a request_id or the final data.');
|
||||
}
|
||||
|
||||
|
||||
const maxAttempts = 20;
|
||||
const pollInterval = 3000;
|
||||
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
||||
await sleep(pollInterval);
|
||||
const pollResponse = await makeRequest(apiKey, HttpMethod.POST, RESUME_SCORE_ENDPOINT, { request_id: requestIdToPoll });
|
||||
|
||||
if (pollResponse.data?.score !== undefined) {
|
||||
|
||||
return pollResponse.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
throw new Error(
|
||||
'Timeout: Resume scoring is taking longer than expected. You can check the status later with this Request ID: ' + requestIdToPoll
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import { PieceAuth } from "@activepieces/pieces-framework";
|
||||
import { makeRequest } from "./client";
|
||||
import { HttpMethod } from "@activepieces/pieces-common";
|
||||
import { AppConnectionType } from "@activepieces/shared";
|
||||
|
||||
export const magicalApiAuth = PieceAuth.SecretText({
|
||||
displayName: "Magical API Key",
|
||||
description: "Enter your Magical API key from your MagicalAPI dashboard.",
|
||||
required: true,
|
||||
validate: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
valid: false,
|
||||
error: "API Key is required.",
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
const response = await makeRequest(
|
||||
{type: AppConnectionType.SECRET_TEXT, secret_text: auth},
|
||||
HttpMethod.POST,
|
||||
"/profile-data",
|
||||
{ profile_name: "activepieces_validation" }
|
||||
);
|
||||
|
||||
if (response && response.data?.request_id) {
|
||||
return { valid: true };
|
||||
}
|
||||
|
||||
return {
|
||||
valid: false,
|
||||
error: "Invalid API key.",
|
||||
};
|
||||
} catch (e: any) {
|
||||
return {
|
||||
valid: false,
|
||||
error: `Authentication failed: Invalid API key.`,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
import { HttpMethod, httpClient } from "@activepieces/pieces-common";
|
||||
import { AppConnectionValueForAuthProperty } from "@activepieces/pieces-framework";
|
||||
import { magicalApiAuth } from "./auth";
|
||||
|
||||
export const BASE_URL = "https://gw.magicalapi.com";
|
||||
|
||||
export async function makeRequest(
|
||||
apiKey: AppConnectionValueForAuthProperty<typeof magicalApiAuth>,
|
||||
method: HttpMethod,
|
||||
path: string,
|
||||
body?: any
|
||||
): Promise<any> {
|
||||
try {
|
||||
const headers: Record<string, string> = {
|
||||
"api-key": apiKey.secret_text,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method,
|
||||
url: `${BASE_URL}${path}`,
|
||||
headers,
|
||||
body: body,
|
||||
});
|
||||
|
||||
return response.body;
|
||||
} catch (error: any) {
|
||||
throw new Error(
|
||||
`MagicalAPI request failed: ${JSON.stringify(
|
||||
error.response?.body || error.message || error
|
||||
)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"importHelpers": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noPropertyAccessFromIndexSignature": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user