Add Activepieces integration for workflow automation

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

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

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

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Aufgabe erstellen",
"Update Task": "Aufgabe aktualisieren",
"Get Task": "Aufgabe abrufen",
"Delete Task": "Aufgabe löschen",
"Complete Task": "Complete Task",
"Find Task": "Aufgabe finden",
"Get Task List": "Aufgabenliste abrufen",
"Custom API Call": "Eigener API-Aufruf",
"Creates a new in a specific list.": "Erstellt ein neues in einer bestimmten Liste.",
"Update an existing task.": "Bestehende Aufgabe aktualisieren.",
"Retrieves the details of a specific task.": "Ruft die Details einer bestimmten Aufgabe ab.",
"Deletes an existing task.": "Löscht eine existierende Aufgabe.",
"Marks an existing task as completed.": "Markiert eine existierende Aufgabe als abgeschlossen.",
"Finds tasks in a specific project by their title.": "Findet nach dem Titel Aufgaben in einem bestimmten Projekt.",
"Retrieves the details of a specific task list by ID.": "Ruft die Details einer bestimmten Aufgabenliste per ID ab.",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"List": "Liste",
"Task Title": "Aufgabentitel",
"Task Content": "Aufgabeninhalt",
"Description (Checklist)": "Beschreibung (Checklist)",
"Start Date": "Startdatum",
"Due Date": "Fälligkeitsdatum",
"Priority": "Priorität",
"Task ID": "Task ID",
"Title": "Titel",
"Content": "Inhalt",
"Match Type": "Match-Typ",
"List ID": "Listen-ID",
"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 list to create the task in.": "Die Liste, in der die Aufgabe erstellt wird.",
"Description of the checklist, often used with subtasks (items).": "Beschreibung der Checkliste, die oft mit Unteraufgaben (Einträge) verwendet wird.",
"The list to update the task in.": "Die Liste, in der die Aufgabe aktualisiert wird.",
"The ID of the task to update.": "Die ID der zu aktualisierenden Aufgabe.",
"New description of the checklist items. Replaces existing.": "Neue Beschreibung der Checklisten-Elemente. Ersetzt existierende Elemente.",
"The list the task belongs to.": "Die Liste, zu der die Aufgabe gehört.",
"The ID of the task to retrieve.": "Die ID der Aufgabe, die abgerufen werden soll.",
"The ID of the task to delete.": "Die ID der zu löschenden Aufgabe.",
"The ID of the task to complete.": "Die ID der zu erledigenden Aufgabe.",
"The list to search within.": "Die Liste nach der gesucht werden soll.",
"Select how the title should be matched.": "Wählen Sie, wie der Titel übereinstimmen soll.",
"Select the list to retrieve details for.": "Wählen Sie die Liste aus, für die Details abgerufen werden sollen.",
"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..",
"None": "Keine",
"Low": "Niedrig",
"Medium": "Mittel",
"High": "Hoch",
"Contains (case-insensitive)": "Enthält (Groß- und Kleinschreibung)",
"Exact Match (case-insensitive)": "Genaue Übereinstimmung (Groß- und Kleinschreibung)",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD",
"New Task Created": "Neue Aufgabe erstellt",
"Triggers when a new task is created in a selected project.": "Wird ausgelöst, wenn eine neue Aufgabe in einem ausgewählten Projekt erstellt wird.",
"Project": "Projekt",
"The project to monitor for new tasks.": "Das zu überwachende Projekt für neue Aufgaben."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Crear tarea",
"Update Task": "Actualizar tarea",
"Get Task": "Obtener tarea",
"Delete Task": "Eliminar tarea",
"Complete Task": "Complete Task",
"Find Task": "Buscar tarea",
"Get Task List": "Obtener lista de tareas",
"Custom API Call": "Llamada API personalizada",
"Creates a new in a specific list.": "Crea un nuevo en una lista específica.",
"Update an existing task.": "Actualizar una tarea existente.",
"Retrieves the details of a specific task.": "Recuperar los detalles de una tarea específica.",
"Deletes an existing task.": "Elimina una tarea existente.",
"Marks an existing task as completed.": "Marca una tarea existente como completada.",
"Finds tasks in a specific project by their title.": "Encuentra tareas en un proyecto específico por su título.",
"Retrieves the details of a specific task list by ID.": "Obtiene los detalles de una lista de tareas específica por ID.",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"List": "Lista",
"Task Title": "Título de la tarea",
"Task Content": "Contenido de la tarea",
"Description (Checklist)": "Descripción (Checklist)",
"Start Date": "Fecha de inicio",
"Due Date": "Fecha de fin",
"Priority": "Prioridad",
"Task ID": "Task ID",
"Title": "Título",
"Content": "Contenido",
"Match Type": "Tipo de partida",
"List ID": "ID de lista",
"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 list to create the task in.": "La lista en la que crear la tarea.",
"Description of the checklist, often used with subtasks (items).": "Descripción de la lista de verificación, a menudo usada con subtareas (elementos).",
"The list to update the task in.": "La lista en la que actualizar la tarea.",
"The ID of the task to update.": "El ID de la tarea a actualizar.",
"New description of the checklist items. Replaces existing.": "Nueva descripción de los elementos de la lista de verificación. Reemplaza la existente.",
"The list the task belongs to.": "La lista a la que pertenece la tarea.",
"The ID of the task to retrieve.": "El ID de la tarea a recuperar.",
"The ID of the task to delete.": "El ID de la tarea a eliminar.",
"The ID of the task to complete.": "El ID de la tarea a completar.",
"The list to search within.": "La lista en la que buscar dentro.",
"Select how the title should be matched.": "Seleccione cómo debe coincidir el título.",
"Select the list to retrieve details for.": "Seleccione la lista para recuperar los detalles.",
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDFs, imágenes, etc.",
"None": "Ninguna",
"Low": "Baja",
"Medium": "Medio",
"High": "Alta",
"Contains (case-insensitive)": "Contiene (mayúsculas y minúsculas)",
"Exact Match (case-insensitive)": "Partida exacta (mayúsculas y minúsculas)",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO",
"New Task Created": "Nueva tarea creada",
"Triggers when a new task is created in a selected project.": "Se activa cuando se crea una nueva tarea en un proyecto seleccionado.",
"Project": "Projekt",
"The project to monitor for new tasks.": "El proyecto a monitorear para nuevas tareas."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Créer une tâche",
"Update Task": "Tâche de mise à jour",
"Get Task": "Obtenir une tâche",
"Delete Task": "Supprimer la tâche",
"Complete Task": "Complete Task",
"Find Task": "Trouver une tâche",
"Get Task List": "Obtenir la liste des tâches",
"Custom API Call": "Appel d'API personnalisé",
"Creates a new in a specific list.": "Crée un nouveau dans une liste spécifique.",
"Update an existing task.": "Mettre à jour une tâche existante.",
"Retrieves the details of a specific task.": "Récupère les détails d'une tâche spécifique.",
"Deletes an existing task.": "Supprime une tâche existante.",
"Marks an existing task as completed.": "Marque une tâche existante comme terminée.",
"Finds tasks in a specific project by their title.": "Trouve des tâches dans un projet spécifique par leur titre.",
"Retrieves the details of a specific task list by ID.": "Récupère les détails d'une liste de tâches spécifique par ID.",
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
"List": "Liste",
"Task Title": "Titre de la tâche",
"Task Content": "Contenu de la tâche",
"Description (Checklist)": "Description (Liste de contrôle)",
"Start Date": "Date de début",
"Due Date": "Date de fin",
"Priority": "Priorité",
"Task ID": "Task ID",
"Title": "Titre de la page",
"Content": "Contenus",
"Match Type": "Type de correspondance",
"List ID": "ID de la liste",
"Method": "Méthode",
"Headers": "En-têtes",
"Query Parameters": "Paramètres de requête",
"Body": "Corps",
"Response is Binary ?": "La réponse est Binaire ?",
"No Error on Failure": "Aucune erreur en cas d'échec",
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
"The list to create the task in.": "La liste dans laquelle créer la tâche.",
"Description of the checklist, often used with subtasks (items).": "Description de la liste de vérification, souvent utilisée avec des sous-tâches (éléments).",
"The list to update the task in.": "La liste de mise à jour de la tâche.",
"The ID of the task to update.": "L'ID de la tâche à mettre à jour.",
"New description of the checklist items. Replaces existing.": "Nouvelle description des éléments de la liste de contrôle. Remplace les éléments existants.",
"The list the task belongs to.": "La liste à laquelle appartient la tâche.",
"The ID of the task to retrieve.": "L'ID de la tâche à récupérer.",
"The ID of the task to delete.": "L'ID de la tâche à supprimer.",
"The ID of the task to complete.": "L'ID de la tâche à accomplir.",
"The list to search within.": "La liste à rechercher à l'intérieur.",
"Select how the title should be matched.": "Sélectionnez comment le titre doit être correspondant.",
"Select the list to retrieve details for.": "Sélectionnez la liste pour laquelle récupérer les détails.",
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
"None": "Aucun",
"Low": "Bas",
"Medium": "Moyenne",
"High": "Élevé",
"Contains (case-insensitive)": "Contient (insensible à la casse)",
"Exact Match (case-insensitive)": "Correspondance exacte (insensible à la casse)",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Task Created": "Nouvelle tâche créée",
"Triggers when a new task is created in a selected project.": "Déclenche lorsqu'une nouvelle tâche est créée dans un projet sélectionné.",
"Project": "Projet",
"The project to monitor for new tasks.": "Le projet à surveiller pour de nouvelles tâches."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "タスクを作成",
"Update Task": "タスクの更新",
"Get Task": "タスクを取得",
"Delete Task": "タスクの削除",
"Complete Task": "Complete Task",
"Find Task": "タスクを検索",
"Get Task List": "タスクリストの取得",
"Custom API Call": "カスタムAPI通話",
"Creates a new in a specific list.": "特定のリストに新規作成します。",
"Update an existing task.": "既存のタスクを更新する。",
"Retrieves the details of a specific task.": "特定のタスクの詳細を取得します。",
"Deletes an existing task.": "既存のタスクを削除します。",
"Marks an existing task as completed.": "既存のタスクを完了としてマークします。",
"Finds tasks in a specific project by their title.": "特定のプロジェクトのタスクをタイトルで検索します。",
"Retrieves the details of a specific task list by ID.": "特定のタスクリストの詳細を ID で取得します。",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"List": "リスト",
"Task Title": "タスクタイトル",
"Task Content": "タスクの内容",
"Description (Checklist)": "説明 (チェックリスト)",
"Start Date": "開始日",
"Due Date": "締切日",
"Priority": "優先度",
"Task ID": "Task ID",
"Title": "タイトル",
"Content": "コンテンツ",
"Match Type": "一致するタイプ",
"List ID": "リストID",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"The list to create the task in.": "タスクを作成するリスト。",
"Description of the checklist, often used with subtasks (items).": "チェックリストの説明は、サブタスク(項目)でよく使用されます。",
"The list to update the task in.": "タスクを更新するリストです。",
"The ID of the task to update.": "更新するタスクのID。",
"New description of the checklist items. Replaces existing.": "チェックリストアイテムの新しい説明。既存のものに置き換えます。",
"The list the task belongs to.": "タスクが属するリスト。",
"The ID of the task to retrieve.": "取得するタスクのID。",
"The ID of the task to delete.": "削除するタスクのID。",
"The ID of the task to complete.": "完了するタスクのID。",
"The list to search within.": "内で検索するリスト",
"Select how the title should be matched.": "タイトルのマッチング方法を選択します。",
"Select the list to retrieve details for.": "詳細を取得するリストを選択します。",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"None": "なし",
"Low": "低い",
"Medium": "ミディアム",
"High": "高い",
"Contains (case-insensitive)": "含む (大文字小文字を区別しない)",
"Exact Match (case-insensitive)": "完全一致 (大文字小文字を区別しない)",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭",
"New Task Created": "新しいタスクが作成されました",
"Triggers when a new task is created in a selected project.": "選択したプロジェクトで新しいタスクが作成されたときにトリガーされます。",
"Project": "プロジェクト",
"The project to monitor for new tasks.": "新しいタスクを監視するプロジェクト。"
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Taak maken",
"Update Task": "Taak bijwerken",
"Get Task": "Ophalen taak",
"Delete Task": "Taak verwijderen",
"Complete Task": "Complete Task",
"Find Task": "Zoek Taak",
"Get Task List": "Takenlijst krijgen",
"Custom API Call": "Custom API Call",
"Creates a new in a specific list.": "Maakt een nieuwe in een specifieke lijst.",
"Update an existing task.": "Een bestaande taak bijwerken.",
"Retrieves the details of a specific task.": "De details van een specifieke taak worden opgehaald.",
"Deletes an existing task.": "Verwijdert een bestaande taak.",
"Marks an existing task as completed.": "Markeert een bestaande taak als voltooid.",
"Finds tasks in a specific project by their title.": "Vindt taken in een specifiek project met hun titel.",
"Retrieves the details of a specific task list by ID.": "Haal de details van een specifieke takenlijst op via ID.",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"List": "Klantenlijst",
"Task Title": "Taak titel",
"Task Content": "Taak inhoud",
"Description (Checklist)": "Beschrijving (controlelijst)",
"Start Date": "Start datum",
"Due Date": "Inleverdatum",
"Priority": "Prioriteit",
"Task ID": "Task ID",
"Title": "Aanspreektitel",
"Content": "Inhoud",
"Match Type": "Wedstrijd Type",
"List ID": "Lijst ID",
"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 list to create the task in.": "De lijst om de taak in aan te maken.",
"Description of the checklist, often used with subtasks (items).": "Beschrijving van de checklist, vaak gebruikt met subtaken (items).",
"The list to update the task in.": "De lijst om de taak in bij te werken.",
"The ID of the task to update.": "De ID van de taak om bij te werken.",
"New description of the checklist items. Replaces existing.": "Nieuwe omschrijving van de checklist items. Vervangingen bestaan.",
"The list the task belongs to.": "De lijst waar de taak bij hoort.",
"The ID of the task to retrieve.": "De ID van de taak om op te halen.",
"The ID of the task to delete.": "Het ID van de taak om te verwijderen.",
"The ID of the task to complete.": "Het te voltooien ID van de taak.",
"The list to search within.": "De lijst om in te zoeken.",
"Select how the title should be matched.": "Selecteer hoe de titel moet worden gevonden.",
"Select the list to retrieve details for.": "Selecteer de lijst om de details op te halen.",
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
"None": "geen",
"Low": "laag",
"Medium": "Middelgroot",
"High": "hoog",
"Contains (case-insensitive)": "Bevat (hoofdlettergevoelig)",
"Exact Match (case-insensitive)": "Exacte overeenkomst (hoofdlettergevoelig)",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD",
"New Task Created": "Nieuwe taak aangemaakt",
"Triggers when a new task is created in a selected project.": "Triggert wanneer een nieuwe taak wordt aangemaakt in een geselecteerd project.",
"Project": "Project",
"The project to monitor for new tasks.": "Het project om nieuwe taken te controleren."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Criar tarefa",
"Update Task": "Atualizar Tarefa",
"Get Task": "Obter Tarefa",
"Delete Task": "Excluir Tarefa",
"Complete Task": "Complete Task",
"Find Task": "Procurar Tarefa",
"Get Task List": "Obter lista de tarefas",
"Custom API Call": "Chamada de API personalizada",
"Creates a new in a specific list.": "Cria um novo em uma lista específica.",
"Update an existing task.": "Atualizar uma tarefa existente.",
"Retrieves the details of a specific task.": "Recupera detalhes de uma tarefa específica.",
"Deletes an existing task.": "Exclui uma tarefa existente.",
"Marks an existing task as completed.": "Marca uma tarefa existente como concluída.",
"Finds tasks in a specific project by their title.": "Localiza tarefas em um projeto específico por seu título.",
"Retrieves the details of a specific task list by ID.": "Recupera detalhes de uma lista de tarefas específica por ID.",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"List": "Lista",
"Task Title": "Título da tarefa",
"Task Content": "Conteúdo da tarefa",
"Description (Checklist)": "Descrição (Checklist)",
"Start Date": "Data Inicial",
"Due Date": "Data de vencimento",
"Priority": "Prioridade",
"Task ID": "Task ID",
"Title": "Título",
"Content": "Conteúdo",
"Match Type": "Tipo de correspondência",
"List ID": "ID da lista",
"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 list to create the task in.": "Lista para criar a tarefa.",
"Description of the checklist, often used with subtasks (items).": "Descrição da lista de verificação, muitas vezes usada com subtarefas (itens).",
"The list to update the task in.": "Lista para atualizar a tarefa.",
"The ID of the task to update.": "A ID da tarefa a atualizar.",
"New description of the checklist items. Replaces existing.": "Nova descrição dos itens da lista de seleção. Substitui os itens existentes.",
"The list the task belongs to.": "A lista à qual a tarefa pertence.",
"The ID of the task to retrieve.": "O ID da tarefa a recuperar.",
"The ID of the task to delete.": "O ID da tarefa a excluir.",
"The ID of the task to complete.": "A ID da tarefa a ser concluída.",
"The list to search within.": "A lista para pesquisar dentro.",
"Select how the title should be matched.": "Selecione como o título deve ser combinado.",
"Select the list to retrieve details for.": "Selecione a lista para recuperar detalhes.",
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
"None": "Nenhuma",
"Low": "baixa",
"Medium": "Média",
"High": "alta",
"Contains (case-insensitive)": "Contém (maiúsculas de minúsculas)",
"Exact Match (case-insensitive)": "Partida exata (maiúsculas e minúsculas)",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA",
"New Task Created": "Nova tarefa criada",
"Triggers when a new task is created in a selected project.": "Aciona quando uma nova tarefa é criada em um projeto selecionado.",
"Project": "Projecto",
"The project to monitor for new tasks.": "O projeto para monitorar novas tarefas."
}

