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-fragment
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-fragment` to build the library.
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@activepieces/piece-fragment",
|
||||
"version": "0.0.2",
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0",
|
||||
"dayjs": "^1.11.7"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "pieces-fragment",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/fragment/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/fragment",
|
||||
"tsConfig": "packages/pieces/community/fragment/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/fragment/package.json",
|
||||
"main": "packages/pieces/community/fragment/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/fragment/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/fragment/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
}
|
||||
},
|
||||
"nx-release-publish": {
|
||||
"options": {
|
||||
"packageRoot": "dist/{projectRoot}"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "Du kannst dein API-Token erhalten, indem du in [Entwickler-Einstellungen]navigierst (https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Aufgabe erstellen",
|
||||
"Update Task": "Aufgabe aktualisieren",
|
||||
"Get Task": "Aufgabe abrufen",
|
||||
"List Tasks": "Aufgaben auflisten",
|
||||
"Delete Task": "Aufgabe löschen",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"Creates a new task in Fragment.": "Erstellt eine neue Aufgabe in Fragment.",
|
||||
"Updates an existing task.": "Aktualisiert eine existierende Aufgabe.",
|
||||
"Retrieves details of a specific task.": "Ruft Details einer bestimmten Aufgabe ab.",
|
||||
"Retrieves a list of tasks from.": "Ruft eine Liste der Aufgaben ab",
|
||||
"Deletes an existing task.": "Löscht eine existierende Aufgabe.",
|
||||
"Make a custom API call to any Fragment endpoint": "Machen Sie einen benutzerdefinierten API-Aufruf an jeden Fragment Endpunkt",
|
||||
"Title": "Titel",
|
||||
"URL": "URL",
|
||||
"Due Date": "Fälligkeitsdatum",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Tags",
|
||||
"Custom Fields": "Eigene Felder",
|
||||
"Task UID": "Aufgaben-UID",
|
||||
"Status": "Status",
|
||||
"Limit": "Limit",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopfzeilen",
|
||||
"Query Parameters": "Abfrageparameter",
|
||||
"Body": "Körper",
|
||||
"Response is Binary ?": "Antwort ist binär?",
|
||||
"No Error on Failure": "Kein Fehler bei Fehler",
|
||||
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
||||
"The title of the task": "Der Titel der Aufgabe",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "Eine URL, die der Aufgabe zugeordnet ist (z.B. Link zu einem Ticket oder einer Ressource)",
|
||||
"When the task is due": "Wenn die Aufgabe fällig ist",
|
||||
"Email of the person to assign this task to.": "E-Mail der Person, der diese Aufgabe zugewiesen werden soll.",
|
||||
"Tags to categorize the task": "Tags zur Kategorisierung der Aufgabe",
|
||||
"Additional custom fields for the task": "Zusätzliche benutzerdefinierte Felder für die Aufgabe",
|
||||
"The unique identifier of the task to update": "Der eindeutige Bezeichner der zu aktualisierenden Aufgabe",
|
||||
"The updated title of the task": "Der aktualisierte Titel der Aufgabe",
|
||||
"The updated URL for the task": "Die aktualisierte URL für die Aufgabe",
|
||||
"The updated due date": "Das aktualisierte Abgabedatum",
|
||||
"The status of the task": "Der Status der Aufgabe",
|
||||
"Email of the person to assign this task to": "E-Mail der Person, der diese Aufgabe zugewiesen werden soll",
|
||||
"Updated tags for the task": "Aktualisierte Tags für die Aufgabe",
|
||||
"Updated custom fields": "Benutzerdefinierte Felder aktualisiert",
|
||||
"The unique identifier of the task to retrieve": "Der eindeutige Identifikator der Aufgabe zum Abrufen",
|
||||
"Filter tasks by status": "Aufgaben nach Status filtern",
|
||||
"Filter tasks by assignee email or ID": "Aufgaben nach zuweisender E-Mail oder ID filtern",
|
||||
"Maximum number of tasks to return (default: 50)": "Maximale Anzahl der zurückzugebenden Aufgaben (Standard: 50)",
|
||||
"The unique identifier of the task to delete": "Der eindeutige Identifikator der zu löschenden Aufgabe",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
|
||||
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "GESETZT",
|
||||
"DONE": "Fertig",
|
||||
"GET": "ERHALTEN",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "LÖSCHEN",
|
||||
"HEAD": "HEAD",
|
||||
"New Task": "Neue Aufgabe",
|
||||
"Task Updated": "Aufgabe aktualisiert",
|
||||
"Triggers when a new task is created.": "Wird ausgelöst, wenn eine neue Aufgabe erstellt wird.",
|
||||
"Triggers when a task is updated.": "Wird ausgelöst, wenn eine Aufgabe aktualisiert wird."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "Puedes obtener tu token API navegando a [Configuración del Desarrollador](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Crear tarea",
|
||||
"Update Task": "Actualizar tarea",
|
||||
"Get Task": "Obtener tarea",
|
||||
"List Tasks": "Lista de tareas",
|
||||
"Delete Task": "Eliminar tarea",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"Creates a new task in Fragment.": "Crea una nueva tarea en Fragmento.",
|
||||
"Updates an existing task.": "Actualiza una tarea existente.",
|
||||
"Retrieves details of a specific task.": "Devuelve los detalles de una tarea específica.",
|
||||
"Retrieves a list of tasks from.": "Recuperar una lista de tareas.",
|
||||
"Deletes an existing task.": "Elimina una tarea existente.",
|
||||
"Make a custom API call to any Fragment endpoint": "Hacer una llamada API personalizada a cualquier punto final de fragmentos",
|
||||
"Title": "Título",
|
||||
"URL": "URL",
|
||||
"Due Date": "Fecha de fin",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Etiquetas",
|
||||
"Custom Fields": "Campos personalizados",
|
||||
"Task UID": "UID de tarea",
|
||||
"Status": "Estado",
|
||||
"Limit": "Límite",
|
||||
"Method": "Método",
|
||||
"Headers": "Encabezados",
|
||||
"Query Parameters": "Parámetros de consulta",
|
||||
"Body": "Cuerpo",
|
||||
"Response is Binary ?": "¿Respuesta es binaria?",
|
||||
"No Error on Failure": "No hay ningún error en fallo",
|
||||
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
|
||||
"The title of the task": "El título de la tarea",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "Una URL asociada con la tarea (por ejemplo, enlace a un ticket o recurso)",
|
||||
"When the task is due": "Cuando la tarea vence",
|
||||
"Email of the person to assign this task to.": "Correo electrónico de la persona a la que asignar esta tarea.",
|
||||
"Tags to categorize the task": "Etiquetas para categorizar la tarea",
|
||||
"Additional custom fields for the task": "Campos personalizados adicionales para la tarea",
|
||||
"The unique identifier of the task to update": "El identificador único de la tarea a actualizar",
|
||||
"The updated title of the task": "El título actualizado de la tarea",
|
||||
"The updated URL for the task": "La URL actualizada para la tarea",
|
||||
"The updated due date": "La fecha límite actualizada",
|
||||
"The status of the task": "El estado de la tarea",
|
||||
"Email of the person to assign this task to": "Correo electrónico de la persona a la que asignar esta tarea",
|
||||
"Updated tags for the task": "Etiquetas actualizadas para la tarea",
|
||||
"Updated custom fields": "Campos personalizados actualizados",
|
||||
"The unique identifier of the task to retrieve": "El identificador único de la tarea a recuperar",
|
||||
"Filter tasks by status": "Filtrar tareas por estado",
|
||||
"Filter tasks by assignee email or ID": "Filtrar tareas por email o ID del asignatario",
|
||||
"Maximum number of tasks to return (default: 50)": "Número máximo de tareas a devolver (por defecto: 50)",
|
||||
"The unique identifier of the task to delete": "El identificador único de la tarea a eliminar",
|
||||
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
|
||||
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDF, imágenes, etc.",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "BUSCAR",
|
||||
"DONE": "HECHO",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO",
|
||||
"New Task": "Nueva tarea",
|
||||
"Task Updated": "Tarea actualizada",
|
||||
"Triggers when a new task is created.": "Se activa cuando se crea una nueva tarea.",
|
||||
"Triggers when a task is updated.": "Se activa cuando se actualiza una tarea."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "Vous pouvez obtenir votre jeton API en accédant à [Developer Settings](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Créer une tâche",
|
||||
"Update Task": "Tâche de mise à jour",
|
||||
"Get Task": "Obtenir une tâche",
|
||||
"List Tasks": "Lister les tâches",
|
||||
"Delete Task": "Supprimer la tâche",
|
||||
"Custom API Call": "Appel d'API personnalisé",
|
||||
"Creates a new task in Fragment.": "Crée une nouvelle tâche dans Fragment.",
|
||||
"Updates an existing task.": "Met à jour une tâche existante.",
|
||||
"Retrieves details of a specific task.": "Récupère les détails d'une tâche spécifique.",
|
||||
"Retrieves a list of tasks from.": "Récupère une liste de tâches.",
|
||||
"Deletes an existing task.": "Supprime une tâche existante.",
|
||||
"Make a custom API call to any Fragment endpoint": "Passez un appel API personnalisé à n'importe quel point de terminaison de fragment",
|
||||
"Title": "Titre",
|
||||
"URL": "URL",
|
||||
"Due Date": "Date de fin",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Tags",
|
||||
"Custom Fields": "Champs personnalisés",
|
||||
"Task UID": "UID de la tâche",
|
||||
"Status": "Statut",
|
||||
"Limit": "Limite",
|
||||
"Method": "Méthode",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "La réponse est Binaire ?",
|
||||
"No Error on Failure": "Aucune erreur en cas d'échec",
|
||||
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
||||
"The title of the task": "Le titre de la tâche",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "Une URL associée à la tâche (ex: lien vers un ticket ou une ressource)",
|
||||
"When the task is due": "Quand la tâche est due",
|
||||
"Email of the person to assign this task to.": "E-mail de la personne à assigner cette tâche.",
|
||||
"Tags to categorize the task": "Tags pour catégoriser la tâche",
|
||||
"Additional custom fields for the task": "Champs supplémentaires personnalisés pour la tâche",
|
||||
"The unique identifier of the task to update": "L'identifiant unique de la tâche à mettre à jour",
|
||||
"The updated title of the task": "Le titre mis à jour de la tâche",
|
||||
"The updated URL for the task": "L'URL mise à jour pour la tâche",
|
||||
"The updated due date": "La date d'échéance mise à jour",
|
||||
"The status of the task": "Le statut de la tâche",
|
||||
"Email of the person to assign this task to": "E-mail de la personne à assigner cette tâche à",
|
||||
"Updated tags for the task": "Balises mises à jour pour la tâche",
|
||||
"Updated custom fields": "Champs personnalisés mis à jour",
|
||||
"The unique identifier of the task to retrieve": "L'identifiant unique de la tâche à récupérer",
|
||||
"Filter tasks by status": "Filtrer les tâches par statut",
|
||||
"Filter tasks by assignee email or ID": "Filtrer les tâches par email ou ID du cessionnaire",
|
||||
"Maximum number of tasks to return (default: 50)": "Nombre maximum de tâches à retourner (par défaut: 50)",
|
||||
"The unique identifier of the task to delete": "L'identifiant unique de la tâche à supprimer",
|
||||
"Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
||||
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "DÉMARRÉ",
|
||||
"DONE": "FAIT",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD",
|
||||
"New Task": "Nouvelle tâche",
|
||||
"Task Updated": "Tâche mise à jour",
|
||||
"Triggers when a new task is created.": "Déclenche quand une nouvelle tâche est créée.",
|
||||
"Triggers when a task is updated.": "Déclenche quand une tâche est mise à jour."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "API トークンは [Developer Settings](https://app.onfragment.com/settings/account/developers) に移動して取得できます。",
|
||||
"Create Task": "タスクを作成",
|
||||
"Update Task": "タスクの更新",
|
||||
"Get Task": "タスクを取得",
|
||||
"List Tasks": "タスク一覧",
|
||||
"Delete Task": "タスクの削除",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"Creates a new task in Fragment.": "フラグメントに新しいタスクを作成します。",
|
||||
"Updates an existing task.": "既存のタスクを更新する。",
|
||||
"Retrieves details of a specific task.": "特定のタスクの詳細を取得します。",
|
||||
"Retrieves a list of tasks from.": "タスクのリストを取得します。",
|
||||
"Deletes an existing task.": "既存のタスクを削除します。",
|
||||
"Make a custom API call to any Fragment endpoint": "任意のフラグメントエンドポイントへのカスタム API コールを行う",
|
||||
"Title": "タイトル",
|
||||
"URL": "URL",
|
||||
"Due Date": "締切日",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "タグ",
|
||||
"Custom Fields": "カスタムフィールド",
|
||||
"Task UID": "タスクUID",
|
||||
"Status": "Status",
|
||||
"Limit": "制限",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"The title of the task": "タスクのタイトル",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "タスクに関連付けられた URL (例: チケットまたはリソースへのリンク)",
|
||||
"When the task is due": "タスクが期限のとき",
|
||||
"Email of the person to assign this task to.": "このタスクに割り当てる人のメール。",
|
||||
"Tags to categorize the task": "タスクを分類するタグ",
|
||||
"Additional custom fields for the task": "タスクの追加カスタムフィールド",
|
||||
"The unique identifier of the task to update": "更新するタスクの一意の識別子",
|
||||
"The updated title of the task": "タスクの更新されたタイトル",
|
||||
"The updated URL for the task": "タスクの更新されたURL",
|
||||
"The updated due date": "更新日時",
|
||||
"The status of the task": "タスクの状態",
|
||||
"Email of the person to assign this task to": "このタスクに割り当てる人のメール",
|
||||
"Updated tags for the task": "タスクのタグを更新しました",
|
||||
"Updated custom fields": "カスタムフィールドを更新しました",
|
||||
"The unique identifier of the task to retrieve": "取得するタスクの一意の識別子",
|
||||
"Filter tasks by status": "状態でタスクをフィルター",
|
||||
"Filter tasks by assignee email or ID": "担当者のメールアドレスまたはIDでタスクをフィルター",
|
||||
"Maximum number of tasks to return (default: 50)": "リターンするタスクの最大数(デフォルト:50)",
|
||||
"The unique identifier of the task to delete": "削除するタスクの一意の識別子",
|
||||
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
||||
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "開始",
|
||||
"DONE": "完了",
|
||||
"GET": "取得",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "削除",
|
||||
"HEAD": "頭",
|
||||
"New Task": "新しいタスク",
|
||||
"Task Updated": "タスクを更新しました",
|
||||
"Triggers when a new task is created.": "新しいタスクが作成されたときにトリガーされます。",
|
||||
"Triggers when a task is updated.": "タスクが更新されたときにトリガーされます。"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "U kunt uw API-token verkrijgen door te navigeren naar [Ontwikkelaarsinstellingen](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Taak maken",
|
||||
"Update Task": "Taak bijwerken",
|
||||
"Get Task": "Ophalen taak",
|
||||
"List Tasks": "Lijst Taken",
|
||||
"Delete Task": "Taak verwijderen",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Creates a new task in Fragment.": "Maakt een nieuwe taak in Fragment.",
|
||||
"Updates an existing task.": "Werkt een bestaande taak bij.",
|
||||
"Retrieves details of a specific task.": "Details van een specifieke taak worden opgehaald.",
|
||||
"Retrieves a list of tasks from.": "Haal een lijst op van taken van",
|
||||
"Deletes an existing task.": "Verwijdert een bestaande taak.",
|
||||
"Make a custom API call to any Fragment endpoint": "Maak een aangepaste API oproep tot een Fragment Eindpunt",
|
||||
"Title": "Aanspreektitel",
|
||||
"URL": "URL",
|
||||
"Due Date": "Inleverdatum",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Labels",
|
||||
"Custom Fields": "Aangepaste velden",
|
||||
"Task UID": "Taak UID",
|
||||
"Status": "status",
|
||||
"Limit": "Limiet",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopteksten",
|
||||
"Query Parameters": "Query parameters",
|
||||
"Body": "Lichaam",
|
||||
"Response is Binary ?": "Antwoord is binair?",
|
||||
"No Error on Failure": "Geen fout bij fout",
|
||||
"Timeout (in seconds)": "Time-out (in seconden)",
|
||||
"The title of the task": "De titel van de taak",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "Een URL die gekoppeld is aan de taak (bijv. link naar een ticket of bron)",
|
||||
"When the task is due": "Wanneer de taak klaar is",
|
||||
"Email of the person to assign this task to.": "E-mail van de persoon aan wie deze taak toe te wijzen.",
|
||||
"Tags to categorize the task": "Tags om de taak te categoriseren",
|
||||
"Additional custom fields for the task": "Extra extra velden voor de taak",
|
||||
"The unique identifier of the task to update": "De unieke id van de taak om bij te werken",
|
||||
"The updated title of the task": "De bijgewerkte titel van de taak",
|
||||
"The updated URL for the task": "De bijgewerkte URL voor de taak",
|
||||
"The updated due date": "De bijgewerkte vervaldatum",
|
||||
"The status of the task": "De status van de taak",
|
||||
"Email of the person to assign this task to": "E-mail van de persoon om deze taak toe te wijzen",
|
||||
"Updated tags for the task": "Labels voor de taak bijgewerkt",
|
||||
"Updated custom fields": "Aangepaste velden bijgewerkt",
|
||||
"The unique identifier of the task to retrieve": "De unieke id van de op te halen taak",
|
||||
"Filter tasks by status": "Filter taken op status",
|
||||
"Filter tasks by assignee email or ID": "Filter taken op toegewezen e-mail of ID",
|
||||
"Maximum number of tasks to return (default: 50)": "Maximum aantal weer te geven taken (standaard: 50)",
|
||||
"The unique identifier of the task to delete": "Het unieke id van de taak te verwijderen",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
|
||||
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "BEGIND",
|
||||
"DONE": "KLAAR",
|
||||
"GET": "KRIJG",
|
||||
"POST": "POSTE",
|
||||
"PATCH": "BEKIJK",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "VERWIJDEREN",
|
||||
"HEAD": "HOOFD",
|
||||
"New Task": "Nieuwe taak",
|
||||
"Task Updated": "Taak bijgewerkt",
|
||||
"Triggers when a new task is created.": "Triggert wanneer een nieuwe taak is aangemaakt.",
|
||||
"Triggers when a task is updated.": "Triggert wanneer een taak is bijgewerkt."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "Você pode obter seu token de API navegando até [Configurações do Desenvolvedor](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Criar tarefa",
|
||||
"Update Task": "Atualizar Tarefa",
|
||||
"Get Task": "Obter Tarefa",
|
||||
"List Tasks": "Listar Tarefas",
|
||||
"Delete Task": "Excluir Tarefa",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"Creates a new task in Fragment.": "Cria uma nova tarefa em Fragmento.",
|
||||
"Updates an existing task.": "Atualiza uma tarefa existente.",
|
||||
"Retrieves details of a specific task.": "Recupera detalhes de uma tarefa específica.",
|
||||
"Retrieves a list of tasks from.": "Obtem uma lista de tarefas.",
|
||||
"Deletes an existing task.": "Exclui uma tarefa existente.",
|
||||
"Make a custom API call to any Fragment endpoint": "Faça uma chamada de API personalizada para qualquer ponto de extremidade de fragmento",
|
||||
"Title": "Título",
|
||||
"URL": "URL:",
|
||||
"Due Date": "Data de vencimento",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Etiquetas",
|
||||
"Custom Fields": "Campos Personalizados",
|
||||
"Task UID": "UID da tarefa",
|
||||
"Status": "Estado",
|
||||
"Limit": "Limitar",
|
||||
"Method": "Método",
|
||||
"Headers": "Cabeçalhos",
|
||||
"Query Parameters": "Parâmetros da consulta",
|
||||
"Body": "Conteúdo",
|
||||
"Response is Binary ?": "A resposta é binária ?",
|
||||
"No Error on Failure": "Nenhum erro no Failure",
|
||||
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
||||
"The title of the task": "O título da tarefa",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "Uma URL associada à tarefa (por exemplo, link para um ticket ou recurso)",
|
||||
"When the task is due": "Quando a tarefa expira",
|
||||
"Email of the person to assign this task to.": "E-mail da pessoa para atribuir esta tarefa.",
|
||||
"Tags to categorize the task": "Tags para categorizar a tarefa",
|
||||
"Additional custom fields for the task": "Campos personalizados adicionais para a tarefa",
|
||||
"The unique identifier of the task to update": "O identificador exclusivo da tarefa a ser atualizada",
|
||||
"The updated title of the task": "O título atualizado da tarefa",
|
||||
"The updated URL for the task": "O URL atualizado para a tarefa",
|
||||
"The updated due date": "Data de vencimento atualizada",
|
||||
"The status of the task": "O status da tarefa",
|
||||
"Email of the person to assign this task to": "E-mail da pessoa para atribuir esta tarefa a",
|
||||
"Updated tags for the task": "Tags atualizadas para a tarefa",
|
||||
"Updated custom fields": "Campos personalizados atualizados",
|
||||
"The unique identifier of the task to retrieve": "O identificador exclusivo da tarefa para recuperar",
|
||||
"Filter tasks by status": "Filtrar tarefas por status",
|
||||
"Filter tasks by assignee email or ID": "Filtrar tarefas por e-mail atribuído ou ID",
|
||||
"Maximum number of tasks to return (default: 50)": "Número máximo de tarefas a retornar (padrão: 50)",
|
||||
"The unique identifier of the task to delete": "O identificador exclusivo da tarefa para excluir",
|
||||
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
|
||||
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "INICIADO",
|
||||
"DONE": "Concluído",
|
||||
"GET": "OBTER",
|
||||
"POST": "POSTAR",
|
||||
"PATCH": "COMPRAR",
|
||||
"PUT": "COLOCAR",
|
||||
"DELETE": "EXCLUIR",
|
||||
"HEAD": "CABEÇA",
|
||||
"New Task": "Nova tarefa",
|
||||
"Task Updated": "Tarefa atualizada",
|
||||
"Triggers when a new task is created.": "Dispara quando uma nova tarefa é criada.",
|
||||
"Triggers when a task is updated.": "Dispara quando uma tarefa é atualizada."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Create Task",
|
||||
"Update Task": "Update Task",
|
||||
"Get Task": "Get Task",
|
||||
"List Tasks": "List Tasks",
|
||||
"Delete Task": "Delete Task",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Creates a new task in Fragment.": "Creates a new task in Fragment.",
|
||||
"Updates an existing task.": "Updates an existing task.",
|
||||
"Retrieves details of a specific task.": "Retrieves details of a specific task.",
|
||||
"Retrieves a list of tasks from.": "Retrieves a list of tasks from.",
|
||||
"Deletes an existing task.": "Deletes an existing task.",
|
||||
"Make a custom API call to any Fragment endpoint": "Make a custom API call to any Fragment endpoint",
|
||||
"Title": "Title",
|
||||
"URL": "URL",
|
||||
"Due Date": "Due Date",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "Tags",
|
||||
"Custom Fields": "Custom Fields",
|
||||
"Task UID": "Task UID",
|
||||
"Status": "Status",
|
||||
"Limit": "Limit",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"The title of the task": "The title of the task",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "A URL associated with the task (e.g., link to a ticket or resource)",
|
||||
"When the task is due": "When the task is due",
|
||||
"Email of the person to assign this task to.": "Email of the person to assign this task to.",
|
||||
"Tags to categorize the task": "Tags to categorize the task",
|
||||
"Additional custom fields for the task": "Additional custom fields for the task",
|
||||
"The unique identifier of the task to update": "The unique identifier of the task to update",
|
||||
"The updated title of the task": "The updated title of the task",
|
||||
"The updated URL for the task": "The updated URL for the task",
|
||||
"The updated due date": "The updated due date",
|
||||
"The status of the task": "The status of the task",
|
||||
"Email of the person to assign this task to": "Email of the person to assign this task to",
|
||||
"Updated tags for the task": "Updated tags for the task",
|
||||
"Updated custom fields": "Updated custom fields",
|
||||
"The unique identifier of the task to retrieve": "The unique identifier of the task to retrieve",
|
||||
"Filter tasks by status": "Filter tasks by status",
|
||||
"Filter tasks by assignee email or ID": "Filter tasks by assignee email or ID",
|
||||
"Maximum number of tasks to return (default: 50)": "Maximum number of tasks to return (default: 50)",
|
||||
"The unique identifier of the task to delete": "The unique identifier of the task to delete",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "STARTED",
|
||||
"DONE": "DONE",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD",
|
||||
"New Task": "New Task",
|
||||
"Task Updated": "Task Updated",
|
||||
"Triggers when a new task is created.": "Triggers when a new task is created.",
|
||||
"Triggers when a task is updated.": "Triggers when a task is updated."
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).": "You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).",
|
||||
"Create Task": "Create Task",
|
||||
"Update Task": "Update Task",
|
||||
"Get Task": "Get Task",
|
||||
"List Tasks": "List Tasks",
|
||||
"Delete Task": "Delete Task",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"Creates a new task in Fragment.": "Creates a new task in Fragment.",
|
||||
"Updates an existing task.": "Updates an existing task.",
|
||||
"Retrieves details of a specific task.": "Retrieves details of a specific task.",
|
||||
"Retrieves a list of tasks from.": "Retrieves a list of tasks from.",
|
||||
"Deletes an existing task.": "Deletes an existing task.",
|
||||
"Make a custom API call to any Fragment endpoint": "Make a custom API call to any Fragment endpoint",
|
||||
"Title": "标题",
|
||||
"URL": "URL",
|
||||
"Due Date": "Due Date",
|
||||
"Assignee": "Assignee",
|
||||
"Tags": "标签",
|
||||
"Custom Fields": "Custom Fields",
|
||||
"Task UID": "Task UID",
|
||||
"Status": "状态",
|
||||
"Limit": "Limit",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"The title of the task": "The title of the task",
|
||||
"A URL associated with the task (e.g., link to a ticket or resource)": "A URL associated with the task (e.g., link to a ticket or resource)",
|
||||
"When the task is due": "When the task is due",
|
||||
"Email of the person to assign this task to.": "Email of the person to assign this task to.",
|
||||
"Tags to categorize the task": "Tags to categorize the task",
|
||||
"Additional custom fields for the task": "Additional custom fields for the task",
|
||||
"The unique identifier of the task to update": "The unique identifier of the task to update",
|
||||
"The updated title of the task": "The updated title of the task",
|
||||
"The updated URL for the task": "The updated URL for the task",
|
||||
"The updated due date": "The updated due date",
|
||||
"The status of the task": "The status of the task",
|
||||
"Email of the person to assign this task to": "Email of the person to assign this task to",
|
||||
"Updated tags for the task": "Updated tags for the task",
|
||||
"Updated custom fields": "Updated custom fields",
|
||||
"The unique identifier of the task to retrieve": "The unique identifier of the task to retrieve",
|
||||
"Filter tasks by status": "Filter tasks by status",
|
||||
"Filter tasks by assignee email or ID": "Filter tasks by assignee email or ID",
|
||||
"Maximum number of tasks to return (default: 50)": "Maximum number of tasks to return (default: 50)",
|
||||
"The unique identifier of the task to delete": "The unique identifier of the task to delete",
|
||||
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"TODO": "TODO",
|
||||
"STARTED": "STARTED",
|
||||
"DONE": "DONE",
|
||||
"GET": "获取",
|
||||
"POST": "帖子",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "弹出",
|
||||
"DELETE": "删除",
|
||||
"HEAD": "黑色",
|
||||
"New Task": "New Task",
|
||||
"Task Updated": "Task Updated",
|
||||
"Triggers when a new task is created.": "Triggers when a new task is created.",
|
||||
"Triggers when a task is updated.": "Triggers when a task is updated."
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { createPiece } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from './lib/common';
|
||||
import { createTask } from './lib/actions/create-task';
|
||||
import { updateTask } from './lib/actions/update-task';
|
||||
import { getTask } from './lib/actions/get-task';
|
||||
import { listTasks } from './lib/actions/list-tasks';
|
||||
import { deleteTask } from './lib/actions/delete-task';
|
||||
import { customApiCall } from './lib/actions/custom-api-call';
|
||||
import { newTaskTrigger } from './lib/triggers/new-task';
|
||||
import { taskUpdatedTrigger } from './lib/triggers/task-updated';
|
||||
|
||||
export const fragment = createPiece({
|
||||
displayName: 'Fragment',
|
||||
auth: fragmentAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/fragment.png',
|
||||
authors: ["meenulekha-premakumar"],
|
||||
actions: [
|
||||
createTask,
|
||||
updateTask,
|
||||
getTask,
|
||||
listTasks,
|
||||
deleteTask,
|
||||
customApiCall,
|
||||
],
|
||||
triggers: [
|
||||
newTaskTrigger,
|
||||
taskUpdatedTrigger,
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,71 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const createTask = createAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'create_task',
|
||||
displayName: 'Create Task',
|
||||
description: 'Creates a new task in Fragment.',
|
||||
props: {
|
||||
title: Property.ShortText({
|
||||
displayName: 'Title',
|
||||
description: 'The title of the task',
|
||||
required: true,
|
||||
}),
|
||||
url: Property.ShortText({
|
||||
displayName: 'URL',
|
||||
description: 'A URL associated with the task (e.g., link to a ticket or resource)',
|
||||
required: false,
|
||||
}),
|
||||
due_at: Property.DateTime({
|
||||
displayName: 'Due Date',
|
||||
description: 'When the task is due',
|
||||
required: false,
|
||||
}),
|
||||
assignee: Property.ShortText({
|
||||
displayName: 'Assignee',
|
||||
description: 'Email of the person to assign this task to.',
|
||||
required: false,
|
||||
}),
|
||||
tags: Property.Array({
|
||||
displayName: 'Tags',
|
||||
description: 'Tags to categorize the task',
|
||||
required: false,
|
||||
}),
|
||||
custom_fields: Property.Object({
|
||||
displayName: 'Custom Fields',
|
||||
description: 'Additional custom fields for the task',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const fields: Record<string, any> = {
|
||||
title: context.propsValue.title,
|
||||
...(context.propsValue.custom_fields ?? {}),
|
||||
};
|
||||
|
||||
const taskPayload: Record<string, any> = {
|
||||
fields,
|
||||
};
|
||||
|
||||
if (context.propsValue.url) {
|
||||
fields['url'] = context.propsValue.url;
|
||||
}
|
||||
if (context.propsValue.due_at) {
|
||||
taskPayload['due_at'] = context.propsValue.due_at;
|
||||
}
|
||||
|
||||
if (context.propsValue.assignee) {
|
||||
taskPayload['assignee_email'] = context.propsValue.assignee;
|
||||
}
|
||||
if (context.propsValue.tags && Array.isArray(context.propsValue.tags)) {
|
||||
taskPayload['tags'] = context.propsValue.tags;
|
||||
}
|
||||
|
||||
const response = await fragmentClient.makeRequest(HttpMethod.POST, '/tasks', context.auth, taskPayload);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
|
||||
export const customApiCall = createCustomApiCallAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'custom_api_call',
|
||||
displayName: 'Custom API Call',
|
||||
description: 'Make a custom API call to any Fragment endpoint',
|
||||
baseUrl: () => 'https://api.onfragment.com/api/v1',
|
||||
authMapping: async (auth) => ({
|
||||
'Authorization': `Bearer ${auth}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const deleteTask = createAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'delete_task',
|
||||
displayName: 'Delete Task',
|
||||
description: 'Deletes an existing task.',
|
||||
props: {
|
||||
task_uid: Property.ShortText({
|
||||
displayName: 'Task UID',
|
||||
description: 'The unique identifier of the task to delete',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const response = await fragmentClient.makeRequest(
|
||||
HttpMethod.DELETE,
|
||||
`/tasks/${context.propsValue.task_uid}`,
|
||||
context.auth
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const getTask = createAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'get_task',
|
||||
displayName: 'Get Task',
|
||||
description: 'Retrieves details of a specific task.',
|
||||
props: {
|
||||
task_uid: Property.ShortText({
|
||||
displayName: 'Task UID',
|
||||
description: 'The unique identifier of the task to retrieve',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const response = await fragmentClient.makeRequest(
|
||||
HttpMethod.GET,
|
||||
`/tasks/${context.propsValue.task_uid}`,
|
||||
context.auth
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient } from '../common/client';
|
||||
import { HttpMethod, QueryParams } from '@activepieces/pieces-common';
|
||||
|
||||
export const listTasks = createAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'list_tasks',
|
||||
displayName: 'List Tasks',
|
||||
description: 'Retrieves a list of tasks from.',
|
||||
props: {
|
||||
status: Property.StaticDropdown({
|
||||
displayName: 'Status',
|
||||
description: 'Filter tasks by status',
|
||||
required: false,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'TODO', value: 'TODO' },
|
||||
{ label: 'STARTED', value: 'STARTED' },
|
||||
{ label: 'DONE', value: 'DONE' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
assignee: Property.ShortText({
|
||||
displayName: 'Assignee',
|
||||
description: 'Filter tasks by assignee email or ID',
|
||||
required: false,
|
||||
}),
|
||||
limit: Property.Number({
|
||||
displayName: 'Limit',
|
||||
description: 'Maximum number of tasks to return (default: 50)',
|
||||
required: false,
|
||||
defaultValue: 50,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const queryParams: QueryParams = {};
|
||||
|
||||
if (context.propsValue.status) {
|
||||
queryParams['status'] = context.propsValue.status;
|
||||
}
|
||||
if (context.propsValue.assignee) {
|
||||
queryParams['assignee_uid'] = context.propsValue.assignee;
|
||||
}
|
||||
if (context.propsValue.limit !== undefined) {
|
||||
queryParams['limit'] = context.propsValue.limit.toString();
|
||||
}
|
||||
|
||||
const response = await fragmentClient.makeRequest(
|
||||
HttpMethod.GET,
|
||||
'/tasks',
|
||||
context.auth,
|
||||
undefined,
|
||||
queryParams
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient } from '../common/client';
|
||||
import { HttpMethod } from '@activepieces/pieces-common';
|
||||
import { isEmpty } from '@activepieces/shared';
|
||||
|
||||
export const updateTask = createAction({
|
||||
auth: fragmentAuth,
|
||||
name: 'update_task',
|
||||
displayName: 'Update Task',
|
||||
description: 'Updates an existing task.',
|
||||
props: {
|
||||
task_uid: Property.ShortText({
|
||||
displayName: 'Task UID',
|
||||
description: 'The unique identifier of the task to update',
|
||||
required: true,
|
||||
}),
|
||||
title: Property.ShortText({
|
||||
displayName: 'Title',
|
||||
description: 'The updated title of the task',
|
||||
required: false,
|
||||
}),
|
||||
url: Property.ShortText({
|
||||
displayName: 'URL',
|
||||
description: 'The updated URL for the task',
|
||||
required: false,
|
||||
}),
|
||||
due_at: Property.DateTime({
|
||||
displayName: 'Due Date',
|
||||
description: 'The updated due date',
|
||||
required: false,
|
||||
}),
|
||||
status: Property.StaticDropdown({
|
||||
displayName: 'Status',
|
||||
description: 'The status of the task',
|
||||
required: false,
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'TODO', value: 'TODO' },
|
||||
{ label: 'STARTED', value: 'STARTED' },
|
||||
{ label: 'DONE', value: 'DONE' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
assignee: Property.ShortText({
|
||||
displayName: 'Assignee',
|
||||
description: 'Email of the person to assign this task to',
|
||||
required: false,
|
||||
}),
|
||||
tags: Property.Array({
|
||||
displayName: 'Tags',
|
||||
description: 'Updated tags for the task',
|
||||
required: false,
|
||||
}),
|
||||
custom_fields: Property.Object({
|
||||
displayName: 'Custom Fields',
|
||||
description: 'Updated custom fields',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const fields: Record<string, any> = {
|
||||
...(context.propsValue.custom_fields ?? {}),
|
||||
};
|
||||
const taskPayload: Record<string, any> = {};
|
||||
|
||||
if (context.propsValue.title) {
|
||||
fields['title'] = context.propsValue.title;
|
||||
}
|
||||
if (context.propsValue.url) {
|
||||
fields['url'] = context.propsValue.url;
|
||||
}
|
||||
if (context.propsValue.due_at) {
|
||||
taskPayload['due_at'] = context.propsValue.due_at;
|
||||
}
|
||||
if (context.propsValue.status) {
|
||||
taskPayload['status'] = context.propsValue.status;
|
||||
}
|
||||
if (context.propsValue.assignee) {
|
||||
taskPayload['assignee_email'] = context.propsValue.assignee;
|
||||
}
|
||||
if (context.propsValue.tags && Array.isArray(context.propsValue.tags)) {
|
||||
taskPayload['tags'] = context.propsValue.tags;
|
||||
}
|
||||
|
||||
if(!isEmpty(fields)) taskPayload['fields'] = fields;
|
||||
|
||||
const response = await fragmentClient.makeRequest(
|
||||
HttpMethod.PATCH,
|
||||
`/tasks/${context.propsValue.task_uid}`,
|
||||
context.auth,
|
||||
taskPayload
|
||||
);
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const fragmentAuth = PieceAuth.SecretText({
|
||||
displayName: 'API Token',
|
||||
description: `You can obtain your API token by navigating to [Developer Settings](https://app.onfragment.com/settings/account/developers).`,
|
||||
required: true,
|
||||
validate: async ({ auth }) => {
|
||||
try {
|
||||
// Validate by attempting to list tasks
|
||||
await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: 'https://api.onfragment.com/api/v1/tasks',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${auth}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
queryParams: {
|
||||
limit: '1',
|
||||
},
|
||||
});
|
||||
return {
|
||||
valid: true,
|
||||
};
|
||||
} catch (error: any) {
|
||||
return {
|
||||
valid: false,
|
||||
error: 'Invalid API token. Please check your API token and try again.',
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import { httpClient, HttpMethod, HttpMessageBody } from '@activepieces/pieces-common';
|
||||
import { AppConnectionValueForAuthProperty } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from './auth';
|
||||
|
||||
export const BASE_URL = 'https://api.onfragment.com/api/v1';
|
||||
|
||||
export interface FragmentTask {
|
||||
uid?: string;
|
||||
title: string;
|
||||
url?: string;
|
||||
due_at?: string;
|
||||
priority?: 'low' | 'medium' | 'high' | 'urgent';
|
||||
status?: 'open' | 'completed' | 'cancelled';
|
||||
assignee?: string;
|
||||
tags?: string[];
|
||||
custom_fields?: Record<string, any>;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export const fragmentClient = {
|
||||
async makeRequest<T extends HttpMessageBody = any>(
|
||||
method: HttpMethod,
|
||||
path: string,
|
||||
apiKey: AppConnectionValueForAuthProperty<typeof fragmentAuth>,
|
||||
body?: any,
|
||||
queryParams?: Record<string, string>
|
||||
): Promise<T> {
|
||||
const url = `${BASE_URL}${path}`;
|
||||
|
||||
try {
|
||||
const response = await httpClient.sendRequest<T>({
|
||||
method,
|
||||
url,
|
||||
headers: {
|
||||
'Authorization': `Bearer ${apiKey.secret_text}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body,
|
||||
queryParams,
|
||||
});
|
||||
|
||||
return response.body;
|
||||
} catch (error: any) {
|
||||
const errorMessage = error.response?.body?.message || error.message || 'Unknown error occurred';
|
||||
throw new Error(`Fragment API Error: ${errorMessage}`);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './auth';
|
||||
export * from './client';
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
import { AppConnectionValueForAuthProperty, createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient, FragmentTask } from '../common/client';
|
||||
import { HttpMethod, QueryParams } from '@activepieces/pieces-common';
|
||||
import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const polling: Polling<AppConnectionValueForAuthProperty<typeof fragmentAuth>, Record<string, never>> = {
|
||||
strategy: DedupeStrategy.TIMEBASED,
|
||||
items: async ({ auth, lastFetchEpochMS }) => {
|
||||
const isTest = lastFetchEpochMS > 0;
|
||||
|
||||
const qs: QueryParams = {
|
||||
order_by: 'created_at',
|
||||
limit: isTest ? '10' : '100',
|
||||
};
|
||||
|
||||
if (!isTest) {
|
||||
qs['created_at_after'] = dayjs(lastFetchEpochMS).toISOString();
|
||||
}
|
||||
|
||||
const response = await fragmentClient.makeRequest<{ items: FragmentTask[] }>(
|
||||
HttpMethod.GET,
|
||||
'/tasks',
|
||||
auth,
|
||||
undefined,
|
||||
qs,
|
||||
);
|
||||
|
||||
const items = response.items.map((task) => ({
|
||||
epochMilliSeconds: dayjs(task.created_at).valueOf(),
|
||||
data: task,
|
||||
}));
|
||||
|
||||
return items;
|
||||
},
|
||||
};
|
||||
|
||||
export const newTaskTrigger = createTrigger({
|
||||
auth: fragmentAuth,
|
||||
name: 'new_task',
|
||||
displayName: 'New Task',
|
||||
description: 'Triggers when a new task is created.',
|
||||
props: {},
|
||||
type: TriggerStrategy.POLLING,
|
||||
|
||||
async onEnable(context) {
|
||||
await pollingHelper.onEnable(polling, {
|
||||
auth: context.auth,
|
||||
store: context.store,
|
||||
propsValue: context.propsValue,
|
||||
});
|
||||
},
|
||||
async onDisable(context) {
|
||||
await pollingHelper.onDisable(polling, {
|
||||
auth: context.auth,
|
||||
store: context.store,
|
||||
propsValue: context.propsValue,
|
||||
});
|
||||
},
|
||||
async test(context) {
|
||||
return await pollingHelper.test(polling, context);
|
||||
},
|
||||
async run(context) {
|
||||
return await pollingHelper.poll(polling, context);
|
||||
},
|
||||
sampleData: {
|
||||
uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
archived: true,
|
||||
status: 'TODO',
|
||||
legacy_data: {},
|
||||
skills: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
|
||||
queue_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
assignee_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
participants: {},
|
||||
case_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
parent_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
due_at: '2023-11-07T05:31:56Z',
|
||||
snooze_expires_at: '2023-11-07T05:31:56Z',
|
||||
fields: {},
|
||||
metadata_form_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
form_data: {},
|
||||
form_type: '<string>',
|
||||
assigned_at: '2023-11-07T05:31:56Z',
|
||||
started_at: '2023-11-07T05:31:56Z',
|
||||
done_at: '2023-11-07T05:31:56Z',
|
||||
created_at: '2023-11-07T05:31:56Z',
|
||||
updated_at: '2023-11-07T05:31:56Z',
|
||||
assignee_updated_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
queue_updated_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
is_assigned_player: true,
|
||||
internal_created_at: '2023-11-07T05:31:56Z',
|
||||
internal_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_created_at: '2023-11-07T05:31:56Z',
|
||||
external_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_status: 'TODO',
|
||||
external_status_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_assignee_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
queue_time: 123,
|
||||
queue_time_business: 123,
|
||||
work_time: 123,
|
||||
work_time_business: 123,
|
||||
incremental_work_time: 123,
|
||||
incremental_work_time_business: 123,
|
||||
resolution_time: 123,
|
||||
resolution_time_business: 123,
|
||||
num_children: 123,
|
||||
num_children_done: 123,
|
||||
sla_breach_at: '2023-11-07T05:31:56Z',
|
||||
sla_breach_business_at: '2023-11-07T05:31:56Z',
|
||||
wait_time: 123,
|
||||
wait_time_business: 123,
|
||||
review_status: '<string>',
|
||||
task_type: '<string>',
|
||||
played_at: '2023-11-07T05:31:56Z',
|
||||
assignee: {
|
||||
uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
archived: true,
|
||||
role: 'super_admin',
|
||||
email: 'jsmith@example.com',
|
||||
first_name: '<string>',
|
||||
last_name: '<string>',
|
||||
skills: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
|
||||
legacy_data: {},
|
||||
created_at: '2023-11-07T05:31:56Z',
|
||||
updated_at: '2023-11-07T05:31:56Z',
|
||||
is_registered: true,
|
||||
},
|
||||
parent: {},
|
||||
children: [{}],
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,132 @@
|
||||
import { AppConnectionValueForAuthProperty, createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { fragmentAuth } from '../common/auth';
|
||||
import { fragmentClient, FragmentTask } from '../common/client';
|
||||
import { HttpMethod, QueryParams } from '@activepieces/pieces-common';
|
||||
import { DedupeStrategy, Polling, pollingHelper } from '@activepieces/pieces-common';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const polling: Polling<AppConnectionValueForAuthProperty<typeof fragmentAuth>, Record<string, never>> = {
|
||||
strategy: DedupeStrategy.TIMEBASED,
|
||||
items: async ({ auth, lastFetchEpochMS }) => {
|
||||
const isTest = lastFetchEpochMS > 0;
|
||||
|
||||
const qs: QueryParams = {
|
||||
order_by: 'updated_at',
|
||||
limit: isTest ? '10' : '100',
|
||||
};
|
||||
|
||||
if (!isTest) {
|
||||
qs['updated_at_after'] = dayjs(lastFetchEpochMS).toISOString();
|
||||
}
|
||||
|
||||
const response = await fragmentClient.makeRequest<{ items: FragmentTask[] }>(
|
||||
HttpMethod.GET,
|
||||
'/tasks',
|
||||
auth,
|
||||
undefined,
|
||||
qs,
|
||||
);
|
||||
|
||||
const items = response.items.map((task) => ({
|
||||
epochMilliSeconds: dayjs(task.updated_at).valueOf(),
|
||||
data: task,
|
||||
}));
|
||||
|
||||
return items;
|
||||
},
|
||||
};
|
||||
|
||||
export const taskUpdatedTrigger = createTrigger({
|
||||
auth: fragmentAuth,
|
||||
name: 'task_updated',
|
||||
displayName: 'Task Updated',
|
||||
description: 'Triggers when a task is updated.',
|
||||
props: {},
|
||||
type: TriggerStrategy.POLLING,
|
||||
|
||||
async onEnable(context) {
|
||||
await pollingHelper.onEnable(polling, {
|
||||
auth: context.auth,
|
||||
store: context.store,
|
||||
propsValue: context.propsValue,
|
||||
});
|
||||
},
|
||||
async onDisable(context) {
|
||||
await pollingHelper.onDisable(polling, {
|
||||
auth: context.auth,
|
||||
store: context.store,
|
||||
propsValue: context.propsValue,
|
||||
});
|
||||
},
|
||||
async test(context) {
|
||||
return await pollingHelper.test(polling, context);
|
||||
},
|
||||
async run(context) {
|
||||
return await pollingHelper.poll(polling, context);
|
||||
},
|
||||
sampleData: {
|
||||
uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
archived: true,
|
||||
status: 'TODO',
|
||||
legacy_data: {},
|
||||
skills: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
|
||||
queue_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
assignee_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
participants: {},
|
||||
case_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
parent_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
due_at: '2023-11-07T05:31:56Z',
|
||||
snooze_expires_at: '2023-11-07T05:31:56Z',
|
||||
fields: {},
|
||||
metadata_form_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
form_data: {},
|
||||
form_type: '<string>',
|
||||
assigned_at: '2023-11-07T05:31:56Z',
|
||||
started_at: '2023-11-07T05:31:56Z',
|
||||
done_at: '2023-11-07T05:31:56Z',
|
||||
created_at: '2023-11-07T05:31:56Z',
|
||||
updated_at: '2023-11-07T05:31:56Z',
|
||||
assignee_updated_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
queue_updated_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
is_assigned_player: true,
|
||||
internal_created_at: '2023-11-07T05:31:56Z',
|
||||
internal_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_created_at: '2023-11-07T05:31:56Z',
|
||||
external_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_status: 'TODO',
|
||||
external_status_updated_at: '2023-11-07T05:31:56Z',
|
||||
external_assignee_uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
queue_time: 123,
|
||||
queue_time_business: 123,
|
||||
work_time: 123,
|
||||
work_time_business: 123,
|
||||
incremental_work_time: 123,
|
||||
incremental_work_time_business: 123,
|
||||
resolution_time: 123,
|
||||
resolution_time_business: 123,
|
||||
num_children: 123,
|
||||
num_children_done: 123,
|
||||
sla_breach_at: '2023-11-07T05:31:56Z',
|
||||
sla_breach_business_at: '2023-11-07T05:31:56Z',
|
||||
wait_time: 123,
|
||||
wait_time_business: 123,
|
||||
review_status: '<string>',
|
||||
task_type: '<string>',
|
||||
played_at: '2023-11-07T05:31:56Z',
|
||||
assignee: {
|
||||
uid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
|
||||
archived: true,
|
||||
role: 'super_admin',
|
||||
email: 'jsmith@example.com',
|
||||
first_name: '<string>',
|
||||
last_name: '<string>',
|
||||
skills: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
|
||||
legacy_data: {},
|
||||
created_at: '2023-11-07T05:31:56Z',
|
||||
updated_at: '2023-11-07T05:31:56Z',
|
||||
is_registered: true,
|
||||
},
|
||||
parent: {},
|
||||
children: [{}],
|
||||
},
|
||||
});
|
||||
@@ -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