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,18 @@
{
"extends": ["../../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}

View File

@@ -0,0 +1,7 @@
# pieces-freshdesk
This library was generated with [Nx](https://nx.dev).
## Running lint
Run `nx lint pieces-freshdesk` to execute the lint via [ESLint](https://eslint.org/).

View File

@@ -0,0 +1,4 @@
{
"name": "@activepieces/piece-freshdesk",
"version": "0.1.5"
}

View File

@@ -0,0 +1,51 @@
{
"name": "pieces-freshdesk",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/freshdesk/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/pieces/community/freshdesk",
"tsConfig": "packages/pieces/community/freshdesk/tsconfig.lib.json",
"packageJson": "packages/pieces/community/freshdesk/package.json",
"main": "packages/pieces/community/freshdesk/src/index.ts",
"assets": [
"packages/pieces/community/freshdesk/*.md",
{
"input": "packages/pieces/community/freshdesk/src/i18n",
"output": "./src/i18n",
"glob": "**/!(i18n.json)"
}
],
"buildableProjectDepsInPackageJsonType": "dependencies",
"updateBuildableProjectDepsInPackageJson": true
},
"dependsOn": [
"^build",
"prebuild"
]
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
},
"prebuild": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/pieces/community/freshdesk",
"command": "bun install --no-save --silent"
},
"dependsOn": [
"^build"
]
}
},
"tags": []
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Kunden-Supportsoftware",
"Base URL": "Basis-URL",
"API Token": "API Token",
"Enter the base URL": "Basis-URL eingeben",
"Enter the API token": "API-Token eingeben",
"Get the API token by visiting your profile settings and clicking View API key": "Erhalten Sie den API-Token durch einen Besuch Ihrer Profileinstellungen und klicken Sie auf API-Schlüssel anzeigen",
"Get Tickets": "Tickets erhalten",
"Get Contact from ID": "Kontakt von ID erhalten",
"Get Ticket Status": "Ticket-Status erhalten",
"Get Freshdesk Contacts": "Freshdesk Kontakte erhalten",
"Get All Tickets By Status": "Alle Tickets nach Status holen",
"Custom API Call": "Eigener API-Aufruf",
"Get Ticket instances from Freshdesk.": "Ticket-Instanzen von Freshdesk herunterladen.",
"Get contacts details from Freshdesk using ID number.": "Kontaktdetails von Freshdesk mit ID-Nummer abrufen.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Ticket-Status von Freshdesk abrufen. Gibt Ticket-Status zurück, zugewiesen",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Erhalten Sie Kontaktdaten von Freshdesk für alle (optional gefilterten) Kontakte.",
"Get All Tickets by selected status from Freshdesk.": "Alle Tickets nach ausgewähltem Status von Freshdesk erhalten.",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"Contact ID number": "Kontakt-ID Nummer",
"Ticket ID": "Ticket-ID",
"Optional Filter": "Optionaler Filter",
"Filter value": "Filterwert",
"Optional Filter Status": "Optionaler Filterstatus",
"Results to return": "Rückzugebende Ergebnisse",
"Choose Status(es)": "Status(e) auswählen",
"Method": "Methode",
"Headers": "Kopfzeilen",
"Query Parameters": "Abfrageparameter",
"Body": "Körper",
"Response is Binary ?": "Antwort ist binär?",
"No Error on Failure": "Kein Fehler bei Fehler",
"Timeout (in seconds)": "Timeout (in Sekunden)",
"The ID number of the contact": "Die ID Nummer des Kontakts",
"The Ticket ID to return status": "Die Ticket-ID zum Zurückgeben des Status",
"Select one and provide the value.": "Wählen Sie eine aus und geben Sie den Wert an.",
"Provide value if previous option selected!": "Geben Sie einen Wert an, wenn die vorherige Option ausgewählt wurde!",
"Can filter by state: blocked, deleted, unverified or verified.": "Kann nach Status filtern: Gesperrt, gelöscht, nicht verifiziert oder gesperrt.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk ruft diese per_page auf - setzt auf 0 für alle, wenn das Maximum 100 ist",
"Select one or status values": "Wählen Sie eine oder mehrere Statuswerte",
"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..",
"E-mail": "E-Mail",
"Mobile": "Mobil",
"Phone": "Telefon",
"Company ID": "Firmen-ID",
"Updated Since": "Aktualisiert seit",
"Blocked": "Blockiert",
"Deleted": "Gelöscht",
"Unverified": "Nicht verifiziert",
"Verified": "Verifiziert",
"Open": "Öffnen",
"Pending": "Ausstehend",
"Resolved": "Gelöst",
"Closed": "Geschlossen",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Software de soporte al cliente",
"Base URL": "URL base",
"API Token": "API Token",
"Enter the base URL": "Introduzca la URL base",
"Enter the API token": "Introduzca el token API",
"Get the API token by visiting your profile settings and clicking View API key": "Obtén el token API visitando la configuración de tu perfil y haciendo clic en Ver clave API",
"Get Tickets": "Obtener Tickets",
"Get Contact from ID": "Obtener contacto desde ID",
"Get Ticket Status": "Obtener Estado del Ticket",
"Get Freshdesk Contacts": "Obtener contactos de Freshdesk",
"Get All Tickets By Status": "Obtener todos los Tickets por Estado",
"Custom API Call": "Llamada API personalizada",
"Get Ticket instances from Freshdesk.": "Obtener instancias de tickets de Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Obtenga los datos de contacto de Freshdesk usando el número de identificación.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Obtener estado del Ticket de Freshdesk. Devuelve ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Obtenga datos de contacto de Freshdesk para todos los contactos (opcionalmente filtrados).",
"Get All Tickets by selected status from Freshdesk.": "Obtener todos los Tickets por estado seleccionado de Freshdesk.",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"Contact ID number": "Número de ID de contacto",
"Ticket ID": "ID del Ticket",
"Optional Filter": "Filtro opcional",
"Filter value": "Valor del filtro",
"Optional Filter Status": "Estado de filtro opcional",
"Results to return": "Resultados a devolver",
"Choose Status(es)": "Elegir Estado(s)",
"Method": "Método",
"Headers": "Encabezados",
"Query Parameters": "Parámetros de consulta",
"Body": "Cuerpo",
"Response is Binary ?": "¿Respuesta es binaria?",
"No Error on Failure": "No hay ningún error en fallo",
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
"The ID number of the contact": "El número ID del contacto",
"The Ticket ID to return status": "El ID del Ticket para devolver el estado",
"Select one and provide the value.": "Seleccione uno y proporcione el valor.",
"Provide value if previous option selected!": "¡Proporciona un valor si se selecciona la opción anterior!",
"Can filter by state: blocked, deleted, unverified or verified.": "Puede filtrar por estado: bloqueado, eliminado, no verificado o verificado.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk llama a esta per_page - establece en 0 para todos, si el máximo especificado es 100",
"Select one or status values": "Seleccione uno o los valores de 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.",
"E-mail": "E-mail",
"Mobile": "Móvil",
"Phone": "Teléfono",
"Company ID": "ID de empresa",
"Updated Since": "Actualizado desde",
"Blocked": "Bloqueado",
"Deleted": "Eliminado",
"Unverified": "Sin verificar",
"Verified": "Verificado",
"Open": "Abrir",
"Pending": "Pendiente",
"Resolved": "Resuelto",
"Closed": "Cerrado",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Logiciel de support client",
"Base URL": "URL de base",
"API Token": "API Token",
"Enter the base URL": "Entrez l'URL de base",
"Enter the API token": "Entrez le jeton de l'API",
"Get the API token by visiting your profile settings and clicking View API key": "Obtenez le jeton API en visitant les paramètres de votre profil et en cliquant sur Afficher la clé API",
"Get Tickets": "Obtenir des billets",
"Get Contact from ID": "Obtenir un contact depuis l'ID",
"Get Ticket Status": "Obtenir le statut du ticket",
"Get Freshdesk Contacts": "Obtenir des contacts de Freshdesk",
"Get All Tickets By Status": "Recevoir tous les tickets par statut",
"Custom API Call": "Appel API personnalisé",
"Get Ticket instances from Freshdesk.": "Obtenir les instances de tickets depuis Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Obtenir les détails des contacts depuis Freshdesk en utilisant le numéro ID.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Obtenir le statut du ticket depuis Freshdesk. Renvoie ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Obtenez les coordonnées de Freshdesk pour tous les contacts (filtrés en option).",
"Get All Tickets by selected status from Freshdesk.": "Obtenir tous les billets par statut sélectionné depuis Freshdesk.",
"Make a custom API call to a specific endpoint": "Passez un appel API personnalisé à un point de terminaison spécifique",
"Contact ID number": "Numéro d'identification du contact",
"Ticket ID": "ID du ticket",
"Optional Filter": "Filtre optionnel",
"Filter value": "Valeur du filtre",
"Optional Filter Status": "Statut du filtre optionnel",
"Results to return": "Résultats à retourner",
"Choose Status(es)": "Choisir le(s) statut(s)",
"Method": "Méthode",
"Headers": "En-têtes",
"Query Parameters": "Paramètres de requête",
"Body": "Corps",
"Response is Binary ?": "La réponse est Binaire ?",
"No Error on Failure": "Aucune erreur en cas d'échec",
"Timeout (in seconds)": "Délai d'attente (en secondes)",
"The ID number of the contact": "Le numéro d'identification du contact",
"The Ticket ID to return status": "L'ID du ticket à retourner",
"Select one and provide the value.": "Sélectionnez-en un et indiquez la valeur.",
"Provide value if previous option selected!": "Fournir une valeur si l'option précédente est sélectionnée !",
"Can filter by state: blocked, deleted, unverified or verified.": "Peut filtrer par état: bloqué, supprimé, non vérifié ou vérifié.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk appelle cette per_page - défini à 0 pour tous, si spécifié maximum est de 100",
"Select one or status values": "Sélectionnez une ou des valeurs de statut",
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
"E-mail": "Courriel",
"Mobile": "Téléphone mobile",
"Phone": "Téléphone",
"Company ID": "ID de la société",
"Updated Since": "Mis à jour depuis",
"Blocked": "Bloqué",
"Deleted": "Supprimé",
"Unverified": "Non vérifié",
"Verified": "Vérifié",
"Open": "Ouvert",
"Pending": "En attente",
"Resolved": "Résolu",
"Closed": "Fermé",
"GET": "OBTENIR",
"POST": "POSTER",
"PATCH": "PATCH",
"PUT": "EFFACER",
"DELETE": "SUPPRIMER",
"HEAD": "TÊTE"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "カスタマーサポートソフトウェア",
"Base URL": "ベースURL",
"API Token": "API Token",
"Enter the base URL": "ベース URL を入力してください",
"Enter the API token": "API トークンを入力してください",
"Get the API token by visiting your profile settings and clicking View API key": "API トークンを取得するには、プロフィールの設定にアクセスし、「API キーを表示」をクリックします。",
"Get Tickets": "チケットを入手",
"Get Contact from ID": "IDから連絡先を取得",
"Get Ticket Status": "チケットのステータスを取得する",
"Get Freshdesk Contacts": "Freshdesk の連絡先を取得",
"Get All Tickets By Status": "すべてのチケットをステータス別に取得する",
"Custom API Call": "カスタムAPI通話",
"Get Ticket instances from Freshdesk.": "Freshdeskからチケットインスタンスを取得します。",
"Get contacts details from Freshdesk using ID number.": "Freshdeskから連絡先の詳細をID番号で取得します。",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Freshdeskからチケットのステータスを取得します。ticket_status, assigned_status, assigned_id を返します。",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "すべての連絡先についてFreshdeskから連絡先の詳細を取得します(オプション)。",
"Get All Tickets by selected status from Freshdesk.": "Freshdeskから選択したステータスですべてのチケットを入手します。",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"Contact ID number": "連絡先ID番号",
"Ticket ID": "ケースID",
"Optional Filter": "オプションフィルタ",
"Filter value": "フィルタの値",
"Optional Filter Status": "オプションのフィルタステータス",
"Results to return": "返す結果",
"Choose Status(es)": "ステータスを選択",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"The ID number of the contact": "連絡先の ID 番号",
"The Ticket ID to return status": "ステータスを返すチケット ID",
"Select one and provide the value.": "いずれかを選択し、値を入力します。",
"Provide value if previous option selected!": "前のオプションが選択されている場合は、値を入力してください!",
"Can filter by state: blocked, deleted, unverified or verified.": "状態でフィルタすることができます: ブロック、削除、未確認、または検証。",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk はこの per_page を呼び出します。指定された最大値が 100 の場合、すべては 0 に設定されます。",
"Select one or status values": "1つまたはステータス値を選択してください",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"E-mail": "電子メール",
"Mobile": "モバイル",
"Phone": "電話番号",
"Company ID": "会社ID",
"Updated Since": "更新日時",
"Blocked": "ブロック",
"Deleted": "削除しました",
"Unverified": "未認証",
"Verified": "確認済み",
"Open": "開く",
"Pending": "処理待ち",
"Resolved": "解決済み",
"Closed": "クローズ済み",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Software klantenondersteuning",
"Base URL": "Basis URL",
"API Token": "API Token",
"Enter the base URL": "Voer de basis-URL in",
"Enter the API token": "Voer het API token in",
"Get the API token by visiting your profile settings and clicking View API key": "Verkrijg de API-sleutel door je profielinstellingen te bezoeken en op API-sleutel te klikken",
"Get Tickets": "Tickets ophalen",
"Get Contact from ID": "Contact ophalen van ID",
"Get Ticket Status": "Ticket status krijgen",
"Get Freshdesk Contacts": "Haal Freshdesk contactpersonen op",
"Get All Tickets By Status": "Krijg alle tickets op status",
"Custom API Call": "Custom API Call",
"Get Ticket instances from Freshdesk.": "Krijg Ticket instanties van Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Haal contactgegevens op van Freshdesk met behulp van ID-nummer.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Ticket status ophalen van Freshdesk. Geeft ticket_status, toegewezen_status, toegewezen _id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Haal contactgegevens op bij Freshdesk voor alle (optionele gefilterde) contactpersonen.",
"Get All Tickets by selected status from Freshdesk.": "Krijg alle tickets via de geselecteerde status van Freshdesk.",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"Contact ID number": "Contact ID nummer",
"Ticket ID": "Ticket ID",
"Optional Filter": "Optioneel filter",
"Filter value": "Filter waarde",
"Optional Filter Status": "Optionele filterstatus",
"Results to return": "Resultaten om terug te keren",
"Choose Status(es)": "Kies status(sen)",
"Method": "Methode",
"Headers": "Kopteksten",
"Query Parameters": "Query parameters",
"Body": "Lichaam",
"Response is Binary ?": "Antwoord is binair?",
"No Error on Failure": "Geen fout bij fout",
"Timeout (in seconds)": "Time-out (in seconden)",
"The ID number of the contact": "Het ID-nummer van de contactpersoon",
"The Ticket ID to return status": "De Ticket ID om status terug te sturen",
"Select one and provide the value.": "Selecteer één en voer de waarde in.",
"Provide value if previous option selected!": "Waarde opgeven als vorige optie is geselecteerd!",
"Can filter by state: blocked, deleted, unverified or verified.": "Kan filteren op status: geblokkeerd, verwijderd, niet-geverifieerd of geverifieerd.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Deze per_page - ingesteld op 0 voor alle, indien het opgegeven maximum 100 is",
"Select one or status values": "Selecteer een of status waarden",
"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..",
"E-mail": "E-mailadres",
"Mobile": "Mobiel",
"Phone": "Telefoonnummer",
"Company ID": "Bedrijf ID",
"Updated Since": "Bijgewerkt sinds",
"Blocked": "Geblokkeerd",
"Deleted": "Verwijderd",
"Unverified": "Ongeverifieerd",
"Verified": "Geverifieerd",
"Open": "Open",
"Pending": "In behandeling",
"Resolved": "Opgelost",
"Closed": "gesloten",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Software de suporte ao cliente",
"Base URL": "URL Base",
"API Token": "API Token",
"Enter the base URL": "Digite a URL base",
"Enter the API token": "Digite o token de API",
"Get the API token by visiting your profile settings and clicking View API key": "Obter o token API visitando as suas configurações de perfil e clicando em Ver chave API",
"Get Tickets": "Obter bilhetes",
"Get Contact from ID": "Obter contato do ID",
"Get Ticket Status": "Obter Status do Ticket",
"Get Freshdesk Contacts": "Obter contatos mais recentes",
"Get All Tickets By Status": "Obter todos os bilhetes por status",
"Custom API Call": "Chamada de API personalizada",
"Get Ticket instances from Freshdesk.": "Obter instâncias de tickets de Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Obter detalhes dos contatos do Freshdesk usando o número de ID.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Obter o status do Ticket a partir de Freshdesk. Retorna ticket_status, atribuído_status, atribuído_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Obtenha detalhes de contato de Freshdesk para todos os contatos (filtrados opcionais).",
"Get All Tickets by selected status from Freshdesk.": "Obter todos os bilhetes selecionados pelo status de Freshdesk.",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"Contact ID number": "No. ID do Contato",
"Ticket ID": "ID Ticket",
"Optional Filter": "Filtro opcional",
"Filter value": "Valor do filtro",
"Optional Filter Status": "Status de filtro opcional",
"Results to return": "Resultados para retornar",
"Choose Status(es)": "Escolher Status",
"Method": "Método",
"Headers": "Cabeçalhos",
"Query Parameters": "Parâmetros da consulta",
"Body": "Conteúdo",
"Response is Binary ?": "A resposta é binária ?",
"No Error on Failure": "Nenhum erro no Failure",
"Timeout (in seconds)": "Tempo limite (em segundos)",
"The ID number of the contact": "A ID do número do contato",
"The Ticket ID to return status": "O ID do Ticket para devolver o status",
"Select one and provide the value.": "Selecione um e forneça o valor.",
"Provide value if previous option selected!": "Fornecer valor se a opção anterior selecionada!",
"Can filter by state: blocked, deleted, unverified or verified.": "Pode filtrar por estado: bloqueado, apagado, não verificado ou verificado.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk chama esta per_page - definir como 0 para todos, se o máximo especificado for 100",
"Select one or status values": "Selecione um ou valores de 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..",
"E-mail": "e-mail",
"Mobile": "Celular",
"Phone": "Smartphone",
"Company ID": "ID da Empresa",
"Updated Since": "Atualizado desde",
"Blocked": "Bloqueado",
"Deleted": "Excluído",
"Unverified": "Não verificado",
"Verified": "Verificada",
"Open": "Abertas",
"Pending": "Pendente",
"Resolved": "Resolvido",
"Closed": "Fechado",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA"
}