View File

@@ -0,0 +1,66 @@
{
"TickTick": "Тик",
"Create Task": "Создать задачу",
"Update Task": "Обновить задачу",
"Get Task": "Получить задачу",
"Delete Task": "Удалить задачу",
"Complete Task": "Complete Task",
"Find Task": "Найти задачу",
"Get Task List": "Получить список задач",
"Custom API Call": "Пользовательский вызов API",
"Creates a new in a specific list.": "Создает новый в конкретном списке.",
"Update an existing task.": "Обновить существующую задачу.",
"Retrieves the details of a specific task.": "Получает детали конкретной задачи.",
"Deletes an existing task.": "Удалить существующую задачу.",
"Marks an existing task as completed.": "Отмечает существующую задачу как завершенной.",
"Finds tasks in a specific project by their title.": "Ищет задачи в конкретном проекте по их названию.",
"Retrieves the details of a specific task list by ID.": "Получает информацию о конкретном списке задач по ID.",
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
"List": "Список",
"Task Title": "Название задачи",
"Task Content": "Содержание задачи",
"Description (Checklist)": "Описание (список)",
"Start Date": "Дата начала",
"Due Date": "Срок сдачи",
"Priority": "Приоритет",
"Task ID": "Task ID",
"Title": "Заголовок",
"Content": "Содержание",
"Match Type": "Тип матча",
"List ID": "ID списка",
"Method": "Метод",
"Headers": "Заголовки",
"Query Parameters": "Параметры запроса",
"Body": "Тело",
"No Error on Failure": "Нет ошибок при ошибке",
"Timeout (in seconds)": "Таймаут (в секундах)",
"The list to create the task in.": "Список для создания задачи.",
"Description of the checklist, often used with subtasks (items).": "Описание контрольного списка, часто используется с подзадачами (элементами).",
"The list to update the task in.": "Список для обновления задачи.",
"The ID of the task to update.": "ID задачи для обновления.",
"New description of the checklist items. Replaces existing.": "Новое описание элементов контрольного списка.",
"The list the task belongs to.": "Список к которому принадлежит задача.",
"The ID of the task to retrieve.": "ID задачи для извлечения.",
"The ID of the task to delete.": "ID задачи для удаления.",
"The ID of the task to complete.": "ID задачи для завершения.",
"The list to search within.": "Список для поиска.",
"Select how the title should be matched.": "Выберите, как заголовок должен быть совпадать.",
"Select the list to retrieve details for.": "Выберите список для получения деталей.",
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
"None": "Нет",
"Low": "Низкий",
"Medium": "Средний",
"High": "Высокий",
"Contains (case-insensitive)": "Содержит (без учета регистра)",
"Exact Match (case-insensitive)": "Точное совпадение (без учета регистра)",
"GET": "ПОЛУЧИТЬ",
"POST": "ПОСТ",
"PATCH": "ПАТЧ",
"PUT": "ПОКУПИТЬ",
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD",
"New Task Created": "Новая задача создана",
"Triggers when a new task is created in a selected project.": "Включает при создании новой задачи в выбранном проекте.",
"Project": "Проект",
"The project to monitor for new tasks.": "Проект мониторинга новых задач."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Create Task",
"Update Task": "Update Task",
"Get Task": "Get Task",
"Delete Task": "Delete Task",
"Complete Task": "Complete Task",
"Find Task": "Find Task",
"Get Task List": "Get Task List",
"Custom API Call": "Custom API Call",
"Creates a new in a specific list.": "Creates a new in a specific list.",
"Update an existing task.": "Update an existing task.",
"Retrieves the details of a specific task.": "Retrieves the details of a specific task.",
"Deletes an existing task.": "Deletes an existing task.",
"Marks an existing task as completed.": "Marks an existing task as completed.",
"Finds tasks in a specific project by their title.": "Finds tasks in a specific project by their title.",
"Retrieves the details of a specific task list by ID.": "Retrieves the details of a specific task list by ID.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"List": "List",
"Task Title": "Task Title",
"Task Content": "Task Content",
"Description (Checklist)": "Description (Checklist)",
"Start Date": "Start Date",
"Due Date": "Due Date",
"Priority": "Priority",
"Task ID": "Task ID",
"Title": "Title",
"Content": "Content",
"Match Type": "Match Type",
"List ID": "List ID",
"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 list to create the task in.": "The list to create the task in.",
"Description of the checklist, often used with subtasks (items).": "Description of the checklist, often used with subtasks (items).",
"The list to update the task in.": "The list to update the task in.",
"The ID of the task to update.": "The ID of the task to update.",
"New description of the checklist items. Replaces existing.": "New description of the checklist items. Replaces existing.",
"The list the task belongs to.": "The list the task belongs to.",
"The ID of the task to retrieve.": "The ID of the task to retrieve.",
"The ID of the task to delete.": "The ID of the task to delete.",
"The ID of the task to complete.": "The ID of the task to complete.",
"The list to search within.": "The list to search within.",
"Select how the title should be matched.": "Select how the title should be matched.",
"Select the list to retrieve details for.": "Select the list to retrieve details for.",
"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..",
"None": "None",
"Low": "Low",
"Medium": "Medium",
"High": "High",
"Contains (case-insensitive)": "Contains (case-insensitive)",
"Exact Match (case-insensitive)": "Exact Match (case-insensitive)",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Task Created": "New Task Created",
"Triggers when a new task is created in a selected project.": "Triggers when a new task is created in a selected project.",
"Project": "Project",
"The project to monitor for new tasks.": "The project to monitor for new tasks."
}

