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:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-microsoft-outlook-calendar
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-microsoft-outlook-calendar` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-microsoft-outlook-calendar",
|
||||
"version": "0.0.14"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-microsoft-outlook-calendar",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/microsoft-outlook-calendar/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/microsoft-outlook-calendar",
|
||||
"tsConfig": "packages/pieces/community/microsoft-outlook-calendar/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/microsoft-outlook-calendar/package.json",
|
||||
"main": "packages/pieces/community/microsoft-outlook-calendar/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/microsoft-outlook-calendar/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/microsoft-outlook-calendar/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/microsoft-outlook-calendar",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Kalendersoftware von Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Melden Sie sich bei [Microsoft Azure Portal](https://portal.azure.com/).\n. Von der linken Seitenleiste gehen Sie zur **Microsoft Enfra ID**.\n3. Unter **Verwalten** klicken Sie auf **App-Registrierungen**.\n4. Klicken Sie auf die **Neue Registrierung** Schaltfläche.\n5. Geben Sie einen **Name** für Ihre App ein.\n6. Für **unterstützte Kontotypen**, auswählen:\n - **Konten in jedem Organisationsverzeichnis (jeder Microsoft-Entra-ID-Mieter - Multitenant) und persönlichen Microsoft-Konten**\n - Oder wählen Sie nach Ihren Anforderungen aus.\n7. In **Umleitungs-URI** wählen Sie **Web** und fügen Sie die angegebene URL hinzu.\n8. Klicken Sie auf **Registrieren**.\n9. Nach der Registrierung werden Sie zur Übersichtsseite der App weitergeleitet. Kopieren Sie die **Anwendungs-(Client)-ID**.\n10. Gehen Sie aus dem linken Menü zu **Zertifikate & Geheimnis**.\n - Unter **Kundengeheimnis**, klicken Sie **Kundengeheimnis**.\n - Geben Sie eine Beschreibung an, setzen Sie ein Ablaufdatum und klicken Sie auf **Hinzufügen**.\n - Kopieren Sie den **Wert** des Client-Geheimnisses (dies wird nicht wieder angezeigt).\n11. Gehe zu **API-Berechtigungen** vom linken Menü.\n - Klicke auf **Berechtigung hinzufügen**.\n - Wähle **Microsoft Graph** → **Delegierte Berechtigungen**.\n - Fügen Sie folgende Bereiche hinzu:\n\t - Kalender. eadWrite\n\t - offline_access \n - User.Lesen Sie\n - Klicken Sie auf **Berechtigungen hinzufügen**.\n12. Kopieren Sie Ihre **Client-ID** und **Client-Geheimnis**.\n",
|
||||
"Create a new event in a calendar": "Neues Ereignis in einem Kalender erstellen",
|
||||
"Delete an event in a calendar": "Ereignis in einem Kalender löschen",
|
||||
"List events in a calendar": "Ereignisse in einem Kalender auflisten",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
||||
"Calendar": "Kalender",
|
||||
"Title of the event": "Titel des Ereignisses",
|
||||
"Start date time of the event": "Startdatum des Ereignisses",
|
||||
"End date time of the event": "Enddatum des Ereignisses",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Standort",
|
||||
"Event ID": "Event-ID",
|
||||
"Filter": "Filtern",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "Standardmäßig ist es 30 Minuten Beitragsstartzeit",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Suchfilter sehen, siehe: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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..",
|
||||
"GET": "ERHALTEN",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "LÖSCHEN",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Software de calendario de Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n\t - Calendars.ReadWrite\n\t - offline_access\n\t - User.Read\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "Crear un nuevo evento en un calendario",
|
||||
"Delete an event in a calendar": "Eliminar un evento en un calendario",
|
||||
"List events in a calendar": "Listar eventos en un calendario",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
||||
"Calendar": "Calendario",
|
||||
"Title of the event": "Título del evento",
|
||||
"Start date time of the event": "Fecha de inicio del evento",
|
||||
"End date time of the event": "Fecha de fin del evento",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Ubicación",
|
||||
"Event ID": "Evento ID",
|
||||
"Filter": "Filtro",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "Por defecto será 30 minutos de inicio del post",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Filtro de búsqueda de consultas, ver: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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.",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Logiciel de calendrier par Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n\t - Calendars.ReadWrite\n\t - offline_access\n\t - User.Read\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "Créer un nouvel événement dans un calendrier",
|
||||
"Delete an event in a calendar": "Supprimer un événement dans un calendrier",
|
||||
"List events in a calendar": "Lister les événements dans un calendrier",
|
||||
"Custom API Call": "Appel API personnalisé",
|
||||
"Make a custom API call to a specific endpoint": "Passez un appel API personnalisé à un point de terminaison spécifique",
|
||||
"Calendar": "Calendrier",
|
||||
"Title of the event": "Titre de l'événement",
|
||||
"Start date time of the event": "Date de début de l'événement",
|
||||
"End date time of the event": "Date de fin de l'événement",
|
||||
"Timezone": "Fuseau horaire",
|
||||
"Location": "Localisation",
|
||||
"Event ID": "ID de l'événement",
|
||||
"Filter": "Filtre",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "Par défaut, il sera de 30 minutes de début du post",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Filtre de requête de recherche, voir : https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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.",
|
||||
"GET": "OBTENIR",
|
||||
"POST": "POSTER",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "EFFACER",
|
||||
"DELETE": "SUPPRIMER",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Microsoftによるカレンダーソフトウェア",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n\t - Calendars.ReadWrite\n\t - offline_access\n\t - User.Read\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "カレンダーに新しい予定を作成する",
|
||||
"Delete an event in a calendar": "カレンダーの予定を削除する",
|
||||
"List events in a calendar": "カレンダー内のイベント一覧",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
||||
"Calendar": "カレンダー",
|
||||
"Title of the event": "イベントのタイトル",
|
||||
"Start date time of the event": "イベントの開始日時",
|
||||
"End date time of the event": "イベントの終了日時",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "場所",
|
||||
"Event ID": "イベントID",
|
||||
"Filter": "フィルター",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"By default it'll be 30 min post start time": "デフォルトでは投稿開始時間は30分です",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "検索クエリフィルタ, 参照: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
||||
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
||||
"GET": "取得",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "削除",
|
||||
"HEAD": "頭"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Agenda software van Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Log in bij [Microsoft Azure Portal](https://portal.azure.com/).\n. Ga naar **Microsoft Enfra ID**.\n3. Onder **Beheren**, klik op **App registraties**.\n4. Klik op de **Nieuwe registratie** knop.\n5. Voer een **Naam** in voor uw app.\n6. Voor **Ondersteunde accounttypen**, kies keuze:\n - **Accounts in elke map van de organisatie (Any Microsoft Entra ID-tenant - Multitenant) en persoonlijke Microsoft accounts**\n - Of selecteer gebaseerd op uw vereiste.\n7. In **Redirect URI**, selecteer **Web** en voeg de opgegeven URL toe.\n8. Klik **Register**.\n9. Na registratie wordt u doorverwezen naar de overzichtspagina. Kopieer de **Applicatie (client) ID**.\n10. Vanuit het linkermenu ga naar **Certificaten & geheimen**.\n - Onder **Client secrets**, klik op **Nieuwe client geheim**.\n - Geef een beschrijving, verloop, en klik **Toevoegen**.\n - Kopieer de **waarde** van de client secret (dit zal niet meer worden weergegeven).\n11. Ga naar **API permissies** in het linkermenu.\n - Klik **Een machtiging toevoegen**.\n - Selecteer **Microsoft Graph** → **Toegewezen machtigingen**.\n - Voeg de volgende toepassingsgebieden toe:\n\t - kalenders. eadWrite\n\t - offline_access \n - User.Read\n - Klik **Permissies toevoegen**.\n12. Kopieer de **Client ID** en **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "Maak een nieuwe afspraak aan in een kalender",
|
||||
"Delete an event in a calendar": "Een afspraak in een kalender verwijderen",
|
||||
"List events in a calendar": "Afspraken in een kalender weergeven",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
||||
"Calendar": "Kalender",
|
||||
"Title of the event": "Titel van de gebeurtenis",
|
||||
"Start date time of the event": "Startdatum van de gebeurtenis",
|
||||
"End date time of the event": "Einddatum van de gebeurtenis",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Locatie",
|
||||
"Event ID": "Gebeurtenis ID",
|
||||
"Filter": "Filteren",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "Standaard is het 30 minuten begintijd van het bericht",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Zoekfilter zoekopdracht, zie: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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..",
|
||||
"GET": "KRIJG",
|
||||
"POST": "POSTE",
|
||||
"PATCH": "BEKIJK",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "VERWIJDEREN",
|
||||
"HEAD": "HOOFD"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Software de calendário de Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Entre no [Microsoft Azure Portal](https://portal.azure.com/).\n. Na barra lateral esquerda, vá até **Microsoft Enfra ID**.\n3. Sob **Gerenciar**, clique em **Aplicativos registrados**.\n4. Clique no botão **Novo registro**.\n5. Digite um **Nome** para o seu aplicativo.\n6. Para **Tipos de conta suportados**, escolha:\n - **Contas em qualquer diretório organizacional (qualquer inquilino de ID da Microsoft Entra - Multitenant) e contas pessoais da Microsoft**\n - Ou selecione com base nos seus requisitos.\n7. Em **URI de redirecionamento**, selecione **Web** e adicione a URL fornecida.\n8. Clique em **Registrar**.\n9. Após o registro, você será redirecionado para a página de visão geral do aplicativo. Copie o **ID do aplicativo (cliente) **.\n10. No menu da esquerda, vá para **Certificados e segredos**.\n - Em **Segredos do cliente**, clique em **Novo segredo do cliente**.\n - Fornece uma descrição, define um vencimento e clique em **Adicionar**.\n - Copiar o **Valor** do segredo do cliente (isso não será exibido novamente).\n11. Vá para **permissões de API** no menu à esquerda.\n - Clique em **Adicionar uma permissão**.\n - Selecione **Microsoft Graph** → **Delegated permissions**.\n - Adicione os seguintes escopos:\n\t - Calendários. eadWrite\n\t - offline_access \n - Usuário. Leia\n - Clique em **Adicionar permissões**.\n12. Copie seu **ID do Cliente** e **Segredo do Cliente**.\n",
|
||||
"Create a new event in a calendar": "Criar um novo evento em um calendário",
|
||||
"Delete an event in a calendar": "Apagar um evento em um calendário",
|
||||
"List events in a calendar": "Listar eventos em um calendário",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
||||
"Calendar": "calendário",
|
||||
"Title of the event": "Título do evento",
|
||||
"Start date time of the event": "Data de início do evento",
|
||||
"End date time of the event": "Data de término do evento",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Local:",
|
||||
"Event ID": "Código do evento",
|
||||
"Filter": "filtro",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "Por padrão será 30 min hora de início da postagem",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Filtro de consulta de pesquisa, consulte: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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..",
|
||||
"GET": "OBTER",
|
||||
"POST": "POSTAR",
|
||||
"PATCH": "COMPRAR",
|
||||
"PUT": "COLOCAR",
|
||||
"DELETE": "EXCLUIR",
|
||||
"HEAD": "CABEÇA"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"Microsoft Outlook Calendar": "Microsoft Outlook Calendar",
|
||||
"Calendar software by Microsoft": "Программное обеспечение для календаря Microsoft",
|
||||
"Authentication for Microsoft Outlook": "Аутентификация для Microsoft Outlook",
|
||||
"Create a new event in a calendar": "Создать новое событие в календаре",
|
||||
"Delete an event in a calendar": "Удалить событие в календаре",
|
||||
"List events in a calendar": "Список событий в календаре",
|
||||
"Custom API Call": "Пользовательский вызов API",
|
||||
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
|
||||
"Calendar": "Календарь",
|
||||
"Title of the event": "Название события",
|
||||
"Start date time of the event": "Дата начала события",
|
||||
"End date time of the event": "Дата окончания события",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Местоположение",
|
||||
"Event ID": "ID события",
|
||||
"Filter": "Фильтр",
|
||||
"Method": "Метод",
|
||||
"Headers": "Заголовки",
|
||||
"Query Parameters": "Параметры запроса",
|
||||
"Body": "Тело",
|
||||
"No Error on Failure": "Нет ошибок при ошибке",
|
||||
"Timeout (in seconds)": "Таймаут (в секундах)",
|
||||
"By default it'll be 30 min post start time": "По умолчанию он будет равен 30 минутам времени начала записи",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Фильтр поисковых запросов, см. https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
|
||||
"GET": "ПОЛУЧИТЬ",
|
||||
"POST": "ПОСТ",
|
||||
"PATCH": "ПАТЧ",
|
||||
"PUT": "ПОКУПИТЬ",
|
||||
"DELETE": "УДАЛИТЬ",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Calendar software by Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n\t - Calendars.ReadWrite\n\t - offline_access\n\t - User.Read\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "Create a new event in a calendar",
|
||||
"Delete an event in a calendar": "Delete an event in a calendar",
|
||||
"List events in a calendar": "List events in a calendar",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Calendar": "Calendar",
|
||||
"Title of the event": "Title of the event",
|
||||
"Start date time of the event": "Start date time of the event",
|
||||
"End date time of the event": "End date time of the event",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Location",
|
||||
"Event ID": "Event ID",
|
||||
"Filter": "Filter",
|
||||
"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)",
|
||||
"By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"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..",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"Microsoft Outlook Calendar": "Microsoft Outlook Calendar",
|
||||
"Calendar software by Microsoft": "Calendar software by Microsoft",
|
||||
"Authentication for Microsoft Outlook": "Authentication for Microsoft Outlook",
|
||||
"Create a new event in a calendar": "Create a new event in a calendar",
|
||||
"Delete an event in a calendar": "Delete an event in a calendar",
|
||||
"List events in a calendar": "List events in a calendar",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Calendar": "Calendar",
|
||||
"Title of the event": "Title of the event",
|
||||
"Start date time of the event": "Start date time of the event",
|
||||
"End date time of the event": "End date time of the event",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Location",
|
||||
"Event ID": "Event ID",
|
||||
"Filter": "Filter",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Body": "Body",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"Calendar software by Microsoft": "Calendar software by Microsoft",
|
||||
"\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and ad": "\n1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).\n2. From the left sidebar, go to **Microsoft Enfra ID**.\n3. Under **Manage**, click on **App registrations**.\n4. Click the **New registration** button.\n5. Enter a **Name** for your app.\n6. For **Supported account types**, choose:\n - **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**\n - Or select based on your requirement.\n7. In **Redirect URI**, select **Web** and add the given URL.\n8. Click **Register**.\n9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.\n10. From the left menu, go to **Certificates & secrets**.\n - Under **Client secrets**, click **New client secret**.\n - Provide a description, set an expiry, and click **Add**.\n - Copy the **Value** of the client secret (this will not be shown again).\n11. Go to **API permissions** from the left menu.\n - Click **Add a permission**.\n - Select **Microsoft Graph** → **Delegated permissions**.\n - Add the following scopes:\n\t - Calendars.ReadWrite\n\t - offline_access\n\t - User.Read\n - Click **Add permissions**.\n12. Copy your **Client ID** and **Client Secret**.\n",
|
||||
"Create a new event in a calendar": "Create a new event in a calendar",
|
||||
"Delete an event in a calendar": "Delete an event in a calendar",
|
||||
"List events in a calendar": "List events in a calendar",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
||||
"Calendar": "Calendar",
|
||||
"Title of the event": "Title of the event",
|
||||
"Start date time of the event": "Start date time of the event",
|
||||
"End date time of the event": "End date time of the event",
|
||||
"Timezone": "Timezone",
|
||||
"Location": "Location",
|
||||
"Event ID": "Event ID",
|
||||
"Filter": "Filter",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"By default it'll be 30 min post start time": "By default it'll be 30 min post start time",
|
||||
"Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter": "Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter",
|
||||
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"GET": "获取",
|
||||
"POST": "帖子",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "弹出",
|
||||
"DELETE": "删除",
|
||||
"HEAD": "黑色"
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import {
|
||||
createPiece,
|
||||
OAuth2PropertyValue,
|
||||
PieceAuth,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { createEventAction } from './lib/actions/create-event';
|
||||
import { listEventsAction } from './lib/actions/list-events';
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
import { outlookCalendarCommon } from './lib/common/common';
|
||||
import { deleteEventAction } from './lib/actions/delete-event';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
|
||||
const authDesc = `
|
||||
1. Sign in to [Microsoft Azure Portal](https://portal.azure.com/).
|
||||
2. From the left sidebar, go to **Microsoft Enfra ID**.
|
||||
3. Under **Manage**, click on **App registrations**.
|
||||
4. Click the **New registration** button.
|
||||
5. Enter a **Name** for your app.
|
||||
6. For **Supported account types**, choose:
|
||||
- **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts**
|
||||
- Or select based on your requirement.
|
||||
7. In **Redirect URI**, select **Web** and add the given URL.
|
||||
8. Click **Register**.
|
||||
9. After registration, you’ll be redirected to the app’s overview page. Copy the **Application (client) ID**.
|
||||
10. From the left menu, go to **Certificates & secrets**.
|
||||
- Under **Client secrets**, click **New client secret**.
|
||||
- Provide a description, set an expiry, and click **Add**.
|
||||
- Copy the **Value** of the client secret (this will not be shown again).
|
||||
11. Go to **API permissions** from the left menu.
|
||||
- Click **Add a permission**.
|
||||
- Select **Microsoft Graph** → **Delegated permissions**.
|
||||
- Add the following scopes:
|
||||
- Calendars.ReadWrite
|
||||
- offline_access
|
||||
- User.Read
|
||||
- Click **Add permissions**.
|
||||
12. Copy your **Client ID** and **Client Secret**.
|
||||
`
|
||||
|
||||
export const outlookCalendarAuth = PieceAuth.OAuth2({
|
||||
description:authDesc,
|
||||
authUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
|
||||
tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
|
||||
required: true,
|
||||
scope: ['User.Read', 'Calendars.ReadWrite', 'offline_access'],
|
||||
prompt: 'omit'
|
||||
});
|
||||
|
||||
export const microsoftOutlookCalendar = createPiece({
|
||||
displayName: "Microsoft Outlook Calendar",
|
||||
description: 'Calendar software by Microsoft',
|
||||
auth: outlookCalendarAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: "https://cdn.activepieces.com/pieces/microsoft-outlook.png",
|
||||
categories: [PieceCategory.PRODUCTIVITY],
|
||||
authors: ['antonyvigouret'],
|
||||
actions: [
|
||||
createEventAction,
|
||||
deleteEventAction,
|
||||
listEventsAction,
|
||||
createCustomApiCallAction({
|
||||
auth: outlookCalendarAuth,
|
||||
baseUrl() {
|
||||
return outlookCalendarCommon.baseUrl;
|
||||
},
|
||||
authMapping: async (auth) => {
|
||||
return {
|
||||
Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,73 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
AuthenticationType,
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
HttpRequest,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { outlookCalendarAuth } from '../..';
|
||||
import { outlookCalendarCommon } from '../common/common';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
export const createEventAction = createAction({
|
||||
auth: outlookCalendarAuth,
|
||||
name: 'create_event',
|
||||
description: 'Create a new event in a calendar',
|
||||
displayName: 'Create a new event in a calendar',
|
||||
props: {
|
||||
calendarId: outlookCalendarCommon.calendarDropdown,
|
||||
title: Property.ShortText({
|
||||
displayName: 'Title of the event',
|
||||
required: true,
|
||||
}),
|
||||
start: Property.DateTime({
|
||||
displayName: 'Start date time of the event',
|
||||
required: true,
|
||||
}),
|
||||
end: Property.DateTime({
|
||||
displayName: 'End date time of the event',
|
||||
description: "By default it'll be 30 min post start time",
|
||||
required: false,
|
||||
}),
|
||||
timezone: outlookCalendarCommon.timezoneDropdown,
|
||||
location: Property.ShortText({
|
||||
displayName: 'Location',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const startDateTime = dayjs(propsValue.start).format('YYYY-MM-DDTHH:mm:ss');
|
||||
const endTime = propsValue.end
|
||||
? propsValue.end
|
||||
: dayjs(startDateTime).add(30, 'm');
|
||||
const endDateTime = dayjs(endTime).format('YYYY-MM-DDTHH:mm:ss');
|
||||
|
||||
const request: HttpRequest = {
|
||||
method: HttpMethod.POST,
|
||||
url: `${outlookCalendarCommon.baseUrl}/calendars/${propsValue.calendarId}/events`,
|
||||
body: {
|
||||
subject: propsValue.title,
|
||||
body: {},
|
||||
start: {
|
||||
dateTime: startDateTime,
|
||||
timeZone: propsValue.timezone,
|
||||
},
|
||||
end: {
|
||||
dateTime: endDateTime,
|
||||
timeZone: propsValue.timezone,
|
||||
},
|
||||
location: {
|
||||
displayName: propsValue.location,
|
||||
},
|
||||
},
|
||||
authentication: {
|
||||
type: AuthenticationType.BEARER_TOKEN,
|
||||
token: auth['access_token'],
|
||||
},
|
||||
};
|
||||
|
||||
const response = await httpClient.sendRequest(request);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
AuthenticationType,
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
HttpRequest,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { outlookCalendarAuth } from '../..';
|
||||
import { outlookCalendarCommon } from '../common/common';
|
||||
|
||||
export const deleteEventAction = createAction({
|
||||
auth: outlookCalendarAuth,
|
||||
name: 'delete_event',
|
||||
description: 'Delete an event in a calendar',
|
||||
displayName: 'Delete an event in a calendar',
|
||||
props: {
|
||||
calendarId: outlookCalendarCommon.calendarDropdown,
|
||||
eventId: Property.ShortText({
|
||||
displayName: 'Event ID',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const request: HttpRequest = {
|
||||
method: HttpMethod.DELETE,
|
||||
url: `${outlookCalendarCommon.baseUrl}/calendars/${propsValue.calendarId}/events/${propsValue.eventId}`,
|
||||
body: {},
|
||||
authentication: {
|
||||
type: AuthenticationType.BEARER_TOKEN,
|
||||
token: auth['access_token'],
|
||||
},
|
||||
};
|
||||
|
||||
const response = await httpClient.sendRequest(request);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
AuthenticationType,
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
HttpRequest,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { outlookCalendarAuth } from '../..';
|
||||
import { outlookCalendarCommon } from '../common/common';
|
||||
|
||||
export const listEventsAction = createAction({
|
||||
auth: outlookCalendarAuth,
|
||||
name: 'list_events',
|
||||
description: 'List events in a calendar',
|
||||
displayName: 'List events in a calendar',
|
||||
props: {
|
||||
calendarId: outlookCalendarCommon.calendarDropdown,
|
||||
filter: Property.LongText({
|
||||
displayName: 'Filter',
|
||||
required: false,
|
||||
description:
|
||||
'Search query filter, see: https://learn.microsoft.com/en-us/graph/filter-query-parameter',
|
||||
}),
|
||||
},
|
||||
async run({ propsValue, auth }) {
|
||||
const queryParams: Record<string, string> = {};
|
||||
|
||||
if (propsValue.filter) queryParams['$filter'] = propsValue.filter;
|
||||
|
||||
const request: HttpRequest = {
|
||||
method: HttpMethod.GET,
|
||||
url: `${outlookCalendarCommon.baseUrl}/calendars/${propsValue.calendarId}/events`,
|
||||
queryParams,
|
||||
body: {},
|
||||
authentication: {
|
||||
type: AuthenticationType.BEARER_TOKEN,
|
||||
token: auth['access_token'],
|
||||
},
|
||||
};
|
||||
|
||||
const response = await httpClient.sendRequest(request);
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,87 @@
|
||||
import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';
|
||||
import {
|
||||
AuthenticationType,
|
||||
httpClient,
|
||||
HttpMethod,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { outlookCalendarAuth } from '../..';
|
||||
|
||||
export const outlookCalendarCommon = {
|
||||
baseUrl: 'https://graph.microsoft.com/v1.0/me',
|
||||
calendarDropdown: Property.Dropdown({
|
||||
displayName: 'Calendar',
|
||||
required: true,
|
||||
auth: outlookCalendarAuth,
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please authenticate first',
|
||||
};
|
||||
}
|
||||
const authProp: OAuth2PropertyValue = auth as OAuth2PropertyValue;
|
||||
const calendars: { id: string; name: string }[] = (
|
||||
await httpClient.sendRequest<{ value: { id: string; name: string }[] }>(
|
||||
{
|
||||
method: HttpMethod.GET,
|
||||
url: `${outlookCalendarCommon.baseUrl}/calendars`,
|
||||
authentication: {
|
||||
type: AuthenticationType.BEARER_TOKEN,
|
||||
token: authProp['access_token'],
|
||||
},
|
||||
}
|
||||
)
|
||||
).body.value;
|
||||
return {
|
||||
disabled: false,
|
||||
options: calendars.map((calendar: { id: string; name: string }) => {
|
||||
return {
|
||||
label: calendar.name,
|
||||
value: calendar.id,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
refreshers: [],
|
||||
}),
|
||||
timezoneDropdown: Property.Dropdown({
|
||||
displayName: 'Timezone',
|
||||
required: true,
|
||||
auth: outlookCalendarAuth,
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
options: [],
|
||||
placeholder: 'Please authenticate first',
|
||||
};
|
||||
}
|
||||
const authProp: OAuth2PropertyValue = auth as OAuth2PropertyValue;
|
||||
const timezones: { displayName: string; alias: string }[] = (
|
||||
await httpClient.sendRequest<{
|
||||
value: { displayName: string; alias: string }[];
|
||||
}>({
|
||||
method: HttpMethod.GET,
|
||||
url: `${outlookCalendarCommon.baseUrl}/outlook/supportedTimeZones`,
|
||||
authentication: {
|
||||
type: AuthenticationType.BEARER_TOKEN,
|
||||
token: authProp['access_token'],
|
||||
},
|
||||
})
|
||||
).body.value;
|
||||
return {
|
||||
disabled: false,
|
||||
options: timezones.map(
|
||||
(timezone: { displayName: string; alias: string }) => {
|
||||
return {
|
||||
label: timezone.displayName,
|
||||
value: timezone.alias,
|
||||
};
|
||||
}
|
||||
),
|
||||
};
|
||||
},
|
||||
refreshers: [],
|
||||
}),
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user