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-jogg-ai
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-jogg-ai` to build the library.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@activepieces/piece-jogg-ai",
|
||||
"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-jogg-ai",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/jogg-ai/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/jogg-ai",
|
||||
"tsConfig": "packages/pieces/community/jogg-ai/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/jogg-ai/package.json",
|
||||
"main": "packages/pieces/community/jogg-ai/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/jogg-ai/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/jogg-ai/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/jogg-ai",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "AI-basierte Content-Erstellungs-Plattform für Avatar-Fotos, Videos und Produktinhalte mit fortschrittlicher AI-Technologie.",
|
||||
"Your Jogg AI API Key": "Ihr Jogg KI API-Schlüssel",
|
||||
"Create AI Avatar Photo": "AI-Avatar-Foto erstellen",
|
||||
"Create Avatar Video": "Avatar-Video erstellen",
|
||||
"Create Product from URL": "Produkt von URL erstellen",
|
||||
"Create Product from Product Info": "Produkt aus Produktinfo erstellen",
|
||||
"Update Product Info": "Produktinfo aktualisieren",
|
||||
"Get Generated Video": "Video generieren",
|
||||
"Upload Media": "Medien hochladen",
|
||||
"Create Video from Template": "Video aus Vorlage erstellen",
|
||||
"Creates an AI avatar photo using JoggAI API": "Erstellt ein AI-Avatar-Foto mit der JoggAI-API",
|
||||
"Creates an avatar video using JoggAI API": "Erstellt ein Avatar-Video mit der JoggAI-API",
|
||||
"Creates a product by crawling product information from a URL": "Erzeugt ein Produkt durch Crawling von Produktinformationen von einer URL",
|
||||
"Creates a product from product information": "Erzeugt ein Produkt aus Produktinformationen",
|
||||
"Updates existing product information using product ID": "Aktualisiere vorhandene Produktinformationen mithilfe der Produkt-ID",
|
||||
"Get information about a specific generated video project using its ID": "Informationen über ein bestimmtes generiertes Videoprojekt mit seiner ID erhalten",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Generieren Sie eine signierte URL für das Hochladen von Dateien. Verwenden Sie die zurückgegebene sign_url, um Ihre Datei mit einer PUT-Anfrage hochzuladen.",
|
||||
"Creates a new video from templates": "Erstellt ein neues Video von Vorlagen",
|
||||
"Age": "Alter",
|
||||
"Appearance": "Erscheinungsbild",
|
||||
"Aspect Ratio": "Seitenverhältnis",
|
||||
"Avatar Style": "Avatar-Stil",
|
||||
"Background": "Hintergrund",
|
||||
"Ethnicity": "Ethnisch",
|
||||
"Gender": "Geschlecht",
|
||||
"Image URL": "Bild-URL",
|
||||
"Model": "Modell",
|
||||
"Screen Style": "Bildschirmstil",
|
||||
"Avatar": "Avatar",
|
||||
"Avatar Type": "Avatar-Typ",
|
||||
"Voice": "Stimme",
|
||||
"Script": "Skript",
|
||||
"Audio URL": "Audio-URL",
|
||||
"Caption": "Überschrift",
|
||||
"Video Name": "Videoname",
|
||||
"Product URL": "Produkt-URL",
|
||||
"Product Name": "Produktname",
|
||||
"Product Description": "Produktbeschreibung",
|
||||
"Target Audience": "Zielgruppe",
|
||||
"Media": "Medien",
|
||||
"Product ID": "Produkt-ID",
|
||||
"Project ID": "Projekt-ID",
|
||||
"Filename": "Dateiname",
|
||||
"Template Type": "Vorlagentyp",
|
||||
"Template": "Vorlage",
|
||||
"Language": "Sprache",
|
||||
"Variables": "Variablen",
|
||||
"Voice ID": "Sprach-ID",
|
||||
"Enable Captions": "Bildunterschriften aktivieren",
|
||||
"Music ID": "Musik-ID",
|
||||
"The age group for the avatar": "Die Altersgruppe für den Avatar",
|
||||
"Description of the appearance": "Beschreibung des Erscheinens",
|
||||
"Photo aspect ratio": "Bildseitenverhältnis",
|
||||
"Style of the avatar": "Stil des Avatar",
|
||||
"Description of the background": "Beschreibung des Hintergrunds",
|
||||
"The ethnicity for the avatar": "Die Ethnizität für den Avatar",
|
||||
"The gender for the avatar": "Das Geschlecht für den Avatar",
|
||||
"URL of an existing image to use as reference": "URL eines vorhandenen Bildes als Referenz verwenden",
|
||||
"The AI model to use": "Das zu verwendende KI-Modell",
|
||||
"Background style": "Hintergrundstil",
|
||||
"Select an avatar to use": "Wähle einen zu verwendenden Avatar",
|
||||
"Source type of the avatar": "Quelltyp des Avatars",
|
||||
"Select a voice to use": "Wählen Sie eine Stimme",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Skriptinhalt für das Sprechen des Avatars. Muss entweder Skript oder audio_url bereitstellen",
|
||||
"URL for audio. Must provide either script or audio_url": "URL für Audio. Muss entweder Skript oder audio_url bereitstellen",
|
||||
"Aspect ratio of the output video": "Seitenverhältnis des Ausgabevideo",
|
||||
"Enable subtitles": "Untertitel aktivieren",
|
||||
"Name of the generated video": "Name des generierten Videos",
|
||||
"URL of the product to crawl and extract information from": "URL des Produkts, um Informationen zu crawlen und zu extrahieren",
|
||||
"URL of the product to crawl for information": "URL des zu crawlenden Produkts für Informationen",
|
||||
"Name of the product": "Name des Produkts",
|
||||
"Product introduction and selling points": "Produkteinführung und Verkaufspunkte",
|
||||
"Target audience for the product": "Zielpublikum für das Produkt",
|
||||
"Media resources for the product": "Medienressourcen für das Produkt",
|
||||
"Product ID obtained from product creation": "Produkt-ID von der Produkterstellung erhalten",
|
||||
"Updated product name": "Aktualisierte Produktname",
|
||||
"Updated product description": "Produktbeschreibung aktualisiert",
|
||||
"Updated target audience for the product": "Zielgruppe für das Produkt aktualisiert",
|
||||
"Updated media resources for the product (replaces existing media)": "Aktualisierte Medienressourcen für das Produkt (ersetzt vorhandene Medien)",
|
||||
"The ID of the project to retrieve information for": "Die ID des Projekts, für das Informationen abgerufen werden sollen",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Name der Datei, die mit der Endung hochgeladen werden soll (z.B. \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Vorlagenquellentyp",
|
||||
"Select a template to use": "Wählen Sie eine Vorlage",
|
||||
"Language for text-to-speech conversion": "Sprache für Sprachkonvertierung",
|
||||
"Variables to replace in the template": "Variablen die in der Vorlage ersetzt werden sollen",
|
||||
"Voice ID for text-to-speech (optional)": "Sprach-ID für Sprachausgabe (optional)",
|
||||
"Whether to enable captions": "Ob Bildunterschriften aktiviert werden sollen",
|
||||
"Background music ID (optional)": "Hintergrundmusik ID (optional)",
|
||||
"Name of the generated video (optional)": "Name des generierten Videos (optional)",
|
||||
"Teenager": "Teenager",
|
||||
"Young adult": "Junge Erwachsene",
|
||||
"Adult": "Erwachsene",
|
||||
"Elderly": "Ältere",
|
||||
"Portrait [9:16]": "Hochformat [9:16]",
|
||||
"Landscape [16:9]": "Querformat [16:9]",
|
||||
"Professional": "Profi",
|
||||
"Social": "Soziale",
|
||||
"European": "Europäisch",
|
||||
"African": "Afrikanisch",
|
||||
"South Asian": "Südasien",
|
||||
"East Asian": "Ostasiatisch",
|
||||
"Middle Eastern": "Naher Osten",
|
||||
"South American": "Südamerika",
|
||||
"North American": "Nordamerikanisch",
|
||||
"Female": "Weiblich",
|
||||
"Male": "Mann",
|
||||
"Classic": "Klassisch",
|
||||
"Modern": "Modern",
|
||||
"With background": "Mit Hintergrund",
|
||||
"Green screen": "Grüner Bildschirm",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "Jogg-Avatar",
|
||||
"Your avatar": "Dein Avatar",
|
||||
"9:16 (Portrait)": "9:16 (Hochformat)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Quare)",
|
||||
"Common (Template Library)": "Häufig (Vorlagen-Bibliothek)",
|
||||
"User (My Templates)": "Benutzer (Meine Vorlagen)",
|
||||
"Public avatars": "Öffentliche Avatare",
|
||||
"Custom avatars": "Eigene Avatare",
|
||||
"Video Generated Successfully": "Video erfolgreich erstellt",
|
||||
"Video Generation Failed": "Video-Erzeugung fehlgeschlagen",
|
||||
"Fires when a video is generated successfully": "Feuert ab, wenn ein Video erfolgreich erstellt wurde",
|
||||
"Fires when video generation fails": "Feuer, wenn die Videogenerierung fehlschlägt"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "Plataforma de creación de contenido impulsada por AIs para generar fotos de avatar, vídeos y contenido de productos usando tecnología de IA avanzada.",
|
||||
"Your Jogg AI API Key": "Tu Clave API de Jogg AI",
|
||||
"Create AI Avatar Photo": "Crear foto de Avatar IA",
|
||||
"Create Avatar Video": "Crear video Avatar",
|
||||
"Create Product from URL": "Crear producto desde URL",
|
||||
"Create Product from Product Info": "Crear producto a partir de información del producto",
|
||||
"Update Product Info": "Actualizar información del producto",
|
||||
"Get Generated Video": "Generar vídeo",
|
||||
"Upload Media": "Cargar medios",
|
||||
"Create Video from Template": "Crear vídeo desde plantilla",
|
||||
"Creates an AI avatar photo using JoggAI API": "Crea una foto de avatar de IA usando la API de JoggAI",
|
||||
"Creates an avatar video using JoggAI API": "Crea un video de avatar usando la API de JoggAI",
|
||||
"Creates a product by crawling product information from a URL": "Crea un producto al procesar la información de un producto desde una URL",
|
||||
"Creates a product from product information": "Crea un producto a partir de la información del producto",
|
||||
"Updates existing product information using product ID": "Actualiza la información del producto existente usando el ID del producto",
|
||||
"Get information about a specific generated video project using its ID": "Obtener información sobre un proyecto de vídeo generado específico usando su ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Genera una URL firmada para subir archivos. Utilice la URL devuelta para subir su archivo con una solicitud PUT.",
|
||||
"Creates a new video from templates": "Crea un nuevo vídeo a partir de plantillas",
|
||||
"Age": "Edad",
|
||||
"Appearance": "Apariencia",
|
||||
"Aspect Ratio": "Relación de aspecto",
|
||||
"Avatar Style": "Estilo de Avatar",
|
||||
"Background": "Fondo",
|
||||
"Ethnicity": "Etnicidad",
|
||||
"Gender": "Sexo",
|
||||
"Image URL": "URL de imagen",
|
||||
"Model": "Modelo",
|
||||
"Screen Style": "Estilo de pantalla",
|
||||
"Avatar": "Avatar",
|
||||
"Avatar Type": "Tipo de avatar",
|
||||
"Voice": "Voz",
|
||||
"Script": "Escribir",
|
||||
"Audio URL": "URL de audio",
|
||||
"Caption": "Leyenda",
|
||||
"Video Name": "Nombre de vídeo",
|
||||
"Product URL": "URL del producto",
|
||||
"Product Name": "Producto",
|
||||
"Product Description": "Descripción del producto",
|
||||
"Target Audience": "Público objetivo",
|
||||
"Media": "Medios",
|
||||
"Product ID": "ID producto",
|
||||
"Project ID": "ID del proyecto",
|
||||
"Filename": "Nombre de archivo",
|
||||
"Template Type": "Tipo de plantilla",
|
||||
"Template": "Plantilla",
|
||||
"Language": "Idioma",
|
||||
"Variables": "Variables",
|
||||
"Voice ID": "ID de voz",
|
||||
"Enable Captions": "Activar leyendas",
|
||||
"Music ID": "ID de música",
|
||||
"The age group for the avatar": "El grupo de edad para el avatar",
|
||||
"Description of the appearance": "Descripción de la apariencia",
|
||||
"Photo aspect ratio": "Relación de aspecto de foto",
|
||||
"Style of the avatar": "Estilo del avatar",
|
||||
"Description of the background": "Descripción del fondo",
|
||||
"The ethnicity for the avatar": "La etnicidad para el avatar",
|
||||
"The gender for the avatar": "El género para el avatar",
|
||||
"URL of an existing image to use as reference": "URL de una imagen existente a usar como referencia",
|
||||
"The AI model to use": "El modelo de IA a usar",
|
||||
"Background style": "Estilo de fondo",
|
||||
"Select an avatar to use": "Selecciona un avatar para usar",
|
||||
"Source type of the avatar": "Tipo de fuente del avatar",
|
||||
"Select a voice to use": "Seleccione una voz para usar",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Contenido del script para que el avatar hable. Debe proporcionar script o audio url",
|
||||
"URL for audio. Must provide either script or audio_url": "URL para audio. Debe proporcionar tanto script como audio url",
|
||||
"Aspect ratio of the output video": "Relación de aspecto del vídeo de salida",
|
||||
"Enable subtitles": "Habilitar subtítulos",
|
||||
"Name of the generated video": "Nombre del video generado",
|
||||
"URL of the product to crawl and extract information from": "URL del producto desde el cual extraer información",
|
||||
"URL of the product to crawl for information": "URL del producto a procesar para obtener información",
|
||||
"Name of the product": "Nombre del producto",
|
||||
"Product introduction and selling points": "Puntos de introducción y venta del producto",
|
||||
"Target audience for the product": "Público objetivo para el producto",
|
||||
"Media resources for the product": "Recursos multimedia para el producto",
|
||||
"Product ID obtained from product creation": "ID de producto obtenido de la creación de producto",
|
||||
"Updated product name": "Nombre del producto actualizado",
|
||||
"Updated product description": "Descripción del producto actualizada",
|
||||
"Updated target audience for the product": "Público objetivo actualizado para el producto",
|
||||
"Updated media resources for the product (replaces existing media)": "Recursos multimedia actualizados para el producto (sustituye a los soportes existentes)",
|
||||
"The ID of the project to retrieve information for": "El ID del proyecto para recuperar información para",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Nombre del archivo a subir con extensión (por ejemplo, \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Tipo de fuente de plantilla",
|
||||
"Select a template to use": "Seleccione una plantilla para usar",
|
||||
"Language for text-to-speech conversion": "Idioma para conversión de texto a voz",
|
||||
"Variables to replace in the template": "Variables a reemplazar en la plantilla",
|
||||
"Voice ID for text-to-speech (optional)": "ID de voz para texto a voz (opcional)",
|
||||
"Whether to enable captions": "Activar subtítulos",
|
||||
"Background music ID (optional)": "ID de música de fondo (opcional)",
|
||||
"Name of the generated video (optional)": "Nombre del video generado (opcional)",
|
||||
"Teenager": "Adolescente",
|
||||
"Young adult": "Jóvenes adultos",
|
||||
"Adult": "Adultos",
|
||||
"Elderly": "Anciano",
|
||||
"Portrait [9:16]": "Retrato [9:16]",
|
||||
"Landscape [16:9]": "Paisaje [16:9]",
|
||||
"Professional": "Profesional",
|
||||
"Social": "Social",
|
||||
"European": "Europeo",
|
||||
"African": "Africano",
|
||||
"South Asian": "Asia Meridional",
|
||||
"East Asian": "Asia oriental",
|
||||
"Middle Eastern": "Medio Oriente",
|
||||
"South American": "Sudamericano",
|
||||
"North American": "Norteamericano",
|
||||
"Female": "Mujer",
|
||||
"Male": "Hombre",
|
||||
"Classic": "Clásico",
|
||||
"Modern": "Moderna",
|
||||
"With background": "Con fondo",
|
||||
"Green screen": "Pantalla verde",
|
||||
"WebM": "Web M",
|
||||
"Jogg avatar": "Avatar de Jogg",
|
||||
"Your avatar": "Tu avatar",
|
||||
"9:16 (Portrait)": "9:16 (Retrato)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Cuadrado)",
|
||||
"Common (Template Library)": "Común (plantilla de biblioteca)",
|
||||
"User (My Templates)": "Usuario (Mis Plantillas)",
|
||||
"Public avatars": "Avatares públicos",
|
||||
"Custom avatars": "Avatares personalizados",
|
||||
"Video Generated Successfully": "Video generado con éxito",
|
||||
"Video Generation Failed": "Generación de vídeo fallida",
|
||||
"Fires when a video is generated successfully": "Dispara cuando un video se genera correctamente",
|
||||
"Fires when video generation fails": "Dispara cuando falla la generación de vídeo"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "Plateforme de création de contenu alimentée par les AI pour générer des photos, des vidéos et du contenu de produits d'avatar, en utilisant la technologie IA avancée.",
|
||||
"Your Jogg AI API Key": "Votre clé d'API Jogg AI",
|
||||
"Create AI Avatar Photo": "Créer une photo d'Avatar IA",
|
||||
"Create Avatar Video": "Créer une vidéo d'Avatar",
|
||||
"Create Product from URL": "Créer un produit à partir d'une URL",
|
||||
"Create Product from Product Info": "Créer un produit à partir des informations du produit",
|
||||
"Update Product Info": "Mettre à jour les informations du produit",
|
||||
"Get Generated Video": "Obtenir la vidéo générée",
|
||||
"Upload Media": "Télécharger les médias",
|
||||
"Create Video from Template": "Créer une vidéo à partir du modèle",
|
||||
"Creates an AI avatar photo using JoggAI API": "Crée une photo d'avatar IA en utilisant l'API JoggAI",
|
||||
"Creates an avatar video using JoggAI API": "Crée une vidéo avatar en utilisant l'API JoggAI",
|
||||
"Creates a product by crawling product information from a URL": "Crée un produit en explorant les informations du produit à partir d'une URL",
|
||||
"Creates a product from product information": "Crée un produit à partir des informations du produit",
|
||||
"Updates existing product information using product ID": "Met à jour les informations de produit existantes en utilisant l'ID du produit",
|
||||
"Get information about a specific generated video project using its ID": "Obtenir des informations sur un projet vidéo généré en utilisant son ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Générer une URL signée pour le téléchargement de fichier. Utilisez le sign_url retourné pour télécharger votre fichier avec une requête PUT.",
|
||||
"Creates a new video from templates": "Crée une nouvelle vidéo à partir de modèles",
|
||||
"Age": "Âge",
|
||||
"Appearance": "Apparence",
|
||||
"Aspect Ratio": "Ratio d'aspect",
|
||||
"Avatar Style": "Style de l'avatar",
|
||||
"Background": "Arrière-plan",
|
||||
"Ethnicity": "Ethnicité",
|
||||
"Gender": "Sexe",
|
||||
"Image URL": "URL de l'image",
|
||||
"Model": "Modélisation",
|
||||
"Screen Style": "Style de l'écran",
|
||||
"Avatar": "Avatars",
|
||||
"Avatar Type": "Type d'avatar",
|
||||
"Voice": "Voix",
|
||||
"Script": "Écriture",
|
||||
"Audio URL": "URL audio",
|
||||
"Caption": "Légende",
|
||||
"Video Name": "Nom de la vidéo",
|
||||
"Product URL": "URL du produit",
|
||||
"Product Name": "Nom du produit",
|
||||
"Product Description": "Description du produit",
|
||||
"Target Audience": "Public cible",
|
||||
"Media": "Médias",
|
||||
"Product ID": "ID du produit",
|
||||
"Project ID": "ID du projet",
|
||||
"Filename": "Nom du fichier",
|
||||
"Template Type": "Type de modèle",
|
||||
"Template": "Gabarit",
|
||||
"Language": "Langue",
|
||||
"Variables": "Variables",
|
||||
"Voice ID": "ID vocal",
|
||||
"Enable Captions": "Activer les légendes",
|
||||
"Music ID": "ID de musique",
|
||||
"The age group for the avatar": "Le groupe d'âge pour l'avatar",
|
||||
"Description of the appearance": "Description de l'apparence",
|
||||
"Photo aspect ratio": "Ratio d'aspect photo",
|
||||
"Style of the avatar": "Style de l'avatar",
|
||||
"Description of the background": "Description de l'arrière-plan",
|
||||
"The ethnicity for the avatar": "L'origine ethnique de l'avatar",
|
||||
"The gender for the avatar": "Le sexe de l'avatar",
|
||||
"URL of an existing image to use as reference": "URL d'une image existante à utiliser comme référence",
|
||||
"The AI model to use": "Le modèle IA à utiliser",
|
||||
"Background style": "Style d'arrière-plan",
|
||||
"Select an avatar to use": "Sélectionnez un avatar à utiliser",
|
||||
"Source type of the avatar": "Type source de l'avatar",
|
||||
"Select a voice to use": "Sélectionnez une voix à utiliser",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Contenu du script pour que l'avatar puisse parler. Doit fournir soit le script, soit l'audio_url",
|
||||
"URL for audio. Must provide either script or audio_url": "URL pour l'audio. Doit fournir soit un script soit un audio_url",
|
||||
"Aspect ratio of the output video": "Ratio d'aspect de la vidéo de sortie",
|
||||
"Enable subtitles": "Activer les sous-titres",
|
||||
"Name of the generated video": "Nom de la vidéo généré",
|
||||
"URL of the product to crawl and extract information from": "URL du produit à explorer et extraire les informations de",
|
||||
"URL of the product to crawl for information": "URL du produit à explorer pour obtenir des informations",
|
||||
"Name of the product": "Nom du produit",
|
||||
"Product introduction and selling points": "Points d'introduction et de vente du produit",
|
||||
"Target audience for the product": "Public cible pour le produit",
|
||||
"Media resources for the product": "Ressources média pour le produit",
|
||||
"Product ID obtained from product creation": "ID de produit obtenu à partir de la création du produit",
|
||||
"Updated product name": "Nom du produit mis à jour",
|
||||
"Updated product description": "Description du produit mise à jour",
|
||||
"Updated target audience for the product": "Public cible mis à jour pour le produit",
|
||||
"Updated media resources for the product (replaces existing media)": "Ressources média mises à jour pour le produit (remplace les médias existants)",
|
||||
"The ID of the project to retrieve information for": "L'ID du projet pour récupérer les informations pour",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Nom du fichier à télécharger avec l'extension (par exemple, \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Type de source du modèle",
|
||||
"Select a template to use": "Sélectionnez un modèle à utiliser",
|
||||
"Language for text-to-speech conversion": "Langue pour la conversion de la synthèse vocale",
|
||||
"Variables to replace in the template": "Variables à remplacer dans le modèle",
|
||||
"Voice ID for text-to-speech (optional)": "ID vocal pour la synthèse vocale (facultatif)",
|
||||
"Whether to enable captions": "Activer ou non les légendes",
|
||||
"Background music ID (optional)": "ID de musique de fond (facultatif)",
|
||||
"Name of the generated video (optional)": "Nom de la vidéo générée (facultatif)",
|
||||
"Teenager": "Adolescent",
|
||||
"Young adult": "Jeune adulte",
|
||||
"Adult": "Adulte",
|
||||
"Elderly": "Ancien",
|
||||
"Portrait [9:16]": "Portrait [9:16]",
|
||||
"Landscape [16:9]": "Paysage [16:9]",
|
||||
"Professional": "Professionnel",
|
||||
"Social": "Réseaux sociaux",
|
||||
"European": "Européen",
|
||||
"African": "Africain",
|
||||
"South Asian": "Asie du Sud",
|
||||
"East Asian": "Asie de l'Est",
|
||||
"Middle Eastern": "Moyen Orient",
|
||||
"South American": "Amérique du Sud",
|
||||
"North American": "Amérique du Nord",
|
||||
"Female": "Femme",
|
||||
"Male": "Homme",
|
||||
"Classic": "Classique",
|
||||
"Modern": "Moderne",
|
||||
"With background": "Avec fond",
|
||||
"Green screen": "Écran vert",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "Avatar Jogg",
|
||||
"Your avatar": "Votre avatar",
|
||||
"9:16 (Portrait)": "9:16 (Portrait)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Square)",
|
||||
"Common (Template Library)": "Commun (bibliothèque de modèles)",
|
||||
"User (My Templates)": "Utilisateur (Mes modèles)",
|
||||
"Public avatars": "Avatars publics",
|
||||
"Custom avatars": "Avatars personnalisés",
|
||||
"Video Generated Successfully": "Vidéo générée avec succès",
|
||||
"Video Generation Failed": "Échec de la génération de la vidéo",
|
||||
"Fires when a video is generated successfully": "Se déclenche lorsqu'une vidéo est générée avec succès",
|
||||
"Fires when video generation fails": "Se déclenche lorsque la génération de la vidéo échoue"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "高度なAI技術を使用してアバター写真、ビデオ、製品コンテンツを生成するためのAIによるコンテンツ作成プラットフォーム。",
|
||||
"Your Jogg AI API Key": "JoggのAIAPIキー",
|
||||
"Create AI Avatar Photo": "AIアバターの写真を作成",
|
||||
"Create Avatar Video": "アバターのビデオを作成",
|
||||
"Create Product from URL": "URLから商品を作成",
|
||||
"Create Product from Product Info": "商品情報から商品を作成",
|
||||
"Update Product Info": "商品情報を更新",
|
||||
"Get Generated Video": "生成されたビデオを取得",
|
||||
"Upload Media": "メディアをアップロード",
|
||||
"Create Video from Template": "テンプレートからビデオを作成",
|
||||
"Creates an AI avatar photo using JoggAI API": "JoggAI API を使用して AI アバターの写真を作成します",
|
||||
"Creates an avatar video using JoggAI API": "JoggAI APIを使用してアバタービデオを作成します",
|
||||
"Creates a product by crawling product information from a URL": "URLから商品情報をクロールして商品を作成します",
|
||||
"Creates a product from product information": "商品情報から商品を作成",
|
||||
"Updates existing product information using product ID": "製品IDを使用して既存の製品情報を更新します",
|
||||
"Get information about a specific generated video project using its ID": "特定の生成されたビデオプロジェクトに関する情報をIDを使用して取得する",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "ファイルアップロードのための署名付きURLを生成します。PUTリクエストでファイルをアップロードするには、返されたsign_urlを使用してください。",
|
||||
"Creates a new video from templates": "テンプレートから新しいビデオを作成します",
|
||||
"Age": "年齢",
|
||||
"Appearance": "外観",
|
||||
"Aspect Ratio": "アスペクト比",
|
||||
"Avatar Style": "アバタースタイル",
|
||||
"Background": "背景",
|
||||
"Ethnicity": "民族性",
|
||||
"Gender": "性別",
|
||||
"Image URL": "画像URL",
|
||||
"Model": "モデル",
|
||||
"Screen Style": "画面のスタイル",
|
||||
"Avatar": "アバター",
|
||||
"Avatar Type": "アバターの種類",
|
||||
"Voice": "音声",
|
||||
"Script": "スクリプト",
|
||||
"Audio URL": "オーディオ URL",
|
||||
"Caption": "図表番号",
|
||||
"Video Name": "ビデオ名",
|
||||
"Product URL": "商品URL",
|
||||
"Product Name": "商品名",
|
||||
"Product Description": "製品説明",
|
||||
"Target Audience": "対象のオーディエンス数",
|
||||
"Media": "メディア",
|
||||
"Product ID": "商品ID",
|
||||
"Project ID": "プロジェクトID",
|
||||
"Filename": "ファイル名",
|
||||
"Template Type": "テンプレートタイプ",
|
||||
"Template": "テンプレート",
|
||||
"Language": "言語",
|
||||
"Variables": "変数",
|
||||
"Voice ID": "音声ID",
|
||||
"Enable Captions": "キャプションを有効にする",
|
||||
"Music ID": "音楽 ID",
|
||||
"The age group for the avatar": "アバターの年齢グループ",
|
||||
"Description of the appearance": "外観の説明",
|
||||
"Photo aspect ratio": "写真の縦横比",
|
||||
"Style of the avatar": "アバターのスタイル",
|
||||
"Description of the background": "背景の説明",
|
||||
"The ethnicity for the avatar": "アバターの民族性",
|
||||
"The gender for the avatar": "アバターの性別",
|
||||
"URL of an existing image to use as reference": "参照として使用する既存の画像の URL",
|
||||
"The AI model to use": "使用するAIモデル",
|
||||
"Background style": "背景のスタイル",
|
||||
"Select an avatar to use": "使用するアバターを選択してください",
|
||||
"Source type of the avatar": "アバターのソースタイプ",
|
||||
"Select a voice to use": "使用する音声を選択してください",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "アバターのスクリプトコンテンツが話します。スクリプトまたはaudio_urlのいずれかを指定する必要があります。",
|
||||
"URL for audio. Must provide either script or audio_url": "音声の URL です。スクリプトまたは audio_url のいずれかを指定する必要があります",
|
||||
"Aspect ratio of the output video": "出力ビデオのアスペクト比",
|
||||
"Enable subtitles": "字幕を有効にする",
|
||||
"Name of the generated video": "生成されたビデオの名前",
|
||||
"URL of the product to crawl and extract information from": "クロールして情報を抽出する製品の URL",
|
||||
"URL of the product to crawl for information": "情報のためにクロールする製品のURL",
|
||||
"Name of the product": "製品名",
|
||||
"Product introduction and selling points": "商品紹介とセールスポイント",
|
||||
"Target audience for the product": "対象となるオーディエンスの設定",
|
||||
"Media resources for the product": "製品のメディアリソース",
|
||||
"Product ID obtained from product creation": "製品作成時に取得した製品ID",
|
||||
"Updated product name": "更新された製品名",
|
||||
"Updated product description": "製品の説明を更新しました",
|
||||
"Updated target audience for the product": "製品のターゲットオーディエンスを更新しました",
|
||||
"Updated media resources for the product (replaces existing media)": "製品のメディアリソースを更新しました (既存のメディアを置き換えます)",
|
||||
"The ID of the project to retrieve information for": "情報を取得するプロジェクトの ID",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "拡張子付きでアップロードするファイルの名前(例:\"image.jpg\"、\"video.mp4\")",
|
||||
"Template source type": "テンプレートのソースタイプ",
|
||||
"Select a template to use": "使用するテンプレートを選択",
|
||||
"Language for text-to-speech conversion": "テキスト読み上げ変換のための言語",
|
||||
"Variables to replace in the template": "テンプレートで置き換える変数",
|
||||
"Voice ID for text-to-speech (optional)": "テキスト読み上げ用の音声ID (オプション)",
|
||||
"Whether to enable captions": "キャプションを有効にするかどうか",
|
||||
"Background music ID (optional)": "バックグラウンドミュージックID(任意)",
|
||||
"Name of the generated video (optional)": "生成されたビデオの名前 (オプション)",
|
||||
"Teenager": "ティーンエイジャー",
|
||||
"Young adult": "若年大人",
|
||||
"Adult": "大人",
|
||||
"Elderly": "<unk>",
|
||||
"Portrait [9:16]": "Portrait [9:16]",
|
||||
"Landscape [16:9]": "横向き [16:9]",
|
||||
"Professional": "プロフェッショナル",
|
||||
"Social": "ソーシャル",
|
||||
"European": "ヨーロッパ語",
|
||||
"African": "アフリカ語",
|
||||
"South Asian": "南アジア語",
|
||||
"East Asian": "East Asian",
|
||||
"Middle Eastern": "中東(中東)",
|
||||
"South American": "南アメリカ語",
|
||||
"North American": "北米系",
|
||||
"Female": "女性",
|
||||
"Male": "男性",
|
||||
"Classic": "クラシック",
|
||||
"Modern": "モダンな",
|
||||
"With background": "背景あり",
|
||||
"Green screen": "グリーンスクリーン",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "ジョギングのアバター",
|
||||
"Your avatar": "あなたのアバター",
|
||||
"9:16 (Portrait)": "9:16(縦)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (スクエア)",
|
||||
"Common (Template Library)": "一般的な(テンプレートライブラリ)",
|
||||
"User (My Templates)": "ユーザー (テンプレート)",
|
||||
"Public avatars": "公共のアバター",
|
||||
"Custom avatars": "カスタムアバター",
|
||||
"Video Generated Successfully": "ビデオの生成に成功",
|
||||
"Video Generation Failed": "ビデオの生成に失敗しました",
|
||||
"Fires when a video is generated successfully": "ビデオが正常に生成されたときに発生します",
|
||||
"Fires when video generation fails": "動画の生成に失敗したときに発火します"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "AI-powered content creatie platform voor het genereren van avatar foto's, video's en productinhoud met behulp van geavanceerde AI-technologie.",
|
||||
"Your Jogg AI API Key": "Jouw Jogg AI API-sleutel",
|
||||
"Create AI Avatar Photo": "Maak een Avatar Foto",
|
||||
"Create Avatar Video": "Avatar Video maken",
|
||||
"Create Product from URL": "Product maken van URL",
|
||||
"Create Product from Product Info": "Product van productinfo aanmaken",
|
||||
"Update Product Info": "Productinformatie bijwerken",
|
||||
"Get Generated Video": "Ophalen Gegenereerde Video",
|
||||
"Upload Media": "Media uploaden",
|
||||
"Create Video from Template": "Video maken van sjabloon",
|
||||
"Creates an AI avatar photo using JoggAI API": "Maakt een AI avatar foto met behulp van JoggAI API",
|
||||
"Creates an avatar video using JoggAI API": "Maakt een avatar video met de JoggAI API",
|
||||
"Creates a product by crawling product information from a URL": "Maakt een product door productinformatie van een URL te crawlen",
|
||||
"Creates a product from product information": "Maakt een product van productinformatie",
|
||||
"Updates existing product information using product ID": "Update bestaande productinformatie via product-ID",
|
||||
"Get information about a specific generated video project using its ID": "Krijg informatie over een specifiek gegenereerd videoproject met behulp van zijn ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Genereer een ondertekende URL voor het uploaden van een bestand. Gebruik de geretourneerde sign_url om uw bestand te uploaden met een PUT verzoek.",
|
||||
"Creates a new video from templates": "Maakt een nieuwe video van templates",
|
||||
"Age": "Leeftijd",
|
||||
"Appearance": "Weergave",
|
||||
"Aspect Ratio": "Verhouding beeldverhouding",
|
||||
"Avatar Style": "Avatar stijl",
|
||||
"Background": "Achtergrond",
|
||||
"Ethnicity": "Etniciteit",
|
||||
"Gender": "Geslacht",
|
||||
"Image URL": "Afbeelding URL",
|
||||
"Model": "Model",
|
||||
"Screen Style": "Scherm stijl",
|
||||
"Avatar": "Profielfoto",
|
||||
"Avatar Type": "Avatar type",
|
||||
"Voice": "Stem",
|
||||
"Script": "Naam",
|
||||
"Audio URL": "Audio URL",
|
||||
"Caption": "Onderschrift",
|
||||
"Video Name": "Video naam",
|
||||
"Product URL": "Product URL",
|
||||
"Product Name": "Product Naam",
|
||||
"Product Description": "Omschrijving product",
|
||||
"Target Audience": "Doel detectie",
|
||||
"Media": "Medium",
|
||||
"Product ID": "Product ID",
|
||||
"Project ID": "Project ID",
|
||||
"Filename": "Bestandsnaam",
|
||||
"Template Type": "Sjabloon Type",
|
||||
"Template": "Sjabloon",
|
||||
"Language": "Taal",
|
||||
"Variables": "Variabelen",
|
||||
"Voice ID": "Stem ID",
|
||||
"Enable Captions": "Ondertiteling inschakelen",
|
||||
"Music ID": "Muziek ID",
|
||||
"The age group for the avatar": "De leeftijdscategorie voor de avatar",
|
||||
"Description of the appearance": "Beschrijving van het uiterlijk",
|
||||
"Photo aspect ratio": "Hoogte-breedteverhouding foto",
|
||||
"Style of the avatar": "Stijl van de avatar",
|
||||
"Description of the background": "Beschrijving van de achtergrond",
|
||||
"The ethnicity for the avatar": "De etniciteit van de avatar",
|
||||
"The gender for the avatar": "Het geslacht van de avatar",
|
||||
"URL of an existing image to use as reference": "URL van een bestaande afbeelding om als referentie te gebruiken",
|
||||
"The AI model to use": "Het te gebruiken AI-model",
|
||||
"Background style": "Achtergrond stijl",
|
||||
"Select an avatar to use": "Selecteer een avatar om te gebruiken",
|
||||
"Source type of the avatar": "Brontype van de avatar",
|
||||
"Select a voice to use": "Selecteer een stem om te gebruiken",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Scriptinhoud voor de avatar om te speak. Moet ofwel script of audio_url opgeven",
|
||||
"URL for audio. Must provide either script or audio_url": "URL voor audio. Moet een script of audio_url bevatten",
|
||||
"Aspect ratio of the output video": "Aspect verhouding van de uitvoer video",
|
||||
"Enable subtitles": "Ondertitels inschakelen",
|
||||
"Name of the generated video": "Naam van de gegenereerde video",
|
||||
"URL of the product to crawl and extract information from": "URL van het product om te crawl en haal informatie uit",
|
||||
"URL of the product to crawl for information": "URL van het product om te crawl voor informatie",
|
||||
"Name of the product": "Naam van het product",
|
||||
"Product introduction and selling points": "Product introductie en verkoop punten",
|
||||
"Target audience for the product": "Doel doelgroep voor het product",
|
||||
"Media resources for the product": "Mediabestanden voor het product",
|
||||
"Product ID obtained from product creation": "Product ID verkregen van product aanmaken",
|
||||
"Updated product name": "Bijgewerkte productnaam",
|
||||
"Updated product description": "Bijgewerkte productbeschrijving",
|
||||
"Updated target audience for the product": "Doel doelgroep voor het product bijgewerkt",
|
||||
"Updated media resources for the product (replaces existing media)": "Bijgewerkte mediabronnen voor het product (vervangt bestaande media)",
|
||||
"The ID of the project to retrieve information for": "Het ID van het project voor het ophalen van informatie voor",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Naam van het te uploaden bestand met extensie (bijv. \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Bron sjabloon type",
|
||||
"Select a template to use": "Selecteer een sjabloon om te gebruiken",
|
||||
"Language for text-to-speech conversion": "Taal voor de tekst-naar-spraak conversie",
|
||||
"Variables to replace in the template": "Variabelen die moeten worden vervangen in de template",
|
||||
"Voice ID for text-to-speech (optional)": "Stem-ID voor tekst-naar-spraak (optioneel)",
|
||||
"Whether to enable captions": "Onderschriften inschakelen",
|
||||
"Background music ID (optional)": "Achtergrond muziek-ID (optioneel)",
|
||||
"Name of the generated video (optional)": "Naam van de gegenereerde video (optioneel)",
|
||||
"Teenager": "Tiener",
|
||||
"Young adult": "Jonge volwassene",
|
||||
"Adult": "Volwassenen",
|
||||
"Elderly": "Ouderen",
|
||||
"Portrait [9:16]": "Portret [9:16]",
|
||||
"Landscape [16:9]": "Liggend [16:9]",
|
||||
"Professional": "Professioneel",
|
||||
"Social": "Sociaal",
|
||||
"European": "Europees",
|
||||
"African": "Afrikaans",
|
||||
"South Asian": "Zuid-Aziatisch",
|
||||
"East Asian": "Oost-Aziatisch",
|
||||
"Middle Eastern": "Midden Oosten",
|
||||
"South American": "Zuid Amerikaans",
|
||||
"North American": "Noord-Amerikaans",
|
||||
"Female": "Vrouwelijk",
|
||||
"Male": "Mannelijk",
|
||||
"Classic": "Klassiek",
|
||||
"Modern": "Vernieuwend",
|
||||
"With background": "Met achtergrond",
|
||||
"Green screen": "Groen scherm",
|
||||
"WebM": "NL",
|
||||
"Jogg avatar": "Jogg avatar",
|
||||
"Your avatar": "Uw avatar",
|
||||
"9:16 (Portrait)": "9:16 (Portrait)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Zeil)",
|
||||
"Common (Template Library)": "Gemeenschappelijk (Sjabloon Bibliotheek)",
|
||||
"User (My Templates)": "Gebruiker (Mijn Templates)",
|
||||
"Public avatars": "Openbare avatars",
|
||||
"Custom avatars": "Aangepaste avatars",
|
||||
"Video Generated Successfully": "Video succesvol gegenereerd",
|
||||
"Video Generation Failed": "Video-generatie is mislukt",
|
||||
"Fires when a video is generated successfully": "Vuurt wanneer een video met succes wordt gegenereerd",
|
||||
"Fires when video generation fails": "Vuurt wanneer videopwekking mislukt"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "Plataforma de criação de conteúdo com o AR para gerar fotos, vídeos e conteúdo de produtos usando tecnologia avançada de IA.",
|
||||
"Your Jogg AI API Key": "Sua chave de API do Jogg AI",
|
||||
"Create AI Avatar Photo": "Criar foto de avatar IA",
|
||||
"Create Avatar Video": "Criar vídeo de avatar",
|
||||
"Create Product from URL": "Criar produto a partir de URL",
|
||||
"Create Product from Product Info": "Criar Produto a partir da Informação de Produto",
|
||||
"Update Product Info": "Atualizar informações do produto",
|
||||
"Get Generated Video": "Obter vídeo gerado",
|
||||
"Upload Media": "Carregar Mídia",
|
||||
"Create Video from Template": "Criar vídeo a partir do modelo",
|
||||
"Creates an AI avatar photo using JoggAI API": "Cria uma foto de avatar IA usando a API JoggAI",
|
||||
"Creates an avatar video using JoggAI API": "Cria um vídeo de avatar usando a API JoggAI",
|
||||
"Creates a product by crawling product information from a URL": "Cria um produto rastejando as informações do produto de uma URL",
|
||||
"Creates a product from product information": "Cria um produto a partir das informações do produto",
|
||||
"Updates existing product information using product ID": "Atualizar informações do produto existente usando o ID do produto",
|
||||
"Get information about a specific generated video project using its ID": "Obter informações sobre um projeto de vídeo gerado específico usando seu ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Gerar uma URL assinada para upload de arquivo. Use a sign_url retornada para enviar o seu arquivo com uma solicitação PUT.",
|
||||
"Creates a new video from templates": "Cria um novo vídeo de modelos",
|
||||
"Age": "Idade",
|
||||
"Appearance": "Aparência",
|
||||
"Aspect Ratio": "Proporção da proporção",
|
||||
"Avatar Style": "Estilo de avatar",
|
||||
"Background": "Fundo",
|
||||
"Ethnicity": "Étnicidade",
|
||||
"Gender": "Gênero",
|
||||
"Image URL": "URL da imagem",
|
||||
"Model": "Modelo",
|
||||
"Screen Style": "Estilo da tela",
|
||||
"Avatar": "Avatar",
|
||||
"Avatar Type": "Tipo de Avatar",
|
||||
"Voice": "Voz",
|
||||
"Script": "Roteiro",
|
||||
"Audio URL": "URL do Áudio",
|
||||
"Caption": "Legenda",
|
||||
"Video Name": "Nome do Vídeo",
|
||||
"Product URL": "URL do Produto",
|
||||
"Product Name": "Nome do Produto",
|
||||
"Product Description": "Descrição do Produto",
|
||||
"Target Audience": "Público Alvo",
|
||||
"Media": "Multimídia",
|
||||
"Product ID": "ID do Produto",
|
||||
"Project ID": "ID do Projeto",
|
||||
"Filename": "Nome",
|
||||
"Template Type": "Tipo de modelo",
|
||||
"Template": "Modelo",
|
||||
"Language": "IDIOMA",
|
||||
"Variables": "Variáveis",
|
||||
"Voice ID": "ID da voz",
|
||||
"Enable Captions": "Habilitar legendas",
|
||||
"Music ID": "ID da música",
|
||||
"The age group for the avatar": "O grupo etário para o avatar",
|
||||
"Description of the appearance": "Descrição da aparência",
|
||||
"Photo aspect ratio": "Proporção de aspecto foto",
|
||||
"Style of the avatar": "Estilo do avatar",
|
||||
"Description of the background": "Descrição do plano de fundo",
|
||||
"The ethnicity for the avatar": "A etnia do avatar",
|
||||
"The gender for the avatar": "O gênero para o avatar",
|
||||
"URL of an existing image to use as reference": "URL de uma imagem existente para usar como referência",
|
||||
"The AI model to use": "O modelo de IA a ser usado",
|
||||
"Background style": "Estilo do fundo",
|
||||
"Select an avatar to use": "Selecione um avatar para usar",
|
||||
"Source type of the avatar": "Tipo de origem do avatar",
|
||||
"Select a voice to use": "Selecione uma voz para usar",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Conteúdo do script para o avatar ser exibido. Deve fornecer script ou audio_url",
|
||||
"URL for audio. Must provide either script or audio_url": "URL para áudio. Deve fornecer script ou audio_url",
|
||||
"Aspect ratio of the output video": "Proporção de aspecto do vídeo de saída",
|
||||
"Enable subtitles": "Ativar legendas",
|
||||
"Name of the generated video": "Nome do vídeo gerado",
|
||||
"URL of the product to crawl and extract information from": "URL do produto para rastrear e extrair informações de",
|
||||
"URL of the product to crawl for information": "URL do produto para rastreamento para obter informações",
|
||||
"Name of the product": "Nome do produto",
|
||||
"Product introduction and selling points": "Pontos de introdução e venda do produto",
|
||||
"Target audience for the product": "Público Alvo para o produto",
|
||||
"Media resources for the product": "Recursos de mídia para o produto",
|
||||
"Product ID obtained from product creation": "ID do produto obtido da criação do produto",
|
||||
"Updated product name": "Nome do produto atualizado",
|
||||
"Updated product description": "Descrição do produto atualizada",
|
||||
"Updated target audience for the product": "Público alvo atualizado para o produto",
|
||||
"Updated media resources for the product (replaces existing media)": "Recursos de mídia atualizados para o produto (substitui a mídia existente)",
|
||||
"The ID of the project to retrieve information for": "A ID do projeto para recuperar informações de",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Nome do arquivo a ser enviado com extensão (ex: \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Tipo fonte do modelo",
|
||||
"Select a template to use": "Selecione um modelo para usar",
|
||||
"Language for text-to-speech conversion": "Idioma para conversão de texto-para-voz",
|
||||
"Variables to replace in the template": "Variáveis para substituir no template",
|
||||
"Voice ID for text-to-speech (optional)": "ID de voz para texto-para-voz (opcional)",
|
||||
"Whether to enable captions": "Se deseja habilitar legendas",
|
||||
"Background music ID (optional)": "ID de música de fundo (opcional)",
|
||||
"Name of the generated video (optional)": "Nome do vídeo gerado (opcional)",
|
||||
"Teenager": "Adolescente",
|
||||
"Young adult": "Jovem adulto",
|
||||
"Adult": "Adulto",
|
||||
"Elderly": "Idosos",
|
||||
"Portrait [9:16]": "Retrato [9:16]",
|
||||
"Landscape [16:9]": "Paisagem [16:9]",
|
||||
"Professional": "Profissional",
|
||||
"Social": "Sócio",
|
||||
"European": "Europeu",
|
||||
"African": "africano",
|
||||
"South Asian": "Sul da Ásia",
|
||||
"East Asian": "Leste Asiático",
|
||||
"Middle Eastern": "Oriente Médio",
|
||||
"South American": "Sul Americano",
|
||||
"North American": "Norte Americano",
|
||||
"Female": "Feminino",
|
||||
"Male": "Masculino",
|
||||
"Classic": "Clássico",
|
||||
"Modern": "Moderno",
|
||||
"With background": "Com fundo",
|
||||
"Green screen": "Tela verde",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "Avatar de correg",
|
||||
"Your avatar": "Seu avatar",
|
||||
"9:16 (Portrait)": "9:16 (Retrato)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Quadrado)",
|
||||
"Common (Template Library)": "Comum (Biblioteca de Modelos)",
|
||||
"User (My Templates)": "Usuário (Meus Modelos)",
|
||||
"Public avatars": "Avatares públicos",
|
||||
"Custom avatars": "Avatares personalizados",
|
||||
"Video Generated Successfully": "Vídeo gerado com sucesso",
|
||||
"Video Generation Failed": "Falha ao gerar vídeo",
|
||||
"Fires when a video is generated successfully": "Efetua quando um vídeo é gerado com sucesso",
|
||||
"Fires when video generation fails": "Atira quando a geração de vídeo falhar"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.",
|
||||
"Your Jogg AI API Key": "Your Jogg AI API Key",
|
||||
"Create AI Avatar Photo": "Create AI Avatar Photo",
|
||||
"Create Avatar Video": "Create Avatar Video",
|
||||
"Create Product from URL": "Create Product from URL",
|
||||
"Create Product from Product Info": "Create Product from Product Info",
|
||||
"Update Product Info": "Update Product Info",
|
||||
"Get Generated Video": "Get Generated Video",
|
||||
"Upload Media": "Upload Media",
|
||||
"Create Video from Template": "Create Video from Template",
|
||||
"Creates an AI avatar photo using JoggAI API": "Creates an AI avatar photo using JoggAI API",
|
||||
"Creates an avatar video using JoggAI API": "Creates an avatar video using JoggAI API",
|
||||
"Creates a product by crawling product information from a URL": "Creates a product by crawling product information from a URL",
|
||||
"Creates a product from product information": "Creates a product from product information",
|
||||
"Updates existing product information using product ID": "Updates existing product information using product ID",
|
||||
"Get information about a specific generated video project using its ID": "Get information about a specific generated video project using its ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.",
|
||||
"Creates a new video from templates": "Creates a new video from templates",
|
||||
"Age": "Age",
|
||||
"Appearance": "Appearance",
|
||||
"Aspect Ratio": "Aspect Ratio",
|
||||
"Avatar Style": "Avatar Style",
|
||||
"Background": "Background",
|
||||
"Ethnicity": "Ethnicity",
|
||||
"Gender": "Gender",
|
||||
"Image URL": "Image URL",
|
||||
"Model": "Model",
|
||||
"Screen Style": "Screen Style",
|
||||
"Avatar": "Avatar",
|
||||
"Avatar Type": "Avatar Type",
|
||||
"Voice": "Voice",
|
||||
"Script": "Script",
|
||||
"Audio URL": "Audio URL",
|
||||
"Caption": "Caption",
|
||||
"Video Name": "Video Name",
|
||||
"Product URL": "Product URL",
|
||||
"Product Name": "Product Name",
|
||||
"Product Description": "Product Description",
|
||||
"Target Audience": "Target Audience",
|
||||
"Media": "Media",
|
||||
"Product ID": "Product ID",
|
||||
"Project ID": "Project ID",
|
||||
"Filename": "Filename",
|
||||
"Template Type": "Template Type",
|
||||
"Template": "Template",
|
||||
"Language": "Language",
|
||||
"Variables": "Variables",
|
||||
"Voice ID": "Voice ID",
|
||||
"Enable Captions": "Enable Captions",
|
||||
"Music ID": "Music ID",
|
||||
"The age group for the avatar": "The age group for the avatar",
|
||||
"Description of the appearance": "Description of the appearance",
|
||||
"Photo aspect ratio": "Photo aspect ratio",
|
||||
"Style of the avatar": "Style of the avatar",
|
||||
"Description of the background": "Description of the background",
|
||||
"The ethnicity for the avatar": "The ethnicity for the avatar",
|
||||
"The gender for the avatar": "The gender for the avatar",
|
||||
"URL of an existing image to use as reference": "URL of an existing image to use as reference",
|
||||
"The AI model to use": "The AI model to use",
|
||||
"Background style": "Background style",
|
||||
"Select an avatar to use": "Select an avatar to use",
|
||||
"Source type of the avatar": "Source type of the avatar",
|
||||
"Select a voice to use": "Select a voice to use",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Script content for the avatar to speak. Must provide either script or audio_url",
|
||||
"URL for audio. Must provide either script or audio_url": "URL for audio. Must provide either script or audio_url",
|
||||
"Aspect ratio of the output video": "Aspect ratio of the output video",
|
||||
"Enable subtitles": "Enable subtitles",
|
||||
"Name of the generated video": "Name of the generated video",
|
||||
"URL of the product to crawl and extract information from": "URL of the product to crawl and extract information from",
|
||||
"URL of the product to crawl for information": "URL of the product to crawl for information",
|
||||
"Name of the product": "Name of the product",
|
||||
"Product introduction and selling points": "Product introduction and selling points",
|
||||
"Target audience for the product": "Target audience for the product",
|
||||
"Media resources for the product": "Media resources for the product",
|
||||
"Product ID obtained from product creation": "Product ID obtained from product creation",
|
||||
"Updated product name": "Updated product name",
|
||||
"Updated product description": "Updated product description",
|
||||
"Updated target audience for the product": "Updated target audience for the product",
|
||||
"Updated media resources for the product (replaces existing media)": "Updated media resources for the product (replaces existing media)",
|
||||
"The ID of the project to retrieve information for": "The ID of the project to retrieve information for",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Template source type",
|
||||
"Select a template to use": "Select a template to use",
|
||||
"Language for text-to-speech conversion": "Language for text-to-speech conversion",
|
||||
"Variables to replace in the template": "Variables to replace in the template",
|
||||
"Voice ID for text-to-speech (optional)": "Voice ID for text-to-speech (optional)",
|
||||
"Whether to enable captions": "Whether to enable captions",
|
||||
"Background music ID (optional)": "Background music ID (optional)",
|
||||
"Name of the generated video (optional)": "Name of the generated video (optional)",
|
||||
"Teenager": "Teenager",
|
||||
"Young adult": "Young adult",
|
||||
"Adult": "Adult",
|
||||
"Elderly": "Elderly",
|
||||
"Portrait [9:16]": "Portrait [9:16]",
|
||||
"Landscape [16:9]": "Landscape [16:9]",
|
||||
"Professional": "Professional",
|
||||
"Social": "Social",
|
||||
"European": "European",
|
||||
"African": "African",
|
||||
"South Asian": "South Asian",
|
||||
"East Asian": "East Asian",
|
||||
"Middle Eastern": "Middle Eastern",
|
||||
"South American": "South American",
|
||||
"North American": "North American",
|
||||
"Female": "Female",
|
||||
"Male": "Male",
|
||||
"Classic": "Classic",
|
||||
"Modern": "Modern",
|
||||
"With background": "With background",
|
||||
"Green screen": "Green screen",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "Jogg avatar",
|
||||
"Your avatar": "Your avatar",
|
||||
"9:16 (Portrait)": "9:16 (Portrait)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Square)",
|
||||
"Common (Template Library)": "Common (Template Library)",
|
||||
"User (My Templates)": "User (My Templates)",
|
||||
"Public avatars": "Public avatars",
|
||||
"Custom avatars": "Custom avatars",
|
||||
"Video Generated Successfully": "Video Generated Successfully",
|
||||
"Video Generation Failed": "Video Generation Failed",
|
||||
"Fires when a video is generated successfully": "Fires when a video is generated successfully",
|
||||
"Fires when video generation fails": "Fires when video generation fails"
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.": "AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.",
|
||||
"Your Jogg AI API Key": "Your Jogg AI API Key",
|
||||
"Create AI Avatar Photo": "Create AI Avatar Photo",
|
||||
"Create Avatar Video": "Create Avatar Video",
|
||||
"Create Product from URL": "Create Product from URL",
|
||||
"Create Product from Product Info": "Create Product from Product Info",
|
||||
"Update Product Info": "Update Product Info",
|
||||
"Get Generated Video": "Get Generated Video",
|
||||
"Upload Media": "Upload Media",
|
||||
"Create Video from Template": "Create Video from Template",
|
||||
"Creates an AI avatar photo using JoggAI API": "Creates an AI avatar photo using JoggAI API",
|
||||
"Creates an avatar video using JoggAI API": "Creates an avatar video using JoggAI API",
|
||||
"Creates a product by crawling product information from a URL": "Creates a product by crawling product information from a URL",
|
||||
"Creates a product from product information": "Creates a product from product information",
|
||||
"Updates existing product information using product ID": "Updates existing product information using product ID",
|
||||
"Get information about a specific generated video project using its ID": "Get information about a specific generated video project using its ID",
|
||||
"Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.": "Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.",
|
||||
"Creates a new video from templates": "Creates a new video from templates",
|
||||
"Age": "Age",
|
||||
"Appearance": "外观",
|
||||
"Aspect Ratio": "Aspect Ratio",
|
||||
"Avatar Style": "Avatar Style",
|
||||
"Background": "Background",
|
||||
"Ethnicity": "Ethnicity",
|
||||
"Gender": "Gender",
|
||||
"Image URL": "Image URL",
|
||||
"Model": "Model",
|
||||
"Screen Style": "Screen Style",
|
||||
"Avatar": "头像",
|
||||
"Avatar Type": "Avatar Type",
|
||||
"Voice": "Voice",
|
||||
"Script": "Script",
|
||||
"Audio URL": "Audio URL",
|
||||
"Caption": "Caption",
|
||||
"Video Name": "Video Name",
|
||||
"Product URL": "Product URL",
|
||||
"Product Name": "Product Name",
|
||||
"Product Description": "Product Description",
|
||||
"Target Audience": "Target Audience",
|
||||
"Media": "Media",
|
||||
"Product ID": "Product ID",
|
||||
"Project ID": "Project ID",
|
||||
"Filename": "Filename",
|
||||
"Template Type": "Template Type",
|
||||
"Template": "模板",
|
||||
"Language": "Language",
|
||||
"Variables": "Variables",
|
||||
"Voice ID": "Voice ID",
|
||||
"Enable Captions": "Enable Captions",
|
||||
"Music ID": "Music ID",
|
||||
"The age group for the avatar": "The age group for the avatar",
|
||||
"Description of the appearance": "Description of the appearance",
|
||||
"Photo aspect ratio": "Photo aspect ratio",
|
||||
"Style of the avatar": "Style of the avatar",
|
||||
"Description of the background": "Description of the background",
|
||||
"The ethnicity for the avatar": "The ethnicity for the avatar",
|
||||
"The gender for the avatar": "The gender for the avatar",
|
||||
"URL of an existing image to use as reference": "URL of an existing image to use as reference",
|
||||
"The AI model to use": "The AI model to use",
|
||||
"Background style": "Background style",
|
||||
"Select an avatar to use": "Select an avatar to use",
|
||||
"Source type of the avatar": "Source type of the avatar",
|
||||
"Select a voice to use": "Select a voice to use",
|
||||
"Script content for the avatar to speak. Must provide either script or audio_url": "Script content for the avatar to speak. Must provide either script or audio_url",
|
||||
"URL for audio. Must provide either script or audio_url": "URL for audio. Must provide either script or audio_url",
|
||||
"Aspect ratio of the output video": "Aspect ratio of the output video",
|
||||
"Enable subtitles": "Enable subtitles",
|
||||
"Name of the generated video": "Name of the generated video",
|
||||
"URL of the product to crawl and extract information from": "URL of the product to crawl and extract information from",
|
||||
"URL of the product to crawl for information": "URL of the product to crawl for information",
|
||||
"Name of the product": "Name of the product",
|
||||
"Product introduction and selling points": "Product introduction and selling points",
|
||||
"Target audience for the product": "Target audience for the product",
|
||||
"Media resources for the product": "Media resources for the product",
|
||||
"Product ID obtained from product creation": "Product ID obtained from product creation",
|
||||
"Updated product name": "Updated product name",
|
||||
"Updated product description": "Updated product description",
|
||||
"Updated target audience for the product": "Updated target audience for the product",
|
||||
"Updated media resources for the product (replaces existing media)": "Updated media resources for the product (replaces existing media)",
|
||||
"The ID of the project to retrieve information for": "The ID of the project to retrieve information for",
|
||||
"Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")": "Name of the file to upload with extension (e.g., \"image.jpg\", \"video.mp4\")",
|
||||
"Template source type": "Template source type",
|
||||
"Select a template to use": "Select a template to use",
|
||||
"Language for text-to-speech conversion": "Language for text-to-speech conversion",
|
||||
"Variables to replace in the template": "Variables to replace in the template",
|
||||
"Voice ID for text-to-speech (optional)": "Voice ID for text-to-speech (optional)",
|
||||
"Whether to enable captions": "Whether to enable captions",
|
||||
"Background music ID (optional)": "Background music ID (optional)",
|
||||
"Name of the generated video (optional)": "Name of the generated video (optional)",
|
||||
"Teenager": "Teenager",
|
||||
"Young adult": "Young adult",
|
||||
"Adult": "Adult",
|
||||
"Elderly": "Elderly",
|
||||
"Portrait [9:16]": "Portrait [9:16]",
|
||||
"Landscape [16:9]": "Landscape [16:9]",
|
||||
"Professional": "Professional",
|
||||
"Social": "Social",
|
||||
"European": "European",
|
||||
"African": "African",
|
||||
"South Asian": "South Asian",
|
||||
"East Asian": "East Asian",
|
||||
"Middle Eastern": "Middle Eastern",
|
||||
"South American": "South American",
|
||||
"North American": "North American",
|
||||
"Female": "Female",
|
||||
"Male": "Male",
|
||||
"Classic": "Classic",
|
||||
"Modern": "Modern",
|
||||
"With background": "With background",
|
||||
"Green screen": "Green screen",
|
||||
"WebM": "WebM",
|
||||
"Jogg avatar": "Jogg avatar",
|
||||
"Your avatar": "Your avatar",
|
||||
"9:16 (Portrait)": "9:16 (Portrait)",
|
||||
"16:9 (Landscape)": "16:9 (Landscape)",
|
||||
"1:1 (Square)": "1:1 (Square)",
|
||||
"Common (Template Library)": "Common (Template Library)",
|
||||
"User (My Templates)": "User (My Templates)",
|
||||
"Public avatars": "Public avatars",
|
||||
"Custom avatars": "Custom avatars",
|
||||
"Video Generated Successfully": "Video Generated Successfully",
|
||||
"Video Generation Failed": "Video Generation Failed",
|
||||
"Fires when a video is generated successfully": "Fires when a video is generated successfully",
|
||||
"Fires when video generation fails": "Fires when video generation fails"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { createAiAvatarPhoto } from './lib/actions/create-ai-avatar-photo';
|
||||
import { createAvatarVideo } from './lib/actions/create-avatar-video';
|
||||
import { createProductFromUrl } from './lib/actions/create-product-from-url';
|
||||
import { createProductFromProductInfo } from './lib/actions/create-product-from-product-info';
|
||||
import { updateProductInfo } from './lib/actions/update-product-info';
|
||||
import { getGeneratedVideo } from './lib/actions/get-generated-video';
|
||||
import { uploadMedia } from './lib/actions/upload-media';
|
||||
import { createVideoFromTemplate } from './lib/actions/create-video-from-template';
|
||||
import { videoGeneratedSuccessfully } from './lib/triggers/video-generation-events';
|
||||
import { videoGenerationFailed } from './lib/triggers/video-generation-failed';
|
||||
|
||||
export const joggAiAuth = PieceAuth.SecretText({
|
||||
displayName: 'API Key',
|
||||
description: 'Your Jogg AI API Key',
|
||||
required: true,
|
||||
});
|
||||
|
||||
export const joggAi = createPiece({
|
||||
displayName: 'JoggAI',
|
||||
description:
|
||||
'AI-powered content creation platform for generating avatar photos, videos, and product content using advanced AI technology.',
|
||||
auth: joggAiAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/jogg-ai.png',
|
||||
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE, PieceCategory.MARKETING],
|
||||
authors: ['fortunamide', 'onyedikachi-david'],
|
||||
actions: [
|
||||
createAiAvatarPhoto,
|
||||
createAvatarVideo,
|
||||
createProductFromUrl,
|
||||
createProductFromProductInfo,
|
||||
updateProductInfo,
|
||||
getGeneratedVideo,
|
||||
uploadMedia,
|
||||
createVideoFromTemplate,
|
||||
],
|
||||
triggers: [videoGeneratedSuccessfully, videoGenerationFailed],
|
||||
});
|
||||
@@ -0,0 +1,189 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const createAiAvatarPhoto = createAction({
|
||||
name: 'createAiAvatarPhoto',
|
||||
displayName: 'Create AI Avatar Photo',
|
||||
description: 'Creates an AI avatar photo using JoggAI API',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
age: Property.StaticDropdown({
|
||||
displayName: 'Age',
|
||||
description: 'The age group for the avatar',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Teenager', value: 'Teenager' },
|
||||
{ label: 'Young adult', value: 'Young adult' },
|
||||
{ label: 'Adult', value: 'Adult' },
|
||||
{ label: 'Elderly', value: 'Elderly' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
appearance: Property.LongText({
|
||||
displayName: 'Appearance',
|
||||
description: 'Description of the appearance',
|
||||
required: false,
|
||||
}),
|
||||
aspect_ratio: Property.StaticDropdown({
|
||||
displayName: 'Aspect Ratio',
|
||||
description: 'Photo aspect ratio',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Portrait [9:16]', value: 0 },
|
||||
{ label: 'Landscape [16:9]', value: 1 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
avatar_style: Property.StaticDropdown({
|
||||
displayName: 'Avatar Style',
|
||||
description: 'Style of the avatar',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Professional', value: 'Professional' },
|
||||
{ label: 'Social', value: 'Social' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
background: Property.LongText({
|
||||
displayName: 'Background',
|
||||
description: 'Description of the background',
|
||||
required: false,
|
||||
}),
|
||||
ethnicity: Property.StaticDropdown({
|
||||
displayName: 'Ethnicity',
|
||||
description: 'The ethnicity for the avatar',
|
||||
required: false,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'European', value: 'European' },
|
||||
{ label: 'African', value: 'African' },
|
||||
{ label: 'South Asian', value: 'South Asian' },
|
||||
{ label: 'East Asian', value: 'East Asian' },
|
||||
{ label: 'Middle Eastern', value: 'Middle Eastern' },
|
||||
{ label: 'South American', value: 'South American' },
|
||||
{ label: 'North American', value: 'North American' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
gender: Property.StaticDropdown({
|
||||
displayName: 'Gender',
|
||||
description: 'The gender for the avatar',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Female', value: 'Female' },
|
||||
{ label: 'Male', value: 'Male' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
image_url: Property.ShortText({
|
||||
displayName: 'Image URL',
|
||||
description: 'URL of an existing image to use as reference',
|
||||
required: false,
|
||||
}),
|
||||
model: Property.StaticDropdown({
|
||||
displayName: 'Model',
|
||||
description: 'The AI model to use',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Classic', value: 'classic' },
|
||||
{ label: 'Modern', value: 'modern' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const {
|
||||
age,
|
||||
appearance,
|
||||
aspect_ratio,
|
||||
avatar_style,
|
||||
background,
|
||||
ethnicity,
|
||||
gender,
|
||||
image_url,
|
||||
model,
|
||||
} = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
image_url: z.string().url('Image URL must be a valid URL').optional(),
|
||||
appearance: z
|
||||
.string()
|
||||
.min(1, 'Appearance description cannot be empty')
|
||||
.optional(),
|
||||
background: z
|
||||
.string()
|
||||
.min(1, 'Background description cannot be empty')
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const requestBody: {
|
||||
age: string;
|
||||
aspect_ratio: number;
|
||||
avatar_style: string;
|
||||
gender: string;
|
||||
model: string;
|
||||
appearance?: string;
|
||||
background?: string;
|
||||
ethnicity?: string;
|
||||
image_url?: string;
|
||||
} = {
|
||||
age,
|
||||
aspect_ratio,
|
||||
avatar_style,
|
||||
gender,
|
||||
model,
|
||||
};
|
||||
|
||||
if (appearance) {
|
||||
requestBody.appearance = appearance;
|
||||
}
|
||||
if (background) {
|
||||
requestBody.background = background;
|
||||
}
|
||||
if (ethnicity) {
|
||||
requestBody.ethnicity = ethnicity;
|
||||
}
|
||||
if (image_url) {
|
||||
requestBody.image_url = image_url;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/photo_avatar/photo/generate',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,295 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const createAvatarVideo = createAction({
|
||||
name: 'createAvatarVideo',
|
||||
displayName: 'Create Avatar Video',
|
||||
description: 'Creates an avatar video using JoggAI API',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
screen_style: Property.StaticDropdown({
|
||||
displayName: 'Screen Style',
|
||||
description: 'Background style',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'With background', value: 1 },
|
||||
{ label: 'Green screen', value: 2 },
|
||||
{ label: 'WebM', value: 3 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
avatar_id: Property.Dropdown({
|
||||
auth: joggAiAuth,
|
||||
displayName: 'Avatar',
|
||||
description: 'Select an avatar to use',
|
||||
required: true,
|
||||
refreshers: ['avatar_type'],
|
||||
async options({ auth, avatar_type }) {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Connect your Jogg AI account first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
let url = 'https://api.jogg.ai/v1/avatars';
|
||||
if (avatar_type === 1) {
|
||||
url = 'https://api.jogg.ai/v1/avatars/custom';
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url,
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
return {
|
||||
options: [],
|
||||
placeholder: `Error loading avatars: ${response.body.msg}`,
|
||||
};
|
||||
}
|
||||
|
||||
const avatars = response.body.data?.avatars || [];
|
||||
return {
|
||||
options: avatars.map(
|
||||
(avatar: {
|
||||
avatar_id: number;
|
||||
name: string;
|
||||
status?: number;
|
||||
}) => ({
|
||||
label: `${avatar.name}${
|
||||
avatar.status !== undefined
|
||||
? ` (${avatar.status === 1 ? 'Ready' : 'Processing'})`
|
||||
: ''
|
||||
}`,
|
||||
value: avatar.avatar_id,
|
||||
})
|
||||
),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch avatars', error);
|
||||
return {
|
||||
options: [],
|
||||
placeholder: 'Unable to load avatars',
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
avatar_type: Property.StaticDropdown({
|
||||
displayName: 'Avatar Type',
|
||||
description: 'Source type of the avatar',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Jogg avatar', value: 0 },
|
||||
{ label: 'Your avatar', value: 1 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
voice_id: Property.Dropdown({
|
||||
auth: joggAiAuth,
|
||||
displayName: 'Voice',
|
||||
description: 'Select a voice to use',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
async options({ auth }) {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Connect your Jogg AI account first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
let response;
|
||||
try {
|
||||
response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://api.jogg.ai/v1/voices/custom',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
});
|
||||
} catch {
|
||||
response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://api.jogg.ai/v1/voices',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
return {
|
||||
options: [],
|
||||
placeholder: `Error loading voices: ${response.body.msg}`,
|
||||
};
|
||||
}
|
||||
|
||||
const voices = response.body.data?.voices || [];
|
||||
return {
|
||||
options: voices.map(
|
||||
(voice: {
|
||||
name: string;
|
||||
voice_id: string;
|
||||
language?: string;
|
||||
gender?: string;
|
||||
age?: string;
|
||||
}) => ({
|
||||
label: voice.language
|
||||
? `${voice.name} (${voice.language}, ${voice.gender}, ${voice.age})`
|
||||
: voice.name,
|
||||
value: voice.voice_id,
|
||||
})
|
||||
),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch voices', error);
|
||||
return {
|
||||
options: [],
|
||||
placeholder: 'Unable to load voices',
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
script: Property.LongText({
|
||||
displayName: 'Script',
|
||||
description:
|
||||
'Script content for the avatar to speak. Must provide either script or audio_url',
|
||||
required: false,
|
||||
}),
|
||||
audio_url: Property.ShortText({
|
||||
displayName: 'Audio URL',
|
||||
description: 'URL for audio. Must provide either script or audio_url',
|
||||
required: false,
|
||||
}),
|
||||
aspect_ratio: Property.StaticDropdown({
|
||||
displayName: 'Aspect Ratio',
|
||||
description: 'Aspect ratio of the output video',
|
||||
required: false,
|
||||
defaultValue: 0,
|
||||
options: {
|
||||
options: [
|
||||
{ label: '9:16 (Portrait)', value: 0 },
|
||||
{ label: '16:9 (Landscape)', value: 1 },
|
||||
{ label: '1:1 (Square)', value: 2 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
caption: Property.Checkbox({
|
||||
displayName: 'Caption',
|
||||
description: 'Enable subtitles',
|
||||
required: false,
|
||||
defaultValue: true,
|
||||
}),
|
||||
video_name: Property.ShortText({
|
||||
displayName: 'Video Name',
|
||||
description: 'Name of the generated video',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const {
|
||||
screen_style,
|
||||
avatar_id,
|
||||
avatar_type,
|
||||
voice_id,
|
||||
script,
|
||||
audio_url,
|
||||
aspect_ratio,
|
||||
caption,
|
||||
video_name,
|
||||
} = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
audio_url: z.string().url('Audio URL must be a valid URL').optional(),
|
||||
script: z.string().min(1, 'Script cannot be empty').optional(),
|
||||
video_name: z.string().min(1, 'Video name cannot be empty').optional(),
|
||||
});
|
||||
|
||||
const hasScript = !!script;
|
||||
const hasAudioUrl = !!audio_url;
|
||||
|
||||
if ((hasScript && hasAudioUrl) || (!hasScript && !hasAudioUrl)) {
|
||||
throw new Error(
|
||||
'You must provide either a script or audio_url, but not both.'
|
||||
);
|
||||
}
|
||||
|
||||
const requestBody: {
|
||||
screen_style: number;
|
||||
avatar_id: number;
|
||||
avatar_type: number;
|
||||
voice_id: string;
|
||||
script?: string;
|
||||
audio_url?: string;
|
||||
aspect_ratio?: number;
|
||||
caption?: boolean;
|
||||
video_name?: string;
|
||||
} = {
|
||||
screen_style,
|
||||
avatar_id,
|
||||
avatar_type,
|
||||
voice_id,
|
||||
};
|
||||
|
||||
if (script) {
|
||||
requestBody.script = script;
|
||||
}
|
||||
if (audio_url) {
|
||||
requestBody.audio_url = audio_url;
|
||||
}
|
||||
|
||||
if (aspect_ratio !== undefined) {
|
||||
requestBody.aspect_ratio = aspect_ratio;
|
||||
}
|
||||
if (caption !== undefined) {
|
||||
requestBody.caption = caption;
|
||||
}
|
||||
if (video_name) {
|
||||
requestBody.video_name = video_name;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/create_video_from_talking_avatar',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,172 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const createProductFromProductInfo = createAction({
|
||||
name: 'createProductFromProductInfo',
|
||||
displayName: 'Create Product from Product Info',
|
||||
description: 'Creates a product from product information',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
url: Property.ShortText({
|
||||
displayName: 'Product URL',
|
||||
description: 'URL of the product to crawl for information',
|
||||
required: false,
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Product Name',
|
||||
description: 'Name of the product',
|
||||
required: false,
|
||||
}),
|
||||
description: Property.LongText({
|
||||
displayName: 'Product Description',
|
||||
description: 'Product introduction and selling points',
|
||||
required: false,
|
||||
}),
|
||||
target_audience: Property.ShortText({
|
||||
displayName: 'Target Audience',
|
||||
description: 'Target audience for the product',
|
||||
required: false,
|
||||
}),
|
||||
media: Property.Array({
|
||||
displayName: 'Media',
|
||||
description: 'Media resources for the product',
|
||||
properties: {
|
||||
type: Property.StaticDropdown({
|
||||
displayName: 'Media Type',
|
||||
description: 'Type of media',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Image', value: 1 },
|
||||
{ label: 'Video', value: 2 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Media Name',
|
||||
description: 'Name/filename of the media',
|
||||
required: true,
|
||||
}),
|
||||
url: Property.ShortText({
|
||||
displayName: 'Media URL',
|
||||
description: 'URL of the media file',
|
||||
required: true,
|
||||
}),
|
||||
description: Property.LongText({
|
||||
displayName: 'Media Description',
|
||||
description: 'Description of the media',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const { url, name, description, target_audience, media } = propsValue;
|
||||
|
||||
const hasUrl = !!url;
|
||||
const hasProductInfo = !!(
|
||||
name ||
|
||||
description ||
|
||||
target_audience ||
|
||||
media?.length
|
||||
);
|
||||
|
||||
if (!hasUrl && !hasProductInfo) {
|
||||
throw new Error(
|
||||
'You must provide either a URL or product information (name, description, etc.)'
|
||||
);
|
||||
}
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
url: z.string().url('URL must be a valid URL').optional(),
|
||||
name: z.string().min(1, 'Product name cannot be empty').optional(),
|
||||
description: z
|
||||
.string()
|
||||
.min(1, 'Product description cannot be empty')
|
||||
.optional(),
|
||||
target_audience: z
|
||||
.string()
|
||||
.min(1, 'Target audience cannot be empty')
|
||||
.optional(),
|
||||
media: z
|
||||
.array(
|
||||
z.object({
|
||||
type: z.number().min(1).max(2),
|
||||
name: z.string().min(1, 'Media name is required'),
|
||||
url: z.string().url('Media URL must be a valid URL'),
|
||||
description: z.string().optional(),
|
||||
})
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const requestBody: {
|
||||
url?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
target_audience?: string;
|
||||
media?: Array<{
|
||||
type: number;
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
}>;
|
||||
} = {};
|
||||
|
||||
if (url) {
|
||||
requestBody.url = url;
|
||||
}
|
||||
if (name) {
|
||||
requestBody.name = name;
|
||||
}
|
||||
if (description) {
|
||||
requestBody.description = description;
|
||||
}
|
||||
if (target_audience) {
|
||||
requestBody.target_audience = target_audience;
|
||||
}
|
||||
if (media && media.length > 0) {
|
||||
requestBody.media = media as Array<{
|
||||
type: number;
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/product',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const createProductFromUrl = createAction({
|
||||
name: 'createProductFromUrl',
|
||||
displayName: 'Create Product from URL',
|
||||
description: 'Creates a product by crawling product information from a URL',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
url: Property.ShortText({
|
||||
displayName: 'Product URL',
|
||||
description: 'URL of the product to crawl and extract information from',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const { url } = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
url: z.string().url('Product URL must be a valid URL'),
|
||||
});
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/product',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: {
|
||||
url,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,345 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const createVideoFromTemplate = createAction({
|
||||
name: 'createVideoFromTemplate',
|
||||
displayName: 'Create Video from Template',
|
||||
description: 'Creates a new video from templates',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
template_type: Property.StaticDropdown({
|
||||
displayName: 'Template Type',
|
||||
description: 'Template source type',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Common (Template Library)', value: 'common' },
|
||||
{ label: 'User (My Templates)', value: 'user' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
template_id: Property.Dropdown({
|
||||
auth: joggAiAuth,
|
||||
displayName: 'Template',
|
||||
description: 'Select a template to use',
|
||||
required: true,
|
||||
refreshers: ['template_type'],
|
||||
async options({ auth, template_type }) {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Connect your Jogg AI account first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
let url = 'https://api.jogg.ai/v1/templates';
|
||||
if (template_type === 'user') {
|
||||
url = 'https://api.jogg.ai/v1/templates/custom';
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url,
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
return {
|
||||
options: [],
|
||||
placeholder: `Error loading templates: ${response.body.msg}`,
|
||||
};
|
||||
}
|
||||
|
||||
const templates = response.body.data?.templates || [];
|
||||
return {
|
||||
options: templates.map(
|
||||
(template: { id: number; name: string }) => ({
|
||||
label: template.name,
|
||||
value: template.id,
|
||||
})
|
||||
),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch templates', error);
|
||||
return {
|
||||
options: [],
|
||||
placeholder: 'Unable to load templates',
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
lang: Property.ShortText({
|
||||
displayName: 'Language',
|
||||
description: 'Language for text-to-speech conversion',
|
||||
required: true,
|
||||
defaultValue: 'english',
|
||||
}),
|
||||
variables: Property.Array({
|
||||
displayName: 'Variables',
|
||||
description: 'Variables to replace in the template',
|
||||
required: false,
|
||||
properties: {
|
||||
type: Property.StaticDropdown({
|
||||
displayName: 'Variable Type',
|
||||
description: 'Type of variable content',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Text content', value: 'text' },
|
||||
{ label: 'Image content', value: 'image' },
|
||||
{ label: 'Video content', value: 'video' },
|
||||
{ label: 'Script content', value: 'script' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Variable Name',
|
||||
description:
|
||||
'Name of the variable to replace (as defined in template)',
|
||||
required: true,
|
||||
}),
|
||||
content: Property.LongText({
|
||||
displayName: 'Content',
|
||||
description: 'Content for text/script variables',
|
||||
required: false,
|
||||
}),
|
||||
url: Property.ShortText({
|
||||
displayName: 'URL',
|
||||
description: 'URL for image/video variables',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
}),
|
||||
avatar_type: Property.StaticDropdown({
|
||||
displayName: 'Avatar Type',
|
||||
description: 'Source type of the avatar',
|
||||
required: false,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Public avatars', value: 0 },
|
||||
{ label: 'Custom avatars', value: 1 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
avatar_id: Property.Dropdown({
|
||||
auth: joggAiAuth,
|
||||
displayName: 'Avatar',
|
||||
description: 'Select an avatar to use',
|
||||
required: false,
|
||||
refreshers: ['avatar_type'],
|
||||
async options({ auth, avatar_type }) {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Connect your Jogg AI account first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
let url = 'https://api.jogg.ai/v1/avatars';
|
||||
if (avatar_type === 1) {
|
||||
url = 'https://api.jogg.ai/v1/avatars/custom';
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url,
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
return {
|
||||
options: [],
|
||||
placeholder: `Error loading avatars: ${response.body.msg}`,
|
||||
};
|
||||
}
|
||||
|
||||
const avatars = response.body.data?.avatars || [];
|
||||
return {
|
||||
options: avatars.map(
|
||||
(avatar: { avatar_id: number; name: string }) => ({
|
||||
label: avatar.name,
|
||||
value: avatar.avatar_id,
|
||||
})
|
||||
),
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch avatars', error);
|
||||
return {
|
||||
options: [],
|
||||
placeholder: 'Unable to load avatars',
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
voice_id: Property.ShortText({
|
||||
displayName: 'Voice ID',
|
||||
description: 'Voice ID for text-to-speech (optional)',
|
||||
required: false,
|
||||
}),
|
||||
caption: Property.Checkbox({
|
||||
displayName: 'Enable Captions',
|
||||
description: 'Whether to enable captions',
|
||||
required: false,
|
||||
defaultValue: true,
|
||||
}),
|
||||
music_id: Property.Number({
|
||||
displayName: 'Music ID',
|
||||
description: 'Background music ID (optional)',
|
||||
required: false,
|
||||
}),
|
||||
video_name: Property.ShortText({
|
||||
displayName: 'Video Name',
|
||||
description: 'Name of the generated video (optional)',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const {
|
||||
template_type,
|
||||
template_id,
|
||||
lang,
|
||||
variables,
|
||||
avatar_type,
|
||||
avatar_id,
|
||||
voice_id,
|
||||
caption,
|
||||
music_id,
|
||||
video_name,
|
||||
} = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
template_id: z.number().min(1, 'Template ID is required'),
|
||||
lang: z.string().min(1, 'Language cannot be empty'),
|
||||
video_name: z.string().min(1, 'Video name cannot be empty').optional(),
|
||||
variables: z
|
||||
.array(
|
||||
z.object({
|
||||
type: z.enum(['text', 'image', 'video', 'script']),
|
||||
name: z.string().min(1, 'Variable name is required'),
|
||||
content: z.string().optional(),
|
||||
url: z.string().url('URL must be valid').optional(),
|
||||
})
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const processedVariables =
|
||||
variables && variables.length > 0
|
||||
? (
|
||||
variables as Array<{
|
||||
type: string;
|
||||
name: string;
|
||||
content?: string;
|
||||
url?: string;
|
||||
}>
|
||||
).map((variable) => {
|
||||
const properties: { content?: string; url?: string } = {};
|
||||
|
||||
if (variable.type === 'text' || variable.type === 'script') {
|
||||
if (!variable.content) {
|
||||
throw new Error(
|
||||
`Content is required for ${variable.type} variables`
|
||||
);
|
||||
}
|
||||
properties.content = variable.content;
|
||||
} else if (variable.type === 'image' || variable.type === 'video') {
|
||||
if (!variable.url) {
|
||||
throw new Error(
|
||||
`URL is required for ${variable.type} variables`
|
||||
);
|
||||
}
|
||||
properties.url = variable.url;
|
||||
}
|
||||
|
||||
return {
|
||||
type: variable.type,
|
||||
name: variable.name,
|
||||
properties,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
|
||||
const requestBody: {
|
||||
template_id: number;
|
||||
lang: string;
|
||||
template_type: string;
|
||||
variables: Array<{
|
||||
type: string;
|
||||
name: string;
|
||||
properties: { content?: string; url?: string };
|
||||
}>;
|
||||
avatar_id?: number;
|
||||
avatar_type?: number;
|
||||
voice_id?: string;
|
||||
caption?: boolean;
|
||||
music_id?: number;
|
||||
video_name?: string;
|
||||
} = {
|
||||
template_id,
|
||||
lang,
|
||||
template_type,
|
||||
variables: processedVariables,
|
||||
};
|
||||
|
||||
if (avatar_id !== undefined) {
|
||||
requestBody.avatar_id = avatar_id;
|
||||
}
|
||||
if (avatar_type !== undefined) {
|
||||
requestBody.avatar_type = avatar_type;
|
||||
}
|
||||
if (voice_id) {
|
||||
requestBody.voice_id = voice_id;
|
||||
}
|
||||
if (caption !== undefined) {
|
||||
requestBody.caption = caption;
|
||||
}
|
||||
if (music_id !== undefined) {
|
||||
requestBody.music_id = music_id;
|
||||
}
|
||||
if (video_name) {
|
||||
requestBody.video_name = video_name;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/create_video_with_template',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const getGeneratedVideo = createAction({
|
||||
name: 'getGeneratedVideo',
|
||||
displayName: 'Get Generated Video',
|
||||
description:
|
||||
'Get information about a specific generated video project using its ID',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
project_id: Property.ShortText({
|
||||
displayName: 'Project ID',
|
||||
description: 'The ID of the project to retrieve information for',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const { project_id } = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
project_id: z.string().min(1, 'Project ID cannot be empty'),
|
||||
});
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://api.jogg.ai/v1/project',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
},
|
||||
queryParams: {
|
||||
project_id,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,171 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const updateProductInfo = createAction({
|
||||
name: 'updateProductInfo',
|
||||
displayName: 'Update Product Info',
|
||||
description: 'Updates existing product information using product ID',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
product_id: Property.ShortText({
|
||||
displayName: 'Product ID',
|
||||
description: 'Product ID obtained from product creation',
|
||||
required: true,
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Product Name',
|
||||
description: 'Updated product name',
|
||||
required: false,
|
||||
}),
|
||||
description: Property.LongText({
|
||||
displayName: 'Product Description',
|
||||
description: 'Updated product description',
|
||||
required: false,
|
||||
}),
|
||||
target_audience: Property.ShortText({
|
||||
displayName: 'Target Audience',
|
||||
description: 'Updated target audience for the product',
|
||||
required: false,
|
||||
}),
|
||||
media: Property.Array({
|
||||
displayName: 'Media',
|
||||
description:
|
||||
'Updated media resources for the product (replaces existing media)',
|
||||
properties: {
|
||||
type: Property.StaticDropdown({
|
||||
displayName: 'Media Type',
|
||||
description: 'Type of media',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'Image', value: 1 },
|
||||
{ label: 'Video', value: 2 },
|
||||
],
|
||||
},
|
||||
}),
|
||||
name: Property.ShortText({
|
||||
displayName: 'Media Name',
|
||||
description: 'Name/filename of the media',
|
||||
required: true,
|
||||
}),
|
||||
url: Property.ShortText({
|
||||
displayName: 'Media URL',
|
||||
description: 'URL of the media file',
|
||||
required: true,
|
||||
}),
|
||||
description: Property.LongText({
|
||||
displayName: 'Media Description',
|
||||
description: 'Description of the media',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const { product_id, name, description, target_audience, media } =
|
||||
propsValue;
|
||||
|
||||
const hasUpdates = !!(
|
||||
name ||
|
||||
description ||
|
||||
target_audience ||
|
||||
media?.length
|
||||
);
|
||||
if (!hasUpdates) {
|
||||
throw new Error(
|
||||
'You must provide at least one field to update (name, description, target_audience, or media)'
|
||||
);
|
||||
}
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
product_id: z.string().min(1, 'Product ID is required'),
|
||||
name: z.string().min(1, 'Product name cannot be empty').optional(),
|
||||
description: z
|
||||
.string()
|
||||
.min(1, 'Product description cannot be empty')
|
||||
.optional(),
|
||||
target_audience: z
|
||||
.string()
|
||||
.min(1, 'Target audience cannot be empty')
|
||||
.optional(),
|
||||
media: z
|
||||
.array(
|
||||
z.object({
|
||||
type: z.number().min(1).max(2),
|
||||
name: z.string().min(1, 'Media name is required'),
|
||||
url: z.string().url('Media URL must be a valid URL'),
|
||||
description: z.string().optional(),
|
||||
})
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
const requestBody: {
|
||||
product_id: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
target_audience?: string;
|
||||
media?: Array<{
|
||||
type: number;
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
}>;
|
||||
} = {
|
||||
product_id,
|
||||
};
|
||||
|
||||
if (name) {
|
||||
requestBody.name = name;
|
||||
}
|
||||
if (description) {
|
||||
requestBody.description = description;
|
||||
}
|
||||
if (target_audience) {
|
||||
requestBody.target_audience = target_audience;
|
||||
}
|
||||
if (media && media.length > 0) {
|
||||
requestBody.media = media as Array<{
|
||||
type: number;
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.PUT,
|
||||
url: 'https://api.jogg.ai/v1/product',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,67 @@
|
||||
import {
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
propsValidation,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { z } from 'zod';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
export const uploadMedia = createAction({
|
||||
name: 'uploadMedia',
|
||||
displayName: 'Upload Media',
|
||||
description:
|
||||
'Generate a signed URL for file upload. Use the returned sign_url to upload your file with a PUT request.',
|
||||
auth: joggAiAuth,
|
||||
props: {
|
||||
filename: Property.ShortText({
|
||||
displayName: 'Filename',
|
||||
description:
|
||||
'Name of the file to upload with extension (e.g., "image.jpg", "video.mp4")',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
|
||||
async run({ auth, propsValue }) {
|
||||
const { filename } = propsValue;
|
||||
|
||||
await propsValidation.validateZod(propsValue, {
|
||||
filename: z
|
||||
.string()
|
||||
.min(1, 'Filename cannot be empty')
|
||||
.regex(
|
||||
/^[^/\\:*?"<>|]+\.[a-zA-Z0-9]+$/,
|
||||
'Filename must include a file extension and contain no special characters'
|
||||
),
|
||||
});
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/upload/asset',
|
||||
headers: {
|
||||
'x-api-key': auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: {
|
||||
filename,
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] || `API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,128 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
interface WebhookInfo {
|
||||
endpoint_id: string;
|
||||
}
|
||||
|
||||
export const videoGeneratedSuccessfully = createTrigger({
|
||||
name: 'videoGeneratedSuccessfully',
|
||||
displayName: 'Video Generated Successfully',
|
||||
description: 'Fires when a video is generated successfully',
|
||||
auth: joggAiAuth,
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
|
||||
sampleData: {
|
||||
event_id: 'evt_123456789',
|
||||
event: 'generated_video_success',
|
||||
timestamp: 1703894400,
|
||||
data: {
|
||||
project_id: 'abc123',
|
||||
video_url: 'https://res.jogg.ai/video.mp4',
|
||||
duration: 30,
|
||||
},
|
||||
},
|
||||
|
||||
async onEnable(context) {
|
||||
try {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/webhook/endpoint',
|
||||
headers: {
|
||||
'x-api-key': context.auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: {
|
||||
url: context.webhookUrl,
|
||||
events: ['generated_video_success'],
|
||||
status: 'enabled',
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code && response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] ||
|
||||
`API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const webhookData = response.body;
|
||||
if (webhookData.endpoint_id) {
|
||||
await context.store?.put<WebhookInfo>(
|
||||
'_video_generation_success_webhook',
|
||||
{
|
||||
endpoint_id: webhookData.endpoint_id,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
throw new Error('Failed to get webhook endpoint ID from response');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to register webhook:', error);
|
||||
throw new Error(
|
||||
`Failed to register webhook with JoggAI: ${
|
||||
error instanceof Error ? error.message : 'Unknown error'
|
||||
}`
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
async onDisable(context) {
|
||||
try {
|
||||
const webhookInfo = await context.store?.get<WebhookInfo>(
|
||||
'_video_generation_success_webhook'
|
||||
);
|
||||
if (webhookInfo?.endpoint_id) {
|
||||
await httpClient.sendRequest({
|
||||
method: HttpMethod.DELETE,
|
||||
url: `https://api.jogg.ai/v1/webhook/endpoint/${webhookInfo.endpoint_id}`,
|
||||
headers: {
|
||||
'x-api-key': context.auth.secret_text,
|
||||
},
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to unregister webhook:', error);
|
||||
}
|
||||
},
|
||||
|
||||
async run(context) {
|
||||
const payload = context.payload.body as {
|
||||
event_id: string;
|
||||
event: string;
|
||||
timestamp: number;
|
||||
data: {
|
||||
project_id: string;
|
||||
video_url?: string;
|
||||
duration?: number;
|
||||
};
|
||||
};
|
||||
|
||||
if (
|
||||
!payload.event_id ||
|
||||
!payload.event ||
|
||||
!payload.timestamp ||
|
||||
!payload.data?.project_id
|
||||
) {
|
||||
console.warn('Invalid webhook payload received:', payload);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (payload.event === 'generated_video_success') {
|
||||
return [payload];
|
||||
}
|
||||
|
||||
return [];
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,130 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { joggAiAuth } from '../..';
|
||||
|
||||
interface WebhookInfo {
|
||||
endpoint_id: string;
|
||||
}
|
||||
|
||||
export const videoGenerationFailed = createTrigger({
|
||||
name: 'videoGenerationFailed',
|
||||
displayName: 'Video Generation Failed',
|
||||
description: 'Fires when video generation fails',
|
||||
auth: joggAiAuth,
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
props: {},
|
||||
|
||||
sampleData: {
|
||||
event_id: 'evt_123456789',
|
||||
event: 'generated_video_failed',
|
||||
timestamp: 1703894400,
|
||||
data: {
|
||||
project_id: 'abc123',
|
||||
error: {
|
||||
message: 'Video generation failed due to invalid parameters',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
async onEnable(context) {
|
||||
try {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: 'https://api.jogg.ai/v1/webhook/endpoint',
|
||||
headers: {
|
||||
'x-api-key': context.auth.secret_text,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: {
|
||||
url: context.webhookUrl,
|
||||
events: ['generated_video_failed'],
|
||||
status: 'enabled',
|
||||
},
|
||||
});
|
||||
|
||||
if (response.body.code && response.body.code !== 0) {
|
||||
const errorMessages: Record<number, string> = {
|
||||
10104: 'Record not found',
|
||||
10105: 'Invalid API key',
|
||||
18020: 'Insufficient credit',
|
||||
18025: 'No permission to call APIs',
|
||||
40000: 'Parameter error',
|
||||
50000: 'System error',
|
||||
};
|
||||
|
||||
const message =
|
||||
errorMessages[response.body.code] ||
|
||||
`API Error: ${response.body.msg}`;
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const webhookData = response.body;
|
||||
if (webhookData.endpoint_id) {
|
||||
await context.store?.put<WebhookInfo>(
|
||||
'_video_generation_failed_webhook',
|
||||
{
|
||||
endpoint_id: webhookData.endpoint_id,
|
||||
}
|
||||
);
|
||||
} else {
|
||||
throw new Error('Failed to get webhook endpoint ID from response');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to register webhook:', error);
|
||||
throw new Error(
|
||||
`Failed to register webhook with JoggAI: ${
|
||||
error instanceof Error ? error.message : 'Unknown error'
|
||||
}`
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
async onDisable(context) {
|
||||
try {
|
||||
const webhookInfo = await context.store?.get<WebhookInfo>(
|
||||
'_video_generation_failed_webhook'
|
||||
);
|
||||
if (webhookInfo?.endpoint_id) {
|
||||
await httpClient.sendRequest({
|
||||
method: HttpMethod.DELETE,
|
||||
url: `https://api.jogg.ai/v1/webhook/endpoint/${webhookInfo.endpoint_id}`,
|
||||
headers: {
|
||||
'x-api-key': context.auth.secret_text,
|
||||
},
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to unregister webhook:', error);
|
||||
}
|
||||
},
|
||||
|
||||
async run(context) {
|
||||
const payload = context.payload.body as {
|
||||
event_id: string;
|
||||
event: string;
|
||||
timestamp: number;
|
||||
data: {
|
||||
project_id: string;
|
||||
error: {
|
||||
message: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (
|
||||
!payload.event_id ||
|
||||
!payload.event ||
|
||||
!payload.timestamp ||
|
||||
!payload.data?.project_id
|
||||
) {
|
||||
console.warn('Invalid webhook payload received:', payload);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (payload.event === 'generated_video_failed') {
|
||||
return [payload];
|
||||
}
|
||||
|
||||
return [];
|
||||
},
|
||||
});
|
||||
@@ -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