View File

@@ -0,0 +1,66 @@
{
"TickTick": "TickTick",
"Create Task": "Create Task",
"Update Task": "Update Task",
"Get Task": "Get Task",
"Delete Task": "Delete Task",
"Complete Task": "Complete Task",
"Find Task": "Find Task",
"Get Task List": "Get Task List",
"Custom API Call": "Custom API Call",
"Creates a new in a specific list.": "Creates a new in a specific list.",
"Update an existing task.": "Update an existing task.",
"Retrieves the details of a specific task.": "Retrieves the details of a specific task.",
"Deletes an existing task.": "Deletes an existing task.",
"Marks an existing task as completed.": "Marks an existing task as completed.",
"Finds tasks in a specific project by their title.": "Finds tasks in a specific project by their title.",
"Retrieves the details of a specific task list by ID.": "Retrieves the details of a specific task list by ID.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"List": "List",
"Task Title": "Task Title",
"Task Content": "Task Content",
"Description (Checklist)": "Description (Checklist)",
"Start Date": "Start Date",
"Due Date": "Due Date",
"Priority": "Priority",
"Task ID": "Task ID",
"Title": "Title",
"Content": "Content",
"Match Type": "Match Type",
"List ID": "List ID",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"The list to create the task in.": "The list to create the task in.",
"Description of the checklist, often used with subtasks (items).": "Description of the checklist, often used with subtasks (items).",
"The list to update the task in.": "The list to update the task in.",
"The ID of the task to update.": "The ID of the task to update.",
"New description of the checklist items. Replaces existing.": "New description of the checklist items. Replaces existing.",
"The list the task belongs to.": "The list the task belongs to.",
"The ID of the task to retrieve.": "The ID of the task to retrieve.",
"The ID of the task to delete.": "The ID of the task to delete.",
"The ID of the task to complete.": "The ID of the task to complete.",
"The list to search within.": "The list to search within.",
"Select how the title should be matched.": "Select how the title should be matched.",
"Select the list to retrieve details for.": "Select the list to retrieve details for.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"None": "None",
"Low": "Low",
"Medium": "Medium",
"High": "High",
"Contains (case-insensitive)": "Contains (case-insensitive)",
"Exact Match (case-insensitive)": "Exact Match (case-insensitive)",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Task Created": "New Task Created",
"Triggers when a new task is created in a selected project.": "Triggers when a new task is created in a selected project.",
"Project": "Project",
"The project to monitor for new tasks.": "The project to monitor for new tasks."
}

