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,18 @@
|
||||
{
|
||||
"extends": ["../../../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# pieces-customer-io
|
||||
|
||||
- Track Custom API (https://www.customer.io/docs/api/track/)
|
||||
- Base Custom API (https://customer.io/docs/api/app/#section/Overview)
|
||||
- Create Event
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-customer-io` to build the library.
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@activepieces/piece-customer-io",
|
||||
"version": "0.2.7",
|
||||
"dependencies": {
|
||||
"buffer": "6.0.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-customer-io",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/customer-io/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/customer-io",
|
||||
"tsConfig": "packages/pieces/community/customer-io/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/customer-io/package.json",
|
||||
"main": "packages/pieces/community/customer-io/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/customer-io/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/customer-io/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-customer-io {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/customer-io",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Erstellen Sie personalisierte Reisen über alle Kanäle mit unserer Kundendienstplattform.",
|
||||
"Region": "Region",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API-Schlüssel",
|
||||
"Bearer Token": "Bären-Token",
|
||||
"US": "MN",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site-ID:**\n\n\nBitte melden Sie sich an und gehen Sie zu Einstellungen, klicken Sie [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking-API-Schlüssel:**\n\n\nBitte melden Sie sich an und gehen Sie zu Einstellungen, klicken Sie [here](https://fly.customer.io/settings/api_credentials).\n\n**APP-API-Token:**\n\n\nBitte melden Sie sich an und finden Sie es in den Kontoeinstellungen, klicken Sie [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nBitte beachten Sie, dass der API-Schlüssel und der API-Schlüssel unterschiedlich sind. Sie können mehr darüber lesen [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Ereignis erstellen",
|
||||
"Track Custom API Call": "Eigenen API-Aufruf verfolgen",
|
||||
"App Custom API Call": "App-benutzerdefinierte API-Aufruf",
|
||||
"Create an event in Customer.io": "Ereignis in customer.io erstellen",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Kundenidentifikator",
|
||||
"Event Name": "Ereignisname",
|
||||
"parameters": "Parameter",
|
||||
"Body": "Körper",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopfzeilen",
|
||||
"Query Parameters": "Abfrageparameter",
|
||||
"Response is Binary ?": "Antwort ist binär?",
|
||||
"No Error on Failure": "Kein Fehler bei Fehler",
|
||||
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "Der einzigartige Wert, der eine Person repräsentiert. Sie können eine Person per ID, E-Mail-Adresse oder die cio_id (beim Aktualisieren von Leuten) identifizieren, abhängig von Ihren Einstellungen im Arbeitsbereich",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "Der Name des Ereignisses. So verweisen Sie das Ereignis in Kampagnen oder Segmenten",
|
||||
"Event information to be sent to Customer.io": "Ereignisinformationen, die an Customer.io gesendet werden sollen",
|
||||
"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..",
|
||||
"Key Value": "Schlüsselwert",
|
||||
"JSON": "JSON",
|
||||
"GET": "ERHALTEN",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "LÖSCHEN",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Cree viajes personalizados a través de todos los canales con nuestra plataforma de participación del cliente.",
|
||||
"Region": "Región",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "Clave API",
|
||||
"Bearer Token": "Tóken de portador",
|
||||
"US": "SUS",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Crear Evento",
|
||||
"Track Custom API Call": "Rastrear llamada API personalizada",
|
||||
"App Custom API Call": "Aplicación API Llamada",
|
||||
"Create an event in Customer.io": "Crear un evento en Cliente.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "Llamada API de seguimiento CustomerIO (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "Aplicación CustomerIO API llamada personalizada (api.customer.io)",
|
||||
"Customer identifier": "Identificador de cliente",
|
||||
"Event Name": "Nombre del evento",
|
||||
"parameters": "parámetros",
|
||||
"Body": "Cuerpo",
|
||||
"Method": "Método",
|
||||
"Headers": "Encabezados",
|
||||
"Query Parameters": "Parámetros de consulta",
|
||||
"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 unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "El valor único que representa a una persona. Usted puede identificar a una persona por id, dirección de correo electrónico o el cio_id (al actualizar personas), dependiendo de la configuración de su área de trabajo",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "El nombre del evento. Así es como referirás el evento en campañas o segmentos",
|
||||
"Event information to be sent to Customer.io": "Información del evento a enviar al cliente.io",
|
||||
"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.",
|
||||
"Key Value": "Valor clave",
|
||||
"JSON": "JSON",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Créez des trajets personnalisés sur tous les canaux grâce à notre plateforme d'engagement client.",
|
||||
"Region": "Région",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "Clé API",
|
||||
"Bearer Token": "Jeton de Porteur",
|
||||
"US": "US",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Identifiant du site :**\n\n\nVeuillez vous connecter et aller dans Paramètres, cliquez sur [here](https://fly.customer.io/settings/api_credentials).\n\n**Clé API de suivi :**\n\n\nVeuillez vous connecter et aller dans Paramètres, cliquez sur [here](https://fly.customer.io/settings/api_credentials).\n\n**Jeton API APP :**\n\n\nVeuillez vous connecter et le trouver dans les paramètres du compte, cliquez sur [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nVeuillez noter que la clé API Track et la clé API App sont différentes. Vous pouvez en savoir plus sur [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Créer un événement",
|
||||
"Track Custom API Call": "Suivre l'appel d'API personnalisé",
|
||||
"App Custom API Call": "Appel API personnalisé de l'application",
|
||||
"Create an event in Customer.io": "Créer un événement dans Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "Appel API personnalisé de l'application CustomerIO (api.customer.io)",
|
||||
"Customer identifier": "Identifiant du client",
|
||||
"Event Name": "Nom de l'événement",
|
||||
"parameters": "paramètres",
|
||||
"Body": "Corps",
|
||||
"Method": "Méthode",
|
||||
"Headers": "En-têtes",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"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 unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "La valeur unique représentant une personne. Vous pouvez identifier une personne par l'identifiant, l'adresse e-mail ou le cio_id (lors de la mise à jour des personnes), selon les paramètres de votre espace de travail",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "Le nom de l'événement. C'est ainsi que vous référencerez l'événement dans des campagnes ou des segments",
|
||||
"Event information to be sent to Customer.io": "Informations sur l'événement à envoyer au client.io",
|
||||
"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.",
|
||||
"Key Value": "Valeur de la clé",
|
||||
"JSON": "JSON",
|
||||
"GET": "OBTENIR",
|
||||
"POST": "POSTER",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "EFFACER",
|
||||
"DELETE": "SUPPRIMER",
|
||||
"HEAD": "TÊTE"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "カスタマエンゲージメントプラットフォームを使用して、すべてのチャネルでパーソナライズされた旅を作成します。",
|
||||
"Region": "地域",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API キー",
|
||||
"Bearer Token": "ベアラートトークン",
|
||||
"US": "米国",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "イベントを作成",
|
||||
"Track Custom API Call": "カスタムAPI通話を追跡",
|
||||
"App Custom API Call": "アプリカスタムAPI通話",
|
||||
"Create an event in Customer.io": "Customer.ioでイベントを作成します",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "顧客ID",
|
||||
"Event Name": "イベント名",
|
||||
"parameters": "パラメータ",
|
||||
"Body": "本文",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "人を表すユニークな値。 ワークスペースの設定に応じて、ID、Eメールアドレス、またはCIO_ID(人を更新する場合)で個人を特定できます。",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "イベントの名前。これはキャンペーンまたはセグメントでイベントを参照する方法です。",
|
||||
"Event information to be sent to Customer.io": "Customer.ioに送信されるイベント情報",
|
||||
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
||||
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
||||
"Key Value": "キー値",
|
||||
"JSON": "JSON",
|
||||
"GET": "取得",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "削除",
|
||||
"HEAD": "頭"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Maak gepersonaliseerde ritten over alle kanalen met ons klantengagement platform.",
|
||||
"Region": "Regio",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API Sleutel",
|
||||
"Bearer Token": "Betere Token",
|
||||
"US": "VS",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nLog in en ga naar Instellingen, klik [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API-sleutel:**\n\n\nLog in en ga naar Instellingen, klik [here](https://fly.customer.io/settings/api_credentials).\n\n**APP Token:**\n\n\nLog in en vind het in de accountinstellingen, klik op [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nHoud er rekening mee dat de Track API Key en App API Key verschillend zijn. U kunt er meer over lezen [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Gebeurtenis aanmaken",
|
||||
"Track Custom API Call": "Bijhouden van aangepaste API-oproep",
|
||||
"App Custom API Call": "App Aangepaste API Call",
|
||||
"Create an event in Customer.io": "Maak een gebeurtenis aan in Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Klant identificatie",
|
||||
"Event Name": "Naam van gebeurtenis",
|
||||
"parameters": "parameters",
|
||||
"Body": "Lichaam",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopteksten",
|
||||
"Query Parameters": "Query parameters",
|
||||
"Response is Binary ?": "Antwoord is binair?",
|
||||
"No Error on Failure": "Geen fout bij fout",
|
||||
"Timeout (in seconds)": "Time-out (in seconden)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "De unieke waarde die een persoon vertegenwoordigt. U kunt een persoon per id, e-mailadres of het cio_id (bij het bijwerken van mensen) identificeren, afhankelijk van uw workspace-instellingen",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "De naam van het evenement. Dit is hoe je naar het evenement verwijst in campagnes of segmenten",
|
||||
"Event information to be sent to Customer.io": "Evenement informatie te worden verzonden naar klant.io",
|
||||
"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..",
|
||||
"Key Value": "Toets waarde",
|
||||
"JSON": "JSON",
|
||||
"GET": "KRIJG",
|
||||
"POST": "POSTE",
|
||||
"PATCH": "BEKIJK",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "VERWIJDEREN",
|
||||
"HEAD": "HOOFD"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Crie jornadas personalizadas através de todos os canais com nossa plataforma de envolvimento de clientes.",
|
||||
"Region": "Região",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "Chave de API",
|
||||
"Bearer Token": "Token do portador",
|
||||
"US": "EUA",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Criar evento",
|
||||
"Track Custom API Call": "Rastrear chamada de API personalizada",
|
||||
"App Custom API Call": "Chamada de API personalizada do aplicativo",
|
||||
"Create an event in Customer.io": "Criar um evento em Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "Chamada personalizada API do controle do cliente (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Chamada API personalizada (api.customer.io)",
|
||||
"Customer identifier": "Identificador de cliente",
|
||||
"Event Name": "Nome do Evento",
|
||||
"parameters": "Parâmetros",
|
||||
"Body": "Conteúdo",
|
||||
"Method": "Método",
|
||||
"Headers": "Cabeçalhos",
|
||||
"Query Parameters": "Parâmetros da consulta",
|
||||
"Response is Binary ?": "A resposta é binária ?",
|
||||
"No Error on Failure": "Nenhum erro no Failure",
|
||||
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "O valor único que representa uma pessoa. Você pode identificar uma pessoa por id, endereço de e-mail ou cio_id (ao atualizar pessoas), dependendo das configurações da sua área de trabalho",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "O nome do evento. É assim que você referirá o evento em campanhas ou segmentos",
|
||||
"Event information to be sent to Customer.io": "Informação do evento a ser enviado para o Cliente.io",
|
||||
"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..",
|
||||
"Key Value": "Valor Chave",
|
||||
"JSON": "JSON",
|
||||
"GET": "OBTER",
|
||||
"POST": "POSTAR",
|
||||
"PATCH": "COMPRAR",
|
||||
"PUT": "COLOCAR",
|
||||
"DELETE": "EXCLUIR",
|
||||
"HEAD": "CABEÇA"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"customer.io": "customer.io",
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Создавайте персонализированные маршруты по всем каналам с нашей платформой.",
|
||||
"Region": "Регион",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "Ключ API",
|
||||
"Bearer Token": "Жетон носителя",
|
||||
"US": "США",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**ID сайта:**\n\n\nПожалуйста, войдите в систему и перейдите в Настройки, нажмите [here](https://fly.customer.io/settings/api_credentials).\n\n**Ключ Отслеживания API:**\n\n\nПожалуйста, войдите в систему и перейдите в Настройки, нажмите [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API токен:**\n\n\nПожалуйста, войдите в систему и найдите её в настройках аккаунта, нажмите [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nПожалуйста, обратите внимание на то, что ключ API и ключ API различаются. Подробнее об этом можно прочитать [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Создать событие",
|
||||
"Track Custom API Call": "Отслеживать пользовательский вызов API",
|
||||
"App Custom API Call": "Пользовательский API-вызов приложения",
|
||||
"Create an event in Customer.io": "Создать событие в Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Идентификатор клиента",
|
||||
"Event Name": "Название события",
|
||||
"parameters": "параметры",
|
||||
"Body": "Тело",
|
||||
"Method": "Метод",
|
||||
"Headers": "Заголовки",
|
||||
"Query Parameters": "Параметры запроса",
|
||||
"No Error on Failure": "Нет ошибок при ошибке",
|
||||
"Timeout (in seconds)": "Таймаут (в секундах)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "Уникальное значение, представляющее человека. Вы можете идентифицировать человека по идентификатору, адресу электронной почты или cio_id (при обновлении людей), в зависимости от настроек проекта",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "Название события. Так вы будете ссылаться на событие в кампаниях или сегментах",
|
||||
"Event information to be sent to Customer.io": "Информация о событиях для отправки на Customer.io",
|
||||
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
|
||||
"Key Value": "Ключевое значение",
|
||||
"JSON": "JSON",
|
||||
"GET": "ПОЛУЧИТЬ",
|
||||
"POST": "ПОСТ",
|
||||
"PATCH": "ПАТЧ",
|
||||
"PUT": "ПОКУПИТЬ",
|
||||
"DELETE": "УДАЛИТЬ",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Create personalized journeys across all channels with our customer engagement platform.",
|
||||
"Region": "Region",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API Key",
|
||||
"Bearer Token": "Bearer Token",
|
||||
"US": "US",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Create Event",
|
||||
"Track Custom API Call": "Track Custom API Call",
|
||||
"App Custom API Call": "App Custom API Call",
|
||||
"Create an event in Customer.io": "Create an event in Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Customer identifier",
|
||||
"Event Name": "Event Name",
|
||||
"parameters": "parameters",
|
||||
"Body": "Body",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "The name of the event. This is how you'll reference the event in campaigns or segments",
|
||||
"Event information to be sent to Customer.io": "Event information to be sent to Customer.io",
|
||||
"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..",
|
||||
"Key Value": "Key Value",
|
||||
"JSON": "JSON",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"customer.io": "customer.io",
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Create personalized journeys across all channels with our customer engagement platform.",
|
||||
"Region": "Region",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API Key",
|
||||
"Bearer Token": "Bearer Token",
|
||||
"US": "US",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Create Event",
|
||||
"Track Custom API Call": "Track Custom API Call",
|
||||
"App Custom API Call": "App Custom API Call",
|
||||
"Create an event in Customer.io": "Create an event in Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Customer identifier",
|
||||
"Event Name": "Event Name",
|
||||
"parameters": "parameters",
|
||||
"Body": "Body",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "The name of the event. This is how you'll reference the event in campaigns or segments",
|
||||
"Event information to be sent to Customer.io": "Event information to be sent to Customer.io",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"Key Value": "Key Value",
|
||||
"JSON": "JSON",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"Create personalized journeys across all channels with our customer engagement platform.": "Create personalized journeys across all channels with our customer engagement platform.",
|
||||
"Region": "Region",
|
||||
"Site ID": "Site ID",
|
||||
"API Key": "API 密钥",
|
||||
"Bearer Token": "Bearer Token",
|
||||
"US": "US",
|
||||
"EU": "EU",
|
||||
"\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/doc": "\n**Site ID:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**Tracking API Key:**\n\n\nPlease log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).\n\n**APP API Token:**\n\n\nPlease log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).\n\n\n<br>\nPlease note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).\n",
|
||||
"Create Event": "Create Event",
|
||||
"Track Custom API Call": "Track Custom API Call",
|
||||
"App Custom API Call": "App Custom API Call",
|
||||
"Create an event in Customer.io": "Create an event in Customer.io",
|
||||
"CustomerIO Track Custom API Call (track.customer.io)": "CustomerIO Track Custom API Call (track.customer.io)",
|
||||
"CustomerIO App Custom API Call (api.customer.io)": "CustomerIO App Custom API Call (api.customer.io)",
|
||||
"Customer identifier": "Customer identifier",
|
||||
"Event Name": "Event Name",
|
||||
"parameters": "parameters",
|
||||
"Body": "正文内容",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings": "The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings",
|
||||
"The name of the event. This is how you'll reference the event in campaigns or segments": "The name of the event. This is how you'll reference the event in campaigns or segments",
|
||||
"Event information to be sent to Customer.io": "Event information to be sent to Customer.io",
|
||||
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"Key Value": "Key Value",
|
||||
"JSON": "JSON",
|
||||
"GET": "获取",
|
||||
"POST": "帖子",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "弹出",
|
||||
"DELETE": "删除",
|
||||
"HEAD": "黑色"
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import {
|
||||
createPiece,
|
||||
PieceAuth,
|
||||
Property,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { createEvent } from './lib/actions/create_event';
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
import { customerIOCommon } from './lib/common';
|
||||
import { Buffer } from 'buffer';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
|
||||
const markdown = `
|
||||
**Site ID:**\n
|
||||
|
||||
Please log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).
|
||||
|
||||
**Tracking API Key:**\n
|
||||
|
||||
Please log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).
|
||||
|
||||
**APP API Token:**\n
|
||||
|
||||
Please log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).
|
||||
|
||||
|
||||
<br>
|
||||
Please note that the Track API Key and App API Key are different. You can read more about it [here](https://customer.io/docs/accounts-and-workspaces/managing-credentials/).
|
||||
`;
|
||||
export const customerIOAuth = PieceAuth.CustomAuth({
|
||||
props: {
|
||||
region: Property.StaticDropdown<'us' | 'eu'>({
|
||||
displayName: 'Region',
|
||||
required: true,
|
||||
defaultValue: 'us',
|
||||
options: {
|
||||
options: [
|
||||
{ label: 'US', value: 'us' },
|
||||
{ label: 'EU', value: 'eu' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
track_site_id: Property.ShortText({
|
||||
displayName: 'Site ID',
|
||||
required: true,
|
||||
}),
|
||||
track_api_key: Property.ShortText({
|
||||
displayName: 'API Key',
|
||||
required: true,
|
||||
}),
|
||||
api_bearer_token: Property.ShortText({
|
||||
displayName: 'Bearer Token',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
description: markdown,
|
||||
required: true,
|
||||
});
|
||||
|
||||
type CustomerIOAuth = {
|
||||
region: 'eu' | 'us';
|
||||
track_site_id: string;
|
||||
track_api_key: string;
|
||||
api_bearer_token: string;
|
||||
};
|
||||
export const customerIo: any = createPiece({
|
||||
displayName: 'customer.io',
|
||||
auth: customerIOAuth,
|
||||
description:
|
||||
'Create personalized journeys across all channels with our customer engagement platform.',
|
||||
categories: [PieceCategory.MARKETING],
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/customerio.png',
|
||||
authors: ['hamedsh', 'AbuAboud', 'AdamSelene'],
|
||||
actions: [
|
||||
createEvent,
|
||||
createCustomApiCallAction({
|
||||
baseUrl: (auth) =>
|
||||
auth ? customerIOCommon[auth.props.region || 'us'].trackUrl : '',
|
||||
auth: customerIOAuth,
|
||||
name: 'custom_track_api_call',
|
||||
description: 'CustomerIO Track Custom API Call (track.customer.io)',
|
||||
displayName: 'Track Custom API Call',
|
||||
authMapping: async (auth) => ({
|
||||
Authorization: `Basic ${Buffer.from(
|
||||
`${(auth).props.track_site_id}:${
|
||||
(auth).props.track_api_key
|
||||
}`,
|
||||
'utf8'
|
||||
).toString('base64')}`,
|
||||
}),
|
||||
}),
|
||||
createCustomApiCallAction({
|
||||
baseUrl: (auth) =>
|
||||
auth ? customerIOCommon[auth.props.region || 'us'].apiUrl : '',
|
||||
auth: customerIOAuth,
|
||||
name: 'custom_app_api_call',
|
||||
description: 'CustomerIO App Custom API Call (api.customer.io)',
|
||||
displayName: 'App Custom API Call',
|
||||
authMapping: async (auth) => ({
|
||||
Authorization: `Bearer ${(auth).props.api_bearer_token}`,
|
||||
}),
|
||||
}),
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,102 @@
|
||||
import { createAction, DynamicPropsValue, Property } from '@activepieces/pieces-framework';
|
||||
import { customerIOAuth } from '../../index';
|
||||
import { customerIOCommon } from '../common';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
|
||||
export const createEvent = createAction({
|
||||
auth: customerIOAuth,
|
||||
name: 'create_event',
|
||||
displayName: 'Create Event',
|
||||
description: 'Create an event in Customer.io',
|
||||
props: {
|
||||
customer_identifier: Property.ShortText({
|
||||
displayName: 'Customer identifier',
|
||||
description: 'The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings',
|
||||
required: true,
|
||||
}),
|
||||
event_name: Property.ShortText({
|
||||
displayName: 'Event Name',
|
||||
description: 'The name of the event. This is how you\'ll reference the event in campaigns or segments',
|
||||
required: true,
|
||||
}),
|
||||
body_type: Property.StaticDropdown({
|
||||
displayName: 'parameters',
|
||||
required: false,
|
||||
description: 'Event information to be sent to Customer.io',
|
||||
defaultValue: 'key_value',
|
||||
options: {
|
||||
disabled: false,
|
||||
options: [
|
||||
{
|
||||
label: 'Key Value',
|
||||
value: 'key_value',
|
||||
},
|
||||
{
|
||||
label: 'JSON',
|
||||
value: 'json',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
body: Property.DynamicProperties({
|
||||
auth: customerIOAuth,
|
||||
displayName: 'Body',
|
||||
refreshers: ['body_type'],
|
||||
required: false,
|
||||
props: async ({ body_type }) => {
|
||||
if (!body_type) return {};
|
||||
|
||||
const bodyTypeInput = body_type as unknown as string;
|
||||
|
||||
const fields: DynamicPropsValue = {};
|
||||
|
||||
switch (bodyTypeInput) {
|
||||
case 'json':
|
||||
fields['data'] = Property.Json({
|
||||
displayName: 'JSON Body',
|
||||
required: true,
|
||||
});
|
||||
break;
|
||||
case 'key_value':
|
||||
fields['data'] = Property.Object({
|
||||
displayName: 'Key Value',
|
||||
required: true,
|
||||
});
|
||||
break;
|
||||
}
|
||||
return fields;
|
||||
},
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const {
|
||||
body,
|
||||
body_type,
|
||||
} = context.propsValue;
|
||||
|
||||
const basic_track_api = `${
|
||||
Buffer.from(
|
||||
`${context.auth.props.track_site_id}:${context.auth.props.track_api_key}`,
|
||||
'utf8'
|
||||
).toString('base64')
|
||||
}`
|
||||
|
||||
const headers = {
|
||||
Authorization: `Basic ${basic_track_api}`,
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
const encoded_email = encodeURIComponent(context.propsValue.customer_identifier);
|
||||
const url = customerIOCommon[context.auth.props.region || 'us'].trackUrl + 'customers/' + encoded_email + '/events';
|
||||
|
||||
const httprequestdata = {
|
||||
method: HttpMethod.POST,
|
||||
url,
|
||||
headers,
|
||||
body: {
|
||||
name: context.propsValue.event_name,
|
||||
data: body ? body['data'] : {},
|
||||
},
|
||||
}
|
||||
return await httpClient.sendRequest(httprequestdata);
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
export const customerIOCommon = {
|
||||
us: {
|
||||
trackUrl: 'https://track.customer.io/api/v1/',
|
||||
apiUrl: 'https://api.customer.io/v1/',
|
||||
},
|
||||
eu: {
|
||||
trackUrl: 'https://track-eu.customer.io/api/v1/',
|
||||
apiUrl: 'https://api-eu.customer.io/v1/',
|
||||
},
|
||||
};
|
||||
@@ -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