@activepieces/piece-customer-io 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -21
- package/src/i18n/de.json +1 -1
- package/src/i18n/es.json +1 -1
- package/src/i18n/fr.json +1 -1
- package/src/i18n/ja.json +1 -1
- package/src/i18n/nl.json +1 -1
- package/src/i18n/pt.json +1 -1
- package/src/i18n/translation.json +1 -1
- package/src/i18n/zh.json +1 -1
- package/src/index.d.ts +1 -6
- package/src/index.d.ts.map +1 -0
- package/src/index.js +5 -34
- package/src/index.js.map +1 -1
- package/src/lib/actions/create_event.d.ts +1 -0
- package/src/lib/actions/create_event.d.ts.map +1 -0
- package/src/lib/actions/create_event.js +5 -3
- package/src/lib/actions/create_event.js.map +1 -1
- package/src/lib/auth.d.ts +7 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +50 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +1 -0
- package/src/lib/common/index.d.ts.map +1 -0
- package/src/lib/common/index.js.map +1 -1
- package/README.md +0 -9
package/package.json
CHANGED
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-customer-io",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
4
6
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"axios-retry": "4.4.1",
|
|
7
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
8
|
+
"@activepieces/pieces-framework": "0.30.0",
|
|
9
|
+
"@activepieces/shared": "0.87.1",
|
|
9
10
|
"buffer": "6.0.3",
|
|
10
|
-
"deepmerge-ts": "7.1.0",
|
|
11
|
-
"form-data": "4.0.4",
|
|
12
|
-
"mime-types": "2.1.35",
|
|
13
|
-
"nanoid": "3.3.8",
|
|
14
|
-
"semver": "7.6.0",
|
|
15
|
-
"socket.io-client": "4.8.1",
|
|
16
|
-
"zod": "4.1.13",
|
|
17
|
-
"@activepieces/pieces-common": "0.11.6",
|
|
18
|
-
"@activepieces/pieces-framework": "0.25.4",
|
|
19
|
-
"@activepieces/shared": "0.37.0",
|
|
20
11
|
"tslib": "2.6.2"
|
|
21
12
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"main": "./src/index.js",
|
|
27
|
-
"type": "commonjs"
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
15
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
+
}
|
|
28
17
|
}
|
package/src/i18n/de.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Bären-Token",
|
|
7
7
|
"US": "MN",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Ereignis erstellen",
|
|
11
11
|
"Track Custom API Call": "Eigenen API-Aufruf verfolgen",
|
|
12
12
|
"App Custom API Call": "App-benutzerdefinierte API-Aufruf",
|
package/src/i18n/es.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Tóken de portador",
|
|
7
7
|
"US": "SUS",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Crear Evento",
|
|
11
11
|
"Track Custom API Call": "Rastrear llamada API personalizada",
|
|
12
12
|
"App Custom API Call": "Aplicación API Llamada",
|
package/src/i18n/fr.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Jeton de Porteur",
|
|
7
7
|
"US": "US",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Créer un événement",
|
|
11
11
|
"Track Custom API Call": "Suivre l'appel d'API personnalisé",
|
|
12
12
|
"App Custom API Call": "Appel API personnalisé de l'application",
|
package/src/i18n/ja.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "ベアラートトークン",
|
|
7
7
|
"US": "米国",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "イベントを作成",
|
|
11
11
|
"Track Custom API Call": "カスタムAPI通話を追跡",
|
|
12
12
|
"App Custom API Call": "アプリカスタムAPI通話",
|
package/src/i18n/nl.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Betere Token",
|
|
7
7
|
"US": "VS",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Gebeurtenis aanmaken",
|
|
11
11
|
"Track Custom API Call": "Bijhouden van aangepaste API-oproep",
|
|
12
12
|
"App Custom API Call": "App Aangepaste API Call",
|
package/src/i18n/pt.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Token do portador",
|
|
7
7
|
"US": "EUA",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Criar evento",
|
|
11
11
|
"Track Custom API Call": "Rastrear chamada de API personalizada",
|
|
12
12
|
"App Custom API Call": "Chamada de API personalizada do aplicativo",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Bearer Token",
|
|
7
7
|
"US": "US",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Create Event",
|
|
11
11
|
"Track Custom API Call": "Track Custom API Call",
|
|
12
12
|
"App Custom API Call": "App Custom API Call",
|
package/src/i18n/zh.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"Bearer Token": "Bearer Token",
|
|
7
7
|
"US": "US",
|
|
8
8
|
"EU": "EU",
|
|
9
|
-
"\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
|
|
9
|
+
"\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<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": "\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<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",
|
|
10
10
|
"Create Event": "Create Event",
|
|
11
11
|
"Track Custom API Call": "Track Custom API Call",
|
|
12
12
|
"App Custom API Call": "App Custom API Call",
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export declare const customerIOAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<"us" | "eu", false> | import("@activepieces/pieces-framework").StaticDropdownProperty<"us" | "eu", true>;
|
|
3
|
-
track_site_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
track_api_key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
api_bearer_token: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
-
}>;
|
|
7
1
|
export declare const customerIo: any;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,UAAU,EAAE,GAwCvB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customerIo =
|
|
3
|
+
exports.customerIo = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const create_event_1 = require("./lib/actions/create_event");
|
|
@@ -8,6 +8,7 @@ const pieces_common_1 = require("@activepieces/pieces-common");
|
|
|
8
8
|
const common_1 = require("./lib/common");
|
|
9
9
|
const buffer_1 = require("buffer");
|
|
10
10
|
const shared_1 = require("@activepieces/shared");
|
|
11
|
+
const auth_1 = require("./lib/auth");
|
|
11
12
|
const markdown = `
|
|
12
13
|
**Site ID:**\n
|
|
13
14
|
|
|
@@ -21,42 +22,12 @@ Please log in and go to Settings, click [here](https://fly.customer.io/settings/
|
|
|
21
22
|
|
|
22
23
|
Please log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).
|
|
23
24
|
|
|
24
|
-
|
|
25
25
|
<br>
|
|
26
26
|
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/).
|
|
27
27
|
`;
|
|
28
|
-
exports.customerIOAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
29
|
-
props: {
|
|
30
|
-
region: pieces_framework_1.Property.StaticDropdown({
|
|
31
|
-
displayName: 'Region',
|
|
32
|
-
required: true,
|
|
33
|
-
defaultValue: 'us',
|
|
34
|
-
options: {
|
|
35
|
-
options: [
|
|
36
|
-
{ label: 'US', value: 'us' },
|
|
37
|
-
{ label: 'EU', value: 'eu' },
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
track_site_id: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: 'Site ID',
|
|
43
|
-
required: true,
|
|
44
|
-
}),
|
|
45
|
-
track_api_key: pieces_framework_1.Property.ShortText({
|
|
46
|
-
displayName: 'API Key',
|
|
47
|
-
required: true,
|
|
48
|
-
}),
|
|
49
|
-
api_bearer_token: pieces_framework_1.Property.ShortText({
|
|
50
|
-
displayName: 'Bearer Token',
|
|
51
|
-
required: true,
|
|
52
|
-
}),
|
|
53
|
-
},
|
|
54
|
-
description: markdown,
|
|
55
|
-
required: true,
|
|
56
|
-
});
|
|
57
28
|
exports.customerIo = (0, pieces_framework_1.createPiece)({
|
|
58
29
|
displayName: 'customer.io',
|
|
59
|
-
auth:
|
|
30
|
+
auth: auth_1.customerIOAuth,
|
|
60
31
|
description: 'Create personalized journeys across all channels with our customer engagement platform.',
|
|
61
32
|
categories: [shared_1.PieceCategory.MARKETING],
|
|
62
33
|
minimumSupportedRelease: '0.30.0',
|
|
@@ -66,7 +37,7 @@ exports.customerIo = (0, pieces_framework_1.createPiece)({
|
|
|
66
37
|
create_event_1.createEvent,
|
|
67
38
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
68
39
|
baseUrl: (auth) => auth ? common_1.customerIOCommon[auth.props.region || 'us'].trackUrl : '',
|
|
69
|
-
auth:
|
|
40
|
+
auth: auth_1.customerIOAuth,
|
|
70
41
|
name: 'custom_track_api_call',
|
|
71
42
|
description: 'CustomerIO Track Custom API Call (track.customer.io)',
|
|
72
43
|
displayName: 'Track Custom API Call',
|
|
@@ -78,7 +49,7 @@ exports.customerIo = (0, pieces_framework_1.createPiece)({
|
|
|
78
49
|
}),
|
|
79
50
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
80
51
|
baseUrl: (auth) => auth ? common_1.customerIOCommon[auth.props.region || 'us'].apiUrl : '',
|
|
81
|
-
auth:
|
|
52
|
+
auth: auth_1.customerIOAuth,
|
|
82
53
|
name: 'custom_app_api_call',
|
|
83
54
|
description: 'CustomerIO App Custom API Call (api.customer.io)',
|
|
84
55
|
displayName: 'App Custom API Call',
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,6DAAyD;AACzD,+DAAwE;AACxE,yCAAgD;AAChD,mCAAgC;AAChC,iDAAqD;AACrD,qCAA4C;AAE5C,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;CAehB,CAAC;AAOW,QAAA,UAAU,GAAQ,IAAA,8BAAW,EAAC;IACzC,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,qBAAc;IACpB,WAAW,EACT,yFAAyF;IAC3F,UAAU,EAAE,CAAC,sBAA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AA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_event.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create_event.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAkGtB,CAAA"}
|
|
@@ -3,14 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createEvent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const
|
|
6
|
+
const auth_1 = require("../auth");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
8
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
9
|
exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth:
|
|
10
|
+
auth: auth_1.customerIOAuth,
|
|
11
11
|
name: 'create_event',
|
|
12
12
|
displayName: 'Create Event',
|
|
13
13
|
description: 'Create an event in Customer.io',
|
|
14
|
+
audience: 'both',
|
|
15
|
+
aiMetadata: { description: 'Sends a behavioral/tracking event for a specific person to Customer.io via the Track API, identified by id, email, or cio_id per the workspace setting. Use to record that a customer did something so it can drive campaigns or segments. Provide the event payload either as key-value pairs or a raw JSON object (body_type). Not idempotent: each call appends a new event, even with identical input.', idempotent: false },
|
|
14
16
|
props: {
|
|
15
17
|
customer_identifier: pieces_framework_1.Property.ShortText({
|
|
16
18
|
displayName: 'Customer identifier',
|
|
@@ -42,7 +44,7 @@ exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
|
42
44
|
},
|
|
43
45
|
}),
|
|
44
46
|
body: pieces_framework_1.Property.DynamicProperties({
|
|
45
|
-
auth:
|
|
47
|
+
auth: auth_1.customerIOAuth,
|
|
46
48
|
displayName: 'Body',
|
|
47
49
|
refreshers: ['body_type'],
|
|
48
50
|
required: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_event.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"create_event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create_event.ts"],"names":[],"mappings":";;;;AAAA,qEAA2F;AAC3F,kCAAyC;AACzC,sCAA6C;AAC7C,+DAAqE;AAExD,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,qBAAc;IACpB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4YAA4Y,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5b,KAAK,EAAE;QACL,mBAAmB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,oKAAoK;YACjL,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,yFAAyF;YACtG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACjC,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,6CAA6C;YAC1D,YAAY,EAAE,WAAW;YACzB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,WAAW;wBAClB,KAAK,EAAE,WAAW;qBACnB;oBACD;wBACE,KAAK,EAAE,MAAM;wBACb,KAAK,EAAE,MAAM;qBACd;iBACF;aACF;SACF,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,iBAAiB,CAAC;YAC/B,IAAI,EAAE,qBAAc;YACpB,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,QAAQ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,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;YAEpH,MAAM,eAAe,GAAG;gBACtB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG;gBACH,OAAO;gBACP,IAAI,EAAE;oBACJ,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;oBACnC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;iBAC/B;aACF,CAAA;YACD,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const customerIOAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
region: import("@activepieces/pieces-framework").StaticDropdownProperty<"us" | "eu", false> | import("@activepieces/pieces-framework").StaticDropdownProperty<"us" | "eu", true>;
|
|
3
|
+
track_site_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
track_api_key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
api_bearer_token: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>;
|
|
7
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,cAAc;;;;;EA4BzB,CAAC"}
|
package/src/lib/auth.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerIOAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
const markdown = `
|
|
6
|
+
**Site ID:**\n
|
|
7
|
+
|
|
8
|
+
Please log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).
|
|
9
|
+
|
|
10
|
+
**Tracking API Key:**\n
|
|
11
|
+
|
|
12
|
+
Please log in and go to Settings, click [here](https://fly.customer.io/settings/api_credentials).
|
|
13
|
+
|
|
14
|
+
**APP API Token:**\n
|
|
15
|
+
|
|
16
|
+
Please log in and find it in Account Settings, click [here](https://fly.customer.io/settings/api_credentials?keyType=app).
|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
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/).
|
|
20
|
+
`;
|
|
21
|
+
exports.customerIOAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
22
|
+
props: {
|
|
23
|
+
region: pieces_framework_1.Property.StaticDropdown({
|
|
24
|
+
displayName: 'Region',
|
|
25
|
+
required: true,
|
|
26
|
+
defaultValue: 'us',
|
|
27
|
+
options: {
|
|
28
|
+
options: [
|
|
29
|
+
{ label: 'US', value: 'us' },
|
|
30
|
+
{ label: 'EU', value: 'eu' },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
}),
|
|
34
|
+
track_site_id: pieces_framework_1.Property.ShortText({
|
|
35
|
+
displayName: 'Site ID',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
track_api_key: pieces_framework_1.Property.ShortText({
|
|
39
|
+
displayName: 'API Key',
|
|
40
|
+
required: true,
|
|
41
|
+
}),
|
|
42
|
+
api_bearer_token: pieces_framework_1.Property.ShortText({
|
|
43
|
+
displayName: 'Bearer Token',
|
|
44
|
+
required: true,
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
description: markdown,
|
|
48
|
+
required: true,
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAErE,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;CAehB,CAAC;AAEW,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAc;YAC3C,WAAW,EAAE,QAAQ;YACrB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC5B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;iBAC7B;aACF;SACF,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,gBAAgB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACnC,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;CAS5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,EAAE,EAAE;QACF,QAAQ,EAAE,mCAAmC;QAC7C,MAAM,EAAE,6BAA6B;KACtC;IACD,EAAE,EAAE;QACF,QAAQ,EAAE,sCAAsC;QAChD,MAAM,EAAE,gCAAgC;KACzC;CACF,CAAC"}
|
package/README.md
DELETED