View File

@@ -0,0 +1,67 @@
{
"Create Task": "Create Task",
"Update Task": "Update Task",
"Get Task": "Get Task",
"Delete Task": "Delete Task",
"Complete Task": "Complete Task",
"Find Task": "Find Task",
"Get Task List": "Get Task List",
"Custom API Call": "自定义 API 呼叫",
"Creates a new in a specific list.": "Creates a new in a specific list.",
"Update an existing task.": "Update an existing task.",
"Retrieves the details of a specific task.": "Retrieves the details of a specific task.",
"Deletes an existing task.": "Deletes an existing task.",
"Marks an existing task as completed.": "Marks an existing task as completed.",
"Finds tasks in a specific project by their title.": "Finds tasks in a specific project by their title.",
"Retrieves the details of a specific task list by ID.": "Retrieves the details of a specific task list by ID.",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"List": "List",
"Task Title": "Task Title",
"Task Content": "Task Content",
"Description (Checklist)": "Description (Checklist)",
"Start Date": "Start Date",
"Due Date": "Due Date",
"Priority": "Priority",
"Task ID": "Task ID",
"Title": "标题",
"Content": "Content",
"Match Type": "Match Type",
"List ID": "List ID",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"The list to create the task in.": "The list to create the task in.",
"Description of the checklist, often used with subtasks (items).": "Description of the checklist, often used with subtasks (items).",
"The list to update the task in.": "The list to update the task in.",
"The ID of the task to update.": "The ID of the task to update.",
"New description of the checklist items. Replaces existing.": "New description of the checklist items. Replaces existing.",
"The list the task belongs to.": "The list the task belongs to.",
"The ID of the task to retrieve.": "The ID of the task to retrieve.",
"The ID of the task to delete.": "The ID of the task to delete.",
"The ID of the task to complete.": "The ID of the task to complete.",
"The list to search within.": "The list to search within.",
"Select how the title should be matched.": "Select how the title should be matched.",
"Select the list to retrieve details for.": "Select the list to retrieve details for.",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"None": "无",
"Low": "Low",
"Medium": "Medium",
"High": "High",
"Contains (case-insensitive)": "Contains (case-insensitive)",
"Exact Match (case-insensitive)": "Exact Match (case-insensitive)",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色",
"New Task Created": "New Task Created",
"Triggers when a new task is created in a selected project.": "Triggers when a new task is created in a selected project.",
"Project": "项目",
"The project to monitor for new tasks.": "The project to monitor for new tasks."
}