View File

@@ -0,0 +1,61 @@
{
"Freshdesk": "Свежий стол",
"Customer support software": "Программа поддержки клиентов",
"Base URL": "Базовый URL",
"API Token": "API Token",
"Enter the base URL": "Введите базовый URL",
"Enter the API token": "Введите API token",
"Get the API token by visiting your profile settings and clicking View API key": "Получить API токен, посетив настройки вашего профиля и нажав View API ключ",
"Get Tickets": "Получить заявки",
"Get Contact from ID": "Получить контакт с ID",
"Get Ticket Status": "Получить статус Заявки",
"Get Freshdesk Contacts": "Получить контакты Freshdesk",
"Get All Tickets By Status": "Получить все заявки по статусу",
"Custom API Call": "Пользовательский вызов API",
"Get Ticket instances from Freshdesk.": "Получить экземпляры заявок от Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Получить информацию о контактах из Freshdesk по номеру ID.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Получить статус заявки от Freshdesk. Возвращает ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Получить контактную информацию из Freshdesk для всех (опциональных фильтров) контактов.",
"Get All Tickets by selected status from Freshdesk.": "Получить все Заявки по выбранному статусу из Freshdesk.",
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
"Contact ID number": "Номер контакта",
"Ticket ID": "ID заявки",
"Optional Filter": "Необязательный фильтр",
"Filter value": "Значение фильтра",
"Optional Filter Status": "Дополнительный статус фильтра",
"Results to return": "Результаты для возврата",
"Choose Status(es)": "Выберите статус(ы)",
"Method": "Метод",
"Headers": "Заголовки",
"Query Parameters": "Параметры запроса",
"Body": "Тело",
"No Error on Failure": "Нет ошибок при ошибке",
"Timeout (in seconds)": "Таймаут (в секундах)",
"The ID number of the contact": "Номер контакта",
"The Ticket ID to return status": "ID заявки для возврата статуса",
"Select one and provide the value.": "Выберите один и укажите значение.",
"Provide value if previous option selected!": "Предоставить значение, если выбран предыдущий вариант!",
"Can filter by state: blocked, deleted, unverified or verified.": "Может фильтровать по состоянию: заблокирован, удален, непроверен или проверен.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk вызывает этот per_page - установите 0 для всех, если указан максимум 100",
"Select one or status values": "Выберите одно или одно значение статуса",
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
"E-mail": "Эл. почта",
"Mobile": "Мобильный",
"Phone": "Телефон",
"Company ID": "ID Компании",
"Updated Since": "Обновлено С",
"Blocked": "Заблокирован",
"Deleted": "Удалено",
"Unverified": "Не подтверждено",
"Verified": "Подтверждено",
"Open": "Открыть",
"Pending": "В ожидании",
"Resolved": "Решена",
"Closed": "Закрыто",
"GET": "ПОЛУЧИТЬ",
"POST": "ПОСТ",
"PATCH": "ПАТЧ",
"PUT": "ПОКУПИТЬ",
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Customer support software",
"Base URL": "Base URL",
"API Token": "API Token",
"Enter the base URL": "Enter the base URL",
"Enter the API token": "Enter the API token",
"Get the API token by visiting your profile settings and clicking View API key": "Get the API token by visiting your profile settings and clicking View API key",
"Get Tickets": "Get Tickets",
"Get Contact from ID": "Get Contact from ID",
"Get Ticket Status": "Get Ticket Status",
"Get Freshdesk Contacts": "Get Freshdesk Contacts",
"Get All Tickets By Status": "Get All Tickets By Status",
"Custom API Call": "Custom API Call",
"Get Ticket instances from Freshdesk.": "Get Ticket instances from Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Get contacts details from Freshdesk using ID number.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Get contact details from Freshdesk for all (optional filtered) contacts.",
"Get All Tickets by selected status from Freshdesk.": "Get All Tickets by selected status from Freshdesk.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Contact ID number": "Contact ID number",
"Ticket ID": "Ticket ID",
"Optional Filter": "Optional Filter",
"Filter value": "Filter value",
"Optional Filter Status": "Optional Filter Status",
"Results to return": "Results to return",
"Choose Status(es)": "Choose Status(es)",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"The ID number of the contact": "The ID number of the contact",
"The Ticket ID to return status": "The Ticket ID to return status",
"Select one and provide the value.": "Select one and provide the value.",
"Provide value if previous option selected!": "Provide value if previous option selected!",
"Can filter by state: blocked, deleted, unverified or verified.": "Can filter by state: blocked, deleted, unverified or verified.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100",
"Select one or status values": "Select one or status values",
"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..",
"E-mail": "E-mail",
"Mobile": "Mobile",
"Phone": "Phone",
"Company ID": "Company ID",
"Updated Since": "Updated Since",
"Blocked": "Blocked",
"Deleted": "Deleted",
"Unverified": "Unverified",
"Verified": "Verified",
"Open": "Open",
"Pending": "Pending",
"Resolved": "Resolved",
"Closed": "Closed",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,61 @@
{
"Freshdesk": "Freshdesk",
"Customer support software": "Customer support software",
"Base URL": "Base URL",
"API Token": "API Token",
"Enter the base URL": "Enter the base URL",
"Enter the API token": "Enter the API token",
"Get the API token by visiting your profile settings and clicking View API key": "Get the API token by visiting your profile settings and clicking View API key",
"Get Tickets": "Get Tickets",
"Get Contact from ID": "Get Contact from ID",
"Get Ticket Status": "Get Ticket Status",
"Get Freshdesk Contacts": "Get Freshdesk Contacts",
"Get All Tickets By Status": "Get All Tickets By Status",
"Custom API Call": "Custom API Call",
"Get Ticket instances from Freshdesk.": "Get Ticket instances from Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Get contacts details from Freshdesk using ID number.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Get contact details from Freshdesk for all (optional filtered) contacts.",
"Get All Tickets by selected status from Freshdesk.": "Get All Tickets by selected status from Freshdesk.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Contact ID number": "Contact ID number",
"Ticket ID": "Ticket ID",
"Optional Filter": "Optional Filter",
"Filter value": "Filter value",
"Optional Filter Status": "Optional Filter Status",
"Results to return": "Results to return",
"Choose Status(es)": "Choose Status(es)",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"The ID number of the contact": "The ID number of the contact",
"The Ticket ID to return status": "The Ticket ID to return status",
"Select one and provide the value.": "Select one and provide the value.",
"Provide value if previous option selected!": "Provide value if previous option selected!",
"Can filter by state: blocked, deleted, unverified or verified.": "Can filter by state: blocked, deleted, unverified or verified.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100",
"Select one or status values": "Select one or status values",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"E-mail": "E-mail",
"Mobile": "Mobile",
"Phone": "Phone",
"Company ID": "Company ID",
"Updated Since": "Updated Since",
"Blocked": "Blocked",
"Deleted": "Deleted",
"Unverified": "Unverified",
"Verified": "Verified",
"Open": "Open",
"Pending": "Đang chờ",
"Resolved": "Resolved",
"Closed": "Closed",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,62 @@
{
"Customer support software": "Customer support software",
"Base URL": "基本网址",
"API Token": "API Token",
"Enter the base URL": "Enter the base URL",
"Enter the API token": "Enter the API token",
"Get the API token by visiting your profile settings and clicking View API key": "Get the API token by visiting your profile settings and clicking View API key",
"Get Tickets": "Get Tickets",
"Get Contact from ID": "Get Contact from ID",
"Get Ticket Status": "Get Ticket Status",
"Get Freshdesk Contacts": "Get Freshdesk Contacts",
"Get All Tickets By Status": "Get All Tickets By Status",
"Custom API Call": "自定义 API 呼叫",
"Get Ticket instances from Freshdesk.": "Get Ticket instances from Freshdesk.",
"Get contacts details from Freshdesk using ID number.": "Get contacts details from Freshdesk using ID number.",
"Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id": "Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id",
"Get contact details from Freshdesk for all (optional filtered) contacts.": "Get contact details from Freshdesk for all (optional filtered) contacts.",
"Get All Tickets by selected status from Freshdesk.": "Get All Tickets by selected status from Freshdesk.",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"Contact ID number": "Contact ID number",
"Ticket ID": "Ticket ID",
"Optional Filter": "Optional Filter",
"Filter value": "Filter value",
"Optional Filter Status": "Optional Filter Status",
"Results to return": "Results to return",
"Choose Status(es)": "Choose Status(es)",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"The ID number of the contact": "The ID number of the contact",
"The Ticket ID to return status": "The Ticket ID to return status",
"Select one and provide the value.": "Select one and provide the value.",
"Provide value if previous option selected!": "Provide value if previous option selected!",
"Can filter by state: blocked, deleted, unverified or verified.": "Can filter by state: blocked, deleted, unverified or verified.",
"Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100": "Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100",
"Select one or status values": "Select one or status values",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"E-mail": "E-mail",
"Mobile": "Mobile",
"Phone": "Phone",
"Company ID": "Company ID",
"Updated Since": "Updated Since",
"Blocked": "Blocked",
"Deleted": "Deleted",
"Unverified": "Unverified",
"Verified": "已验证",
"Open": "Open",
"Pending": "待處理",
"Resolved": "已解决",
"Closed": "Closed",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色"
}

View File

@@ -0,0 +1,54 @@
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import {
PieceAuth,
Property,
createPiece,
} from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { getContactFromID } from './lib/actions/get-contact-from-id';
import { getTicketStatus } from './lib/actions/get-ticket-status';
import { getTickets } from './lib/actions/get-tickets';
import { getContacts } from './lib/actions/get-contacts';
import { getAllTicketsByStatus } from './lib/actions/get-all-tickets-by-status';
export const freshdeskAuth = PieceAuth.CustomAuth({
props: {
base_url: Property.ShortText({
displayName: 'Base URL',
description: 'Enter the base URL',
required: true,
}),
access_token: Property.ShortText({
displayName: 'API Token',
description: 'Enter the API token',
required: true,
}),
},
description: `Get the API token by visiting your profile settings and clicking View API key`,
required: true,
});
export const freshdesk = createPiece({
displayName: 'Freshdesk',
description: 'Customer support software',
logoUrl: 'https://cdn.activepieces.com/pieces/freshdesk.png',
categories: [PieceCategory.CUSTOMER_SUPPORT],
authors: ["buttonsbond","kishanprmr","MoShizzle","AbdulTheActivePiecer","abuaboud"],
auth: freshdeskAuth,
actions: [
getTickets,
getContactFromID,
getTicketStatus,
getContacts,
getAllTicketsByStatus,
createCustomApiCallAction({
baseUrl: (auth) => (auth?.props.base_url ?? ''),
auth: freshdeskAuth,
authMapping: async (auth) => ({
Authorization: (auth.props.access_token),
}),
}),
],
triggers: [],
});

View File

@@ -0,0 +1,133 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { freshdeskAuth } from '../..';
export const getAllTicketsByStatus = createAction({
auth: freshdeskAuth,
name: 'get_all_tickets_by_status',
displayName: 'Get All Tickets By Status',
description: 'Get All Tickets by selected status from Freshdesk.',
props: {
status_filter: Property.StaticMultiSelectDropdown({
displayName: 'Choose Status(es)',
description: 'Select one or status values',
required: true,
options: {
options: [
{
label: 'Open',
value: 'status:2'
},
{
label: 'Pending',
value: 'status:3'
},
{
label: 'Resolved',
value: 'status:4'
},
{
label: 'Closed',
value: 'status:5'
}
]
}
}),
},
async run(context) {
const FDapiToken = context.auth.props.access_token;
const headers = {
Authorization: FDapiToken,
'Content-Type': 'application/json',
};
// Remove trailing slash from base_url
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
const queryParams = new URLSearchParams();
// Adjusted to accept number or string
const replacedArray = context.propsValue.status_filter.map(str => str.replace(/,/g, ' OR '));
const replacedString = '"' + replacedArray.join(' OR ') + '"';
queryParams.append('query', replacedString || '');
const url = `${baseUrl}/api/v2/search/tickets/?${queryParams.toString()}`;
const httprequestdata = {
method: HttpMethod.GET,
url,
headers,
};
const response = await httpClient.sendRequest(httprequestdata);
if (response.status == 200) {
// Define an interface for the ticket structure
interface Ticket {
id: number;
requester_id: number;
responder_id: number | null;
company_id: number;
status: number | string; // Adjusted to accept number or string
subject: string;
created_at: string;
updated_at: string;
description_text: string;
description: string;
// Add more properties if necessary
}
// response.body.results is an array of ticket objects
const ticketResults: Ticket[] = response.body.results;
// Sort the ticketResults array by requester_id
ticketResults.sort((a, b) => a.requester_id - b.requester_id);
// Initialize an empty array to store tickets
const tickets: Ticket[] = [];
// Iterate through each ticket result and push it to the tickets array
ticketResults.forEach((ticketResult: Ticket) => {
// Map status number to corresponding string
let statusString: string;
switch (ticketResult.status) {
case 2:
statusString = 'Open';
break;
case 3:
statusString = 'Pending';
break;
case 4:
statusString = 'Resolved';
break;
case 5:
statusString = 'Closed';
break;
default:
statusString = 'Unknown';
}
// Push the ticket object with modified status string to the tickets array
tickets.push({
id: ticketResult.id,
requester_id: ticketResult.requester_id,
responder_id: ticketResult.responder_id,
company_id: ticketResult.company_id,
status: statusString,
subject: ticketResult.subject,
created_at: ticketResult.created_at,
updated_at: ticketResult.updated_at,
description_text: ticketResult.description_text,
description: ticketResult.description,
// Add more properties if necessary
});
});
// Return the tickets array
return tickets;
} else {
return response.status;
}
},
});

View File

@@ -0,0 +1,45 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { freshdeskAuth } from '../..';
export const getContactFromID = createAction({
auth: freshdeskAuth,
name: 'get_contact_from_id',
displayName: 'Get Contact from ID',
description: 'Get contacts details from Freshdesk using ID number.',
props: {
contactid: Property.ShortText({
displayName: 'Contact ID number',
description: 'The ID number of the contact',
required: true,
}),
},
async run(context) {
const FDapiToken = context.auth.props.access_token;
const FDcontactID = context.propsValue.contactid;
const headers = {
Authorization: FDapiToken,
'Content-Type': 'application/json',
};
// Remove trailing slash from base_url
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
// not needed for gettickets ?${queryParams.toString()}
const url = `${baseUrl}/api/v2/contacts/${FDcontactID}`;
const httprequestdata = {
method: HttpMethod.GET,
url,
headers,
};
const response = await httpClient.sendRequest(httprequestdata);
if (response.status == 200) {
return response.body;
} else {
return response;
}
},
});

View File

@@ -0,0 +1,129 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { freshdeskAuth } from '../..';
export const getContacts = createAction({
auth: freshdeskAuth,
name: 'get_contacts',
displayName: 'Get Freshdesk Contacts',
description:
'Get contact details from Freshdesk for all (optional filtered) contacts.',
props: {
filter_type: Property.StaticDropdown({
displayName: 'Optional Filter',
description: 'Select one and provide the value.',
defaultValue: '',
required: false,
options: {
options: [
{
label: 'E-mail',
value: 'email',
},
{
label: 'Mobile',
value: 'mobile',
},
{
label: 'Phone',
value: 'phone',
},
{
label: 'Company ID',
value: 'company_id',
},
{
label: 'Updated Since',
value: 'updated_since',
},
],
},
}),
filter_value: Property.ShortText({
displayName: 'Filter value',
description: 'Provide value if previous option selected!',
required: false,
defaultValue: '',
}),
filter_status: Property.StaticDropdown({
displayName: 'Optional Filter Status',
description:
'Can filter by state: blocked, deleted, unverified or verified.',
defaultValue: '',
required: false,
options: {
options: [
{
label: 'Blocked',
value: 'blocked',
},
{
label: 'Deleted',
value: 'deleted',
},
{
label: 'Unverified',
value: 'unverified',
},
{
label: 'Verified',
value: 'verified',
},
],
},
}),
per_page: Property.Number({
displayName: 'Results to return',
description:
'Freshdesk calls this per_page - set to 0 for all, if specified maximum is 100',
required: true,
defaultValue: 0,
}),
},
async run(context) {
const FDapiToken = context.auth.props.access_token;
const headers = {
Authorization: FDapiToken,
'Content-Type': 'application/json',
};
// not needed for gettickets ?${queryParams.toString()}
const queryParams = new URLSearchParams();
if (
context.propsValue.filter_type?.valueOf != null &&
context.propsValue.filter_value?.valueOf != null
) {
queryParams.append(
context.propsValue.filter_type?.toString(),
context.propsValue.filter_value || ''
);
}
if (context.propsValue.filter_status?.valueOf != null) {
queryParams.append('state', context.propsValue.filter_status || '');
}
if (context.propsValue.per_page != 0) {
queryParams.append(
'per_page',
context.propsValue.per_page.toString() || '100'
);
}
// Remove trailing slash from base_url
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
const url = `${baseUrl}/api/v2/contacts/?${queryParams.toString()}`;
const httprequestdata = {
method: HttpMethod.GET,
url,
headers,
};
const response = await httpClient.sendRequest(httprequestdata);
if (response.status == 200) {
return response.body;
} else {
return response;
}
},
});

View File

@@ -0,0 +1,88 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { freshdeskAuth } from '../..';
import { isNil } from '@activepieces/shared';
export const getTicketStatus = createAction({
auth: freshdeskAuth,
name: 'get_ticket_status',
displayName: 'Get Ticket Status',
description:
'Get Ticket status from Freshdesk. Returns ticket_status, assigned_status, assigned_id',
props: {
ticketid: Property.ShortText({
displayName: 'Ticket ID',
description: 'The Ticket ID to return status',
required: true,
}),
},
async run(context) {
const FDapiToken = context.auth.props.access_token;
const FDticketID = context.propsValue.ticketid;
const headers = {
Authorization: FDapiToken,
'Content-Type': 'application/json',
};
// Remove trailing slash from base_url
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
const url = `${baseUrl}/api/v2/tickets/${FDticketID}`;
const httprequestdata = {
method: HttpMethod.GET,
url,
headers,
};
const response = await httpClient.sendRequest(httprequestdata);
if (response.status == 200) {
const status = response.body.status;
const responderid = response.body.responder_id;
let AssignedStatusFriendlyValue = '';
let TicketStatusFriendlyValue = '';
if (isNil(responderid)) {
AssignedStatusFriendlyValue = 'NOTASSIGNED';
} else {
AssignedStatusFriendlyValue = 'ASSIGNED';
}
switch (status) {
case 2: {
TicketStatusFriendlyValue = 'OPEN';
break;
}
case 3: {
TicketStatusFriendlyValue = 'PENDING';
break;
}
case 4: {
TicketStatusFriendlyValue = 'RESOLVED';
break;
}
case 5: {
TicketStatusFriendlyValue = 'CLOSED';
break;
}
default: {
// if anything other than 2,3,4 or 5 just assign the value - it shouldn't happen!
TicketStatusFriendlyValue = status;
break;
}
}
const json = [
{
ticket_status: TicketStatusFriendlyValue,
assigned_status: AssignedStatusFriendlyValue,
assigned_id: responderid,
},
];
return json;
} else {
return response.status;
}
},
});

View File

@@ -0,0 +1,37 @@
import { createAction } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { freshdeskAuth } from '../..';
export const getTickets = createAction({
auth: freshdeskAuth,
name: 'get_tickets',
displayName: 'Get Tickets',
description: 'Get Ticket instances from Freshdesk.',
props: {},
async run(context) {
const FDapiToken = context.auth.props.access_token;
const headers = {
Authorization: FDapiToken,
'Content-Type': 'application/json',
};
// Remove trailing slash from base_url
const baseUrl = context.auth.props.base_url.replace(/\/$/, '');
// not needed for gettickets ?${queryParams.toString()}
const url = `${baseUrl}/api/v2/tickets/`;
const httprequestdata = {
method: HttpMethod.GET,
url,
headers,
};
const response = await httpClient.sendRequest(httprequestdata);
if (response.status == 200) {
return response.body;
} else {
return response;
}
},
});

View File

@@ -0,0 +1,16 @@
{
"extends": "../../../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
}
}

View File

@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}