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,78 @@
{
"Workforce management platform for scheduling and forecasting": "Personalverwaltungsplattform für Planung und Prognose",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "Sie können API-Schlüssel erhalten, indem Sie auf [Einstellungen->API](https://app.assembledhq.com/settings/api) navigieren.",
"Custom API Call": "Eigener API-Aufruf",
"Custom GraphQL": "Benutzerdefinierte GraphQL",
"Create OOO Request": "OOO-Anfrage erstellen",
"Add Shift on Assembled": "Umschicht bei Assembled hinzufügen",
"Update OOO Request": "OOO-Anfrage aktualisieren",
"Delete OOO Request": "OOO-Anfrage löschen",
"Make custom API calls to Assembled endpoints": "Eigene API-Aufrufe an zugewiesene Endpunkte tätigen",
"Perform a custom GraphQL query": "Benutzerdefinierte GraphQL-Abfrage ausführen",
"Create an Out of Office request in Assembled.": "Erstellen Sie eine Abwesenheitsanfrage in Assembled.",
"Add a new shift to a user's schedule in Assembled": "Fügen Sie einen neuen Schicht zum Zeitplan eines Benutzers in Assembled hinzu",
"Updates an existing OOO request.": "Aktualisiert eine bestehende OOO-Anfrage.",
"Cancel/delete a OOO request.": "OOO-Anfrage abbrechen/löschen.",
"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)",
"Query": "Abfrage",
"Parameters": "Parameter",
"Mock Mode": "Mock-Modus",
"User ID": "Benutzer-ID",
"Start Date": "Startdatum",
"End Date": "Enddatum",
"Activity Type ID": "Aktivitätstyle-ID",
"All Day Event": "Ganztägige Veranstaltung",
"Reason": "Grund",
"Agent ID": "Agenten-ID",
"Start Time": "Startzeit",
"End Time": "Endzeit",
"Date": "Datum",
"Shift Type": "Schichtart",
"Notes": "Notizen",
"OOO ID": "OOO ID",
"Status": "Status",
"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..",
"Use mock data for testing": "Verwende falsche Daten zum Testen",
"ID of the user requesting time off": "ID des Benutzers, der Time Off anfordert",
"Start date of the OOO period": "Startdatum des OOO-Zeitraums",
"End date of the OOO period": "Enddatum des OOO-Zeitraums",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID des Aktivitätstyps für ausgeschaltete Zeit (kann von Endpunkten der Aktivitätstypen abgerufen werden)",
"Whether this is an all-day OOO event": "Ob dies ein ganztägiger OOO-Event ist",
"Reason for the OOO request": "Grund für die OOO-Anfrage",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "Agent-ID der Person, der die Umschaltung zugewiesen werden soll (verwenden Sie das Feld agent_id vom /people Endpunkt, nicht die Person Id)",
"Start time of the shift": "Startzeit der Schicht",
"End time of the shift": "Endzeit der Schicht",
"Date of the shift": "Datum der Schicht",
"Type of shift": "Schichtart",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID des Aktivitätstyps für diese Verschiebung (erhalten Sie von /activity_types Endpunkt)",
"Additional notes for the shift": "Zusätzliche Notizen für die Schicht",
"ID of the user for the time off request (required for creating new request)": "ID des Benutzers für die Time Off-Anfrage (erforderlich für das Erstellen einer neuen Anfrage)",
"UUID of the activity type for time off (required for creating new request)": "UUID des Aktivitätstyps für Time Off (erforderlich für das Erstellen einer neuen Anfrage)",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD",
"Regular": "Normal",
"Overtime": "Überstunden",
"On-call": "Anruf",
"Training": "Training",
"Pending": "Ausstehend",
"Approved": "Genehmigt",
"Rejected": "Abgelehnt",
"Cancelled": "Abgebrochen",
"New OOO Request": "Neue OOO-Anfrage",
"OOO Status Changed": "OOO-Status geändert",
"Schedule Updated": "Zeitplan aktualisiert",
"Triggers when a new OOO request is created.": "Wird ausgelöst, wenn eine neue OOO-Anfrage erstellt wird.",
"Triggers on approval/rejection of OOO.": "Auslöser bei Genehmigung oder Ablehnung von OOO.",
"Triggers when user schedule is modified.": "Auslöser wenn Benutzerplan geändert wird."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Plataforma de gestión de la fuerza laboral para programar y predecir",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "Puedes obtener la clave API navegando a la página [Ajustes->API](https://app.assembledhq.com/settings/api).",
"Custom API Call": "Llamada API personalizada",
"Custom GraphQL": "GraphQL personalizado",
"Create OOO Request": "Crear solicitud OOO",
"Add Shift on Assembled": "Añadir turno al ensamblado",
"Update OOO Request": "Actualizar solicitud OOO",
"Delete OOO Request": "Eliminar solicitud OOO",
"Make custom API calls to Assembled endpoints": "Hacer llamadas API personalizadas a los extremos ensamblados",
"Perform a custom GraphQL query": "Realizar una consulta GraphQL personalizada",
"Create an Out of Office request in Assembled.": "Crear una solicitud fuera de la oficina en Assemblbled.",
"Add a new shift to a user's schedule in Assembled": "Añadir un nuevo turno a la programación de un usuario en Assemblbled",
"Updates an existing OOO request.": "Actualiza una solicitud OOO existente.",
"Cancel/delete a OOO request.": "Cancelar/borrar una solicitud OOO.",
"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)",
"Query": "Consulta",
"Parameters": "Parámetros",
"Mock Mode": "Modo simulado",
"User ID": "ID Usuario",
"Start Date": "Fecha de inicio",
"End Date": "Fecha de fin",
"Activity Type ID": "Tipo de actividad ID",
"All Day Event": "Evento de todo el día",
"Reason": "Razón",
"Agent ID": "ID del agente",
"Start Time": "Hora de inicio",
"End Time": "Hora de fin",
"Date": "Fecha",
"Shift Type": "Tipo de cambio",
"Notes": "Notas",
"OOO ID": "OOO ID",
"Status": "Estado",
"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.",
"Use mock data for testing": "Usar datos de simulación para probar",
"ID of the user requesting time off": "ID del usuario que solicita tiempo libre",
"Start date of the OOO period": "Fecha de inicio del período OOO",
"End date of the OOO period": "Fecha de fin del período OOO",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID del tipo de actividad por tiempo libre (se puede recuperar de los puntos finales de tipos de actividades)",
"Whether this is an all-day OOO event": "Si este es un evento OOO de todo el día",
"Reason for the OOO request": "Motivo de la solicitud OOO",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "ID del agente de la persona a la que asignar el turno (utilice el campo agent_id del endpoint /people, no el id de la persona)",
"Start time of the shift": "Hora de inicio del cambio",
"End time of the shift": "Hora de fin del cambio",
"Date of the shift": "Fecha del cambio",
"Type of shift": "Tipo de cambio",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID del tipo de actividad para este turno (obtener de /activity_types endpoint)",
"Additional notes for the shift": "Notas adicionales para el cambio",
"ID of the user for the time off request (required for creating new request)": "ID del usuario para la solicitud de tiempo ausente (requerido para crear una nueva solicitud)",
"UUID of the activity type for time off (required for creating new request)": "UUID del tipo de actividad por tiempo libre (requerido para crear una nueva solicitud)",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO",
"Regular": "Regular",
"Overtime": "Extraño",
"On-call": "On-call",
"Training": "Entrenamiento",
"Pending": "Pendiente",
"Approved": "Aprobado",
"Rejected": "Rechazado",
"Cancelled": "Cancelado",
"New OOO Request": "Nueva solicitud OOO",
"OOO Status Changed": "Estado de OOO cambiado",
"Schedule Updated": "Programación actualizada",
"Triggers when a new OOO request is created.": "Dispara cuando se crea una nueva solicitud OOO.",
"Triggers on approval/rejection of OOO.": "Desencadenadores sobre aprobación/rechazo de OOO.",
"Triggers when user schedule is modified.": "Dispara cuando se modifica la programación del usuario."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Plateforme de gestion des effectifs pour la planification et la prévision",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "Vous pouvez obtenir la clé API en accédant à la page [Paramètres->API](https://app.assembledhq.com/settings/api).",
"Custom API Call": "Appel d'API personnalisé",
"Custom GraphQL": "GraphQL personnalisé",
"Create OOO Request": "Créer une requête OOO",
"Add Shift on Assembled": "Ajouter Maj sur Assemblé",
"Update OOO Request": "Mettre à jour la requête OOO",
"Delete OOO Request": "Supprimer la requête OOO",
"Make custom API calls to Assembled endpoints": "Passer des appels API personnalisés vers des points de terminaison assemblés",
"Perform a custom GraphQL query": "Effectuer une requête GraphQL personnalisée",
"Create an Out of Office request in Assembled.": "Créez une demande hors bureau dans Assembled.",
"Add a new shift to a user's schedule in Assembled": "Ajouter un nouveau poste à l'horaire d'un utilisateur dans Assembled",
"Updates an existing OOO request.": "Met à jour une requête OOO existante.",
"Cancel/delete a OOO request.": "Annuler/supprimer une requête OOO.",
"Method": "Méthode",
"Headers": "Headers",
"Query Parameters": "Paramètres de requête",
"Body": "Body",
"Response is Binary ?": "La réponse est Binaire ?",
"No Error on Failure": "Aucune erreur en cas d'échec",
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
"Query": "Requête",
"Parameters": "Paramètres",
"Mock Mode": "Mode fiction",
"User ID": "Identifiant de l'utilisateur",
"Start Date": "Date de début",
"End Date": "Date de fin",
"Activity Type ID": "ID du type d'activité",
"All Day Event": "Evénement de toute la journée",
"Reason": "Raison",
"Agent ID": "ID de l'agent",
"Start Time": "Start Time",
"End Time": "Heure de fin",
"Date": "Date",
"Shift Type": "Type de Maj",
"Notes": "Notes",
"OOO ID": "OOO ID",
"Status": "Statut",
"Authorization headers are injected automatically from your connection.": "Les headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
"Use mock data for testing": "Utiliser les données fictives pour les tests",
"ID of the user requesting time off": "ID de l'utilisateur qui demande une interruption",
"Start date of the OOO period": "Date de début de la période OOO",
"End date of the OOO period": "Date de fin de la période OOO",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID du type d'activité pour l'interruption (peut être récupéré à partir des points de terminaison des types d'activité)",
"Whether this is an all-day OOO event": "Si c'est un événement OOO toute la journée",
"Reason for the OOO request": "Raison de la requête OOO",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "ID de l'agent de la personne à assigner le changement (utilisez le champ agent_id depuis /people endpoint, pas l'id de la personne)",
"Start time of the shift": "Heure de début du décalage",
"End time of the shift": "Heure de fin du décalage",
"Date of the shift": "Date du décalage",
"Type of shift": "Type de décalage",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID du type d'activité pour ce décalage (obtenu depuis le point de terminaison /activity_types)",
"Additional notes for the shift": "Notes supplémentaires pour le décalage",
"ID of the user for the time off request (required for creating new request)": "ID de l'utilisateur pour la demande de temps d'arrêt (requis pour créer une nouvelle requête)",
"UUID of the activity type for time off (required for creating new request)": "UUID du type d'activité pour le congé (requis pour créer une nouvelle requête)",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"Regular": "Régulièrement",
"Overtime": "Délai supplémentaire",
"On-call": "Appel en cours",
"Training": "Entrainement",
"Pending": "En attente",
"Approved": "Approuvé",
"Rejected": "Rejeté",
"Cancelled": "Annulé",
"New OOO Request": "Nouvelle requête OOO",
"OOO Status Changed": "Statut OOO modifié",
"Schedule Updated": "Horaire mis à jour",
"Triggers when a new OOO request is created.": "Déclenche quand une nouvelle requête OOO est créée.",
"Triggers on approval/rejection of OOO.": "Déclenche sur approbation/rejet d'OOO.",
"Triggers when user schedule is modified.": "Déclenche lorsque l'horaire de l'utilisateur est modifié."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "スケジューリングと予測のための労働力管理プラットフォーム",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "[Settings->API](https://app.assembledhq.com/settings/apiページ) に移動して、API キーを取得できます。",
"Custom API Call": "カスタムAPI通話",
"Custom GraphQL": "カスタムGraphQL",
"Create OOO Request": "OOO リクエストを作成",
"Add Shift on Assembled": "シフトをアセンブリに追加",
"Update OOO Request": "OOOリクエストを更新",
"Delete OOO Request": "OOO リクエストを削除",
"Make custom API calls to Assembled endpoints": "アセンブルされたエンドポイントにカスタム API コールを実行する",
"Perform a custom GraphQL query": "カスタム GraphQL クエリを実行します",
"Create an Out of Office request in Assembled.": "AssembledでOfficeアウトリクエストを作成します。",
"Add a new shift to a user's schedule in Assembled": "アセンブリでユーザーのスケジュールに新しいシフトを追加します。",
"Updates an existing OOO request.": "既存の OOO リクエストを更新します。",
"Cancel/delete a OOO request.": "OOO リクエストをキャンセル/削除します。",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"Query": "クエリ",
"Parameters": "パラメータ",
"Mock Mode": "モックモード",
"User ID": "ユーザー ID",
"Start Date": "開始日",
"End Date": "終了日",
"Activity Type ID": "アクティビティタイプID",
"All Day Event": "終日イベント",
"Reason": "理由:",
"Agent ID": "エージェントID",
"Start Time": "開始時刻",
"End Time": "終了時刻",
"Date": "日付",
"Shift Type": "シフトタイプ",
"Notes": "メモ",
"OOO ID": "OOO ID",
"Status": "Status",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"Use mock data for testing": "テストにモックデータを使用",
"ID of the user requesting time off": "ユーザーの ID が時間オフを要求しています",
"Start date of the OOO period": "OOO期間の開始日",
"End date of the OOO period": "OOO期間の終了日",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "時間切れのアクティビティタイプのUUIDアクティビティタイプのエンドポイントから取得可能",
"Whether this is an all-day OOO event": "これが終日OOOイベントであるかどうか",
"Reason for the OOO request": "OOOリクエストの理由",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "シフトを割り当てる担当者のエージェントID個人IDではなく/personエンドポイントからagent_idフィールドを使用",
"Start time of the shift": "シフトの開始時刻",
"End time of the shift": "シフトの終了時間",
"Date of the shift": "シフトの日付",
"Type of shift": "シフトの種類",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "このシフトのアクティビティタイプの UUID (/activity_types エンドポイントから取得)",
"Additional notes for the shift": "シフトの追加ノート",
"ID of the user for the time off request (required for creating new request)": "期間オフリクエストのユーザーID新規リクエストの作成に必要",
"UUID of the activity type for time off (required for creating new request)": "時間切れのアクティビティタイプの UUID (新しいリクエストを作成するために必要)",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭",
"Regular": "標準",
"Overtime": "残業時間",
"On-call": "通話中",
"Training": "トレーニング",
"Pending": "処理待ち",
"Approved": "承認済み",
"Rejected": "拒否",
"Cancelled": "キャンセルしました",
"New OOO Request": "新しいOOOリクエスト",
"OOO Status Changed": "OOO ステータスが変更されました",
"Schedule Updated": "スケジュールが更新されました",
"Triggers when a new OOO request is created.": "新しい OOO リクエストが作成されたときにトリガーします。",
"Triggers on approval/rejection of OOO.": "OOOの承認/拒否をトリガーします。",
"Triggers when user schedule is modified.": "ユーザーのスケジュールが変更されたときにトリガーします。"
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Werknemersbeheer platform voor planning en voorspellingen",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "U kunt API-sleutel verkrijgen door te navigeren naar de [Instellingen->API](https://app.assembledhq.com/settings/api) pagina.",
"Custom API Call": "Custom API Call",
"Custom GraphQL": "Aangepaste GraphQL",
"Create OOO Request": "OOO-verzoek maken",
"Add Shift on Assembled": "Voeg Shift toe op Assemblee",
"Update OOO Request": "OOOO-verzoek bijwerken",
"Delete OOO Request": "OOOO-verzoek verwijderen",
"Make custom API calls to Assembled endpoints": "Aangepaste API-aanroepen naar samengestelde eindpunten",
"Perform a custom GraphQL query": "Een aangepaste GraphQL query uitvoeren",
"Create an Out of Office request in Assembled.": "Maak een \"Geen kantoor”-verzoek aan in de Buurderij.",
"Add a new shift to a user's schedule in Assembled": "Voeg een nieuwe dienst toe aan het schema van een gebruiker in de Buurderij",
"Updates an existing OOO request.": "Werkt een bestaand OOOO-verzoek bij.",
"Cancel/delete a OOO request.": "Annuleren/verwijderen van een OOO-verzoek.",
"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)",
"Query": "Zoekopdracht",
"Parameters": "Parameters",
"Mock Mode": "Modus nekken",
"User ID": "Gebruiker ID",
"Start Date": "Start datum",
"End Date": "Eind datum",
"Activity Type ID": "Activiteit type ID",
"All Day Event": "Hele Dag Evenement",
"Reason": "Reden",
"Agent ID": "Agent ID",
"Start Time": "Starttijd",
"End Time": "Eind Tijd",
"Date": "Datum:",
"Shift Type": "Shift Type",
"Notes": "Opmerkingen",
"OOO ID": "OOO ID",
"Status": "status",
"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..",
"Use mock data for testing": "nepgegevens gebruiken voor testen",
"ID of the user requesting time off": "ID van de aanvraagtijd van de gebruiker",
"Start date of the OOO period": "Startdatum van de OOO periode",
"End date of the OOO period": "Einddatum van de OOO periode",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID van het activiteitstype voor uitschakeling (kan worden opgehaald van activiteitstypen eindpunten)",
"Whether this is an all-day OOO event": "Of dit een alledaags OOO-evenement is",
"Reason for the OOO request": "Reden voor het OOO-verzoek",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "Agent ID van de persoon waaraan de dienst moet worden toegewezen (gebruik het agent_id veld van /people endpoint, niet de persoon id)",
"Start time of the shift": "Start tijd van dienst",
"End time of the shift": "Eindtijd van de dienst",
"Date of the shift": "Datum van de dienst",
"Type of shift": "Soort dienst",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID van het activiteitstype voor deze verschuiving (haal van /activity_types eindpunt)",
"Additional notes for the shift": "Aanvullende notities voor de dienst",
"ID of the user for the time off request (required for creating new request)": "ID van de gebruiker voor de 'time-off aanvraag' (vereist voor het maken van een nieuwe aanvraag)",
"UUID of the activity type for time off (required for creating new request)": "UUID van het activiteitstype voor time-off (vereist voor het maken van nieuwe aanvraag)",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD",
"Regular": "Normaal",
"Overtime": "Overtijd",
"On-call": "Actieve oproep",
"Training": "Opleiding",
"Pending": "In behandeling",
"Approved": "Goedgekeurd",
"Rejected": "Geweigerd",
"Cancelled": "Geannuleerd",
"New OOO Request": "Nieuw OOOO-verzoek",
"OOO Status Changed": "OOO status veranderd",
"Schedule Updated": "Schema bijgewerkt",
"Triggers when a new OOO request is created.": "Triggert wanneer een nieuw OOOO-verzoek wordt aangemaakt.",
"Triggers on approval/rejection of OOO.": "Triggers bij goedkeuring/afwijzing van OO.",
"Triggers when user schedule is modified.": "Triggert wanneer het gebruikersschema is gewijzigd."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Plataforma de gerenciamento da força de trabalho para agendamento e previsão",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "Você pode obter a chave de API navegando em [Configurações->API](https://app.assembledhq.com/settings/api) página.",
"Custom API Call": "Chamada de API personalizada",
"Custom GraphQL": "Gráfico personalizado",
"Create OOO Request": "Criar solicitação OOO",
"Add Shift on Assembled": "Adicionar Shift no Montador",
"Update OOO Request": "Atualizar solicitação OOO",
"Delete OOO Request": "Excluir Pedido OOOO",
"Make custom API calls to Assembled endpoints": "Fazer chamadas personalizadas de API para pontos de extremidade Assembled",
"Perform a custom GraphQL query": "Executar uma consulta personalizada do GraphQL",
"Create an Out of Office request in Assembled.": "Crie uma solicitação de Fora do Escritório no montado.",
"Add a new shift to a user's schedule in Assembled": "Adicionar uma nova mudança à agenda de um usuário no Montado",
"Updates an existing OOO request.": "Atualiza uma solicitação OOO existente.",
"Cancel/delete a OOO request.": "Cancelar/excluir uma solicitação OO.",
"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)",
"Query": "Requisição",
"Parameters": "Parâmetros",
"Mock Mode": "Modo de Simulação",
"User ID": "ID de usuário",
"Start Date": "Data Inicial",
"End Date": "Data de Término",
"Activity Type ID": "ID Tipo de Atividade",
"All Day Event": "Evento de dia inteiro",
"Reason": "Motivo",
"Agent ID": "ID representante",
"Start Time": "Hora de início",
"End Time": "Hora de término",
"Date": "Encontro",
"Shift Type": "Tipo de turno",
"Notes": "Observações",
"OOO ID": "OOO ID",
"Status": "Estado",
"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..",
"Use mock data for testing": "Usar dados fictícios para teste",
"ID of the user requesting time off": "ID do usuário que solicitou tempo de desconto",
"Start date of the OOO period": "Data de início do período OOO",
"End date of the OOO period": "Data de término do período OO",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID do tipo de atividade para desligar o tempo (pode ser recuperado a partir de pontos de extremidade do tipo de atividade)",
"Whether this is an all-day OOO event": "Se este é um evento OOO de todos os dias",
"Reason for the OOO request": "Motivo da solicitação OOO",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "ID do representante da pessoa para atribuir o turno para (use o campo agent_id de /people endpoint, não a pessoa id)",
"Start time of the shift": "Hora de início do turno",
"End time of the shift": "Hora de término do turno",
"Date of the shift": "Data do turno",
"Type of shift": "Tipo de turno",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID do tipo de atividade para este turno (obtenha ponto de extremidade /activity_types)",
"Additional notes for the shift": "Notas adicionais para o turno",
"ID of the user for the time off request (required for creating new request)": "ID do usuário para a solicitação de pausa (necessário para criar nova solicitação)",
"UUID of the activity type for time off (required for creating new request)": "UUID do tipo de atividade para desligar o tempo (necessário para criar nova solicitação)",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA",
"Regular": "Padrão",
"Overtime": "Tempo Exterior",
"On-call": "Ligação",
"Training": "Treino",
"Pending": "Pendente",
"Approved": "Aceito",
"Rejected": "Rejeitados",
"Cancelled": "Cancelado",
"New OOO Request": "Nova solicitação OOO",
"OOO Status Changed": "Estado OOO Alterado",
"Schedule Updated": "Programação Atualizada",
"Triggers when a new OOO request is created.": "Aciona quando uma nova solicitação OOO é criada.",
"Triggers on approval/rejection of OOO.": "Disparadores na aprovação/rejeição de OO.",
"Triggers when user schedule is modified.": "Dispara quando o agendamento do usuário é modificado."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Workforce management platform for scheduling and forecasting",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.",
"Custom API Call": "Custom API Call",
"Custom GraphQL": "Custom GraphQL",
"Create OOO Request": "Create OOO Request",
"Add Shift on Assembled": "Add Shift on Assembled",
"Update OOO Request": "Update OOO Request",
"Delete OOO Request": "Delete OOO Request",
"Make custom API calls to Assembled endpoints": "Make custom API calls to Assembled endpoints",
"Perform a custom GraphQL query": "Perform a custom GraphQL query",
"Create an Out of Office request in Assembled.": "Create an Out of Office request in Assembled.",
"Add a new shift to a user's schedule in Assembled": "Add a new shift to a user's schedule in Assembled",
"Updates an existing OOO request.": "Updates an existing OOO request.",
"Cancel/delete a OOO request.": "Cancel/delete a OOO request.",
"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)",
"Query": "Query",
"Parameters": "Parameters",
"Mock Mode": "Mock Mode",
"User ID": "User ID",
"Start Date": "Start Date",
"End Date": "End Date",
"Activity Type ID": "Activity Type ID",
"All Day Event": "All Day Event",
"Reason": "Reason",
"Agent ID": "Agent ID",
"Start Time": "Start Time",
"End Time": "End Time",
"Date": "Date",
"Shift Type": "Shift Type",
"Notes": "Notes",
"OOO ID": "OOO ID",
"Status": "Status",
"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..",
"Use mock data for testing": "Use mock data for testing",
"ID of the user requesting time off": "ID of the user requesting time off",
"Start date of the OOO period": "Start date of the OOO period",
"End date of the OOO period": "End date of the OOO period",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID of the activity type for time off (can be retrieved from activity types endpoints)",
"Whether this is an all-day OOO event": "Whether this is an all-day OOO event",
"Reason for the OOO request": "Reason for the OOO request",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)",
"Start time of the shift": "Start time of the shift",
"End time of the shift": "End time of the shift",
"Date of the shift": "Date of the shift",
"Type of shift": "Type of shift",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID of the activity type for this shift (get from /activity_types endpoint)",
"Additional notes for the shift": "Additional notes for the shift",
"ID of the user for the time off request (required for creating new request)": "ID of the user for the time off request (required for creating new request)",
"UUID of the activity type for time off (required for creating new request)": "UUID of the activity type for time off (required for creating new request)",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"Regular": "Regular",
"Overtime": "Overtime",
"On-call": "On-call",
"Training": "Training",
"Pending": "Pending",
"Approved": "Approved",
"Rejected": "Rejected",
"Cancelled": "Cancelled",
"New OOO Request": "New OOO Request",
"OOO Status Changed": "OOO Status Changed",
"Schedule Updated": "Schedule Updated",
"Triggers when a new OOO request is created.": "Triggers when a new OOO request is created.",
"Triggers on approval/rejection of OOO.": "Triggers on approval/rejection of OOO.",
"Triggers when user schedule is modified.": "Triggers when user schedule is modified."
}

View File

@@ -0,0 +1,78 @@
{
"Workforce management platform for scheduling and forecasting": "Workforce management platform for scheduling and forecasting",
"You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.": "You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.",
"Custom API Call": "自定义 API 呼叫",
"Custom GraphQL": "Custom GraphQL",
"Create OOO Request": "Create OOO Request",
"Add Shift on Assembled": "Add Shift on Assembled",
"Update OOO Request": "Update OOO Request",
"Delete OOO Request": "Delete OOO Request",
"Make custom API calls to Assembled endpoints": "Make custom API calls to Assembled endpoints",
"Perform a custom GraphQL query": "Perform a custom GraphQL query",
"Create an Out of Office request in Assembled.": "Create an Out of Office request in Assembled.",
"Add a new shift to a user's schedule in Assembled": "Add a new shift to a user's schedule in Assembled",
"Updates an existing OOO request.": "Updates an existing OOO request.",
"Cancel/delete a OOO request.": "Cancel/delete a OOO request.",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"Query": "Query",
"Parameters": "Parameters",
"Mock Mode": "Mock Mode",
"User ID": "User ID",
"Start Date": "Start Date",
"End Date": "End Date",
"Activity Type ID": "Activity Type ID",
"All Day Event": "All Day Event",
"Reason": "Reason",
"Agent ID": "Agent ID",
"Start Time": "开始时间",
"End Time": "End Time",
"Date": "Date",
"Shift Type": "Shift Type",
"Notes": "Notes",
"OOO ID": "OOO ID",
"Status": "状态",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"Use mock data for testing": "Use mock data for testing",
"ID of the user requesting time off": "ID of the user requesting time off",
"Start date of the OOO period": "Start date of the OOO period",
"End date of the OOO period": "End date of the OOO period",
"UUID of the activity type for time off (can be retrieved from activity types endpoints)": "UUID of the activity type for time off (can be retrieved from activity types endpoints)",
"Whether this is an all-day OOO event": "Whether this is an all-day OOO event",
"Reason for the OOO request": "Reason for the OOO request",
"Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)": "Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)",
"Start time of the shift": "Start time of the shift",
"End time of the shift": "End time of the shift",
"Date of the shift": "Date of the shift",
"Type of shift": "Type of shift",
"UUID of the activity type for this shift (get from /activity_types endpoint)": "UUID of the activity type for this shift (get from /activity_types endpoint)",
"Additional notes for the shift": "Additional notes for the shift",
"ID of the user for the time off request (required for creating new request)": "ID of the user for the time off request (required for creating new request)",
"UUID of the activity type for time off (required for creating new request)": "UUID of the activity type for time off (required for creating new request)",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色",
"Regular": "Regular",
"Overtime": "Overtime",
"On-call": "On-call",
"Training": "Training",
"Pending": "待處理",
"Approved": "Approved",
"Rejected": "Rejected",
"Cancelled": "Cancelled",
"New OOO Request": "New OOO Request",
"OOO Status Changed": "OOO Status Changed",
"Schedule Updated": "Schedule Updated",
"Triggers when a new OOO request is created.": "Triggers when a new OOO request is created.",
"Triggers on approval/rejection of OOO.": "Triggers on approval/rejection of OOO.",
"Triggers when user schedule is modified.": "Triggers when user schedule is modified."
}

View File

@@ -0,0 +1,36 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { customApiCall } from './lib/actions/custom-api-call';
import { customGraphql } from './lib/actions/custom-graphql';
import { OOO } from './lib/actions/ooo';
import { updateOOO } from './lib/actions/update-OOO';
import { deleteOOO } from './lib/actions/delete-OOO'
import { addShift } from './lib/actions/add-shift';
import { scheduleUpdated } from './lib/triggers/schedule-updated';
import { timeOffStatusChanged } from './lib/triggers/OOO-status-changed';
import { newTimeOffRequest } from './lib/triggers/new-OOO-request';
import { assembledAuth } from './lib/common/auth';
export const assembled = createPiece({
displayName: 'Assembled',
description: 'Workforce management platform for scheduling and forecasting',
auth: assembledAuth,
minimumSupportedRelease: '0.20.0',
logoUrl: 'https://cdn.activepieces.com/pieces/assembled.png',
categories: [PieceCategory.PRODUCTIVITY, PieceCategory.HUMAN_RESOURCES],
authors: ['meenulekha-premakumar'],
actions: [
customApiCall,
customGraphql,
OOO,
addShift,
updateOOO,
deleteOOO,
],
triggers: [
newTimeOffRequest,
timeOffStatusChanged,
scheduleUpdated,
],
});

View File

@@ -0,0 +1,85 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const addShift = createAction({
auth: assembledAuth,
name: 'add_shift',
displayName: 'Add Shift on Assembled',
description: 'Add a new shift to a user\'s schedule in Assembled',
props: {
agent_id: Property.ShortText({
displayName: 'Agent ID',
description: 'Agent ID of the person to assign the shift to (use the agent_id field from /people endpoint, not the person id)',
required: true,
}),
start_time: Property.DateTime({
displayName: 'Start Time',
description: 'Start time of the shift',
required: true,
}),
end_time: Property.DateTime({
displayName: 'End Time',
description: 'End time of the shift',
required: true,
}),
shift_type: Property.StaticDropdown({
displayName: 'Shift Type',
description: 'Type of shift',
required: false,
defaultValue: 'regular',
options: {
options: [
{ label: 'Regular', value: 'regular' },
{ label: 'Overtime', value: 'overtime' },
{ label: 'On-call', value: 'on_call' },
{ label: 'Training', value: 'training' },
],
},
}),
activity_type_id: Property.ShortText({
displayName: 'Activity Type ID',
description: 'UUID of the activity type for this shift (get from /activity_types endpoint)',
required: true,
}),
notes: Property.LongText({
displayName: 'Notes',
description: 'Additional notes for the shift',
required: false,
}),
},
async run(context) {
const { agent_id, start_time, end_time, shift_type, activity_type_id, notes } = context.propsValue;
try {
// Convert to Unix timestamps as required by Assembled API
const startTimestamp = Math.floor(new Date(start_time).getTime() / 1000);
const endTimestamp = Math.floor(new Date(end_time).getTime() / 1000);
const shiftData = {
agent_id: agent_id,
type_id: activity_type_id,
start_time: startTimestamp,
end_time: endTimestamp,
description: notes || `${shift_type || 'regular'} shift`,
};
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.POST,
'/activities',
shiftData
);
return {
success: true,
shift_id: response.body.id,
message: 'Shift added successfully',
data: response.body,
};
} catch (error) {
throw new Error(`Failed to add shift: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
},
});

View File

@@ -0,0 +1,14 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const customApiCall = createCustomApiCallAction({
auth: assembledAuth,
name: 'custom_api_call',
displayName: 'Custom API Call',
description: 'Make custom API calls to Assembled endpoints',
baseUrl: () => 'https://api.assembledhq.com/v0',
authMapping: async (auth) => ({
'Authorization': `Basic ${Buffer.from(auth.secret_text + ':').toString('base64')}`,
'Content-Type': 'application/json',
}),
});

View File

@@ -0,0 +1,22 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { assembledAuth } from '../common/auth';
export const customGraphql = createAction({
name: 'custom_graphql',
displayName: 'Custom GraphQL',
description: 'Perform a custom GraphQL query',
auth: assembledAuth,
props: {
query: Property.LongText({ displayName: 'Query', required: true }),
variables: Property.Object({ displayName: 'Parameters', required: false }),
},
async run({ auth, propsValue }) {
const client = assembledCommon.makeClient(auth.secret_text);
const result = await client.rawRequest(
propsValue.query,
propsValue.variables
);
return result;
},
});

View File

@@ -0,0 +1,33 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const deleteOOO = createAction({
auth: assembledAuth,
name: 'delete_OOO',
displayName: 'Delete OOO Request',
description: 'Cancel/delete a OOO request.',
props: {
OOO_id: Property.ShortText({
displayName: 'OOO ID',
required: true,
}),
},
async run(context) {
const { OOO_id } = context.propsValue;
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.POST,
`/time_off/${OOO_id}/cancel`,
{}
);
return {
success: true,
message: 'OOO request deleted successfully',
data: response.body,
};
},
});

View File

@@ -0,0 +1,41 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const getUserSchedule = createAction({
auth: assembledAuth,
name: 'get_user_schedule',
displayName: 'Get User Schedule',
description: 'Retrieves user\'s schedule for specified period.',
props: {
user_id: Property.ShortText({
displayName: 'User ID',
required: true,
}),
start_date: Property.DateTime({
displayName: 'Start Date',
required: true,
}),
end_date: Property.DateTime({
displayName: 'End Date',
required: true,
}),
},
async run(context) {
const { user_id, start_date, end_date } = context.propsValue;
const params = new URLSearchParams({
start_date: assembledCommon.formatDate(start_date),
end_date: assembledCommon.formatDate(end_date),
});
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.GET,
`/users/${user_id}/schedule?${params.toString()}`
);
return response.body;
},
});

View File

@@ -0,0 +1,97 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const OOO = createAction({
auth: assembledAuth,
name: 'OOO',
displayName: 'Create OOO Request',
description: 'Create an Out of Office request in Assembled.',
props: {
mock_mode: Property.Checkbox({
displayName: 'Mock Mode',
description: 'Use mock data for testing',
required: false,
defaultValue: true,
}),
user_id: Property.ShortText({
displayName: 'User ID',
description: 'ID of the user requesting time off',
required: true,
}),
start_date: Property.DateTime({
displayName: 'Start Date',
description: 'Start date of the OOO period',
required: true,
}),
end_date: Property.DateTime({
displayName: 'End Date',
description: 'End date of the OOO period',
required: true,
}),
activity_type_id: Property.ShortText({
displayName: 'Activity Type ID',
description: 'UUID of the activity type for time off (can be retrieved from activity types endpoints)',
required: true,
}),
all_day: Property.Checkbox({
displayName: 'All Day Event',
description: 'Whether this is an all-day OOO event',
required: false,
defaultValue: true,
}),
reason: Property.LongText({
displayName: 'Reason',
description: 'Reason for the OOO request',
required: false,
}),
},
async run(context) {
const { mock_mode, user_id, start_date, end_date, activity_type_id, all_day, reason } = context.propsValue;
// Mock response for testing
if (mock_mode) {
return {
success: true,
message: 'Mock OOO created successfully',
data: {
id: `mock_ooo_${Date.now()}`,
user_id,
start_date,
end_date,
activity_type_id: activity_type_id || 'mock-activity-type-id',
status: 'pending',
created_at: new Date().toISOString(),
}
};
}
try {
const oooData = {
user_id: user_id,
start_time: Math.floor(new Date(start_date).getTime() / 1000),
end_time: Math.floor(new Date(end_date).getTime() / 1000),
activity_type_id,
all_day: all_day ?? true,
description: reason || '',
};
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.POST,
'/time_off',
oooData
);
return {
success: true,
ooo_id: response.body.id,
message: 'OOO request created successfully',
data: response.body,
};
} catch (error) {
throw new Error(`Failed to create OOO request: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
},
});

View File

@@ -0,0 +1,95 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const updateOOO = createAction({
auth: assembledAuth,
name: 'update_OOO',
displayName: 'Update OOO Request',
description: 'Updates an existing OOO request.',
props: {
OOO_id: Property.ShortText({
displayName: 'OOO ID',
required: true,
}),
start_date: Property.DateTime({
displayName: 'Start Date',
required: false,
}),
end_date: Property.DateTime({
displayName: 'End Date',
required: false,
}),
status: Property.StaticDropdown({
displayName: 'Status',
required: false,
options: {
options: [
{ label: 'Pending', value: 'pending' },
{ label: 'Approved', value: 'approved' },
{ label: 'Rejected', value: 'rejected' },
{ label: 'Cancelled', value: 'cancelled' },
],
},
}),
reason: Property.LongText({
displayName: 'Reason',
required: false,
}),
user_id: Property.ShortText({
displayName: 'User ID',
description: 'ID of the user for the time off request (required for creating new request)',
required: true,
}),
activity_type_id: Property.ShortText({
displayName: 'Activity Type ID',
description: 'UUID of the activity type for time off (required for creating new request)',
required: true,
}),
},
async run(context) {
const { OOO_id, start_date, end_date, status, reason, user_id, activity_type_id } = context.propsValue;
// no direct endpoint to update a time off request, so need to cancel and create new time off request
try {
// cancel the existing time off request
console.log(`Canceling existing time off request: ${OOO_id}`);
await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.POST,
`/time_off/${OOO_id}/cancel`
);
// create new time off request with updated details
console.log('Creating new time off request with updated details');
const newRequestData: Record<string, unknown> = {
user_id,
activity_type_id,
all_day: true,
};
if (start_date) newRequestData['start_time'] = Math.floor(new Date(start_date).getTime() / 1000);
if (end_date) newRequestData['end_time'] = Math.floor(new Date(end_date).getTime() / 1000);
if (reason) newRequestData['description'] = reason;
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.POST,
'/time_off',
newRequestData
);
return {
success: true,
message: 'Time off request updated successfully (canceled old and created new)',
canceled_request_id: OOO_id,
new_request_id: response.body.id,
data: response.body,
};
} catch (error) {
throw new Error(`Failed to update time off request: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
},
});

View File

@@ -0,0 +1,7 @@
import { PieceAuth } from '@activepieces/pieces-framework';
export const assembledAuth = PieceAuth.SecretText({
displayName: 'API Key',
description: `You can obtain API key by navigating to [Settings->API](https://app.assembledhq.com/settings/api) page.`,
required: true,
});

View File

@@ -0,0 +1,48 @@
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
export const assembledCommon = {
baseUrl: 'https://api.assembledhq.com/v0',
async makeRequest(
auth: string,
method: HttpMethod,
endpoint: string,
body?: unknown,
headers?: Record<string, string>
) {
const url = endpoint.startsWith('http') ? endpoint : `${this.baseUrl}${endpoint}`;
return await httpClient.sendRequest({
method,
url,
headers: {
'Authorization': `Basic ${Buffer.from(auth + ':').toString('base64')}`,
'Content-Type': 'application/json',
...headers,
},
body,
});
},
formatDateTime(date: string | Date): string {
return new Date(date).toISOString();
},
formatDate(date: string | Date): string {
return new Date(date).toISOString().split('T')[0];
},
makeClient(auth: string) {
return {
rawRequest: async (query: string, variables?: Record<string, unknown>) => {
const response = await this.makeRequest(
auth,
HttpMethod.POST,
'/graphql',
{ query, variables }
);
return response.body;
}
};
}
};

View File

@@ -0,0 +1,64 @@
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const timeOffStatusChanged = createTrigger({
auth: assembledAuth,
name: 'OOO_status_changed',
displayName: 'OOO Status Changed',
description: 'Triggers on approval/rejection of OOO.',
type: TriggerStrategy.POLLING,
props: {},
sampleData: {
id: '<uuid>',
time_off_request_id: '<uuid>',
created_at: 1546303260,
comment: 'Enjoy your vacation',
type: 'approve',
time_off_request: {
id: '<uuid>',
agent_id: '<uuid>',
start_time: 1546303260,
end_time: 1546303270,
created_at: 1546303260,
description: 'Going to the dentist',
status: 'approved',
activity_type_id: '<uuid>'
}
},
async onEnable(context) {
await context.store.put('lastStatusCheck', Math.floor(Date.now() / 1000));
},
async onDisable() {
// No cleanup needed
},
async run(context) {
const lastCheck = await context.store.get('lastStatusCheck') || Math.floor(Date.now() / 1000) - 86400; // 24 hours ago in Unix timestamp
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.GET,
`/time_off/updates?updated_since=${lastCheck}&type=approve`
);
// Handle the documented response structure
const timeOffUpdates = response.body.time_off_updates || {};
const timeOffRequests = response.body.time_off_requests || {};
// Transform the response to include both update and request data
const statusChanges = Object.values(timeOffUpdates).map((update: any) => {
const request = timeOffRequests[update.time_off_request_id];
return {
...update,
time_off_request: request
};
});
if (statusChanges.length > 0) {
await context.store.put('lastStatusCheck', Math.floor(Date.now() / 1000));
}
return statusChanges;
},
});

View File

@@ -0,0 +1,48 @@
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const newTimeOffRequest = createTrigger({
auth: assembledAuth,
name: 'new_OOO_request',
displayName: 'New OOO Request',
description: 'Triggers when a new OOO request is created.',
type: TriggerStrategy.POLLING,
props: {},
sampleData: {
id: '<uuid>',
agent_id: '<uuid>',
start_time: 1546303260,
end_time: 1546303270,
created_at: 1546303260,
description: 'Going to the dentist',
status: 'approved',
activity_type_id: '<uuid>',
},
async onEnable(context) {
await context.store.put('lastCheck', Math.floor(Date.now() / 1000));
},
async onDisable() {
// Cleanup if needed
},
async run(context) {
const lastCheck = await context.store.get('lastCheck') || Math.floor(Date.now() / 1000) - 86400;
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.GET,
`/time_off/requests?updated_since=${lastCheck}&limit=100`
);
// Handle the documented response structure
const timeOffRequests = response.body.time_off_requests || {};
const newRequests = Object.values(timeOffRequests);
if (newRequests.length > 0) {
await context.store.put('lastCheck', Math.floor(Date.now() / 1000));
}
return newRequests;
},
});

View File

@@ -0,0 +1,42 @@
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { assembledCommon } from '../common';
import { HttpMethod } from '@activepieces/pieces-common';
import { assembledAuth } from '../common/auth';
export const scheduleUpdated = createTrigger({
auth: assembledAuth,
name: 'schedule_updated',
displayName: 'Schedule Updated',
description: 'Triggers when user schedule is modified.',
type: TriggerStrategy.POLLING,
props: {},
sampleData: {
user_id: 'user_456',
schedule_id: 'sched_123',
changes: ['shift_added', 'shift_modified'],
updated_at: '2025-01-15T10:00:00Z',
},
async onEnable(context) {
await context.store.put('lastScheduleCheck', new Date().toISOString());
},
async onDisable() {
// Cleanup if needed
},
async run(context) {
const lastCheck = await context.store.get('lastScheduleCheck') || new Date(Date.now() - 60 * 60 * 1000).toISOString();
const response = await assembledCommon.makeRequest(
context.auth.secret_text,
HttpMethod.GET,
`/events?type=schedule_updated&after=${lastCheck}&limit=100`
);
const scheduleUpdates = response.body.data || [];
if (scheduleUpdates.length > 0) {
await context.store.put('lastScheduleCheck', new Date().toISOString());
}
return scheduleUpdates;
},
});