View File

@@ -0,0 +1,43 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { createPiece, OAuth2PropertyValue, PieceAuth } from '@activepieces/pieces-framework';
import { completeTaskAction } from './lib/actions/complete-task';
import { createTaskAction } from './lib/actions/create-task';
import { deleteTaskAction } from './lib/actions/delete-task';
import { findTaskAction } from './lib/actions/find-task';
import { getProjectAction } from './lib/actions/get-project-by-id';
import { getTaskAction } from './lib/actions/get-task';
import { updateTaskAction } from './lib/actions/update-task';
import { newTaskCreatedTrigger } from './lib/triggers/new-task-created';
export const ticktickAuth = PieceAuth.OAuth2({
authUrl: 'https://ticktick.com/oauth/authorize',
tokenUrl: 'https://ticktick.com/oauth/token',
required: true,
scope: ['tasks:read', 'tasks:write'],
});
export const ticktick = createPiece({
displayName: 'TickTick',
logoUrl: 'https://cdn.activepieces.com/pieces/ticktick.png',
auth: ticktickAuth,
authors: ['onyedikachi-david', 'kishanprmr'],
actions: [
createTaskAction,
updateTaskAction,
getTaskAction,
deleteTaskAction,
completeTaskAction,
findTaskAction,
getProjectAction,
createCustomApiCallAction({
auth:ticktickAuth,
baseUrl:()=>'https://api.ticktick.com/open/v1',
authMapping:async (auth)=>{
return {
Authorization:`Bearer ${(auth).access_token}`
}
}
})
],
triggers: [newTaskCreatedTrigger],
});

