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

View File

@@ -0,0 +1,7 @@
# pieces-circle
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build pieces-circle` to build the library.

View File

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

View File

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

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so ist eine Plattform zur Erstellung und Verwaltung von Gemeinschaften.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Du kannst dein API-Token erhalten, indem du unter **Einstellungen->Entwickler->Tokens** navigierst.",
"Create Post": "Beitrag erstellen",
"Create Comment": "Kommentar erstellen",
"Add Member to Space": "Mitglied zur Gruppe hinzufügen",
"Find Member by Email": "Mitglied per E-Mail finden",
"Get Post Details": "Beitragsdetails abrufen",
"Get Member Details": "Mitgliederdetails abrufen",
"Custom API Call": "Eigener API-Aufruf",
"Creates a new post in a specific space.": "Erstellt einen neuen Beitrag in einem bestimmten Bereich.",
"Creates a new comment on a post.": "Erstellt einen neuen Kommentar zu einem Beitrag.",
"Add an existing member to a specific space by their email.": "Ein existierendes Mitglied per E-Mail zu einem bestimmten Raum hinzufügen.",
"Finds a community member by their email address.": "Findet ein Community-Mitglied über seine E-Mail-Adresse.",
"Retrieves the complete details of a specific post.": "Ruft die vollständigen Details eines bestimmten Beitrags ab.",
"Fetches the full profile details for a specific community member.": "Ruft die vollständigen Profildetails für ein bestimmtes Community-Mitglied ab.",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"Space": "Raum",
"Post Name/Title": "Beitragsname/Titel",
"Post Body (Plain Text)": "Post-Body (Plain-Text)",
"Tiptap Body JSON": "TipTap Body JSON",
"Status": "Status",
"Published At (for Scheduled)": "Veröffentlicht nach (für geplant)",
"Enable Comments": "Kommentare aktivieren",
"Skip Notifications": "Benachrichtigungen überspringen",
"Post As User Email (Optional)": "Poste als Benutzer-E-Mail (optional)",
"Post": "Posten",
"Comment Body": "Kommentar-Text",
"Parent Comment ID (Optional)": "Übergeordnete Kommentar-ID (optional)",
"Member Email": "Mitgliedsmail",
"Email": "E-Mail",
"Community Member": "Community-Mitglied",
"Method": "Methode",
"Headers": "Kopfzeilen",
"Query Parameters": "Abfrageparameter",
"Body": "Körper",
"Response is Binary ?": "Antwort ist binär?",
"No Error on Failure": "Kein Fehler bei Fehler",
"Timeout (in seconds)": "Timeout (in Sekunden)",
"The title of the post.": "Der Titel des Beitrags.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Einfacher einfacher Textinhalt für den Beitrag. Wird verwendet, wenn 'Tiptap Body JSON' nicht bereitgestellt wird.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Volle TipTippen JSON-Objekt für den Beitragskörper. Wenn vorhanden, wird 'Post-Body (Plain-Text)' ignoriert.",
"The status of the post.": "Der Status des Beitrags.",
"If status is 'scheduled', provide the future date and time for publishing.": "Wenn der Status 'geplant' ist, geben Sie das Datum und die Zeit für die Veröffentlichung an.",
"Allow comments on this post?": "Kommentare zu diesem Beitrag erlauben?",
"Prevent notifications from being sent for this post?": "Benachrichtigungen für diesen Beitrag verhindern?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "E-Mail eines bestehenden Community-Mitglieds, um diesen Beitrag zu erstellen als. Wenn leer, Posts als authentifizierter Admin.",
"The content of the comment.": "Der Inhalt des Kommentars.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID des zu antwortenden Kommentars. Lassen Sie leer, wenn nicht eine Antwort.",
"Skip sending notifications for this comment?": "Benachrichtigungen für diesen Kommentar überspringen?",
"The email address of the member to add to the space.": "Die E-Mail-Adresse des Mitglieds, das dem Raum hinzugefügt werden soll.",
"The email address of the member to find.": "Die E-Mail-Adresse des zu findenden Mitglieds.",
"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..",
"Draft": "Entwurf",
"Published": "Veröffentlicht",
"Scheduled": "Geplant",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD",
"New Post Created": "Neuer Beitrag erstellt",
"New Member Added": "Neues Mitglied hinzugefügt",
"Triggers when a new post is created in a specific space.": "Wird ausgelöst, wenn ein neuer Beitrag in einem bestimmten Bereich erstellt wird.",
"Triggers when a new member is added to the community.": "Wird ausgelöst, wenn ein neues Mitglied der Community hinzugefügt wird."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so es una plataforma para crear y administrar comunidades.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Puedes obtener tu token de API navegando a **Configuración->Desarrolladores->Tokens**.",
"Create Post": "Crear publicación",
"Create Comment": "Crear comentario",
"Add Member to Space": "Añadir miembro al espacio",
"Find Member by Email": "Buscar miembro por email",
"Get Post Details": "Obtener detalles del post",
"Get Member Details": "Detalles de Miembros",
"Custom API Call": "Llamada API personalizada",
"Creates a new post in a specific space.": "Crea una nueva publicación en un espacio específico.",
"Creates a new comment on a post.": "Crea un nuevo comentario en una publicación.",
"Add an existing member to a specific space by their email.": "Añadir un miembro existente a un espacio específico por su correo electrónico.",
"Finds a community member by their email address.": "Encuentra un miembro de la comunidad por su dirección de correo electrónico.",
"Retrieves the complete details of a specific post.": "Devuelve los detalles completos de un mensaje específico.",
"Fetches the full profile details for a specific community member.": "Obtiene los detalles completos del perfil de un miembro específico de la comunidad.",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"Space": "Espacio",
"Post Name/Title": "Nombre del mensaje",
"Post Body (Plain Text)": "Cuerpo Postal (Texto Pleno)",
"Tiptap Body JSON": "Body JSON de Tiptap",
"Status": "Estado",
"Published At (for Scheduled)": "Publicado el (para programado)",
"Enable Comments": "Habilitar comentarios",
"Skip Notifications": "Omitir notificaciones",
"Post As User Email (Optional)": "Publicar como email de usuario (opcional)",
"Post": "Publicar",
"Comment Body": "Comentar cuerpo",
"Parent Comment ID (Optional)": "ID de comentario padre (opcional)",
"Member Email": "Email de miembro",
"Email": "E-mail",
"Community Member": "Miembro de la comunidad",
"Method": "Método",
"Headers": "Encabezados",
"Query Parameters": "Parámetros de consulta",
"Body": "Cuerpo",
"Response is Binary ?": "¿Respuesta es binaria?",
"No Error on Failure": "No hay ningún error en fallo",
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
"The title of the post.": "El título de la entrada.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Contenido de texto plano simple para la publicación. Utilizado si no se proporciona 'Tiptap Body JSON'.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Full TipTap objeto JSON para el cuerpo del poste. Si se proporciona, 'Post Body (Texto de la Plain)' es ignorado.",
"The status of the post.": "El estado del post.",
"If status is 'scheduled', provide the future date and time for publishing.": "Si el estado es 'programado', proporcione la fecha y hora futuras para la publicación.",
"Allow comments on this post?": "¿Permitir comentarios en esta publicación?",
"Prevent notifications from being sent for this post?": "¿Evitar que las notificaciones sean enviadas para esta publicación?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Correo electrónico de un miembro de la comunidad existente para crear este post como. Si está vacío, publique como el administrador autenticado.",
"The content of the comment.": "El contenido del comentario.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID del comentario al que responder. Dejar vacío si no es una respuesta.",
"Skip sending notifications for this comment?": "¿Saltar el envío de notificaciones para este comentario?",
"The email address of the member to add to the space.": "La dirección de correo electrónico del miembro a añadir al espacio.",
"The email address of the member to find.": "La dirección de correo electrónico del miembro a encontrar.",
"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.",
"Draft": "Borrador",
"Published": "Publicado",
"Scheduled": "Programado",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO",
"New Post Created": "Nuevo mensaje creado",
"New Member Added": "Nuevo miembro añadido",
"Triggers when a new post is created in a specific space.": "Se activa cuando se crea una nueva publicación en un espacio específico.",
"Triggers when a new member is added to the community.": "Dispara cuando un nuevo miembro es añadido a la comunidad."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so est une plateforme de création et de gestion de communautés.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Vous pouvez obtenir votre jeton API en naviguant dans **Paramètres->Développeurs->Tokens**.",
"Create Post": "Créer un message",
"Create Comment": "Créer un commentaire",
"Add Member to Space": "Ajouter un membre à l'espace",
"Find Member by Email": "Trouver un membre par e-mail",
"Get Post Details": "Obtenir les détails de la publication",
"Get Member Details": "Obtenir les détails du membre",
"Custom API Call": "Appel API personnalisé",
"Creates a new post in a specific space.": "Crée un nouveau message dans un espace spécifique.",
"Creates a new comment on a post.": "Crée un nouveau commentaire sur un message.",
"Add an existing member to a specific space by their email.": "Ajouter un membre existant à un espace spécifique par son email.",
"Finds a community member by their email address.": "Trouve un membre de la communauté par son adresse e-mail.",
"Retrieves the complete details of a specific post.": "Récupère les détails complets d'un message spécifique.",
"Fetches the full profile details for a specific community member.": "Récupère les détails du profil complet pour un membre spécifique de la communauté.",
"Make a custom API call to a specific endpoint": "Passez un appel API personnalisé à un point de terminaison spécifique",
"Space": "Espace libre",
"Post Name/Title": "Nom du post/titre",
"Post Body (Plain Text)": "Corps du message (Texte brut)",
"Tiptap Body JSON": "Tiptap Body JSON",
"Status": "Statut",
"Published At (for Scheduled)": "Publié le",
"Enable Comments": "Activer les commentaires",
"Skip Notifications": "Passer les notifications",
"Post As User Email (Optional)": "Publier en tant qu'e-mail de l'utilisateur (facultatif)",
"Post": "Poster",
"Comment Body": "Corps du commentaire",
"Parent Comment ID (Optional)": "ID du commentaire parent (facultatif)",
"Member Email": "E-mail du membre",
"Email": "Courriel",
"Community Member": "Membre de la communauté",
"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 title of the post.": "Le titre du post.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Contenu simple en texte brut pour le post. Utilisé si 'Tiptap Body JSON' n'est pas fourni.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "TipTap complet de l'objet JSON pour le corps du message. Si fourni, 'Corps du message (texte brut)' est ignoré.",
"The status of the post.": "Le statut du poste.",
"If status is 'scheduled', provide the future date and time for publishing.": "Si le statut est « planifié », indiquez la date et l'heure futures de publication.",
"Allow comments on this post?": "Autoriser les commentaires sur ce post ?",
"Prevent notifications from being sent for this post?": "Empêcher l'envoi de notifications pour ce message ?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Courriel d'un membre de la communauté existant pour créer ce post comme. Si vide, les messages comme l'administrateur authentifié.",
"The content of the comment.": "Le contenu du commentaire.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID du commentaire auquel répondre. Laisser vide sinon une réponse.",
"Skip sending notifications for this comment?": "Ignorer l'envoi de notifications pour ce commentaire ?",
"The email address of the member to add to the space.": "L'adresse email du membre à ajouter à l'espace.",
"The email address of the member to find.": "L'adresse email du membre à trouver.",
"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.",
"Draft": "Brouillon",
"Published": "Publié",
"Scheduled": "Planifié",
"GET": "OBTENIR",
"POST": "POSTER",
"PATCH": "PATCH",
"PUT": "EFFACER",
"DELETE": "SUPPRIMER",
"HEAD": "TÊTE",
"New Post Created": "Nouveau message créé",
"New Member Added": "Nouveau membre ajouté",
"Triggers when a new post is created in a specific space.": "Déclenche lorsqu'un nouveau message est créé dans un espace spécifique.",
"Triggers when a new member is added to the community.": "Déclenche lorsqu'un nouveau membre est ajouté à la communauté."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "CircleCI は、コミュニティを作成および管理するためのプラットフォームです。",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "API トークンは **設定->開発者->トークン** に移動して取得できます。",
"Create Post": "投稿を作成",
"Create Comment": "コメントを作成",
"Add Member to Space": "メンバーをスペースに追加",
"Find Member by Email": "電子メールでメンバーを検索",
"Get Post Details": "投稿の詳細を取得",
"Get Member Details": "メンバー詳細を取得",
"Custom API Call": "カスタムAPI通話",
"Creates a new post in a specific space.": "特定のスペースに新しい投稿を作成します。",
"Creates a new comment on a post.": "投稿に新しいコメントを作成します。",
"Add an existing member to a specific space by their email.": "メールで特定のスペースに既存のメンバーを追加します。",
"Finds a community member by their email address.": "メールアドレスからコミュニティメンバーを検索します。",
"Retrieves the complete details of a specific post.": "特定の投稿の詳細を取得します。",
"Fetches the full profile details for a specific community member.": "特定のコミュニティメンバーのプロフィール詳細を取得します。",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"Space": "スペース",
"Post Name/Title": "投稿名/タイトル",
"Post Body (Plain Text)": "投稿本文 (プレーンテキスト)",
"Tiptap Body JSON": "Tiptap ボディ JSON",
"Status": "ステータス",
"Published At (for Scheduled)": "公開日時 (予定)",
"Enable Comments": "コメントを有効化",
"Skip Notifications": "通知をスキップ",
"Post As User Email (Optional)": "ユーザメールとして投稿(オプション)",
"Post": "投稿",
"Comment Body": "コメント本文",
"Parent Comment ID (Optional)": "親コメントIDオプション",
"Member Email": "メンバーのメールアドレス",
"Email": "Eメールアドレス",
"Community Member": "コミュニティメンバー",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"The title of the post.": "投稿のタイトル",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "投稿のシンプルなプレーンテキストコンテンツ。「Tiptap Body JSON」が提供されていない場合に使用されます。",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Full TipTap JSON object for the post body If provided, 'Post Body (Plain Text)\" は無視されます。",
"The status of the post.": "ポストの状態。",
"If status is 'scheduled', provide the future date and time for publishing.": "ステータスが 'スケジュール済み' の場合は、公開の将来の日付と時刻を指定します。",
"Allow comments on this post?": "この投稿へのコメントを許可しますか?",
"Prevent notifications from being sent for this post?": "この投稿の通知が送信されないようにしますか?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "この投稿を作成するには、既存のコミュニティメンバーの電子メールが必要です。空の場合は、認証された管理者として投稿します。",
"The content of the comment.": "コメントの内容.",
"ID of the comment to reply to. Leave empty if not a reply.": "返信先のコメントID。返信しない場合は空のままにします。",
"Skip sending notifications for this comment?": "このコメントの送信通知をスキップしますか?",
"The email address of the member to add to the space.": "スペースに追加するメンバーのメールアドレス",
"The email address of the member to find.": "検索するメンバーのメールアドレス",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"Draft": "下書き",
"Published": "公開済み",
"Scheduled": "スケジュール済み",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭",
"New Post Created": "新しい投稿が作成されました",
"New Member Added": "新しいメンバーが追加されました",
"Triggers when a new post is created in a specific space.": "特定のスペースに新しい投稿が作成されたときにトリガーされます。",
"Triggers when a new member is added to the community.": "コミュニティに新しいメンバーが追加されたときにトリガーします。"
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so is een platform voor het maken en beheren van gemeenschappen.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Je kunt je API-sleutel verkrijgen door te gaan naar **Instellingen->Ontwikkelaars->Tokens**.",
"Create Post": "Post aanmaken",
"Create Comment": "Commentaar maken",
"Add Member to Space": "Lid toevoegen aan ruimte",
"Find Member by Email": "Zoek lid via e-mail",
"Get Post Details": "Krijg berichtdetails",
"Get Member Details": "Ledendetails ophalen",
"Custom API Call": "Custom API Call",
"Creates a new post in a specific space.": "Maakt een nieuw bericht in een specifieke ruimte.",
"Creates a new comment on a post.": "Maakt een nieuwe reactie op een bericht.",
"Add an existing member to a specific space by their email.": "Voeg een bestaand lid toe aan een specifieke ruimte per e-mail.",
"Finds a community member by their email address.": "Vindt een community lid met zijn e-mailadres",
"Retrieves the complete details of a specific post.": "Haalt de volledige details van een specifiek bericht op.",
"Fetches the full profile details for a specific community member.": "Haalt de volledige profielgegevens op voor een specifiek communitylid.",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"Space": "Spatiebalk",
"Post Name/Title": "Post naam/titel",
"Post Body (Plain Text)": "Bericht Lichaam (Plain tekst)",
"Tiptap Body JSON": "Tiptik Carrosserie JSON",
"Status": "status",
"Published At (for Scheduled)": "Gepubliceerd op (voor gepland)",
"Enable Comments": "Reacties inschakelen",
"Skip Notifications": "Notificaties overslaan",
"Post As User Email (Optional)": "Post als gebruiker (Optioneel)",
"Post": "Plaatsen",
"Comment Body": "Commentaar inhoud",
"Parent Comment ID (Optional)": "Bovenliggende Reactie ID (optioneel)",
"Member Email": "E-mail gebruiker",
"Email": "E-mail",
"Community Member": "Community lid",
"Method": "Methode",
"Headers": "Kopteksten",
"Query Parameters": "Query parameters",
"Body": "Lichaam",
"Response is Binary ?": "Antwoord is binair?",
"No Error on Failure": "Geen fout bij fout",
"Timeout (in seconds)": "Time-out (in seconden)",
"The title of the post.": "De titel van het bericht.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Eenvoudige tekst inhoud voor de post. Wordt gebruikt als 'Tiptap Body JSON' niet is verstrekt.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Volledige TipTap JSON object voor de inhoud van het bericht. Indien opgegeven, wordt 'Body (Plain Tekst) genegeerd.",
"The status of the post.": "De status van het bericht.",
"If status is 'scheduled', provide the future date and time for publishing.": "Als de status 'gepland' is, geef dan de datum en tijd voor publicatie in.",
"Allow comments on this post?": "Reacties op dit bericht toestaan?",
"Prevent notifications from being sent for this post?": "Voorkomen dat meldingen worden verzonden voor dit bericht?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "E-mail van een bestaand community lid om dit bericht aan te maken. Indien leeg, berichten als de geverifieerde admin.",
"The content of the comment.": "De inhoud van de opmerking.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID van de reactie op uw reactie. Laat leeg indien niet een antwoord.",
"Skip sending notifications for this comment?": "Verzenden van meldingen voor deze reactie overslaan?",
"The email address of the member to add to the space.": "Het e-mailadres van het lid om toe te voegen aan de ruimte.",
"The email address of the member to find.": "Het e-mailadres van het lid om te vinden.",
"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..",
"Draft": "Concept",
"Published": "Gepubliceerd",
"Scheduled": "Gepland",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD",
"New Post Created": "Nieuwe post aangemaakt",
"New Member Added": "Nieuw lid toegevoegd",
"Triggers when a new post is created in a specific space.": "Triggert wanneer een nieuw bericht wordt gemaakt in een specifieke ruimte.",
"Triggers when a new member is added to the community.": "Triggert wanneer een nieuw lid aan de community is toegevoegd."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so é uma plataforma para criar e gerenciar comunidades.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Você pode obter seu token de API navegando até **Configurações->Desenvolvedores->Tokens**.",
"Create Post": "Criar publicação",
"Create Comment": "Criar Comentário",
"Add Member to Space": "Adicionar Membro ao Espaço",
"Find Member by Email": "Encontrar membro por e-mail",
"Get Post Details": "Obter detalhes do post",
"Get Member Details": "Obter Detalhes do Membro",
"Custom API Call": "Chamada de API personalizada",
"Creates a new post in a specific space.": "Cria um novo post em um espaço específico.",
"Creates a new comment on a post.": "Cria um novo comentário em uma publicação.",
"Add an existing member to a specific space by their email.": "Adicionar um membro existente a um espaço específico por seu e-mail.",
"Finds a community member by their email address.": "Encontrar um membro da comunidade com um endereço de e-mail.",
"Retrieves the complete details of a specific post.": "Recupera os detalhes completos de uma postagem específica.",
"Fetches the full profile details for a specific community member.": "Busca todos os detalhes do perfil para um membro específico da comunidade.",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"Space": "Sala",
"Post Name/Title": "Nome/título do post",
"Post Body (Plain Text)": "Corpo de Postagem (Texto Azul)",
"Tiptap Body JSON": "Dicas de Corpo JSON",
"Status": "Estado",
"Published At (for Scheduled)": "Publicado Em (para Agendado)",
"Enable Comments": "Habilitar comentários",
"Skip Notifications": "Ignorar notificações",
"Post As User Email (Optional)": "Postar como e-mail do usuário (opcional)",
"Post": "Publicar",
"Comment Body": "Corpo do Comentário",
"Parent Comment ID (Optional)": "ID do Comentário Pai (Opcional)",
"Member Email": "E-mail de membro",
"Email": "e-mail",
"Community Member": "Membro da Comunidade",
"Method": "Método",
"Headers": "Cabeçalhos",
"Query Parameters": "Parâmetros da consulta",
"Body": "Conteúdo",
"Response is Binary ?": "A resposta é binária ?",
"No Error on Failure": "Nenhum erro no Failure",
"Timeout (in seconds)": "Tempo limite (em segundos)",
"The title of the post.": "O título da publicação.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Conteúdo de texto simples para a mensagem. Usado se 'Dicas de JSON' não for fornecido.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Dica: Toque em JSON completo para o corpo do post. Se fornecido, 'Post Body (Plain Text)' é ignorado.",
"The status of the post.": "O status da publicação.",
"If status is 'scheduled', provide the future date and time for publishing.": "Se o status for 'agendado', forneça a data e hora futuras para a publicação.",
"Allow comments on this post?": "Permitir comentários nesta publicação?",
"Prevent notifications from being sent for this post?": "Impedir que notificações sejam enviadas para esta publicação?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "E-mail de um membro da comunidade existente para criar este post como. Se estiver vazio, poste como um administrador autenticado.",
"The content of the comment.": "O conteúdo do comentário.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID do comentário para responder. Deixe em branco se não for uma resposta.",
"Skip sending notifications for this comment?": "Ignorar o envio de notificações para este comentário?",
"The email address of the member to add to the space.": "O endereço de e-mail do membro para adicionar ao espaço.",
"The email address of the member to find.": "O endereço de e-mail do membro para encontrar.",
"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..",
"Draft": "Rascunho",
"Published": "Publicado",
"Scheduled": "Agendado",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA",
"New Post Created": "Nova publicação criada",
"New Member Added": "Novo Membro Adicionado",
"Triggers when a new post is created in a specific space.": "Dispara quando uma nova postagem é criada em um espaço específico.",
"Triggers when a new member is added to the community.": "Dispara quando um novo membro é adicionado à comunidade."
}

View File

@@ -0,0 +1,67 @@
{
"Circle": "Круг",
"Circle.so is a platform for creating and managing communities.": "Circle.so является платформой для создания и управления сообществами.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "Вы можете получить ваш API токен, перейдя по ссылке **Settings->Developers->Tokens**.",
"Create Post": "Создать запись",
"Create Comment": "Создать комментарий",
"Add Member to Space": "Добавить участника в сообщество",
"Find Member by Email": "Найти участника по электронной почте",
"Get Post Details": "Получить информацию о записи",
"Get Member Details": "Получить детали участника",
"Custom API Call": "Пользовательский вызов API",
"Creates a new post in a specific space.": "Создает новое сообщение в определенном месте.",
"Creates a new comment on a post.": "Создает новый комментарий к должности.",
"Add an existing member to a specific space by their email.": "Добавить существующего участника в определенное место по их электронной почте.",
"Finds a community member by their email address.": "Находит члена сообщества по их электронному адресу.",
"Retrieves the complete details of a specific post.": "Получает полную информацию о конкретной должности.",
"Fetches the full profile details for a specific community member.": "Получает полную информацию о профиле для конкретного члена сообщества.",
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
"Space": "Пространство",
"Post Name/Title": "Название / Заголовок",
"Post Body (Plain Text)": "Текст сообщения (Plain Text)",
"Tiptap Body JSON": "JSON тела Tiptap",
"Status": "Статус",
"Published At (for Scheduled)": "Опубликовано (по расписанию)",
"Enable Comments": "Включить комментарии",
"Skip Notifications": "Пропустить уведомления",
"Post As User Email (Optional)": "Сообщение от Пользователя (опционально)",
"Post": "Пост",
"Comment Body": "Тело комментария",
"Parent Comment ID (Optional)": "Родительский ID комментария (необязательно)",
"Member Email": "Email участника",
"Email": "Почта",
"Community Member": "Участник сообщества",
"Method": "Метод",
"Headers": "Заголовки",
"Query Parameters": "Параметры запроса",
"Body": "Тело",
"No Error on Failure": "Нет ошибок при ошибке",
"Timeout (in seconds)": "Таймаут (в секундах)",
"The title of the post.": "Название должности.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Простой текстовый контент для поста. Используется если 'Подсказка JSON' не предусмотрена.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Полная TipTap JSON объект для тела поста. Если предусмотрено, 'Пост тело (Plain Text)' игнорируется.",
"The status of the post.": "Статус должности.",
"If status is 'scheduled', provide the future date and time for publishing.": "Если статус 'запланированный', укажите будущую дату и время для публикации.",
"Allow comments on this post?": "Разрешить комментарии к этой записи?",
"Prevent notifications from being sent for this post?": "Запретить отправку уведомлений для этого поста?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Email существующего члена сообщества для создания этого сообщения. Если пустой, сообщения как авторизованный администратор.",
"The content of the comment.": "Содержание комментария.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID комментария к ответу. Оставьте пустым, если не отвечает.",
"Skip sending notifications for this comment?": "Пропустить отправку уведомлений для этого комментария?",
"The email address of the member to add to the space.": "Адрес электронной почты члена для добавления в место.",
"The email address of the member to find.": "Адрес электронной почты участника, который будет найти.",
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
"Draft": "Черновик",
"Published": "Опубликовано",
"Scheduled": "Запланированный",
"GET": "ПОЛУЧИТЬ",
"POST": "ПОСТ",
"PATCH": "ПАТЧ",
"PUT": "ПОКУПИТЬ",
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD",
"New Post Created": "Новое сообщение создано",
"New Member Added": "Добавлен новый участник",
"Triggers when a new post is created in a specific space.": "Триггеры при создании нового сообщения в определенном пространстве.",
"Triggers when a new member is added to the community.": "Включает при добавлении нового участника в сообщество."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so is a platform for creating and managing communities.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "You can obtain your API token by navigating to **Settings->Developers->Tokens**.",
"Create Post": "Create Post",
"Create Comment": "Create Comment",
"Add Member to Space": "Add Member to Space",
"Find Member by Email": "Find Member by Email",
"Get Post Details": "Get Post Details",
"Get Member Details": "Get Member Details",
"Custom API Call": "Custom API Call",
"Creates a new post in a specific space.": "Creates a new post in a specific space.",
"Creates a new comment on a post.": "Creates a new comment on a post.",
"Add an existing member to a specific space by their email.": "Add an existing member to a specific space by their email.",
"Finds a community member by their email address.": "Finds a community member by their email address.",
"Retrieves the complete details of a specific post.": "Retrieves the complete details of a specific post.",
"Fetches the full profile details for a specific community member.": "Fetches the full profile details for a specific community member.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Space": "Space",
"Post Name/Title": "Post Name/Title",
"Post Body (Plain Text)": "Post Body (Plain Text)",
"Tiptap Body JSON": "Tiptap Body JSON",
"Status": "Status",
"Published At (for Scheduled)": "Published At (for Scheduled)",
"Enable Comments": "Enable Comments",
"Skip Notifications": "Skip Notifications",
"Post As User Email (Optional)": "Post As User Email (Optional)",
"Post": "Post",
"Comment Body": "Comment Body",
"Parent Comment ID (Optional)": "Parent Comment ID (Optional)",
"Member Email": "Member Email",
"Email": "Email",
"Community Member": "Community Member",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"The title of the post.": "The title of the post.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.",
"The status of the post.": "The status of the post.",
"If status is 'scheduled', provide the future date and time for publishing.": "If status is 'scheduled', provide the future date and time for publishing.",
"Allow comments on this post?": "Allow comments on this post?",
"Prevent notifications from being sent for this post?": "Prevent notifications from being sent for this post?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Email of an existing community member to create this post as. If empty, posts as the authenticated admin.",
"The content of the comment.": "The content of the comment.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID of the comment to reply to. Leave empty if not a reply.",
"Skip sending notifications for this comment?": "Skip sending notifications for this comment?",
"The email address of the member to add to the space.": "The email address of the member to add to the space.",
"The email address of the member to find.": "The email address of the member to find.",
"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..",
"Draft": "Draft",
"Published": "Published",
"Scheduled": "Scheduled",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Post Created": "New Post Created",
"New Member Added": "New Member Added",
"Triggers when a new post is created in a specific space.": "Triggers when a new post is created in a specific space.",
"Triggers when a new member is added to the community.": "Triggers when a new member is added to the community."
}

View File

@@ -0,0 +1,67 @@
{
"Circle": "Circle",
"Circle.so is a platform for creating and managing communities.": "Circle.so is a platform for creating and managing communities.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "You can obtain your API token by navigating to **Settings->Developers->Tokens**.",
"Create Post": "Create Post",
"Create Comment": "Create Comment",
"Add Member to Space": "Add Member to Space",
"Find Member by Email": "Find Member by Email",
"Get Post Details": "Get Post Details",
"Get Member Details": "Get Member Details",
"Custom API Call": "Custom API Call",
"Creates a new post in a specific space.": "Creates a new post in a specific space.",
"Creates a new comment on a post.": "Creates a new comment on a post.",
"Add an existing member to a specific space by their email.": "Add an existing member to a specific space by their email.",
"Finds a community member by their email address.": "Finds a community member by their email address.",
"Retrieves the complete details of a specific post.": "Retrieves the complete details of a specific post.",
"Fetches the full profile details for a specific community member.": "Fetches the full profile details for a specific community member.",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Space": "Space",
"Post Name/Title": "Post Name/Title",
"Post Body (Plain Text)": "Post Body (Plain Text)",
"Tiptap Body JSON": "Tiptap Body JSON",
"Status": "Status",
"Published At (for Scheduled)": "Published At (for Scheduled)",
"Enable Comments": "Enable Comments",
"Skip Notifications": "Skip Notifications",
"Post As User Email (Optional)": "Post As User Email (Optional)",
"Post": "Post",
"Comment Body": "Comment Body",
"Parent Comment ID (Optional)": "Parent Comment ID (Optional)",
"Member Email": "Member Email",
"Email": "Email",
"Community Member": "Community Member",
"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 title of the post.": "The title of the post.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.",
"The status of the post.": "The status of the post.",
"If status is 'scheduled', provide the future date and time for publishing.": "If status is 'scheduled', provide the future date and time for publishing.",
"Allow comments on this post?": "Allow comments on this post?",
"Prevent notifications from being sent for this post?": "Prevent notifications from being sent for this post?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Email of an existing community member to create this post as. If empty, posts as the authenticated admin.",
"The content of the comment.": "The content of the comment.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID of the comment to reply to. Leave empty if not a reply.",
"Skip sending notifications for this comment?": "Skip sending notifications for this comment?",
"The email address of the member to add to the space.": "The email address of the member to add to the space.",
"The email address of the member to find.": "The email address of the member to find.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"Draft": "Bản nháp",
"Published": "Đã xuất bản",
"Scheduled": "Scheduled",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD",
"New Post Created": "New Post Created",
"New Member Added": "New Member Added",
"Triggers when a new post is created in a specific space.": "Triggers when a new post is created in a specific space.",
"Triggers when a new member is added to the community.": "Triggers when a new member is added to the community."
}

View File

@@ -0,0 +1,68 @@
{
"Circle.so is a platform for creating and managing communities.": "Circle.so is a platform for creating and managing communities.",
"You can obtain your API token by navigating to **Settings->Developers->Tokens**.": "You can obtain your API token by navigating to **Settings->Developers->Tokens**.",
"Create Post": "Create Post",
"Create Comment": "Create Comment",
"Add Member to Space": "Add Member to Space",
"Find Member by Email": "Find Member by Email",
"Get Post Details": "Get Post Details",
"Get Member Details": "Get Member Details",
"Custom API Call": "自定义 API 呼叫",
"Creates a new post in a specific space.": "Creates a new post in a specific space.",
"Creates a new comment on a post.": "Creates a new comment on a post.",
"Add an existing member to a specific space by their email.": "Add an existing member to a specific space by their email.",
"Finds a community member by their email address.": "Finds a community member by their email address.",
"Retrieves the complete details of a specific post.": "Retrieves the complete details of a specific post.",
"Fetches the full profile details for a specific community member.": "Fetches the full profile details for a specific community member.",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"Space": "Space",
"Post Name/Title": "Post Name/Title",
"Post Body (Plain Text)": "Post Body (Plain Text)",
"Tiptap Body JSON": "Tiptap Body JSON",
"Status": "状态",
"Published At (for Scheduled)": "Published At (for Scheduled)",
"Enable Comments": "Enable Comments",
"Skip Notifications": "Skip Notifications",
"Post As User Email (Optional)": "Post As User Email (Optional)",
"Post": "Post",
"Comment Body": "Comment Body",
"Parent Comment ID (Optional)": "Parent Comment ID (Optional)",
"Member Email": "Member Email",
"Email": "电子邮件地址",
"Community Member": "Community Member",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"The title of the post.": "The title of the post.",
"Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.": "Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.",
"Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.": "Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.",
"The status of the post.": "The status of the post.",
"If status is 'scheduled', provide the future date and time for publishing.": "If status is 'scheduled', provide the future date and time for publishing.",
"Allow comments on this post?": "Allow comments on this post?",
"Prevent notifications from being sent for this post?": "Prevent notifications from being sent for this post?",
"Email of an existing community member to create this post as. If empty, posts as the authenticated admin.": "Email of an existing community member to create this post as. If empty, posts as the authenticated admin.",
"The content of the comment.": "The content of the comment.",
"ID of the comment to reply to. Leave empty if not a reply.": "ID of the comment to reply to. Leave empty if not a reply.",
"Skip sending notifications for this comment?": "Skip sending notifications for this comment?",
"The email address of the member to add to the space.": "The email address of the member to add to the space.",
"The email address of the member to find.": "The email address of the member to find.",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"Draft": "草稿",
"Published": "已发布",
"Scheduled": "Scheduled",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色",
"New Post Created": "New Post Created",
"New Member Added": "New Member Added",
"Triggers when a new post is created in a specific space.": "Triggers when a new post is created in a specific space.",
"Triggers when a new member is added to the community.": "Triggers when a new member is added to the community."
}

View File

@@ -0,0 +1,39 @@
import { createPiece } from '@activepieces/pieces-framework';
import { newPostCreated } from './lib/triggers/new-post';
import { newMemberAdded } from './lib/triggers/new-member-added';
import { createPost } from './lib/actions/create-post';
import { createComment } from './lib/actions/create-comment';
import { addMemberToSpace } from './lib/actions/add-member-to-space';
import { findMemberByEmail } from './lib/actions/find-member-by-email';
import { getPostDetailsAction } from './lib/actions/get-post-details';
import { getMemberDetails } from './lib/actions/get-member-details';
import { circleAuth } from './lib/common/auth';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { BASE_URL } from './lib/common';
export const circle = createPiece({
displayName: 'Circle',
logoUrl: 'https://cdn.activepieces.com/pieces/circle.png',
description: 'Circle.so is a platform for creating and managing communities.',
auth: circleAuth,
minimumSupportedRelease: '0.36.1',
authors: ['onyedikachi-david', 'kishanprmr'],
actions: [
createPost,
createComment,
addMemberToSpace,
findMemberByEmail,
getPostDetailsAction,
getMemberDetails,
createCustomApiCallAction({
auth: circleAuth,
baseUrl: () => BASE_URL,
authMapping: async (auth) => {
return {
Authorization: `Bearer ${auth}`,
};
},
}),
],
triggers: [newPostCreated, newMemberAdded],
});

View File

@@ -0,0 +1,55 @@
import { Property, createAction } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import { BASE_URL, spaceIdDropdown } from '../common';
interface AddMemberToSpacePayload {
space_id: number;
email: string;
}
export const addMemberToSpace = createAction({
auth: circleAuth,
name: 'add_member_to_space',
displayName: 'Add Member to Space',
description: 'Add an existing member to a specific space by their email.',
props: {
space_id: spaceIdDropdown,
email: Property.ShortText({
displayName: 'Member Email',
description: 'The email address of the member to add to the space.',
required: true,
}),
},
async run(context) {
const { space_id, email } = context.propsValue;
if (space_id === undefined) {
throw new Error('Space ID is undefined, but it is a required field.');
}
if (email === undefined) {
throw new Error('Email is undefined, but it is a required field.');
}
const payload: AddMemberToSpacePayload = {
space_id: space_id,
email: email,
};
const response = await httpClient.sendRequest<{
message?: string;
success?: boolean;
error_details?: unknown;
}>({
method: HttpMethod.POST,
url: `${BASE_URL}/space_members`,
body: payload,
headers: {
Authorization: `Bearer ${context.auth.secret_text}`,
'Content-Type': 'application/json',
},
});
return response.body;
},
});

View File

@@ -0,0 +1,73 @@
import { Property, createAction } from '@activepieces/pieces-framework';
import { spaceIdDropdown, postIdDropdown, BASE_URL } from '../common';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import { isNil } from '@activepieces/shared';
interface CreateCommentPayload {
post_id: number;
body: string;
parent_comment_id?: number;
skip_notifications?: boolean;
}
export const createComment = createAction({
auth: circleAuth,
name: 'create_comment',
displayName: 'Create Comment',
description: 'Creates a new comment on a post.',
props: {
space_id: spaceIdDropdown,
post_id: postIdDropdown,
body: Property.LongText({
displayName: 'Comment Body',
description: 'The content of the comment.',
required: true,
}),
parent_comment_id: Property.Number({
displayName: 'Parent Comment ID (Optional)',
description: 'ID of the comment to reply to. Leave empty if not a reply.',
required: false,
}),
skip_notifications: Property.Checkbox({
displayName: 'Skip Notifications',
description: 'Skip sending notifications for this comment?',
required: false,
defaultValue: false,
}),
},
async run(context) {
const { post_id, body, parent_comment_id, skip_notifications } = context.propsValue;
if (post_id === undefined) {
throw new Error('Post ID is required but was not provided.');
}
if (body === undefined) {
throw new Error('Comment body is required but was not provided.');
}
const payload: CreateCommentPayload = {
post_id: post_id,
body: body,
};
if (!isNil(parent_comment_id)) {
payload.parent_comment_id = parent_comment_id;
}
if (skip_notifications !== undefined) {
payload.skip_notifications = skip_notifications;
}
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: `${BASE_URL}/comments`,
body: payload,
headers: {
Authorization: `Bearer ${context.auth.secret_text}`,
'Content-Type': 'application/json',
},
});
return response.body;
},
});

View File

@@ -0,0 +1,176 @@
import { Property, createAction } from "@activepieces/pieces-framework";
import { httpClient, HttpMethod } from "@activepieces/pieces-common";
import { circleAuth } from "../common/auth";
import { BASE_URL, spaceIdDropdown } from "../common";
// Interface for the TipTap body structure (simplified for payload)
interface TipTapPayloadBody {
type: string; // "doc"
content: any[]; // Content structure for TipTap
}
// Interface for the full payload to create a post
interface CreatePostPayload {
space_id: number;
name: string;
status?: string;
tiptap_body: { body: TipTapPayloadBody };
slug?: string;
cover_image?: string;
internal_custom_html?: string;
is_truncation_disabled?: boolean;
is_comments_closed?: boolean;
is_comments_enabled?: boolean;
is_liking_enabled?: boolean;
hide_meta_info?: boolean;
hide_from_featured_areas?: boolean;
meta_title?: string;
meta_description?: string;
opengraph_title?: string;
opengraph_description?: string;
published_at?: string; // ISO 8601 string
created_at?: string; // ISO 8601 string - usually set by server
topics?: number[];
skip_notifications?: boolean;
is_pinned?: boolean;
user_email?: string;
user_id?: number;
}
export const createPost = createAction({
auth: circleAuth,
name: 'create_post',
displayName: 'Create Post',
description: 'Creates a new post in a specific space.',
props: {
space_id: spaceIdDropdown,
name: Property.ShortText({
displayName: 'Post Name/Title',
description: 'The title of the post.',
required: true,
}),
text_body: Property.LongText({
displayName: 'Post Body (Plain Text)',
description: "Simple plain text content for the post. Used if 'Tiptap Body JSON' is not provided.",
required: false,
}),
tiptap_body_json: Property.Json({
displayName: 'Tiptap Body JSON',
description: "Full TipTap JSON object for the post body. If provided, 'Post Body (Plain Text)' is ignored.",
required: false,
}),
status: Property.StaticDropdown({
displayName: 'Status',
description: 'The status of the post.',
required: false,
options: {
options: [
{ label: 'Draft', value: 'draft' },
{ label: 'Published', value: 'published' },
{ label: 'Scheduled', value: 'scheduled' },
]
},
defaultValue: 'published',
}),
published_at: Property.DateTime({
displayName: 'Published At (for Scheduled)',
description: "If status is 'scheduled', provide the future date and time for publishing.",
required: false,
}),
is_comments_enabled: Property.Checkbox({
displayName: 'Enable Comments',
description: 'Allow comments on this post?',
required: false,
defaultValue: true,
}),
skip_notifications: Property.Checkbox({
displayName: 'Skip Notifications',
description: 'Prevent notifications from being sent for this post?',
required: false,
defaultValue: false,
}),
user_email: Property.ShortText({
displayName: 'Post As User Email (Optional)',
description: 'Email of an existing community member to create this post as. If empty, posts as the authenticated admin.',
required: false,
})
},
async run(context) {
const {
space_id, name, text_body, tiptap_body_json,
status, published_at, is_comments_enabled,
skip_notifications, user_email
} = context.propsValue;
if (space_id === undefined) {
throw new Error("Space ID is undefined, but it is a required field.");
}
if (name === undefined) {
throw new Error("Post Name/Title is undefined, but it is a required field.");
}
let finalTiptapBody: { body: TipTapPayloadBody };
if (tiptap_body_json && typeof tiptap_body_json === 'object' && (tiptap_body_json as any).body) {
finalTiptapBody = tiptap_body_json as { body: TipTapPayloadBody };
} else if (text_body) {
finalTiptapBody = {
body: {
type: "doc",
content: [
{
type: "paragraph",
content: [
{ type: "text", text: text_body }
]
}
]
}
};
} else if (!text_body && !tiptap_body_json) {
finalTiptapBody = {
body: { type: "doc", content: [{ type: "paragraph", content: [{ type: "text", text: "" }] }] }
};
} else {
throw new Error("Invalid body input. Provide either 'Post Body (Plain Text)' or a valid 'Tiptap Body JSON'. If both are empty, an empty post will be created.");
}
const payload: CreatePostPayload = {
space_id: space_id,
name: name,
tiptap_body: finalTiptapBody,
status: status ?? 'published',
};
if (published_at && payload.status === 'scheduled') {
payload.published_at = new Date(published_at).toISOString();
} else if (payload.status === 'scheduled' && !published_at) {
// It's an error to have scheduled status without a published_at date.
// However, the API might handle this. For now, we'll let it pass,
// but this could be a validation point.
}
if (is_comments_enabled !== undefined) {
payload.is_comments_enabled = is_comments_enabled;
payload.is_comments_closed = !is_comments_enabled;
}
if (skip_notifications !== undefined) {
payload.skip_notifications = skip_notifications;
}
if (user_email) {
payload.user_email = user_email;
}
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: `${BASE_URL}/posts`,
body: payload,
headers: {
"Authorization": `Bearer ${context.auth.secret_text}`,
"Content-Type": "application/json"
}
});
return response.body;
}
});

View File

@@ -0,0 +1,40 @@
import { Property, createAction } from "@activepieces/pieces-framework";
import { BASE_URL } from "../common";
import { httpClient, HttpMethod } from "@activepieces/pieces-common";
import { circleAuth } from "../common/auth";
import { CommunityMemberDetails } from "../common/types";
export const findMemberByEmail = createAction({
auth: circleAuth,
name: 'find_member_by_email',
displayName: 'Find Member by Email',
description: 'Finds a community member by their email address.',
props: {
email: Property.ShortText({
displayName: 'Email',
description: 'The email address of the member to find.',
required: true,
}),
},
async run(context) {
const { email } = context.propsValue;
if (email === undefined) {
throw new Error("Email is undefined, but it is a required field.");
}
const response = await httpClient.sendRequest<CommunityMemberDetails>({
method: HttpMethod.GET,
url: `${BASE_URL}/community_members/search`,
queryParams: {
email: email,
},
headers: {
"Authorization": `Bearer ${context.auth.secret_text}`,
"Content-Type": "application/json"
},
});
return response.body;
}
});

View File

@@ -0,0 +1,31 @@
import { createAction } from '@activepieces/pieces-framework';
import { BASE_URL, communityMemberIdDropdown } from '../common';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import { CommunityMemberDetails } from '../common/types';
export const getMemberDetails = createAction({
auth: circleAuth,
name: 'get_member_details',
displayName: 'Get Member Details',
description: 'Fetches the full profile details for a specific community member.',
props: {
member_id: communityMemberIdDropdown,
},
async run(context) {
const { member_id } = context.propsValue;
if (member_id === undefined) {
throw new Error('Member ID is undefined, but it is a required field.');
}
const response = await httpClient.sendRequest<CommunityMemberDetails>({
method: HttpMethod.GET,
url: `${BASE_URL}/community_members/${member_id}`,
headers: {
Authorization: `Bearer ${context.auth.secret_text}`,
'Content-Type': 'application/json',
},
});
return response.body;
},
});

View File

@@ -0,0 +1,33 @@
import { createAction } from '@activepieces/pieces-framework';
import { BASE_URL, spaceIdDropdown, postIdDropdown } from '../common';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import { PostDetails } from '../common/types';
export const getPostDetailsAction = createAction({
auth: circleAuth,
name: 'get_post_details',
displayName: 'Get Post Details',
description: 'Retrieves the complete details of a specific post.',
props: {
space_id: spaceIdDropdown,
post_id: postIdDropdown,
},
async run(context) {
const { post_id } = context.propsValue;
if (post_id === undefined) {
throw new Error('Post ID is undefined, but it is a required field.');
}
const response = await httpClient.sendRequest<PostDetails>({
method: HttpMethod.GET,
url: `${BASE_URL}/posts/${post_id}`,
headers: {
Authorization: `Bearer ${context.auth.secret_text}`,
'Content-Type': 'application/json',
},
});
return response.body;
},
});

View File

@@ -0,0 +1,7 @@
import { PieceAuth } from "@activepieces/pieces-framework";
export const circleAuth = PieceAuth.SecretText({
displayName: 'API Token',
description: `You can obtain your API token by navigating to **Settings->Developers->Tokens**.`,
required: true,
});

View File

@@ -0,0 +1,121 @@
import { Property } from '@activepieces/pieces-framework';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
import { ListBasicPostsResponse, ListCommunityMembersResponse, ListSpacesResponse } from './types';
import { circleAuth } from './auth';
export const BASE_URL = 'https://app.circle.so/api/admin/v2';
export const spaceIdDropdown = Property.Dropdown({
displayName: 'Space',
required: true,
refreshers: [],
auth: circleAuth,
options: async ({ auth }) => {
if (!auth) {
return {
disabled: true,
placeholder: 'Please connect your account first',
options: [],
};
}
const response = await httpClient.sendRequest<ListSpacesResponse>({
method: HttpMethod.GET,
url: `${BASE_URL}/spaces`,
headers: {
Authorization: `Bearer ${auth.secret_text}`,
'Content-Type': 'application/json',
},
});
if (response.status === 200) {
return {
disabled: false,
options: response.body.records.map((space) => ({
label: space.name,
value: space.id,
})),
};
}
return {
disabled: true,
placeholder: 'Error fetching spaces',
options: [],
};
},
});
export const postIdDropdown = Property.Dropdown({
displayName: 'Post',
required: true,
refreshers: ['space_id'],
auth: circleAuth,
options: async ({ auth, space_id }) => {
if (!auth || !space_id) {
return {
disabled: true,
placeholder: !auth ? 'Please connect your account first' : 'Select a space first',
options: [],
};
}
const response = await httpClient.sendRequest<ListBasicPostsResponse>({
method: HttpMethod.GET,
url: `${BASE_URL}/posts`,
headers: {
Authorization: `Bearer ${auth.secret_text}`,
'Content-Type': 'application/json',
},
queryParams: {
space_id: (space_id as number).toString(),
status: 'all', // Fetch all posts for selection
},
});
if (response.status === 200) {
return {
disabled: false,
options: response.body.records.map((post) => ({
label: post.name,
value: post.id,
})),
};
}
return {
disabled: true,
placeholder: 'Error fetching posts or no posts found in space.',
options: [],
};
},
});
export const communityMemberIdDropdown = Property.Dropdown({
displayName: 'Community Member',
required: true,
refreshers: [],
auth: circleAuth,
options: async ({ auth }) => {
if (!auth) {
return { disabled: true, placeholder: 'Please authenticate first', options: [] };
}
const response = await httpClient.sendRequest<ListCommunityMembersResponse>({
method: HttpMethod.GET,
url: `${BASE_URL}/community_members`,
headers: {
Authorization: `Bearer ${auth.secret_text}`,
'Content-Type': 'application/json',
},
queryParams: { status: 'all' },
});
if (response.status === 200 && response.body.records) {
return {
disabled: false,
options: response.body.records.map((member) => ({
label: `${member.name} (${member.email})`,
value: member.id,
})),
};
}
return {
disabled: true,
placeholder: 'Error fetching community members or no members found',
options: [],
};
},
});

View File

@@ -0,0 +1,269 @@
export interface Space {
id: number;
name: string;
}
export interface ListSpacesResponse {
records: Space[];
page?: number;
per_page?: number;
has_next_page?: boolean;
count?: number;
page_count?: number;
}
// Interface for individual post item based on 'List Basic Posts' records
export interface BasicPostFromList {
id: number;
status: string;
name: string;
slug: string;
comments_count: number;
hide_meta_info: boolean;
published_at: string;
created_at: string;
updated_at: string;
is_comments_enabled: boolean;
is_liking_enabled: boolean;
flagged_for_approval_at: string | null;
body: {
id: number;
name: string; // e.g., "body"
body: string; // HTML content snippet
record_type: string; // "Post"
record_id: number;
created_at: string;
updated_at: string;
};
url: string;
space_name: string;
space_slug: string;
space_id: number;
user_id: number;
user_email: string;
user_name: string;
community_id: number;
user_avatar_url: string | null;
cover_image_url: string | null;
cover_image: string | null;
cardview_thumbnail_url: string | null;
cardview_thumbnail: string | null;
is_comments_closed: boolean;
custom_html: string | null;
likes_count: number;
member_posts_count: number;
member_comments_count: number;
member_likes_count: number;
topics: number[];
}
// Interface based on the 'List Basic Posts' API response
export interface ListBasicPostsResponse {
page: number;
per_page: number;
has_next_page: boolean;
count: number;
page_count: number;
records: BasicPostFromList[];
}
// --- Shared Member Profile Sub-Interfaces ---
export interface ProfileFieldChoice {
id: number;
value: string;
}
export interface CommunityMemberProfileFieldChoice {
id: number;
profile_field_choice: ProfileFieldChoice;
}
export interface CommunityMemberProfileFieldDetails {
id: number;
text: string | null;
textarea: string | null;
created_at: string;
updated_at: string;
display_value: string[] | null;
community_member_choices: CommunityMemberProfileFieldChoice[];
}
export interface ProfileFieldPage {
id: number;
name: string;
position: number;
visible: boolean;
created_at: string;
updated_at: string;
}
export interface ProfileField {
id: number;
label: string;
field_type: string;
key: string;
placeholder: string | null;
description: string | null;
required: boolean;
platform_field: boolean;
created_at: string;
updated_at: string;
community_member_profile_field: CommunityMemberProfileFieldDetails | null;
number_options: any | null;
choices: ProfileFieldChoice[];
pages: ProfileFieldPage[];
}
export interface MemberTag {
name: string;
id: number;
}
export interface GamificationStats {
community_member_id: number;
total_points: number;
current_level: number;
current_level_name: string;
points_to_next_level: number;
level_progress: number;
}
export interface CommunityMemberListItem {
id: number;
name: string; // Full name
email: string;
first_name: string | null;
last_name: string | null;
headline: string | null;
created_at: string;
updated_at: string;
community_id: number;
last_seen_at: string | null;
profile_confirmed_at: string | null;
profile_url: string;
public_uid: string;
avatar_url: string | null;
user_id: number; // This is the user_id associated with the community_member, not the community_member.id
active: boolean;
sso_provider_user_id: string | null;
accepted_invitation: string | null;
profile_fields: ProfileField[];
flattened_profile_fields: Record<string, string[] | null>;
member_tags: MemberTag[];
posts_count: number;
comments_count: number;
gamification_stats: GamificationStats;
}
export interface ListCommunityMembersResponse {
page: number;
per_page: number;
has_next_page: boolean;
count: number;
page_count: number;
records: CommunityMemberListItem[];
}
export interface CommunityMemberDetails {
id: number;
first_name: string | null;
last_name: string | null;
headline: string | null;
created_at: string;
updated_at: string;
community_id: number;
last_seen_at: string | null;
profile_confirmed_at: string | null;
profile_url: string;
public_uid: string;
profile_fields: ProfileField[];
flattened_profile_fields: Record<string, string[] | null>;
avatar_url: string | null;
user_id: number;
name: string;
email: string;
accepted_invitation: string | null;
active: boolean;
sso_provider_user_id: string | null;
member_tags: MemberTag[];
posts_count: number;
comments_count: number;
gamification_stats: GamificationStats;
}
interface PostBody {
id: number;
name: string; // "body"
body: string; // HTML content
record_type: string; // "Post"
record_id: number;
created_at: string;
updated_at: string;
}
interface TipTapMark {
type: string;
attrs?: Record<string, unknown>; // Example: { href: 'url' } for a link mark
}
interface TipTapContentItem {
type: string;
text?: string;
marks?: TipTapMark[];
attrs?: Record<string, unknown>;
content?: TipTapContentItem[];
circle_ios_fallback_text?: string;
}
interface TipTapBody {
body: {
type: string; // "doc"
content: TipTapContentItem[];
};
circle_ios_fallback_text?: string;
attachments?: unknown[];
inline_attachments?: unknown[];
sgids_to_object_map?: Record<string, unknown>;
format?: string; // "post"
community_members?: unknown[];
entities?: unknown[];
group_mentions?: unknown[];
polls?: unknown[];
}
export interface PostDetails {
id: number;
status: string;
name: string;
slug: string;
comments_count: number;
hide_meta_info: boolean;
published_at: string;
created_at: string;
updated_at: string;
is_comments_enabled: boolean;
is_liking_enabled: boolean;
flagged_for_approval_at: string | null;
body: PostBody;
tiptap_body: TipTapBody;
url: string;
space_name: string;
space_slug: string;
space_id: number;
user_id: number;
user_email: string;
user_name: string;
community_id: number;
user_avatar_url: string | null;
cover_image_url: string | null;
cover_image: string | null; // This seems to be an identifier string
cardview_thumbnail_url: string | null;
cardview_thumbnail: string | null; // Also an identifier
is_comments_closed: boolean;
custom_html: string | null;
likes_count: number;
member_posts_count: number;
member_comments_count: number;
member_likes_count: number;
topics: number[];
}

View File

@@ -0,0 +1,134 @@
import {
AppConnectionValueForAuthProperty,
PiecePropValueSchema,
TriggerStrategy,
createTrigger,
} from '@activepieces/pieces-framework';
import { BASE_URL } from '../common';
import {
DedupeStrategy,
httpClient,
HttpMethod,
Polling,
pollingHelper,
} from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import dayjs from 'dayjs';
import { ListCommunityMembersResponse } from '../common/types';
const polling: Polling<AppConnectionValueForAuthProperty<typeof circleAuth>, Record<string, any>> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, lastFetchEpochMS }) {
let page = 1;
let hasMorePages = true;
let stopFetching = false;
const members = [];
do {
const response = await httpClient.sendRequest<ListCommunityMembersResponse>({
method: HttpMethod.GET,
url: `${BASE_URL}/community_members`,
queryParams: {
page: page.toString(),
per_page: '50',
status: 'all',
},
headers: {
Authorization: `Bearer ${auth.secret_text}`,
'Content-Type': 'application/json',
},
});
const items = response.body.records || [];
for (const member of items) {
const publishedAt = dayjs(member.created_at).valueOf();
if (publishedAt < lastFetchEpochMS) {
stopFetching = true;
break;
}
members.push(member);
}
if (stopFetching || lastFetchEpochMS === 0) break;
page++;
hasMorePages = response.body.has_next_page;
} while (hasMorePages);
return members.map((member) => {
return {
epochMilliSeconds: dayjs(member.created_at).valueOf(),
data: member,
};
});
},
};
export const newMemberAdded = createTrigger({
auth: circleAuth,
name: 'new_member_added',
displayName: 'New Member Added',
description: 'Triggers when a new member is added to the community.',
props: {},
type: TriggerStrategy.POLLING,
async onEnable(context) {
await pollingHelper.onEnable(polling, {
auth: context.auth,
store: context.store,
propsValue: context.propsValue,
});
},
async onDisable(context) {
await pollingHelper.onDisable(polling, {
auth: context.auth,
store: context.store,
propsValue: context.propsValue,
});
},
async test(context) {
return await pollingHelper.test(polling, context);
},
async run(context) {
return await pollingHelper.poll(polling, context);
},
sampleData: {
first_name: 'Gov.',
last_name: 'Loriann Barton',
headline: 'Sales Orchestrator',
created_at: '2024-09-03T16:20:19.814Z',
updated_at: '2024-09-03T16:20:19.826Z',
community_id: 1,
last_seen_at: null,
profile_confirmed_at: '2024-09-03T16:20:19.000Z',
id: 2,
profile_url: 'http://reynolds.circledev.net:31337/u/352c3aff',
public_uid: '352c3aff',
profile_fields: [],
flattened_profile_fields: {
profile_field_key_1: null,
},
avatar_url: null,
user_id: 3,
name: 'Gov. Loriann Barton',
email: 'raul@nitzsche.org',
accepted_invitation: '2024-09-03 16:20:19 UTC',
active: true,
sso_provider_user_id: null,
member_tags: [],
posts_count: 0,
comments_count: 0,
gamification_stats: {
community_member_id: 2,
total_points: 0,
current_level: 1,
current_level_name: 'Level 1',
points_to_next_level: 50,
level_progress: 50,
},
},
});

View File

@@ -0,0 +1,146 @@
import {
AppConnectionValueForAuthProperty,
TriggerStrategy,
createTrigger,
} from '@activepieces/pieces-framework';
import { BASE_URL, spaceIdDropdown } from '../common';
import {
DedupeStrategy,
httpClient,
HttpMethod,
Polling,
pollingHelper,
} from '@activepieces/pieces-common';
import { circleAuth } from '../common/auth';
import { ListBasicPostsResponse } from '../common/types';
import dayjs from 'dayjs';
const polling: Polling<AppConnectionValueForAuthProperty<typeof circleAuth>, { space_id?: number }> = {
strategy: DedupeStrategy.TIMEBASED,
async items({ auth, propsValue, lastFetchEpochMS }) {
const spaceId = propsValue.space_id!;
let page = 1;
let hasMorePages = true;
let stopFetching = false;
const posts = [];
do {
const response = await httpClient.sendRequest<ListBasicPostsResponse>({
method: HttpMethod.GET,
url: `${BASE_URL}/posts`,
queryParams: {
space_id: spaceId.toString(),
status: 'published',
sort: 'latest',
page: page.toString(),
per_page: '60',
},
headers: {
Authorization: `Bearer ${auth}`,
'Content-Type': 'application/json',
},
});
const items = response.body.records || [];
for (const post of items) {
const publishedAt = dayjs(post.published_at).valueOf();
if (publishedAt < lastFetchEpochMS) {
stopFetching = true;
break;
}
posts.push(post);
}
if (stopFetching || lastFetchEpochMS === 0) break;
page++;
hasMorePages = response.body.has_next_page;
} while (hasMorePages);
return posts.map((post) => {
return {
epochMilliSeconds: dayjs(post.published_at).valueOf(),
data: post,
};
});
},
};
export const newPostCreated = createTrigger({
auth: circleAuth,
name: 'new_post_created',
displayName: 'New Post Created',
description: 'Triggers when a new post is created in a specific space.',
props: {
space_id: spaceIdDropdown,
},
type: TriggerStrategy.POLLING,
async onEnable(context) {
await pollingHelper.onEnable(polling, {
auth: context.auth,
store: context.store,
propsValue: context.propsValue,
});
},
async onDisable(context) {
await pollingHelper.onDisable(polling, {
auth: context.auth,
store: context.store,
propsValue: context.propsValue,
});
},
async test(context) {
return await pollingHelper.test(polling, context);
},
async run(context) {
return await pollingHelper.poll(polling, context);
},
sampleData: {
id: 2,
status: 'published',
name: 'Second post',
slug: 'kiehn',
comments_count: 0,
hide_meta_info: false,
published_at: '2024-06-27T08:31:30.777Z',
created_at: '2024-06-27T08:31:30.781Z',
updated_at: '2024-06-27T08:31:30.784Z',
is_comments_enabled: true,
is_liking_enabled: true,
flagged_for_approval_at: null,
body: {
id: 2,
name: 'body',
body: '<div><!--block-->Iusto sint asperiores sed.</div>',
record_type: 'Post',
record_id: 2,
created_at: '2024-06-27T08:31:30.000Z',
updated_at: '2024-06-27T08:31:30.000Z',
},
url: 'http://dickinson.circledev.net:31337/c/post/kiehn',
space_name: 'post',
space_slug: 'post',
space_id: 1,
user_id: 6,
user_email: 'lyndon@frami.info',
user_name: 'Rory Wyman',
community_id: 1,
user_avatar_url: 'https://example.com/avatar.png',
cover_image_url: 'http://example.com/cover.jpeg',
cover_image: 'identifier-string',
cardview_thumbnail_url: 'http://example.com/thumbnail.jpeg',
cardview_thumbnail: 'identifier-string',
is_comments_closed: false,
custom_html: '<div>Click Me!</div>',
likes_count: 0,
member_posts_count: 2,
member_comments_count: 0,
member_likes_count: 0,
topics: [12, 43, 54],
},
});

View File

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

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"]
}