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,33 @@
{
"extends": [
"../../../../.eslintrc.base.json"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {}
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
]
}

View File

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

View File

@@ -0,0 +1,10 @@
{
"name": "@activepieces/piece-vlm-run",
"version": "0.0.2",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@@ -0,0 +1,65 @@
{
"name": "pieces-vlm-run",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/vlm-run/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/vlm-run",
"tsConfig": "packages/pieces/community/vlm-run/tsconfig.lib.json",
"packageJson": "packages/pieces/community/vlm-run/package.json",
"main": "packages/pieces/community/vlm-run/src/index.ts",
"assets": [
"packages/pieces/community/vlm-run/*.md",
{
"input": "packages/pieces/community/vlm-run/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/vlm-run",
"command": "bun install --no-save --silent"
},
"dependsOn": [
"^build"
]
}
}
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run ist eine visuelle KI-Plattform, die Daten aus Bildern, Videos, Audio und Dokumenten extrahiert. Es hilft bei der Automatisierung von Analyseworkflows wie Objekterkennung, Transkription, Bild-/Audio-Analyse und Dokumentenanalyse.",
"Your VLM Run API Key": "Ihr VLM Run API Key",
"Analyze Audio": "Audio analysieren",
"Analyze Image": "Bild analysieren",
"Analyze Document": "Dokument analysieren",
"Analyze Video": "Video analysieren",
"Get File": "Datei abrufen",
"Custom API Call": "Eigener API-Aufruf",
"Process an audio file, extracting features or transcription": "Audiodateien, Extrahieren von Funktionen oder Transkription",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Verarbeiten eines Bildes (Datei oder URL), Entpacken von Beschreibungen, Erkennung von Objekten, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Verarbeiten Sie ein Dokument (PDF, DOCX, etc.), extrahieren Sie strukturierte Daten oder Texte.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analysieren Sie eine Videodatei oder URL, z.B. Extrahieren von Frames, Erkennung von Inhalten, etc.",
"Gets file's metadata by ID.": "Liefert die Metadaten der Datei nach ID.",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"Audio File": "Audiodatei",
"Image File": "Bilddatei",
"Domain": "Domäne",
"Document File": "Dokumentdatei",
"Video File": "Videodatei",
"File": "Datei",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "Die Audiodatei, von der die Transkription abgerufen wird. Nur MP3 wird unterstützt.",
"The image file to be analyzed.": "Die zu analysierende Bilddatei",
"The specific analysis domain for the image.": "Der spezifische Analysebereich für das Bild.",
"The document file to be analyzed.": "Die zu analysierende Dokumentdatei.",
"The specific analysis domain for the document.": "Der spezifische Analysebereich für das Dokument.",
"The video file to be analyzed.": "Die zu analysierende Videodatei.",
"The specific analysis domain for the video.": "Die spezifische Analyse Domäne für das Video.",
"Select a file to retrieve its details.": "Wählen Sie eine Datei aus, um die Details zu erhalten.",
"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..",
"Image Classification": "Bild-Klassifikation",
"Image Caption": "Bildunterschrift",
"Image TV News": "Bilder TV News",
"Image Q and A": "Bild Q und A",
"Bank Statement": "Bankauszug",
"Document Classification": "Dokumentklassifizierung",
"Invoice": "Rechnung",
"Markdown": "Markdown",
"Q and A": "Q und A",
"Receipt": "Beleg",
"Resume": "Fortsetzen",
"US Driver's License": "US-Führerschein",
"Utility Bill": "Utility Rechnung",
"Video Transcription": "Video-Transkription",
"Video Transcription Summary": "Video Transkription Zusammenfassung",
"Video Product Demo Summary": "Video Produkt Demo Zusammenfassung",
"Video Conferencing Summary": "Videokonferenz-Zusammenfassung",
"Video Podcast Summary": "Video-Podcast-Zusammenfassung",
"Video Summary": "Video-Zusammenfassung",
"Video Dashcam Analytics": "Video-Dashcam-Analyse",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run es una plataforma visual de AI que extrae datos de imágenes, vídeos, audio y documentos. Ayuda a automatizar los flujos de trabajo, como detección de objetos, transcripción, análisis de imagen/audio y análisis de documentos.",
"Your VLM Run API Key": "Su clave API VLM Run",
"Analyze Audio": "Analizar audio",
"Analyze Image": "Analizar imagen",
"Analyze Document": "Analizar documento",
"Analyze Video": "Analizar vídeo",
"Get File": "Obtener archivo",
"Custom API Call": "Llamada API personalizada",
"Process an audio file, extracting features or transcription": "Procesar un archivo de audio, extraer características o transcripción",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Procesar una imagen (archivo o URL), extraer descripciones, detectar objetos, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Procesar un documento (PDF, DOCX, etc.), extraer datos estructurados o texto.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analizar un archivo de vídeo o URL, por ejemplo, extraer frames, detectar contenido, etc.",
"Gets file's metadata by ID.": "Obtiene los metadatos del archivo por ID.",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"Audio File": "Archivo de audio",
"Image File": "Archivo de imagen",
"Domain": "Dominio",
"Document File": "Archivo del documento",
"Video File": "Archivo de vídeo",
"File": "Archivo",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "El archivo de audio desde donde obtener la transcripción. Solo se admite MP3.",
"The image file to be analyzed.": "El archivo de imagen a analizar.",
"The specific analysis domain for the image.": "El dominio de análisis específico para la imagen.",
"The document file to be analyzed.": "El archivo de documento a analizar.",
"The specific analysis domain for the document.": "El dominio de análisis específico para el documento.",
"The video file to be analyzed.": "El archivo de vídeo a analizar.",
"The specific analysis domain for the video.": "El dominio de análisis específico para el vídeo.",
"Select a file to retrieve its details.": "Seleccione un archivo para recuperar sus 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.",
"Image Classification": "Clasificación de imagen",
"Image Caption": "Título de la imagen",
"Image TV News": "Noticias de Imagen TV",
"Image Q and A": "Imagen Q y A",
"Bank Statement": "Extracto bancario",
"Document Classification": "Clasificación de documentos",
"Invoice": "Factura",
"Markdown": "Markdown",
"Q and A": "P y A",
"Receipt": "Recibo",
"Resume": "Reanudar",
"US Driver's License": "Licencia de conducir de US",
"Utility Bill": "Factura de utilidad",
"Video Transcription": "Transcripción de vídeo",
"Video Transcription Summary": "Resumen de transcripción de vídeo",
"Video Product Demo Summary": "Resumen de demostración de producto de vídeo",
"Video Conferencing Summary": "Resumen de videoconferencia",
"Video Podcast Summary": "Resumen de Podcast de Video",
"Video Summary": "Resumen de vídeo",
"Video Dashcam Analytics": "Análisis de vídeo de Dashcam",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run est une plate-forme d'IA visuelle qui extrait des données des images, des vidéos, de l'audio et des documents. Il permet d'automatiser les processus d'analyse, tels que la détection d'objets, la transcription, l'analyse image/audio et l'analyse de documents.",
"Your VLM Run API Key": "Votre clé API VLM Run",
"Analyze Audio": "Analyser l'audio",
"Analyze Image": "Analyser l'image",
"Analyze Document": "Analyser le document",
"Analyze Video": "Analyser la vidéo",
"Get File": "Récupérer le fichier",
"Custom API Call": "Appel d'API personnalisé",
"Process an audio file, extracting features or transcription": "Traiter un fichier audio, extraire des fonctionnalités ou transcription",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Traiter une image (fichier ou URL), extraire des descriptions, détecter des objets, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Traiter un document (PDF, DOCX, etc.), extraire des données structurées ou du texte.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analyser un fichier vidéo ou une URL, par exemple extraire des cadres, détecter le contenu, etc.",
"Gets file's metadata by ID.": "Récupère les métadonnées du fichier par ID.",
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
"Audio File": "Fichier audio",
"Image File": "Fichier image",
"Domain": "Domaine",
"Document File": "Fichier de document",
"Video File": "Fichier vidéo",
"File": "Ficher",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "Le fichier audio à partir duquel la transcription est effectuée. Seuls les MP3 sont pris en charge.",
"The image file to be analyzed.": "Le fichier image à analyser.",
"The specific analysis domain for the image.": "Le domaine d'analyse spécifique de l'image.",
"The document file to be analyzed.": "Le fichier de document à analyser.",
"The specific analysis domain for the document.": "Le domaine d'analyse spécifique du document.",
"The video file to be analyzed.": "Le fichier vidéo à analyser.",
"The specific analysis domain for the video.": "Le domaine d'analyse spécifique pour la vidéo.",
"Select a file to retrieve its details.": "Sélectionnez un fichier pour récupérer ses détails.",
"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.",
"Image Classification": "Classification des images",
"Image Caption": "Légende de l'image",
"Image TV News": "Actualités Image TV",
"Image Q and A": "Image Q et A",
"Bank Statement": "Relevé bancaire",
"Document Classification": "Classification des documents",
"Invoice": "Facture",
"Markdown": "Markdown",
"Q and A": "Q et A",
"Receipt": "Reçu",
"Resume": "Reprendre",
"US Driver's License": "Permis de conduire US",
"Utility Bill": "Facture de services publics",
"Video Transcription": "Transcription vidéo",
"Video Transcription Summary": "Résumé de la transcription vidéo",
"Video Product Demo Summary": "Résumé de la démo du produit vidéo",
"Video Conferencing Summary": "Résumé de la vidéoconférence",
"Video Podcast Summary": "Résumé de Podcast vidéo",
"Video Summary": "Résumé de la vidéo",
"Video Dashcam Analytics": "Analyses de Dashcam Vidéo",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLMランは、画像、ビデオ、オーディオ、ドキュメントからデータを抽出する視覚的なAIプラットフォームです。 オブジェクト検出、転写、画像/オーディオ解析、ドキュメント解析などの分析ワークフローの自動化に役立ちます。",
"Your VLM Run API Key": "VLM実行APIキー",
"Analyze Audio": "オーディオを分析する",
"Analyze Image": "画像を分析する",
"Analyze Document": "ドキュメントを分析する",
"Analyze Video": "ビデオを分析する",
"Get File": "ファイルを取得する",
"Custom API Call": "カスタムAPI通話",
"Process an audio file, extracting features or transcription": "オーディオファイルを処理し、機能や転写を抽出します。",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "画像(ファイルまたは URL、説明の抽出、オブジェクトの検出などを処理します。",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "ドキュメント(PDF、DOCXなど)を処理し、構造化されたデータやテキストを抽出します。",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "ビデオファイルや URL を分析します。例えば、フレームの抽出、コンテンツの検出などです。",
"Gets file's metadata by ID.": "IDでファイルのメタデータを取得します。",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"Audio File": "オーディオ ファイル",
"Image File": "画像ファイル",
"Domain": "ドメイン",
"Document File": "ドキュメントファイル",
"Video File": "ビデオファイル",
"File": "ファイル",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"The audio file to get the transcription from. Only MP3 supported.": "転写を取得するオーディオファイル。MP3 のみ対応。",
"The image file to be analyzed.": "解析するイメージ ファイル。",
"The specific analysis domain for the image.": "画像の特定の解析ドメイン。",
"The document file to be analyzed.": "解析されるドキュメントファイル。",
"The specific analysis domain for the document.": "ドキュメントの特定の解析ドメイン。",
"The video file to be analyzed.": "解析するビデオファイル。",
"The specific analysis domain for the video.": "ビデオの特定の分析ドメイン。",
"Select a file to retrieve its details.": "詳細を取得するファイルを選択します。",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"Image Classification": "画像の分類",
"Image Caption": "画像の図表番号",
"Image TV News": "Image TV News",
"Image Q and A": "画像 Q と A",
"Bank Statement": "銀行の声明",
"Document Classification": "ドキュメントの分類",
"Invoice": "請求書",
"Markdown": "Markdown",
"Q and A": "Q と A",
"Receipt": "領収書(受領)",
"Resume": "再開",
"US Driver's License": "米国のドライバーライセンス",
"Utility Bill": "公共料金請求",
"Video Transcription": "ビデオテープ起こし",
"Video Transcription Summary": "ビデオ表記の概要",
"Video Product Demo Summary": "動画製品デモ概要",
"Video Conferencing Summary": "ビデオ会議の概要",
"Video Podcast Summary": "ビデオのポッドキャストの概要",
"Video Summary": "動画の概要",
"Video Dashcam Analytics": "ビデオダッシュカム分析",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run is een visueel AI platform dat gegevens haalt uit afbeeldingen, video's, audio en documenten. Het helpt analyseworkflows te automatiseren, zoals object-detectie, transcriptie, image/audio-analyse en documentatie.",
"Your VLM Run API Key": "Uw VLM Run API-sleutel",
"Analyze Audio": "Audio analyseren",
"Analyze Image": "Afbeelding analyseren",
"Analyze Document": "Document analyseren",
"Analyze Video": "Video analyseren",
"Get File": "Bestand ophalen",
"Custom API Call": "Custom API Call",
"Process an audio file, extracting features or transcription": "Verwerk een audiobestand, uitpakken van functies of transcriptie",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Verwerk een afbeelding (bestand of URL), beschrijvingen, detecteren van objecten, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Verwerk een document (PDF, DOCX, enz.), het extraheren van gestructureerde gegevens of tekst.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analyseer een video bestand of URL, bijv. extract frames, detecteer inhoud, etc.",
"Gets file's metadata by ID.": "Haalt de metadata van het bestand op met ID.",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"Audio File": "Audio bestand",
"Image File": "Afbeelding bestand",
"Domain": "Domein",
"Document File": "Document bestand",
"Video File": "Video bestand",
"File": "Bestand",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "Het audio-bestand waar je de transcriptie van ophaalt. Alleen MP3 ondersteund.",
"The image file to be analyzed.": "Het te analyseren afbeeldingsbestand",
"The specific analysis domain for the image.": "Het specifieke analysedomein voor de afbeelding.",
"The document file to be analyzed.": "Het te analyseren documentbestand",
"The specific analysis domain for the document.": "Het specifieke analysedomein voor het document.",
"The video file to be analyzed.": "Het videobestand dat moet worden geanalyseerd.",
"The specific analysis domain for the video.": "Het specifieke analysedomein voor de video.",
"Select a file to retrieve its details.": "Selecteer een bestand om de details op te halen.",
"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..",
"Image Classification": "Classificatie afbeelding",
"Image Caption": "Afbeelding bijschrift",
"Image TV News": "Afbeelding TV nieuws",
"Image Q and A": "Afbeelding Q en A",
"Bank Statement": "Bank verklaring",
"Document Classification": "Document classificatie",
"Invoice": "Factuur",
"Markdown": "Markdown",
"Q and A": "Q en A",
"Receipt": "Bon",
"Resume": "Hervatten",
"US Driver's License": "Amerikaanse Rijbewijs",
"Utility Bill": "Hulpverlenende rekening",
"Video Transcription": "Video transcriptie",
"Video Transcription Summary": "Samenvatting video transcriptie",
"Video Product Demo Summary": "Video Product Demo Samenvatting",
"Video Conferencing Summary": "Samenvatting van videoconferenties",
"Video Podcast Summary": "Video Podcast Samenvatting",
"Video Summary": "Video samenvatting",
"Video Dashcam Analytics": "Video Dashcam Analyses",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run é uma plataforma visual de AI que extrai dados de imagens, vídeos, áudio e documentos. Isso ajuda a automatizar fluxos de trabalho de análise, como detecção de objeto, transcrição, análise de imagem/áudio e análise de documentos.",
"Your VLM Run API Key": "Sua chave de API VLM Run",
"Analyze Audio": "Analisar Áudio",
"Analyze Image": "Analisar imagem",
"Analyze Document": "Analisar documento",
"Analyze Video": "Analisar Vídeo",
"Get File": "Obter arquivo",
"Custom API Call": "Chamada de API personalizada",
"Process an audio file, extracting features or transcription": "Processar um arquivo de áudio, extraindo recursos ou transcrição",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Processar uma imagem (arquivo ou URL), extrair descrições, detectando objetos, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Processar um documento (PDF, DOCX, etc.), extraindo dados estruturados ou texto.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analisar um arquivo de vídeo ou URL, por exemplo, extrair quadros, detectar conteúdo, etc.",
"Gets file's metadata by ID.": "Obtém metadados do arquivo por ID.",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"Audio File": "Arquivo de Áudio",
"Image File": "Arquivo de imagem",
"Domain": "Domínio",
"Document File": "Arquivo de documento",
"Video File": "Arquivo de vídeo",
"File": "Arquivo",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "O arquivo de áudio para obter a transcrição. Somente MP3 suportado.",
"The image file to be analyzed.": "O arquivo de imagem a ser analisado.",
"The specific analysis domain for the image.": "O domínio específico da análise para a imagem.",
"The document file to be analyzed.": "O arquivo de documento a ser analisado.",
"The specific analysis domain for the document.": "O domínio específico da análise para o documento.",
"The video file to be analyzed.": "O arquivo de vídeo a ser analisado.",
"The specific analysis domain for the video.": "O domínio específico de análise para o vídeo.",
"Select a file to retrieve its details.": "Selecione um arquivo para recuperar os seus 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..",
"Image Classification": "Classificação de imagem",
"Image Caption": "Legenda da imagem",
"Image TV News": "Imagens de TV",
"Image Q and A": "Imagem Q e A",
"Bank Statement": "Extrato bancário",
"Document Classification": "Classificação do documento",
"Invoice": "Fatura",
"Markdown": "Markdown",
"Q and A": "Q e A",
"Receipt": "Recibo",
"Resume": "Retomar",
"US Driver's License": "Carteira de Motorista dos EUA",
"Utility Bill": "Conta de Utilidade",
"Video Transcription": "Transcrição de vídeo",
"Video Transcription Summary": "Resumo da Transcrição de Vídeo",
"Video Product Demo Summary": "Vídeo Demonstração de Produto",
"Video Conferencing Summary": "Resumo da videoconferência",
"Video Podcast Summary": "Resumo do Video Podcast",
"Video Summary": "Resumo do vídeo",
"Video Dashcam Analytics": "Video Dashcam Analytics",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.",
"Your VLM Run API Key": "Your VLM Run API Key",
"Analyze Audio": "Analyze Audio",
"Analyze Image": "Analyze Image",
"Analyze Document": "Analyze Document",
"Analyze Video": "Analyze Video",
"Get File": "Get File",
"Custom API Call": "Custom API Call",
"Process an audio file, extracting features or transcription": "Process an audio file, extracting features or transcription",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Process an image (file or URL), extracting descriptions, detecting objects, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Process a document (PDF, DOCX, etc.), extracting structured data or text.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analyze a video file or URL, e.g. extract frames, detect content, etc.",
"Gets file's metadata by ID.": "Gets file's metadata by ID.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Audio File": "Audio File",
"Image File": "Image File",
"Domain": "Domain",
"Document File": "Document File",
"Video File": "Video File",
"File": "File",
"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)",
"The audio file to get the transcription from. Only MP3 supported.": "The audio file to get the transcription from. Only MP3 supported.",
"The image file to be analyzed.": "The image file to be analyzed.",
"The specific analysis domain for the image.": "The specific analysis domain for the image.",
"The document file to be analyzed.": "The document file to be analyzed.",
"The specific analysis domain for the document.": "The specific analysis domain for the document.",
"The video file to be analyzed.": "The video file to be analyzed.",
"The specific analysis domain for the video.": "The specific analysis domain for the video.",
"Select a file to retrieve its details.": "Select a file to retrieve its 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..",
"Image Classification": "Image Classification",
"Image Caption": "Image Caption",
"Image TV News": "Image TV News",
"Image Q and A": "Image Q and A",
"Bank Statement": "Bank Statement",
"Document Classification": "Document Classification",
"Invoice": "Invoice",
"Markdown": "Markdown",
"Q and A": "Q and A",
"Receipt": "Receipt",
"Resume": "Resume",
"US Driver's License": "US Driver's License",
"Utility Bill": "Utility Bill",
"Video Transcription": "Video Transcription",
"Video Transcription Summary": "Video Transcription Summary",
"Video Product Demo Summary": "Video Product Demo Summary",
"Video Conferencing Summary": "Video Conferencing Summary",
"Video Podcast Summary": "Video Podcast Summary",
"Video Summary": "Video Summary",
"Video Dashcam Analytics": "Video Dashcam Analytics",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,65 @@
{
"VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.": "VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.",
"Your VLM Run API Key": "Your VLM Run API Key",
"Analyze Audio": "Analyze Audio",
"Analyze Image": "Analyze Image",
"Analyze Document": "Analyze Document",
"Analyze Video": "Analyze Video",
"Get File": "Get File",
"Custom API Call": "自定义 API 呼叫",
"Process an audio file, extracting features or transcription": "Process an audio file, extracting features or transcription",
"Process an image (file or URL), extracting descriptions, detecting objects, etc.": "Process an image (file or URL), extracting descriptions, detecting objects, etc.",
"Process a document (PDF, DOCX, etc.), extracting structured data or text.": "Process a document (PDF, DOCX, etc.), extracting structured data or text.",
"Analyze a video file or URL, e.g. extract frames, detect content, etc.": "Analyze a video file or URL, e.g. extract frames, detect content, etc.",
"Gets file's metadata by ID.": "Gets file's metadata by ID.",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"Audio File": "Audio File",
"Image File": "Image File",
"Domain": "Domain",
"Document File": "Document File",
"Video File": "Video File",
"File": "文件",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"The audio file to get the transcription from. Only MP3 supported.": "The audio file to get the transcription from. Only MP3 supported.",
"The image file to be analyzed.": "The image file to be analyzed.",
"The specific analysis domain for the image.": "The specific analysis domain for the image.",
"The document file to be analyzed.": "The document file to be analyzed.",
"The specific analysis domain for the document.": "The specific analysis domain for the document.",
"The video file to be analyzed.": "The video file to be analyzed.",
"The specific analysis domain for the video.": "The specific analysis domain for the video.",
"Select a file to retrieve its details.": "Select a file to retrieve its details.",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"Image Classification": "Image Classification",
"Image Caption": "Image Caption",
"Image TV News": "Image TV News",
"Image Q and A": "Image Q and A",
"Bank Statement": "Bank Statement",
"Document Classification": "Document Classification",
"Invoice": "Invoice",
"Markdown": "Markdown",
"Q and A": "Q and A",
"Receipt": "Receipt",
"Resume": "Resume",
"US Driver's License": "US Driver's License",
"Utility Bill": "Utility Bill",
"Video Transcription": "Video Transcription",
"Video Transcription Summary": "Video Transcription Summary",
"Video Product Demo Summary": "Video Product Demo Summary",
"Video Conferencing Summary": "Video Conferencing Summary",
"Video Podcast Summary": "Video Podcast Summary",
"Video Summary": "Video Summary",
"Video Dashcam Analytics": "Video Dashcam Analytics",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色"
}

View File

@@ -0,0 +1,37 @@
import { createPiece } from '@activepieces/pieces-framework';
import { analyzeAudio } from './lib/actions/analyze-audio';
import { analyzeDocument } from './lib/actions/analyze-document';
import { analyzeImage } from './lib/actions/analyze-image';
import { analyzeVideo } from './lib/actions/analyze-video';
import { getFile } from './lib/actions/get-file';
import { vlmRunAuth } from './lib/common';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { PieceCategory } from '@activepieces/shared';
export const vlmRun = createPiece({
displayName: 'VLM Run',
description:
'VLM Run is a visual AI platform that extracts data from images, videos, audio, and documents. It helps automate analysis workflows, such as object detection, transcription, image/audio analysis, and document parsing.',
auth: vlmRunAuth,
minimumSupportedRelease: '0.36.1',
categories: [PieceCategory.BUSINESS_INTELLIGENCE, PieceCategory.CONTENT_AND_FILES],
logoUrl: 'https://cdn.activepieces.com/pieces/vlm-run.png',
authors: ['LuizDMM', 'sanket-a11y'],
actions: [
analyzeAudio,
analyzeImage,
analyzeDocument,
analyzeVideo,
getFile,
createCustomApiCallAction({
auth: vlmRunAuth,
baseUrl: () => 'https://api.vlm.run/v1',
authMapping: async (auth) => {
return {
Authorization: `Bearer ${auth.secret_text}`,
};
},
}),
],
triggers: [],
});

View File

@@ -0,0 +1,29 @@
import { propsValidation } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '../common';
import { analyzeAudioProperties } from '../common/properties';
import { analyzeAudioSchema } from '../common/schemas';
export const analyzeAudio = createAction({
auth: vlmRunAuth,
name: 'analyzeAudio',
displayName: 'Analyze Audio',
description: 'Process an audio file, extracting features or transcription',
props: analyzeAudioProperties,
async run({ auth: apiKey, propsValue }) {
await propsValidation.validateZod(propsValue, analyzeAudioSchema);
const uploadResponse = await vlmRunCommon.uploadFile({
apiKey:apiKey.secret_text,
file: propsValue.audio,
});
const response = await vlmRunCommon.analyzeAudio({
apiKey:apiKey.secret_text,
file_id: uploadResponse.id,
});
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
},
});

View File

@@ -0,0 +1,32 @@
import { propsValidation } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '../common';
import { analyzeDocumentProperties } from '../common/properties';
import { analyzeDocumentSchema } from '../common/schemas';
export const analyzeDocument = createAction({
auth: vlmRunAuth,
name: 'analyzeDocument',
displayName: 'Analyze Document',
description:
'Process a document (PDF, DOCX, etc.), extracting structured data or text.',
props: analyzeDocumentProperties,
async run({ auth: apiKey, propsValue }) {
await propsValidation.validateZod(propsValue, analyzeDocumentSchema);
const { document, domain } = propsValue;
const uploadResponse = await vlmRunCommon.uploadFile({
apiKey:apiKey.secret_text,
file: document,
});
const response = await vlmRunCommon.analyzeDocument({
apiKey:apiKey.secret_text,
file_id: uploadResponse.id,
domain,
});
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
},
});

View File

@@ -0,0 +1,28 @@
import { propsValidation } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '../common';
import { analyzeImageProperties } from '../common/properties';
import { analyzeImageSchema } from '../common/schemas';
export const analyzeImage = createAction({
auth: vlmRunAuth,
name: 'analyzeImage',
displayName: 'Analyze Image',
description:
'Process an image (file or URL), extracting descriptions, detecting objects, etc.',
props: analyzeImageProperties,
async run({ auth: apiKey, propsValue }) {
await propsValidation.validateZod(propsValue, analyzeImageSchema);
const { image, domain } = propsValue;
const response = await vlmRunCommon.analyzeImage({
apiKey:apiKey.secret_text,
images: [image],
domain,
});
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
},
});

View File

@@ -0,0 +1,32 @@
import { propsValidation } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '../common';
import { analyzeVideoProperties } from '../common/properties';
import { analyzeVideoSchema } from '../common/schemas';
export const analyzeVideo = createAction({
auth: vlmRunAuth,
name: 'analyzeVideo',
displayName: 'Analyze Video',
description:
'Analyze a video file or URL, e.g. extract frames, detect content, etc.',
props: analyzeVideoProperties,
async run({ auth: apiKey, propsValue }) {
await propsValidation.validateZod(propsValue, analyzeVideoSchema);
const { video, domain } = propsValue;
const uploadResponse = await vlmRunCommon.uploadFile({
apiKey:apiKey.secret_text,
file: video,
});
const response = await vlmRunCommon.analyzeVideo({
apiKey:apiKey.secret_text,
file_id: uploadResponse.id,
domain,
});
return await vlmRunCommon.getresponse(apiKey.secret_text, response.id, response.status);
},
});

View File

@@ -0,0 +1,17 @@
import { propsValidation } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '../common';
import { getFileProperties } from '../common/properties';
import { getFileSchema } from '../common/schemas';
export const getFile = createAction({
auth: vlmRunAuth,
name: 'getFile',
displayName: 'Get File',
description: "Gets file's metadata by ID.",
props: getFileProperties,
async run({ auth: apiKey, propsValue }) {
await propsValidation.validateZod(propsValue, getFileSchema);
return await vlmRunCommon.getFile({ apiKey: apiKey.secret_text, file_id: propsValue.fileId });
},
});

View File

@@ -0,0 +1,132 @@
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { PieceAuth } from '@activepieces/pieces-framework';
import FormData from 'form-data';
import {
AnalyzeAudioParams,
AnalyzeDocumentParams,
AnalyzeImageParams,
AnalyzeVideoParams,
FileResponse,
GetFileParams,
PredictionResponse,
UploadFileParams,
} from './types';
export const vlmRunAuth = PieceAuth.SecretText({
displayName: 'API Key',
description: 'Your VLM Run API Key',
required: true,
});
export const vlmRunCommon = {
baseUrl: 'https://api.vlm.run/v1',
baseHeaders: (apiKey: string) => ({
'Content-Type': 'application/json',
Authorization: `Bearer ${apiKey}`,
}),
endpoints: {
uploadFile: '/files',
listFiles: '/files',
analyzeAudio: '/audio/generate',
analyzeImage: '/image/generate',
analyzeDocument: '/document/generate',
analyzeVideo: '/video/generate',
getresponse: '/predictions',
getFile: (fileId: string) => `/files/${fileId}`,
},
// Methods
getresponse: async (apiKey: string, requestId: string, status: string) => {
let statusnow = status;
const timeoutAt = Date.now() + 5 * 60 * 1000;
while (statusnow !== 'completed' && Date.now() < timeoutAt) {
await new Promise((resolve) => setTimeout(resolve, 5000));
const pollRes = await httpClient.sendRequest<any>({
method: HttpMethod.GET,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.getresponse}/${requestId}`,
headers: vlmRunCommon.baseHeaders(apiKey),
});
statusnow = pollRes.body?.status;
console.log('first', statusnow);
if (statusnow === 'completed') {
return pollRes.body.response;
}
}
throw new Error('generation timed out or failed.');
},
uploadFile: async ({ apiKey, file }: UploadFileParams) => {
const formData = new FormData();
formData.append('file', file.data, { filename: file.filename });
const response = await httpClient.sendRequest<FileResponse>({
method: HttpMethod.POST,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.uploadFile}`,
headers: {
...vlmRunCommon.baseHeaders(apiKey),
'Content-Type': 'multipart/form-data',
},
body: formData,
});
return response.body;
},
listFiles: async (apiKey: string) => {
const response = await httpClient.sendRequest<FileResponse[]>({
method: HttpMethod.GET,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.listFiles}`,
headers: vlmRunCommon.baseHeaders(apiKey),
});
return response.body;
},
analyzeAudio: async ({ apiKey, ...params }: AnalyzeAudioParams) => {
const response = await httpClient.sendRequest<PredictionResponse>({
method: HttpMethod.POST,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.analyzeAudio}`,
headers: vlmRunCommon.baseHeaders(apiKey),
body: {
domain: 'audio.transcription',
...params,
},
});
return response.body;
},
analyzeImage: async ({ apiKey, ...params }: AnalyzeImageParams) => {
const response = await httpClient.sendRequest<PredictionResponse>({
method: HttpMethod.POST,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.analyzeImage}`,
headers: vlmRunCommon.baseHeaders(apiKey),
body: params,
});
return response.body;
},
analyzeDocument: async ({ apiKey, ...params }: AnalyzeDocumentParams) => {
const response = await httpClient.sendRequest<PredictionResponse>({
method: HttpMethod.POST,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.analyzeDocument}`,
headers: vlmRunCommon.baseHeaders(apiKey),
body: params,
});
return response.body;
},
analyzeVideo: async ({ apiKey, ...params }: AnalyzeVideoParams) => {
const response = await httpClient.sendRequest<PredictionResponse>({
method: HttpMethod.POST,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.analyzeVideo}`,
headers: vlmRunCommon.baseHeaders(apiKey),
body: params,
});
return response.body;
},
getFile: async ({ apiKey, file_id }: GetFileParams) => {
const response = await httpClient.sendRequest<FileResponse>({
method: HttpMethod.GET,
url: `${vlmRunCommon.baseUrl}${vlmRunCommon.endpoints.getFile(file_id)}`,
headers: vlmRunCommon.baseHeaders(apiKey),
});
return response.body;
},
};

View File

@@ -0,0 +1,118 @@
import { Property } from '@activepieces/pieces-framework';
import { vlmRunAuth, vlmRunCommon } from '.';
// Action Properties
export const analyzeAudioProperties = {
audio: Property.File({
displayName: 'Audio File',
description: 'The audio file to get the transcription from. Only MP3 supported.',
required: true,
}),
};
export const analyzeImageProperties = {
image: Property.ShortText({
displayName: 'Image File',
description: 'The image file to be analyzed.',
required: true,
}),
domain: Property.StaticDropdown({
displayName: 'Domain',
description: 'The specific analysis domain for the image.',
required: true,
options: {
options: [
{ label: 'Image Classification', value: 'image.classification' },
{ label: 'Image Caption', value: 'image.caption' },
{ label: 'Image TV News', value: 'image.tv-news' },
{ label: 'Image Q and A', value: 'image.q-and-a' },
],
},
}),
};
export const analyzeDocumentProperties = {
document: Property.File({
displayName: 'Document File',
description: 'The document file to be analyzed.',
required: true,
}),
domain: Property.StaticDropdown({
displayName: 'Domain',
description: 'The specific analysis domain for the document.',
required: true,
options: {
options: [
{ label: 'Bank Statement', value: 'document.bank-statement' },
{ label: 'Document Classification', value: 'document.classification' },
{ label: 'Invoice', value: 'document.invoice' },
{ label: 'Markdown', value: 'document.markdown' },
{ label: 'Q and A', value: 'document.q-and-a' },
{ label: 'Receipt', value: 'document.receipt' },
{ label: 'Resume', value: 'document.resume' },
{ label: "US Driver's License", value: 'document.us-drivers-license' },
{ label: 'Utility Bill', value: 'document.utility-bill' },
],
},
}),
};
export const analyzeVideoProperties = {
video: Property.File({
displayName: 'Video File',
description: 'The video file to be analyzed.',
required: true,
}),
domain: Property.StaticDropdown({
displayName: 'Domain',
description: 'The specific analysis domain for the video.',
required: true,
options: {
options: [
{ label: 'Video Transcription', value: 'video.transcription' },
{
label: 'Video Transcription Summary',
value: 'video.transcription-summary',
},
{
label: 'Video Product Demo Summary',
value: 'video.product-demo-summary',
},
{
label: 'Video Conferencing Summary',
value: 'video.conferencing-summary',
},
{ label: 'Video Podcast Summary', value: 'video.podcast-summary' },
{ label: 'Video Summary', value: 'video.summary' },
{ label: 'Video Dashcam Analytics', value: 'video.dashcam-analytics' },
],
},
}),
};
export const getFileProperties = {
fileId: Property.Dropdown({
auth: vlmRunAuth,
displayName: 'File',
description: 'Select a file to retrieve its details.',
required: true,
refreshers: ['auth'],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Connect your VLM Run account to see files',
options: [],
};
}
const files = await vlmRunCommon.listFiles(auth.secret_text);
return {
disabled: false,
options: files.map((file) => ({
label: file.filename,
value: file.id,
})),
};
},
}),
};

View File

@@ -0,0 +1,59 @@
import z from 'zod';
const imageDomains = [
'image.classification',
'image.caption',
'image.tv-news',
'image.q-and-a',
] as const;
const documentDomains = [
'document.bank-statement',
'document.classification',
'document.invoice',
'document.markdown',
'document.q-and-a',
'document.receipt',
'document.resume',
'document.us-drivers-license',
'document.utility-bill',
] as const;
const videoDomains = [
'video.transcription',
'video.transcription-summary',
'video.product-demo-summary',
'video.conferencing-summary',
'video.podcast-summary',
'video.summary',
'video.dashcam-analytics'
] as const;
const apFileSchema = z.object({
filename: z.string(),
data: z.instanceof(Buffer),
extension: z.string()
});
// Schemas
export const analyzeAudioSchema = {
audio: apFileSchema,
};
export const analyzeImageSchema = {
image: z.string().url(),
domain: z.enum(imageDomains)
};
export const analyzeDocumentSchema = {
document: apFileSchema,
domain: z.enum(documentDomains)
};
export const analyzeVideoSchema = {
video: apFileSchema,
domain: z.enum(videoDomains)
};
export const getFileSchema = {
fileId: z.string()
};

View File

@@ -0,0 +1,59 @@
import { ApFile } from "@activepieces/pieces-framework";
export interface AuthenticationParams {
apiKey: string;
}
// Request types
export interface UploadFileParams extends AuthenticationParams {
file: ApFile;
}
export interface AnalyzeAudioParams extends AuthenticationParams {
file_id: string;
}
export interface AnalyzeImageParams extends AuthenticationParams {
images: string[];
domain: string;
}
export interface AnalyzeDocumentParams extends AuthenticationParams {
file_id: string;
domain: string;
}
export interface AnalyzeVideoParams extends AuthenticationParams {
file_id: string;
domain: string;
}
export interface GetFileParams extends AuthenticationParams {
file_id: string;
}
// Response types
export interface FileResponse {
id: string;
filename: string;
bytes: number;
purpose: string;
created_at: string;
object: 'file';
}
type JobStatus = string;
interface CreditUsage {
elements_processed?: number;
element_type?: 'image' | 'page' | 'video' | 'audio';
credits_used?: number;
}
export interface PredictionResponse {
id: string;
created_at: string;
completed_at?: string;
response?: any;
status: JobStatus;
message?: string;
usage?: CreditUsage;
}

View File

@@ -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"
}
]
}

View File

@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"]
}