View File

@@ -0,0 +1,34 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import { projectId, taskId } from '../common/props';
export const completeTaskAction = createAction({
auth: ticktickAuth,
name: 'complete_task',
displayName: 'Complete Task',
description: 'Marks an existing task as completed.',
props: {
projectId: projectId({
displayName: 'List',
required: true,
}),
taskId: taskId({
displayName: 'Task ID',
description: 'The ID of the task to complete.',
required: true,
}),
},
async run(context) {
const { projectId, taskId } = context.propsValue;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.POST,
resourceUri: `/project/${projectId}/task/${taskId}/complete`,
});
return response;
},
});

View File

@@ -0,0 +1,83 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import dayjs from 'dayjs';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import {
TICKTICK_PRIORITY_HIGH,
TICKTICK_PRIORITY_LOW,
TICKTICK_PRIORITY_MEDIUM,
TICKTICK_PRIORITY_NONE,
} from '../common/constants';
import { projectId } from '../common/props';
export const createTaskAction = createAction({
auth: ticktickAuth,
name: 'create_task',
displayName: 'Create Task',
description: 'Creates a new in a specific list.',
props: {
projectId: projectId({
displayName: 'List',
description: 'The list to create the task in.',
required: true,
}),
title: Property.ShortText({
displayName: 'Task Title',
required: true,
}),
content: Property.LongText({
displayName: 'Task Content',
required: false,
}),
desc: Property.LongText({
displayName: 'Description (Checklist)',
description: 'Description of the checklist, often used with subtasks (items).',
required: false,
}),
startDate: Property.DateTime({
displayName: 'Start Date',
required: false,
}),
dueDate: Property.DateTime({
displayName: 'Due Date',
required: false,
}),
priority: Property.StaticDropdown({
displayName: 'Priority',
required: false,
options: {
options: [
{ label: 'None', value: TICKTICK_PRIORITY_NONE },
{ label: 'Low', value: TICKTICK_PRIORITY_LOW },
{ label: 'Medium', value: TICKTICK_PRIORITY_MEDIUM },
{ label: 'High', value: TICKTICK_PRIORITY_HIGH },
],
},
}),
},
async run(context) {
const { projectId, title, content, desc, startDate, dueDate, priority } = context.propsValue;
const createTaskParams: Record<string, any> = {
title,
projectId: projectId as string,
};
if (content) createTaskParams['content'] = content;
if (desc) createTaskParams['desc'] = desc;
if (startDate)
createTaskParams['startDate'] = dayjs(startDate).format('YYYY-MM-DDTHH:mm:ssZZ');
if (dueDate) createTaskParams['dueDate'] = dayjs(dueDate).format('YYYY-MM-DDTHH:mm:ssZZ');
if (priority) createTaskParams['priority'] = priority;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.POST,
resourceUri: '/task',
body: createTaskParams,
});
return response;
},
});

View File

@@ -0,0 +1,35 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import { projectId, taskId } from '../common/props';
export const deleteTaskAction = createAction({
auth: ticktickAuth,
name: 'delete_task',
displayName: 'Delete Task',
description: 'Deletes an existing task.',
props: {
projectId: projectId({
displayName: 'List',
description: 'The list the task belongs to.',
required: true,
}),
taskId: taskId({
displayName: 'Task ID',
description: 'The ID of the task to delete.',
required: true,
}),
},
async run(context) {
const { projectId, taskId } = context.propsValue;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.DELETE,
resourceUri: `/project/${projectId}/task/${taskId}`,
});
return response;
},
});

