AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(todoist): ui improvement (#16372)
Talal Jaber4f20869aa04b
diff --git a/bun.lock b/bun.lockindex 3d934f86ab6..72a459a103b 100644--- a/bun.lock+++ b/bun.lock@@ -9254,7 +9254,7 @@},"packages/pieces/community/todoist": {"name": "@activepieces/piece-todoist",- "version": "0.5.2",+ "version": "0.6.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/todoist/package.json b/packages/pieces/community/todoist/package.jsonindex e6ddfac178f..77781538101 100644--- a/packages/pieces/community/todoist/package.json+++ b/packages/pieces/community/todoist/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-todoist",- "version": "0.5.2",+ "version": "0.6.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","scripts": {diff --git a/packages/pieces/community/todoist/src/i18n/de.json b/packages/pieces/community/todoist/src/i18n/de.jsonindex 0600f3b8dd0..fa9f2e26fa2 100644--- a/packages/pieces/community/todoist/src/i18n/de.json+++ b/packages/pieces/community/todoist/src/i18n/de.json@@ -244,5 +244,33 @@"Raw": "Rohe","Task Completed": "Aufgabe erledigt","Triggers when a new task is completed": "Wird ausgelöst, wenn eine neue Aufgabe abgeschlossen ist",- "Leave it blank if you want to get completed tasks from all your projects.": "Lassen Sie es leer, wenn Sie erledigte Aufgaben aus all Ihren Projekten erhalten möchten."+ "Leave it blank if you want to get completed tasks from all your projects.": "Lassen Sie es leer, wenn Sie erledigte Aufgaben aus all Ihren Projekten erhalten möchten.",+ "Add a task to a Todoist project or your Inbox.": "Eine Aufgabe zu einem Todoist-Projekt oder deinem Eingang hinzufügen.",+ "Change the title, details, labels, priority or due date of a task.": "Titel, Details, Etiketten, Priorität oder Fälligkeitsdatum einer Aufgabe ändern.",+ "Find an open task by its exact title.": "Eine offene Aufgabe anhand ihres genauen Titels finden.",+ "Complete a task. A recurring task moves to its next date.": "Eine Aufgabe erledigen. Eine wiederkehrende Aufgabe springt zum nächsten Termin.",+ "Title": "Titel",+ "Due Date": "Fälligkeitsdatum",+ "Markdown": "Markdown",+ "Response is Binary": "Antwort ist binär",+ "Return Error as Output": "Fehler als Ausgabe zurückgeben",+ "Timeout": "Zeitlimit",+ "Leave empty to add the task to your Inbox.": "Leer lassen, um die Aufgabe deinem Eingang hinzuzufügen.",+ "Leave empty to add the task outside any section.": "Leer lassen, um die Aufgabe außerhalb eines Abschnitts hinzuzufügen.",+ "Markdown and links are supported.": "Markdown und Links werden unterstützt.",+ "Extra details shown under the title. Markdown is supported.": "Zusätzliche Details unter dem Titel. Markdown wird unterstützt.",+ "Names of personal or shared labels to add.": "Namen persönlicher oder geteilter Etiketten, die hinzugefügt werden.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 ist normal, 4 ist dringend; Todoist zeigt 4 als P1 an.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "JJJJ-MM-TT oder englische Wörter. Wiederkehrende Termine gehen auch.",+ "The task's ID, from a Create Task or Find Task step.": "Die ID der Aufgabe aus einem Schritt „Aufgabe erstellen“ oder „Aufgabe finden“.",+ "Fields left empty keep their current value.": "Leer gelassene Felder behalten ihren aktuellen Wert.",+ "Replaces the task's labels with these names.": "Ersetzt die Etiketten der Aufgabe durch diese Namen.",+ "Matches an open task whose title is exactly this text.": "Findet eine offene Aufgabe, deren Titel genau diesem Text entspricht.",+ "Leave empty to search every project.": "Leer lassen, um alle Projekte zu durchsuchen.",+ "Appended to the URL as ?key=value.": "Wird als ?key=value an die URL angehängt.",+ "On a failed request, output the error instead of failing the step.": "Bei einer fehlgeschlagenen Anfrage den Fehler ausgeben, statt den Schritt abzubrechen.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Sekunden bis zur Antwort. Leer: bis zum Flow-Limit (10 Min.).",+ "Follow 3xx redirects instead of returning them as the response.": "3xx-Weiterleitungen folgen, statt sie als Antwort zurückzugeben.",+ "Fires when a task is marked complete.": "Wird ausgelöst, wenn eine Aufgabe als erledigt markiert wird.",+ "Leave empty to watch every project.": "Leer lassen, um alle Projekte zu überwachen."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/es.json b/packages/pieces/community/todoist/src/i18n/es.jsonindex 23931147316..422bc7c34e8 100644--- a/packages/pieces/community/todoist/src/i18n/es.json+++ b/packages/pieces/community/todoist/src/i18n/es.json@@ -244,5 +244,33 @@"Raw": "Rápido","Task Completed": "Tarea completada","Triggers when a new task is completed": "Se activa cuando se completa una nueva tarea",- "Leave it blank if you want to get completed tasks from all your projects.": "Déjalo en blanco si quieres obtener las tareas completadas de todos tus proyectos."+ "Leave it blank if you want to get completed tasks from all your projects.": "Déjalo en blanco si quieres obtener las tareas completadas de todos tus proyectos.",+ "Add a task to a Todoist project or your Inbox.": "Añade una tarea a un proyecto de Todoist o a tu Bandeja de entrada.",+ "Change the title, details, labels, priority or due date of a task.": "Cambia el título, los detalles, las etiquetas, la prioridad o la fecha de vencimiento de una tarea.",+ "Find an open task by its exact title.": "Busca una tarea abierta por su título exacto.",+ "Complete a task. A recurring task moves to its next date.": "Completa una tarea. Una tarea recurrente pasa a su siguiente fecha.",+ "Title": "Título",+ "Due Date": "Fecha de vencimiento",+ "Markdown": "Markdown",+ "Response is Binary": "Respuesta binaria",+ "Return Error as Output": "Devolver error como salida",+ "Timeout": "Tiempo de espera",+ "Leave empty to add the task to your Inbox.": "Déjalo vacío para añadir la tarea a tu Bandeja de entrada.",+ "Leave empty to add the task outside any section.": "Déjalo vacío para añadir la tarea fuera de cualquier sección.",+ "Markdown and links are supported.": "Se admiten Markdown y enlaces.",+ "Extra details shown under the title. Markdown is supported.": "Detalles adicionales que se muestran bajo el título. Se admite Markdown.",+ "Names of personal or shared labels to add.": "Nombres de etiquetas personales o compartidas que se añadirán.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 es normal, 4 es urgente; Todoist muestra el 4 como P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "AAAA-MM-DD o palabras en inglés. También admite fechas recurrentes.",+ "The task's ID, from a Create Task or Find Task step.": "El ID de la tarea, de un paso Crear tarea o Buscar tarea.",+ "Fields left empty keep their current value.": "Los campos vacíos conservan su valor actual.",+ "Replaces the task's labels with these names.": "Sustituye las etiquetas de la tarea por estos nombres.",+ "Matches an open task whose title is exactly this text.": "Coincide con una tarea abierta cuyo título es exactamente este texto.",+ "Leave empty to search every project.": "Déjalo vacío para buscar en todos los proyectos.",+ "Appended to the URL as ?key=value.": "Se añade a la URL como ?key=value.",+ "On a failed request, output the error instead of failing the step.": "Si la solicitud falla, devuelve el error en lugar de fallar el paso.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Segundos de espera de la respuesta. Vacío: hasta el límite del flujo (10 min).",+ "Follow 3xx redirects instead of returning them as the response.": "Seguir las redirecciones 3xx en lugar de devolverlas como respuesta.",+ "Fires when a task is marked complete.": "Se activa cuando una tarea se marca como completada.",+ "Leave empty to watch every project.": "Déjalo vacío para vigilar todos los proyectos."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/fr.json b/packages/pieces/community/todoist/src/i18n/fr.jsonindex 33ee004d013..a1dec9bb75d 100644--- a/packages/pieces/community/todoist/src/i18n/fr.json+++ b/packages/pieces/community/todoist/src/i18n/fr.json@@ -244,5 +244,33 @@"Raw": "Brut","Task Completed": "Tâche terminée","Triggers when a new task is completed": "Déclenche quand une nouvelle tâche est terminée",- "Leave it blank if you want to get completed tasks from all your projects.": "Laissez vide si vous voulez obtenir des tâches terminées de tous vos projets."+ "Leave it blank if you want to get completed tasks from all your projects.": "Laissez vide si vous voulez obtenir des tâches terminées de tous vos projets.",+ "Add a task to a Todoist project or your Inbox.": "Ajouter une tâche à un projet Todoist ou à votre boîte de réception.",+ "Change the title, details, labels, priority or due date of a task.": "Modifier le titre, les détails, les étiquettes, la priorité ou la date d'échéance d'une tâche.",+ "Find an open task by its exact title.": "Trouver une tâche ouverte par son titre exact.",+ "Complete a task. A recurring task moves to its next date.": "Terminer une tâche. Une tâche récurrente passe à sa prochaine date.",+ "Title": "Titre",+ "Due Date": "Date d'échéance",+ "Markdown": "Markdown",+ "Response is Binary": "La réponse est binaire",+ "Return Error as Output": "Renvoyer l'erreur comme sortie",+ "Timeout": "Délai d'expiration",+ "Leave empty to add the task to your Inbox.": "Laissez vide pour ajouter la tâche à votre boîte de réception.",+ "Leave empty to add the task outside any section.": "Laissez vide pour ajouter la tâche hors de toute section.",+ "Markdown and links are supported.": "Markdown et les liens sont pris en charge.",+ "Extra details shown under the title. Markdown is supported.": "Détails supplémentaires affichés sous le titre. Markdown est pris en charge.",+ "Names of personal or shared labels to add.": "Noms des étiquettes personnelles ou partagées à ajouter.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 est normal, 4 est urgent ; Todoist affiche 4 comme P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "AAAA-MM-JJ ou mots en anglais. Les dates récurrentes fonctionnent aussi.",+ "The task's ID, from a Create Task or Find Task step.": "L'ID de la tâche, issu d'une étape Créer une tâche ou Trouver une tâche.",+ "Fields left empty keep their current value.": "Les champs laissés vides conservent leur valeur actuelle.",+ "Replaces the task's labels with these names.": "Remplace les étiquettes de la tâche par ces noms.",+ "Matches an open task whose title is exactly this text.": "Correspond à une tâche ouverte dont le titre est exactement ce texte.",+ "Leave empty to search every project.": "Laissez vide pour rechercher dans tous les projets.",+ "Appended to the URL as ?key=value.": "Ajouté à l'URL sous la forme ?key=value.",+ "On a failed request, output the error instead of failing the step.": "En cas d'échec de la requête, renvoyer l'erreur au lieu de faire échouer l'étape.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Secondes d'attente de la réponse. Vide : jusqu'à la limite du flux (10 min).",+ "Follow 3xx redirects instead of returning them as the response.": "Suivre les redirections 3xx au lieu de les renvoyer comme réponse.",+ "Fires when a task is marked complete.": "Se déclenche lorsqu'une tâche est marquée comme terminée.",+ "Leave empty to watch every project.": "Laissez vide pour surveiller tous les projets."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/ja.json b/packages/pieces/community/todoist/src/i18n/ja.jsonindex 596a6322091..d83f14eb228 100644--- a/packages/pieces/community/todoist/src/i18n/ja.json+++ b/packages/pieces/community/todoist/src/i18n/ja.json@@ -244,5 +244,33 @@"Raw": "Raw","Task Completed": "タスクが完了しました","Triggers when a new task is completed": "新しいタスクが完了したときにトリガーします",- "Leave it blank if you want to get completed tasks from all your projects.": "すべてのプロジェクトから完了したタスクを取得したい場合は、空白のままにしてください。"+ "Leave it blank if you want to get completed tasks from all your projects.": "すべてのプロジェクトから完了したタスクを取得したい場合は、空白のままにしてください。",+ "Add a task to a Todoist project or your Inbox.": "Todoist のプロジェクトまたはインボックスにタスクを追加します。",+ "Change the title, details, labels, priority or due date of a task.": "タスクのタイトル、詳細、ラベル、優先度、期日を変更します。",+ "Find an open task by its exact title.": "タイトルが完全に一致する未完了のタスクを検索します。",+ "Complete a task. A recurring task moves to its next date.": "タスクを完了します。繰り返しタスクは次の日付に進みます。",+ "Title": "タイトル",+ "Due Date": "期日",+ "Markdown": "Markdown",+ "Response is Binary": "応答はバイナリ",+ "Return Error as Output": "エラーを出力として返す",+ "Timeout": "タイムアウト",+ "Leave empty to add the task to your Inbox.": "空欄の場合、タスクはインボックスに追加されます。",+ "Leave empty to add the task outside any section.": "空欄の場合、タスクはどのセクションにも属さずに追加されます。",+ "Markdown and links are supported.": "Markdown とリンクを使用できます。",+ "Extra details shown under the title. Markdown is supported.": "タイトルの下に表示される詳細です。Markdown を使用できます。",+ "Names of personal or shared labels to add.": "追加する個人ラベルまたは共有ラベルの名前。",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 は通常、4 は緊急です。Todoist では 4 が P1 と表示されます。",+ "YYYY-MM-DD or English words. Repeating dates work too.": "YYYY-MM-DD または英語の言葉。繰り返しの日付も使えます。",+ "The task's ID, from a Create Task or Find Task step.": "「タスクを作成」または「タスクを検索」ステップから得たタスクの ID。",+ "Fields left empty keep their current value.": "空欄のフィールドは現在の値のままになります。",+ "Replaces the task's labels with these names.": "タスクのラベルをこれらの名前で置き換えます。",+ "Matches an open task whose title is exactly this text.": "タイトルがこのテキストと完全に一致する未完了のタスクに一致します。",+ "Leave empty to search every project.": "空欄の場合、すべてのプロジェクトを検索します。",+ "Appended to the URL as ?key=value.": "?key=value として URL に追加されます。",+ "On a failed request, output the error instead of failing the step.": "リクエスト失敗時にステップを失敗させず、エラーを出力します。",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "応答を待つ秒数。空欄: フローの上限(10 分)まで。",+ "Follow 3xx redirects instead of returning them as the response.": "3xx リダイレクトを応答として返さずに追従します。",+ "Fires when a task is marked complete.": "タスクが完了としてマークされたときに起動します。",+ "Leave empty to watch every project.": "空欄の場合、すべてのプロジェクトを監視します。"}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/nl.json b/packages/pieces/community/todoist/src/i18n/nl.jsonindex 38fa9c4a838..69fb1210afc 100644--- a/packages/pieces/community/todoist/src/i18n/nl.json+++ b/packages/pieces/community/todoist/src/i18n/nl.json@@ -244,5 +244,33 @@"Raw": "Onbewerkte","Task Completed": "Taak voltooid","Triggers when a new task is completed": "Triggert wanneer een nieuwe taak is voltooid",- "Leave it blank if you want to get completed tasks from all your projects.": "Laat het leeg als je voltooide taken van al je projecten wilt krijgen."+ "Leave it blank if you want to get completed tasks from all your projects.": "Laat het leeg als je voltooide taken van al je projecten wilt krijgen.",+ "Add a task to a Todoist project or your Inbox.": "Voeg een taak toe aan een Todoist-project of je Inbox.",+ "Change the title, details, labels, priority or due date of a task.": "Wijzig de titel, details, labels, prioriteit of vervaldatum van een taak.",+ "Find an open task by its exact title.": "Zoek een open taak op de exacte titel.",+ "Complete a task. A recurring task moves to its next date.": "Voltooi een taak. Een terugkerende taak schuift door naar de volgende datum.",+ "Title": "Titel",+ "Due Date": "Vervaldatum",+ "Markdown": "Markdown",+ "Response is Binary": "Antwoord is binair",+ "Return Error as Output": "Fout als uitvoer teruggeven",+ "Timeout": "Time-out",+ "Leave empty to add the task to your Inbox.": "Laat leeg om de taak aan je Inbox toe te voegen.",+ "Leave empty to add the task outside any section.": "Laat leeg om de taak buiten een sectie toe te voegen.",+ "Markdown and links are supported.": "Markdown en links worden ondersteund.",+ "Extra details shown under the title. Markdown is supported.": "Extra details onder de titel. Markdown wordt ondersteund.",+ "Names of personal or shared labels to add.": "Namen van persoonlijke of gedeelde labels om toe te voegen.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 is normaal, 4 is urgent; Todoist toont 4 als P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "JJJJ-MM-DD of Engelse woorden. Terugkerende datums werken ook.",+ "The task's ID, from a Create Task or Find Task step.": "De ID van de taak, uit een stap Taak maken of Zoek Taak.",+ "Fields left empty keep their current value.": "Lege velden behouden hun huidige waarde.",+ "Replaces the task's labels with these names.": "Vervangt de labels van de taak door deze namen.",+ "Matches an open task whose title is exactly this text.": "Vindt een open taak waarvan de titel precies deze tekst is.",+ "Leave empty to search every project.": "Laat leeg om in alle projecten te zoeken.",+ "Appended to the URL as ?key=value.": "Toegevoegd aan de URL als ?key=value.",+ "On a failed request, output the error instead of failing the step.": "Bij een mislukt verzoek de fout als uitvoer geven in plaats van de stap te laten mislukken.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconden wachten op een antwoord. Leeg: tot de flowlimiet (10 min).",+ "Follow 3xx redirects instead of returning them as the response.": "3xx-omleidingen volgen in plaats van ze als antwoord terug te geven.",+ "Fires when a task is marked complete.": "Wordt geactiveerd wanneer een taak als voltooid wordt gemarkeerd.",+ "Leave empty to watch every project.": "Laat leeg om alle projecten te volgen."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/pt.json b/packages/pieces/community/todoist/src/i18n/pt.jsonindex 0c5e10e7e0a..940f9c769c5 100644--- a/packages/pieces/community/todoist/src/i18n/pt.json+++ b/packages/pieces/community/todoist/src/i18n/pt.json@@ -244,5 +244,33 @@"Raw": "RAW","Task Completed": "Tarefa concluída","Triggers when a new task is completed": "Dispara quando uma nova tarefa for concluída",- "Leave it blank if you want to get completed tasks from all your projects.": "Deixe em branco se você quiser obter tarefas concluídas de todos os seus projetos."+ "Leave it blank if you want to get completed tasks from all your projects.": "Deixe em branco se você quiser obter tarefas concluídas de todos os seus projetos.",+ "Add a task to a Todoist project or your Inbox.": "Adicione uma tarefa a um projeto do Todoist ou à sua Caixa de entrada.",+ "Change the title, details, labels, priority or due date of a task.": "Altere o título, os detalhes, os marcadores, a prioridade ou a data de vencimento de uma tarefa.",+ "Find an open task by its exact title.": "Encontre uma tarefa aberta pelo título exato.",+ "Complete a task. A recurring task moves to its next date.": "Conclua uma tarefa. Uma tarefa recorrente passa para a próxima data.",+ "Title": "Título",+ "Due Date": "Data de vencimento",+ "Markdown": "Markdown",+ "Response is Binary": "A resposta é binária",+ "Return Error as Output": "Retornar erro como saída",+ "Timeout": "Tempo limite",+ "Leave empty to add the task to your Inbox.": "Deixe vazio para adicionar a tarefa à sua Caixa de entrada.",+ "Leave empty to add the task outside any section.": "Deixe vazio para adicionar a tarefa fora de qualquer seção.",+ "Markdown and links are supported.": "Markdown e links são suportados.",+ "Extra details shown under the title. Markdown is supported.": "Detalhes extras exibidos abaixo do título. Markdown é suportado.",+ "Names of personal or shared labels to add.": "Nomes de marcadores pessoais ou compartilhados a adicionar.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 é normal, 4 é urgente; o Todoist mostra 4 como P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "AAAA-MM-DD ou palavras em inglês. Datas recorrentes também funcionam.",+ "The task's ID, from a Create Task or Find Task step.": "O ID da tarefa, de uma etapa Criar tarefa ou Procurar Tarefa.",+ "Fields left empty keep their current value.": "Campos deixados vazios mantêm o valor atual.",+ "Replaces the task's labels with these names.": "Substitui os marcadores da tarefa por estes nomes.",+ "Matches an open task whose title is exactly this text.": "Corresponde a uma tarefa aberta cujo título é exatamente este texto.",+ "Leave empty to search every project.": "Deixe vazio para pesquisar em todos os projetos.",+ "Appended to the URL as ?key=value.": "Adicionado à URL como ?key=value.",+ "On a failed request, output the error instead of failing the step.": "Se a requisição falhar, retorna o erro em vez de falhar a etapa.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Segundos de espera pela resposta. Vazio: até o limite do fluxo (10 min).",+ "Follow 3xx redirects instead of returning them as the response.": "Seguir redirecionamentos 3xx em vez de retorná-los como resposta.",+ "Fires when a task is marked complete.": "Dispara quando uma tarefa é marcada como concluída.",+ "Leave empty to watch every project.": "Deixe vazio para monitorar todos os projetos."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/ru.json b/packages/pieces/community/todoist/src/i18n/ru.jsonindex 8dc70bc8f34..750c6371776 100644--- a/packages/pieces/community/todoist/src/i18n/ru.json+++ b/packages/pieces/community/todoist/src/i18n/ru.json@@ -43,5 +43,33 @@"HEAD": "HEAD","Task Completed": "Задача выполнена","Triggers when a new task is completed": "Срабатывает при выполнении новой задачи",- "Leave it blank if you want to get completed tasks from all your projects.": "Оставьте это пустым, если вы хотите получить завершенные задачи из всех ваших проектов."+ "Leave it blank if you want to get completed tasks from all your projects.": "Оставьте это пустым, если вы хотите получить завершенные задачи из всех ваших проектов.",+ "Add a task to a Todoist project or your Inbox.": "Добавить задачу в проект Todoist или во «Входящие».",+ "Change the title, details, labels, priority or due date of a task.": "Изменить название, описание, метки, приоритет или срок задачи.",+ "Find an open task by its exact title.": "Найти открытую задачу по точному названию.",+ "Complete a task. A recurring task moves to its next date.": "Выполнить задачу. Повторяющаяся задача переносится на следующую дату.",+ "Title": "Название",+ "Due Date": "Срок",+ "Markdown": "Markdown",+ "Response is Binary": "Ответ двоичный",+ "Return Error as Output": "Возвращать ошибку как результат",+ "Timeout": "Тайм-аут",+ "Leave empty to add the task to your Inbox.": "Оставьте пустым, чтобы добавить задачу во «Входящие».",+ "Leave empty to add the task outside any section.": "Оставьте пустым, чтобы добавить задачу вне разделов.",+ "Markdown and links are supported.": "Поддерживаются Markdown и ссылки.",+ "Extra details shown under the title. Markdown is supported.": "Дополнительные сведения под названием. Поддерживается Markdown.",+ "Names of personal or shared labels to add.": "Названия личных или общих меток для добавления.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 — обычный, 4 — срочный; в Todoist 4 отображается как P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "ГГГГ-ММ-ДД или английские слова. Повторяющиеся даты тоже работают.",+ "The task's ID, from a Create Task or Find Task step.": "ID задачи из шага «Создать задачу» или «Найти задачу».",+ "Fields left empty keep their current value.": "Пустые поля сохраняют текущее значение.",+ "Replaces the task's labels with these names.": "Заменяет метки задачи этими названиями.",+ "Matches an open task whose title is exactly this text.": "Находит открытую задачу, название которой точно совпадает с этим текстом.",+ "Leave empty to search every project.": "Оставьте пустым, чтобы искать во всех проектах.",+ "Appended to the URL as ?key=value.": "Добавляется к URL как ?key=value.",+ "On a failed request, output the error instead of failing the step.": "При неудачном запросе вернуть ошибку вместо сбоя шага.",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Секунды ожидания ответа. Пусто: до лимита потока (10 мин).",+ "Follow 3xx redirects instead of returning them as the response.": "Следовать перенаправлениям 3xx, а не возвращать их как ответ.",+ "Fires when a task is marked complete.": "Срабатывает, когда задача отмечена как выполненная.",+ "Leave empty to watch every project.": "Оставьте пустым, чтобы отслеживать все проекты."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/translation.json b/packages/pieces/community/todoist/src/i18n/translation.jsonindex 2290d51a5a5..206355b3c56 100644--- a/packages/pieces/community/todoist/src/i18n/translation.json+++ b/packages/pieces/community/todoist/src/i18n/translation.json@@ -44,10 +44,10 @@"Get Productivity Stats": "Get Productivity Stats","List Activity Log": "List Activity Log","Custom API Call": "Custom API Call",- "Create task": "Create task",- "Updates an existing task.": "Updates an existing task.",- "Finds a task by name.": "Finds a task by name.",- "Marks a task as being completed.": "Marks a task as being completed.",+ "Add a task to a Todoist project or your Inbox.": "Add a task to a Todoist project or your Inbox.",+ "Change the title, details, labels, priority or due date of a task.": "Change the title, details, labels, priority or due date of a task.",+ "Find an open task by its exact title.": "Find an open task by its exact title.",+ "Complete a task. A recurring task moves to its next date.": "Complete a task. A recurring task moves to its next date.","Create a task in Todoist with explicit, structured fields.": "Create a task in Todoist with explicit, structured fields.","Update fields on an existing Todoist task.": "Update fields on an existing Todoist task.","Find an active task by its exact name.": "Find an active task by its exact name.",@@ -92,13 +92,16 @@"Retrieves the Todoist activity (event) history.": "Retrieves the Todoist activity (event) history.","Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint","Project": "Project",- "content": "content",+ "Section": "Section",+ "Title": "Title","Description": "Description","Labels": "Labels","Priority": "Priority",- "Due date": "Due date",- "Section": "Section",+ "Due Date": "Due Date","Task ID": "Task ID",+ "Markdown": "Markdown",+ "content": "content",+ "Due date": "Due date","Name": "Name","Query": "Query","Language": "Language",@@ -141,15 +144,27 @@"Return Error as Output": "Return Error as Output","Timeout": "Timeout","Follow redirects": "Follow redirects",+ "Leave empty to add the task to your Inbox.": "Leave empty to add the task to your Inbox.",+ "Leave empty to add the task outside any section.": "Leave empty to add the task outside any section.",+ "Markdown and links are supported.": "Markdown and links are supported.",+ "Extra details shown under the title. Markdown is supported.": "Extra details shown under the title. Markdown is supported.",+ "Names of personal or shared labels to add.": "Names of personal or shared labels to add.",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 is normal, 4 is urgent; Todoist shows 4 as P1.",+ "YYYY-MM-DD or English words. Repeating dates work too.": "YYYY-MM-DD or English words. Repeating dates work too.",+ "The task's ID, from a Create Task or Find Task step.": "The task's ID, from a Create Task or Find Task step.",+ "Fields left empty keep their current value.": "Fields left empty keep their current value.",+ "Replaces the task's labels with these names.": "Replaces the task's labels with these names.",+ "Matches an open task whose title is exactly this text.": "Matches an open task whose title is exactly this text.",+ "Leave empty to search every project.": "Leave empty to search every project.","Task project ID. If not set, task is put to user's Inbox.": "Task project ID. If not set, task is put to user's Inbox.","The task's content. It may contain some markdown-formatted text and hyperlinks": "The task's content. It may contain some markdown-formatted text and hyperlinks","A description for the task. This value may contain some markdown-formatted text and hyperlinks.": "A description for the task. This value may contain some markdown-formatted text and hyperlinks.","The task's labels (a list of names that may represent either personal or shared labels)": "The task's labels (a list of names that may represent either personal or shared labels)","Task priority from 1 (normal) to 4 (urgent)": "Task priority from 1 (normal) to 4 (urgent)","Can be either a specific date in YYYY-MM-DD format relative to user's timezone, a specific date and time in RFC3339 format, or a human defined date (e.g. 'next Monday') using local time": "Can be either a specific date in YYYY-MM-DD format relative to user's timezone, a specific date and time in RFC3339 format, or a human defined date (e.g. 'next Monday') using local time",+ "The ID of the task to update (obtain from Find Task, Filter Tasks, or Get Task).": "The ID of the task to update (obtain from Find Task, Filter Tasks, or Get Task).","The name of the task to search for.": "The name of the task to search for.","Search for tasks within the selected project. If left blank, then all projects are searched.": "Search for tasks within the selected project. If left blank, then all projects are searched.",- "The ID of the task to update (obtain from Find Task, Filter Tasks, or Get Task).": "The ID of the task to update (obtain from Find Task, Filter Tasks, or Get Task).","The ID of the task to complete (obtain from Find Task, Filter Tasks, or Get Task).": "The ID of the task to complete (obtain from Find Task, Filter Tasks, or Get Task).","Todoist filter query. Examples: \"today | overdue\", \"p1 & !#Work\", \"search: meeting\", \"no due date\". Uses Todoist's native filter syntax.": "Todoist filter query. Examples: \"today | overdue\", \"p1 & !#Work\", \"search: meeting\", \"no due date\". Uses Todoist's native filter syntax.","IETF language code for parsing date keywords in the query (e.g. \"en\", \"de\"). Defaults to the account language.": "IETF language code for parsing date keywords in the query (e.g. \"en\", \"de\"). Defaults to the account language.",@@ -243,6 +258,6 @@"DELETE": "DELETE","HEAD": "HEAD","Task Completed": "Task Completed",- "Triggers when a new task is completed": "Triggers when a new task is completed",- "Leave it blank if you want to get completed tasks from all your projects.": "Leave it blank if you want to get completed tasks from all your projects."+ "Fires when a task is marked complete.": "Fires when a task is marked complete.",+ "Leave empty to watch every project.": "Leave empty to watch every project."}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/i18n/zh.json b/packages/pieces/community/todoist/src/i18n/zh.jsonindex d6d3e3c13a7..8e5af7c4c02 100644--- a/packages/pieces/community/todoist/src/i18n/zh.json+++ b/packages/pieces/community/todoist/src/i18n/zh.json@@ -244,5 +244,33 @@"Raw": "原始文件","Task Completed": "Task Completed","Triggers when a new task is completed": "Triggers when a new task is completed",- "Leave it blank if you want to get completed tasks from all your projects.": "Leave it blank if you want to get completed tasks from all your projects."+ "Leave it blank if you want to get completed tasks from all your projects.": "Leave it blank if you want to get completed tasks from all your projects.",+ "Add a task to a Todoist project or your Inbox.": "将任务添加到 Todoist 项目或收件箱。",+ "Change the title, details, labels, priority or due date of a task.": "更改任务的标题、详情、标签、优先级或截止日期。",+ "Find an open task by its exact title.": "按确切标题查找未完成的任务。",+ "Complete a task. A recurring task moves to its next date.": "完成任务。重复任务会移到下一个日期。",+ "Title": "标题",+ "Due Date": "截止日期",+ "Markdown": "Markdown",+ "Response is Binary": "响应为二进制",+ "Return Error as Output": "将错误作为输出返回",+ "Timeout": "超时",+ "Leave empty to add the task to your Inbox.": "留空则将任务添加到收件箱。",+ "Leave empty to add the task outside any section.": "留空则将任务添加到任何分区之外。",+ "Markdown and links are supported.": "支持 Markdown 和链接。",+ "Extra details shown under the title. Markdown is supported.": "显示在标题下方的额外详情。支持 Markdown。",+ "Names of personal or shared labels to add.": "要添加的个人或共享标签名称。",+ "1 is normal, 4 is urgent; Todoist shows 4 as P1.": "1 为普通,4 为紧急;Todoist 将 4 显示为 P1。",+ "YYYY-MM-DD or English words. Repeating dates work too.": "YYYY-MM-DD 或英文词语。也支持重复日期。",+ "The task's ID, from a Create Task or Find Task step.": "任务 ID,来自 Create Task 或 Find Task 步骤。",+ "Fields left empty keep their current value.": "留空的字段保持当前值。",+ "Replaces the task's labels with these names.": "用这些名称替换任务的标签。",+ "Matches an open task whose title is exactly this text.": "匹配标题与此文本完全相同的未完成任务。",+ "Leave empty to search every project.": "留空则搜索所有项目。",+ "Appended to the URL as ?key=value.": "以 ?key=value 形式附加到 URL。",+ "On a failed request, output the error instead of failing the step.": "请求失败时输出错误,而不是让步骤失败。",+ "Seconds to wait for a response. Empty: up to the flow limit (10 min).": "等待响应的秒数。留空:最长为流程上限(10 分钟)。",+ "Follow 3xx redirects instead of returning them as the response.": "跟随 3xx 重定向,而不是将其作为响应返回。",+ "Fires when a task is marked complete.": "当任务被标记为完成时触发。",+ "Leave empty to watch every project.": "留空则监视所有项目。"}\ No newline at end of filediff --git a/packages/pieces/community/todoist/src/index.ts b/packages/pieces/community/todoist/src/index.tsindex d0b9b51d593..7caeb7af022 100644--- a/packages/pieces/community/todoist/src/index.ts+++ b/packages/pieces/community/todoist/src/index.ts@@ -72,7 +72,7 @@ export const todoistAuth = PieceAuth.OAuth2({export const todoist = createPiece({displayName: 'Todoist',description: 'To-do list and task manager',- minimumSupportedRelease: '0.86.4',+ minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/todoist.png',authors: ['MyWay', 'kishanprmr', 'MoShizzle', 'khaledmashaly', 'abuaboud','sanket-a11y'],categories: [PieceCategory.PRODUCTIVITY],diff --git a/packages/pieces/community/todoist/src/lib/actions/create-task-action.ts b/packages/pieces/community/todoist/src/lib/actions/create-task-action.tsindex 315ca1503f6..c06cf41022e 100644--- a/packages/pieces/community/todoist/src/lib/actions/create-task-action.ts+++ b/packages/pieces/community/todoist/src/lib/actions/create-task-action.ts@@ -14,44 +14,68 @@ export const todoistCreateTaskAction = createAction({name: 'create_task',classification: 'WRITE',displayName: 'Create Task',- description: 'Create task',+ description: 'Add a task to a Todoist project or your Inbox.',audience: 'human',aiMetadata: { description: 'Creates a new task in Todoist with content, optional description, labels, priority (1-4), and a natural-language or ISO due date. Use to add a to-do item; without a project_id it lands in the user\'s Inbox. Not idempotent: each call appends a separate task even if the content is identical.', idempotent: false },outputSchema: createTaskActionOutputSchema,+ propertyGroups: [+ {+ key: 'destination',+ display: 'section',+ label: 'Where to add it',+ icon: 'inbox',+ props: ['project_id', 'section_id'],+ },+ {+ key: 'task',+ display: 'section',+ label: 'Task',+ icon: 'text',+ props: ['content', 'description'],+ },+ {+ key: 'details',+ display: 'section',+ label: 'Details',+ icon: 'tag',+ props: ['labels', 'priority', 'due_date'],+ },+ ],props: {project_id: todoistProjectIdDropdown(- "Task project ID. If not set, task is put to user's Inbox."+ 'Leave empty to add the task to your Inbox.'),+ section_id: todoistSectionIdDropdown,content: Property.LongText({- displayName: 'content',- description:- "The task's content. It may contain some markdown-formatted text and hyperlinks",+ displayName: 'Title',+ description: 'Markdown and links are supported.',+ placeholder: 'e.g. Buy milk',required: true,}),description: Property.LongText({displayName: 'Description',- description:- 'A description for the task. This value may contain some markdown-formatted text and hyperlinks.',+ description: 'Extra details shown under the title. Markdown is supported.',required: false,}),labels: Property.Array({displayName: 'Labels',required: false,- description:- "The task's labels (a list of names that may represent either personal or shared labels)",+ description: 'Names of personal or shared labels to add.',}),priority: Property.Number({displayName: 'Priority',- description: 'Task priority from 1 (normal) to 4 (urgent)',+ description: '1 is normal, 4 is urgent; Todoist shows 4 as P1.',required: false,+ width: 'half',}),due_date: Property.ShortText({- displayName: 'Due date',+ displayName: 'Due Date',description:- "Can be either a specific date in YYYY-MM-DD format relative to user's timezone, a specific date and time in RFC3339 format, or a human defined date (e.g. 'next Monday') using local time",+ 'YYYY-MM-DD or English words. Repeating dates work too.',+ placeholder: 'e.g. tomorrow 5pm',required: false,+ width: 'half',}),- section_id: todoistSectionIdDropdown,},async run({ auth, propsValue }) {diff --git a/packages/pieces/community/todoist/src/lib/actions/find-task.action.ts b/packages/pieces/community/todoist/src/lib/actions/find-task.action.tsindex 0e990e3cb85..f8e2e948b07 100644--- a/packages/pieces/community/todoist/src/lib/actions/find-task.action.ts+++ b/packages/pieces/community/todoist/src/lib/actions/find-task.action.ts@@ -10,19 +10,27 @@ export const todoistFindTaskAction = createAction({name: 'find_task',classification: 'READ',displayName: 'Find Task',- description: 'Finds a task by name.',+ description: 'Find an open task by its exact title.',audience: 'human',aiMetadata: { description: 'Looks up an active Todoist task by exact content match, optionally scoped to one project (all projects if left blank). Use to resolve a task name to its full record (including its ID) before updating or completing it. Read-only and idempotent; errors if no task matches the name exactly.', idempotent: true },outputSchema: findTaskActionOutputSchema,+ propertyGroups: [+ {+ key: 'search',+ display: 'section',+ label: 'Search',+ icon: 'filter',+ props: ['name', 'project_id'],+ },+ ],props: {name: Property.ShortText({- displayName: 'Name',- description: 'The name of the task to search for.',+ displayName: 'Title',+ description: 'Matches an open task whose title is exactly this text.',+ placeholder: 'e.g. Buy milk',required: true,}),- project_id: todoistProjectIdDropdown(- 'Search for tasks within the selected project. If left blank, then all projects are searched.',- ),+ project_id: todoistProjectIdDropdown('Leave empty to search every project.'),},async run(context) {const token = context.auth.access_token;diff --git a/packages/pieces/community/todoist/src/lib/actions/mark-task-completed.action.ts b/packages/pieces/community/todoist/src/lib/actions/mark-task-completed.action.tsindex fa93bedd324..7112bd21fc5 100644--- a/packages/pieces/community/todoist/src/lib/actions/mark-task-completed.action.ts+++ b/packages/pieces/community/todoist/src/lib/actions/mark-task-completed.action.ts@@ -8,12 +8,14 @@ export const todoistMarkTaskCompletedAction = createAction({name: 'mark_task_completed',classification: 'WRITE',displayName: 'Mark Task as Completed',- description: 'Marks a task as being completed.',+ description: 'Complete a task. A recurring task moves to its next date.',audience: 'human',aiMetadata: { description: 'Closes (completes) an active Todoist task by its task_id; recurring tasks advance to their next occurrence. Use once you have the task ID (e.g. from Find Task) and want to mark it done. Idempotent: completing an already-completed task leaves it completed with no additional effect.', idempotent: true },props: {task_id: Property.ShortText({displayName: 'Task ID',+ description: "The task's ID, from a Create Task or Find Task step.",+ placeholder: 'e.g. 6X7rM8997g3RQmvh',required: true,}),},diff --git a/packages/pieces/community/todoist/src/lib/actions/update-task.action.ts b/packages/pieces/community/todoist/src/lib/actions/update-task.action.tsindex 923be9f9b89..032b1c3e529 100644--- a/packages/pieces/community/todoist/src/lib/actions/update-task.action.ts+++ b/packages/pieces/community/todoist/src/lib/actions/update-task.action.ts@@ -1,4 +1,8 @@-import { createAction, Property } from '@activepieces/pieces-framework';+import {+ createAction,+ MarkdownVariant,+ Property,+} from '@activepieces/pieces-framework';import { assertNotNullOrUndefined } from '@activepieces/pieces-framework';import { todoistRestClient } from '../common/client/rest-client';import { todoistAuth } from '../..';@@ -9,43 +13,73 @@ export const todoistUpdateTaskAction = createAction({name: 'update_task',classification: 'WRITE',displayName: 'Update Task',- description: 'Updates an existing task.',+ description: 'Change the title, details, labels, priority or due date of a task.',audience: 'human',aiMetadata: { description: 'Updates fields (content, description, labels, priority, due date) on an existing Todoist task identified by task_id. Use to edit a task you already know the ID of; only the fields you pass are changed. Idempotent: re-sending the same values overwrites to the same end state with no extra effect.', idempotent: true },outputSchema: updateTaskActionOutputSchema,+ propertyGroups: [+ {+ key: 'target',+ display: 'section',+ label: 'Task to update',+ icon: 'inbox',+ props: ['task_id'],+ },+ {+ key: 'changes',+ display: 'section',+ label: 'Changes',+ icon: 'sliders',+ props: [+ 'changes_info',+ 'content',+ 'description',+ 'labels',+ 'priority',+ 'due_date',+ ],+ },+ ],props: {task_id: Property.ShortText({displayName: 'Task ID',+ description: "The task's ID, from a Create Task or Find Task step.",+ placeholder: 'e.g. 6X7rM8997g3RQmvh',required: true,}),+ changes_info: Property.MarkDown({+ value: 'Fields left empty keep their current value.',+ variant: MarkdownVariant.INFO,+ }),content: Property.LongText({- displayName: 'content',- description:- "The task's content. It may contain some markdown-formatted text and hyperlinks",+ displayName: 'Title',+ description: 'Markdown and links are supported.',+ placeholder: 'e.g. Buy milk',required: false,}),description: Property.LongText({displayName: 'Description',- description:- 'A description for the task. This value may contain some markdown-formatted text and hyperlinks.',+ description: 'Extra details shown under the title. Markdown is supported.',required: false,}),labels: Property.Array({displayName: 'Labels',required: false,- description:- "The task's labels (a list of names that may represent either personal or shared labels)",+ description: "Replaces the task's labels with these names.",}),priority: Property.Number({displayName: 'Priority',- description: 'Task priority from 1 (normal) to 4 (urgent)',+ description: '1 is normal, 4 is urgent; Todoist shows 4 as P1.',required: false,+ width: 'half',}),due_date: Property.ShortText({- displayName: 'Due date',+ displayName: 'Due Date',description:- "Can be either a specific date in YYYY-MM-DD format relative to user's timezone, a specific date and time in RFC3339 format, or a human defined date (e.g. 'next Monday') using local time",+ 'YYYY-MM-DD or English words. Repeating dates work too.',+ placeholder: 'e.g. tomorrow 5pm',required: false,+ width: 'half',}),},diff --git a/packages/pieces/community/todoist/src/lib/common/client/rest-client.ts b/packages/pieces/community/todoist/src/lib/common/client/rest-client.tsindex 1112f5bf771..6b71a5e1b72 100644--- a/packages/pieces/community/todoist/src/lib/common/client/rest-client.ts+++ b/packages/pieces/community/todoist/src/lib/common/client/rest-client.ts@@ -363,7 +363,7 @@ const dueDateParams = (dueDate?: string) => {const parsedDate = Date.parse(dueDate);if (isNaN(parsedDate)) {return { due_string: dueDate };- } else if (/\d{4}-\d{2}-\d{2}/.test(dueDate)) {+ } else if (/^\d{4}-\d{2}-\d{2}$/.test(dueDate)) {return { due_date: dueDate };} else {return { due_datetime: new Date(parsedDate).toISOString() };diff --git a/packages/pieces/community/todoist/src/lib/common/props.ts b/packages/pieces/community/todoist/src/lib/common/props.tsindex b1072695af2..8dce8edb636 100644--- a/packages/pieces/community/todoist/src/lib/common/props.ts+++ b/packages/pieces/community/todoist/src/lib/common/props.ts@@ -1,4 +1,4 @@-import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';+import { Property } from '@activepieces/pieces-framework';import { todoistRestClient } from './client/rest-client';import { todoistAuth } from '../..';@@ -20,15 +20,15 @@ export const todoistProjectIdDropdown = (description: string) =>options: async ({ auth }) => {if (!auth) {return buildEmptyList({- placeholder: 'Please select an authentication',+ placeholder: 'Connect your Todoist account first',});}- const token = (auth as OAuth2PropertyValue).access_token;+ const token = auth.access_token;const projects = await todoistRestClient.projects.list({ token });if (projects.length === 0) {return buildEmptyList({- placeholder: 'No projects found! Please create a project.',+ placeholder: 'No projects found. Create one in Todoist first.',});}@@ -47,22 +47,23 @@ export const todoistProjectIdDropdown = (description: string) =>export const todoistSectionIdDropdown = Property.Dropdown({auth: todoistAuth,displayName: 'Section',+ description: 'Leave empty to add the task outside any section.',refreshers: ['project_id'],required: false,options: async ({ auth, project_id }) => {if (!auth) {return buildEmptyList({- placeholder: 'Please select an authentication',+ placeholder: 'Connect your Todoist account first',});}- const token = (auth as OAuth2PropertyValue).access_token;+ const token = auth.access_token;const projectId = project_id as string | undefined;const sections = await todoistRestClient.sections.list({ token, project_id: projectId });if (sections.length === 0) {return buildEmptyList({- placeholder: 'No sections found! Please create a section.',+ placeholder: 'No sections found. Create one in Todoist first.',});}diff --git a/packages/pieces/community/todoist/src/lib/triggers/task-completed-trigger.ts b/packages/pieces/community/todoist/src/lib/triggers/task-completed-trigger.tsindex 77b30c526b0..bf92c927e81 100644--- a/packages/pieces/community/todoist/src/lib/triggers/task-completed-trigger.ts+++ b/packages/pieces/community/todoist/src/lib/triggers/task-completed-trigger.ts@@ -46,7 +46,7 @@ export const todoistTaskCompletedTrigger = createTrigger({name: 'task_completed',classification: 'READ',displayName: 'Task Completed',- description: 'Triggers when a new task is completed',+ description: 'Fires when a task is marked complete.',aiMetadata: {description: 'Fires when a Todoist task is marked completed, emitting the completed task record. Polls for tasks closed since the last check, optionally limited to a single project (all projects if left blank).',},@@ -55,7 +55,7 @@ export const todoistTaskCompletedTrigger = createTrigger({props: {project_id: todoistProjectIdDropdown(- 'Leave it blank if you want to get completed tasks from all your projects.',+ 'Leave empty to watch every project.',),},diff --git a/packages/pieces/community/todoist/test/due-date.test.ts b/packages/pieces/community/todoist/test/due-date.test.tsnew file mode 100644index 00000000000..0939244ab4d--- /dev/null+++ b/packages/pieces/community/todoist/test/due-date.test.ts@@ -0,0 +1,80 @@+import { afterEach, describe, expect, test, vi } from 'vitest';+import { todoistRestClient } from '../src/lib/common/client/rest-client';++function stubFetch(): Seen[] {+ const seen: Seen[] = [];+ vi.stubGlobal(+ 'fetch',+ vi.fn(async (input: string | URL | Request, init?: RequestInit) => {+ const url = input instanceof Request ? input.url : String(input);+ const body = typeof init?.body === 'string' ? init.body : null;+ seen.push({ url, body });+ return new Response(JSON.stringify({ id: '6X7rM8997g3RQmvh' }), {+ status: 200,+ headers: { 'content-type': 'application/json' },+ });+ })+ );+ return seen;+}++function sentBody(seen: Seen[]): Record<string, unknown> {+ expect(seen).toHaveLength(1);+ const raw = seen[0].body;+ if (raw === null) {+ throw new Error('request had no body');+ }+ return JSON.parse(raw);+}++async function createWithDue(dueDate: string) {+ const seen = stubFetch();+ await todoistRestClient.tasks.create({+ token: 'TKN',+ content: 'Buy milk',+ due_date: dueDate,+ });+ return sentBody(seen);+}++async function updateWithDue(dueDate: string) {+ const seen = stubFetch();+ await todoistRestClient.tasks.update({+ token: 'TKN',+ task_id: '6X7rM8997g3RQmvh',+ due_date: dueDate,+ });+ return sentBody(seen);+}++afterEach(() => {+ vi.unstubAllGlobals();+});++describe.each([+ ['Create Task', createWithDue],+ ['Update Task', updateWithDue],+])('%s due date', (_name, send) => {+ test('a date-only value is sent as due_date', async () => {+ const body = await send('2026-12-31');+ expect(body['due_date']).toBe('2026-12-31');+ expect(body['due_datetime']).toBeUndefined();+ expect(body['due_string']).toBeUndefined();+ });++ test('a date-time with an offset is sent as due_datetime and keeps the instant', async () => {+ const body = await send('2026-12-31T15:00:00+02:00');+ expect(body['due_datetime']).toBe('2026-12-31T13:00:00.000Z');+ expect(body['due_date']).toBeUndefined();+ expect(body['due_string']).toBeUndefined();+ });++ test('natural-language text is sent as due_string', async () => {+ const body = await send('tomorrow 5pm');+ expect(body['due_string']).toBe('tomorrow 5pm');+ expect(body['due_date']).toBeUndefined();+ expect(body['due_datetime']).toBeUndefined();+ });+});++type Seen = { url: string; body: string | null };