View File

@@ -0,0 +1,69 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import { projectId } from '../common/props';
export const findTaskAction = createAction({
auth: ticktickAuth,
name: 'find_task',
displayName: 'Find Task',
description: 'Finds tasks in a specific project by their title.',
props: {
projectId: projectId({
displayName: 'List',
description: 'The list to search within.',
required: true,
}),
title: Property.ShortText({
displayName: 'Task Title',
required: true,
}),
matchType: Property.StaticDropdown({
displayName: 'Match Type',
description: 'Select how the title should be matched.',
required: true,
options: {
options: [
{ label: 'Contains (case-insensitive)', value: 'contains' },
{ label: 'Exact Match (case-insensitive)', value: 'exact' },
],
},
defaultValue: 'contains',
}),
},
async run(context) {
const { projectId, title, matchType } = context.propsValue;
if (!projectId || !title) {
return [];
}
const response = await tickTickApiCall<{
tasks: { id: string; title: string }[];
}>({
accessToken: context.auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${projectId}/data`,
});
const foundTasks = [];
for (const task of response.tasks) {
if (matchType === 'exact') {
if (task.title.toLowerCase() === title.toLowerCase()) {
foundTasks.push(task);
}
} else {
// Default to 'contains'
if (task.title.toLowerCase().includes(title.toLowerCase())) {
foundTasks.push(task);
}
}
}
return {
found: foundTasks.length > 0,
result: foundTasks,
};
},
});

View File

@@ -0,0 +1,29 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
export const getProjectAction = createAction({
auth: ticktickAuth,
name: 'get_project',
displayName: 'Get Task List',
description: 'Retrieves the details of a specific task list by ID.',
props: {
projectId: Property.ShortText({
displayName: 'List ID',
description: 'Select the list to retrieve details for.',
required: true,
}),
},
async run(context) {
const { projectId } = context.propsValue;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${projectId}`,
});
return response;
},
});

View File

@@ -0,0 +1,35 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import { projectId, taskId } from '../common/props';
export const getTaskAction = createAction({
auth: ticktickAuth,
name: 'get_task',
displayName: 'Get Task',
description: 'Retrieves the details of a specific task.',
props: {
projectId: projectId({
displayName: 'List',
description: 'The list the task belongs to.',
required: true,
}),
taskId: taskId({
displayName: 'Task ID',
description: 'The ID of the task to retrieve.',
required: true,
}),
},
async run(context) {
const { projectId, taskId } = context.propsValue;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${projectId}/task/${taskId}`,
});
return response;
},
});

View File

@@ -0,0 +1,91 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { createAction, Property } from '@activepieces/pieces-framework';
import dayjs from 'dayjs';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import {
TICKTICK_PRIORITY_HIGH,
TICKTICK_PRIORITY_LOW,
TICKTICK_PRIORITY_MEDIUM,
TICKTICK_PRIORITY_NONE,
} from '../common/constants';
import { projectId, taskId } from '../common/props';
export const updateTaskAction = createAction({
auth: ticktickAuth,
name: 'update_task',
displayName: 'Update Task',
description: 'Update an existing task.',
props: {
projectId: projectId({
displayName: 'List',
description: 'The list to update the task in.',
required: true,
}),
taskId: taskId({
displayName: 'Task ID',
description: 'The ID of the task to update.',
required: true,
}),
title: Property.ShortText({
displayName: 'Title',
required: false,
}),
content: Property.LongText({
displayName: 'Content',
required: false,
}),
desc: Property.LongText({
displayName: 'Description (Checklist)',
description: 'New description of the checklist items. Replaces existing.',
required: false,
}),
startDate: Property.DateTime({
displayName: 'Start Date',
required: false,
}),
dueDate: Property.DateTime({
displayName: 'Due Date',
required: false,
}),
priority: Property.StaticDropdown({
displayName: 'Priority',
required: false,
options: {
options: [
{ label: 'None', value: TICKTICK_PRIORITY_NONE },
{ label: 'Low', value: TICKTICK_PRIORITY_LOW },
{ label: 'Medium', value: TICKTICK_PRIORITY_MEDIUM },
{ label: 'High', value: TICKTICK_PRIORITY_HIGH },
],
},
}),
},
async run(context) {
const { taskId, projectId, title, content, desc, startDate, dueDate, priority } =
context.propsValue;
const updateTaskParams: Record<string, any> = {
id: taskId,
projectId: projectId as string,
};
if (title) updateTaskParams['title'] = title;
if (content) updateTaskParams['content'] = content;
if (desc) updateTaskParams['desc'] = desc;
if (startDate)
updateTaskParams['startDate'] = dayjs(startDate).format('YYYY-MM-DDTHH:mm:ssZZ');
if (dueDate) updateTaskParams['dueDate'] = dayjs(dueDate).format('YYYY-MM-DDTHH:mm:ssZZ');
if (priority) updateTaskParams['priority'] = priority;
const response = await tickTickApiCall({
accessToken: context.auth.access_token,
method: HttpMethod.POST,
resourceUri: `/task/${taskId}`,
body: updateTaskParams,
});
return response;
},
});

View File

@@ -0,0 +1,49 @@
import {
AuthenticationType,
httpClient,
HttpMessageBody,
HttpMethod,
HttpRequest,
QueryParams,
} from '@activepieces/pieces-common';
export type TickTickApiCallParams = {
accessToken: string;
method: HttpMethod;
resourceUri: string;
query?: Record<string, string | number | string[] | undefined>;
body?: any;
};
export async function tickTickApiCall<T extends HttpMessageBody>({
accessToken,
method,
resourceUri,
query,
body,
}: TickTickApiCallParams): Promise<T> {
const baseUrl = 'https://api.ticktick.com/open/v1';
const qs: QueryParams = {};
if (query) {
for (const [key, value] of Object.entries(query)) {
if (value !== null && value !== undefined) {
qs[key] = String(value);
}
}
}
const request: HttpRequest = {
method,
url: baseUrl + resourceUri,
authentication: {
type: AuthenticationType.BEARER_TOKEN,
token: accessToken,
},
queryParams: qs,
body,
};
const response = await httpClient.sendRequest<T>(request);
return response.body;
}

View File

@@ -0,0 +1,14 @@
// Task Statuses
export const TICKTICK_TASK_STATUS_INCOMPLETE = 0;
export const TICKTICK_TASK_STATUS_COMPLETED = 2;
// ChecklistItem (Subtask) Statuses
export const TICKTICK_SUBTASK_STATUS_INCOMPLETE = 0;
export const TICKTICK_SUBTASK_STATUS_COMPLETED = 1;
// Task Priorities
export const TICKTICK_PRIORITY_NONE = 0;
export const TICKTICK_PRIORITY_LOW = 1;
export const TICKTICK_PRIORITY_MEDIUM = 3;
export const TICKTICK_PRIORITY_HIGH = 5;

View File

@@ -0,0 +1,82 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';
import { tickTickApiCall } from './client';
import { ticktickAuth } from '../..';
interface DropdownParams {
displayName: string;
description?: string;
required: boolean;
}
export const projectId = (params: DropdownParams) =>
Property.Dropdown({
displayName: params.displayName,
description: params.description,
required: params.required,
auth: ticktickAuth,
refreshers: [],
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Please authenticate first',
options: [],
};
}
const authValue = auth;
const response = await tickTickApiCall<{ id: string; name: string }[]>({
accessToken: authValue.access_token,
method: HttpMethod.GET,
resourceUri: '/project',
});
const projects = [...(response || []), { id: 'inbox', name: 'inbox' }];
return {
disabled: false,
options: projects.map((project) => {
return {
label: project.name,
value: project.id,
};
}),
};
},
});
export const taskId = (params: DropdownParams) =>
Property.Dropdown({
auth: ticktickAuth,
displayName: params.displayName,
description: params.description,
required: params.required,
refreshers: ['projectId'],
options: async ({ auth, projectId }) => {
if (!auth || !projectId) {
return {
disabled: true,
placeholder: 'Please authenticate first and select list.',
options: [],
};
}
const authValue = auth;
const response = await tickTickApiCall<{ tasks: { id: string; title: string }[] }>({
accessToken: authValue.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${projectId}/data`,
});
return {
disabled: false,
options: response.tasks.map((task) => {
return {
label: task.title,
value: task.id,
};
}),
};
},
});

View File

@@ -0,0 +1,87 @@
import { HttpMethod } from '@activepieces/pieces-common';
import { TriggerStrategy, createTrigger } from '@activepieces/pieces-framework';
import { ticktickAuth } from '../../index';
import { tickTickApiCall } from '../common/client';
import { TICKTICK_TASK_STATUS_INCOMPLETE } from '../common/constants';
import { projectId } from '../common/props';
const TRIGGER_KEY = 'ticktick_new_task_trigger';
export const newTaskCreatedTrigger = createTrigger({
auth: ticktickAuth,
name: 'new_task_created',
displayName: 'New Task Created',
description: 'Triggers when a new task is created in a selected project.',
props: {
projectId: projectId({
displayName: 'Project',
description: 'The project to monitor for new tasks.',
required: true,
}),
},
type: TriggerStrategy.POLLING,
sampleData: {
id: '6247ee29630c800f064fd145',
projectId: '6226ff9877acee87727f6bca',
title: 'Sample New Task Title',
content: 'This is a sample task content.',
status: TICKTICK_TASK_STATUS_INCOMPLETE, // Corrected usage
},
async onEnable(context) {
const { store, auth, propsValue } = context;
const response = await tickTickApiCall<{ tasks: { id: string; title: string }[] }>({
accessToken: auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${propsValue.projectId}/data`,
});
const taskIds = response.tasks.map((task) => task.id);
await store.put(TRIGGER_KEY, JSON.stringify(taskIds));
},
async onDisable(context) {
await context.store.delete(TRIGGER_KEY);
},
async test(context) {
const { auth, propsValue } = context;
const response = await tickTickApiCall<{ tasks: { id: string; title: string }[] }>({
accessToken: auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${propsValue.projectId}/data`,
});
return response.tasks.slice(0, 5);
},
async run(context) {
const { store, auth, propsValue } = context;
const existingIds = (await store.get<string>(TRIGGER_KEY)) ?? '[]';
const parsedExistingIds = JSON.parse(existingIds) as string[];
const { tasks: currentTasks } = await tickTickApiCall<{
tasks: { id: string; title: string }[];
}>({
accessToken: auth.access_token,
method: HttpMethod.GET,
resourceUri: `/project/${propsValue.projectId}/data`,
});
if (currentTasks.length === 0) {
await store.put(TRIGGER_KEY, '[]');
return [];
}
const newTasks = currentTasks.filter((task) => !parsedExistingIds.includes(task.id));
const allCurrentIds = currentTasks.map((task) => task.id);
await store.put(TRIGGER_KEY, JSON.stringify(allCurrentIds));
if (newTasks.length === 0) {
return [];
}
return newTasks;
},
});