@activepieces/piece-promotekit 0.2.1 → 0.3.1
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 +5 -5
- package/src/i18n/de.json +14 -7
- package/src/i18n/es.json +14 -7
- package/src/i18n/fr.json +48 -41
- package/src/i18n/ja.json +14 -7
- package/src/i18n/nl.json +14 -7
- package/src/i18n/pt.json +14 -7
- package/src/i18n/translation.json +14 -7
- package/src/i18n/zh.json +14 -7
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -2
- package/src/index.js.map +1 -1
- package/src/lib/triggers/new-affiliate-event.d.ts +15 -0
- package/src/lib/triggers/new-affiliate-event.d.ts.map +1 -0
- package/src/lib/triggers/new-affiliate-event.js +91 -0
- package/src/lib/triggers/new-affiliate-event.js.map +1 -0
- package/src/lib/triggers/{new-event.d.ts → new-commission-event.d.ts} +2 -6
- package/src/lib/triggers/new-commission-event.d.ts.map +1 -0
- package/src/lib/triggers/new-commission-event.js +71 -0
- package/src/lib/triggers/new-commission-event.js.map +1 -0
- package/src/lib/triggers/new-referral-event.d.ts +15 -0
- package/src/lib/triggers/new-referral-event.d.ts.map +1 -0
- package/src/lib/triggers/new-referral-event.js +90 -0
- package/src/lib/triggers/new-referral-event.js.map +1 -0
- package/src/lib/triggers/new-event.d.ts.map +0 -1
- package/src/lib/triggers/new-event.js +0 -105
- package/src/lib/triggers/new-event.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-promotekit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"
|
|
9
|
-
"@activepieces/pieces-
|
|
10
|
-
"@activepieces/
|
|
11
|
-
"
|
|
8
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
9
|
+
"@activepieces/pieces-framework": "0.30.0",
|
|
10
|
+
"@activepieces/shared": "0.86.0",
|
|
11
|
+
"tslib": "2.6.2"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
package/src/i18n/de.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Formulardaten",
|
|
85
85
|
"Raw": "Rohe",
|
|
86
|
-
"New Event": "Neues Ereignis",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "Neues Affiliate-Ereignis",
|
|
87
|
+
"New Referral Event": "Neues Empfehlungsereignis",
|
|
88
|
+
"New Commission Event": "Neues Provisions-Ereignis",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Wird ausgelöst, wenn ein PromoteKit-Affiliate-Event empfangen wird.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Wird ausgelöst, wenn ein PromoteKit-Empfehlungs-Webhook empfangen wird.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Trigger wenn ein PromoteKit-Provision Webhook empfangen wird.",
|
|
92
|
+
"Affiliate Event Types": "Affiliate-Event-Typen",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Empfehlungsereignisarten",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Wählen Sie die Affiliate Event Typen, um zu hören. Lassen Sie leer, um alle Affiliate Events zu empfangen.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Anleitung\n\n1. Gehe zu deinem PromoteKit Dashboard.\n2. Navigiere zu **Einstellungen > Webhooks**.\n3. Klicke **Endpunkt hinzufügen**.\n4. Fügen Sie die unten angezeigte Webhook-URL ein:\n```text\n {{webhookUrl}}\n ```\n5. Aktivieren Sie die oben ausgewählten Affiliate-Event-Typen.\n6. Speichern Sie den Endpunkt.\n\n**Benötigen Sie unterschiedliche Strömungen für verschiedene Veranstaltungen? * Erstellen Sie einen separaten Fluss mit einer eigenen Webhook-URL, und fügen Sie einen neuen Endpunkt in PromoteKit für diesen Fluss hinzu, wobei nur das passende Ereignis aktiviert ist.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Wählen Sie die Empfehlungstypen aus, um zu hören. Lassen Sie leer, um alle Empfehlungsereignisse zu empfangen.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Anleitung\n\n1. Gehe zu deinem PromoteKit Dashboard.\n2. Navigiere zu **Einstellungen > Webhooks**.\n3. Klicke **Endpunkt hinzufügen**.\n4. Fügen Sie die unten angezeigte Webhook-URL ein.\n```text\n {{webhookUrl}}\n ```\n5. Aktivieren Sie die oben ausgewählten Empfehlungstypen.\n6. Speichern Sie den Endpunkt.\n\n**Benötigen Sie unterschiedliche Strömungen für verschiedene Veranstaltungen? * Erstellen Sie einen separaten Fluss mit einer eigenen Webhook-URL, und fügen Sie einen neuen Endpunkt in PromoteKit für diesen Fluss hinzu, wobei nur das passende Ereignis aktiviert ist.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Anleitung\n\n1. Gehen Sie zu Ihrem PromoteKit-Dashboard.\n2. Navigieren Sie zu **Einstellungen > Webhooks**.\n3. Klicken Sie auf **Endpunkt hinzufügen**.\n4. Fügen Sie die unten angezeigte Webhook-URL ein:\n```text\n {{webhookUrl}}\n ```\n5. Aktiviere **Kommission erstellt** Event.\n6. Speichere den Endpunkt.",
|
|
92
100
|
"Affiliate Created": "Affiliate erstellt",
|
|
93
101
|
"Affiliate Approved": "Affiliate genehmigt",
|
|
94
102
|
"Referral Created": "Empfehlung erstellt",
|
|
95
|
-
"Referral Converted": "Empfehlung konvertiert"
|
|
96
|
-
"Commission Created": "Kommission erstellt"
|
|
103
|
+
"Referral Converted": "Empfehlung konvertiert"
|
|
97
104
|
}
|
package/src/i18n/es.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Datos de Formulario",
|
|
85
85
|
"Raw": "Rápido",
|
|
86
|
-
"New Event": "Nuevo evento",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "Nuevo evento de afiliado",
|
|
87
|
+
"New Referral Event": "Nuevo Evento de Referido",
|
|
88
|
+
"New Commission Event": "Nuevo Evento de Comisión",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Dispara cuando se recibe un evento de afiliado de PromoteKit.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Dispara cuando un evento de webhook de referencia de PromoteKit es recibido.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Se activa cuando se recibe un evento webhook de comisión de PromoteKit.",
|
|
92
|
+
"Affiliate Event Types": "Tipos de evento de afiliados",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Tipos de Eventos Referidos",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Seleccione los tipos de eventos afiliados para escuchar. Dejar en blanco para recibir todos los eventos afiliados.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Configurar Instrucciones\n\n1. Ve a tu panel de control de PromoteKit.\n2. Navega a **Ajustes > Webhooks**.\n3. Haz clic en **Añadir Endpoint**.\n4. Pegue la URL del webhook mostrada a continuación:\n```text\n {{webhookUrl}}\n ```\n5. Habilitar los tipos de eventos de afiliados que seleccionaste arriba.\n6. Guardar el punto final.\n\n**¿Necesita flujos diferentes para diferentes eventos? * Crear un flujo separado con su propia URL de webhook, y añadir un nuevo endpoint en PromoteKit para ese flujo con sólo el evento coincidente habilitado.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Seleccione los tipos de eventos de referencia a escuchar. Déjelo vacío para recibir todos los eventos de referencia.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Configurar Instrucciones\n\n1. Ve a tu panel de control de PromoteKit.\n2. Navega a **Ajustes > Webhooks**.\n3. Haz clic en **Añadir Endpoint**.\n4. Pegue la URL del webhook que se muestra a continuación.\n```texto\n {{webhookUrl}}\n ```\n5. Activa los tipos de eventos de referencia que seleccionaste arriba.\n6. Guarda el punto final.\n\n**¿Necesita flujos diferentes para diferentes eventos? * Crear un flujo separado con su propia URL de webhook, y añadir un nuevo endpoint en PromoteKit para ese flujo con sólo el evento coincidente habilitado.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Instrucciones de configuración\n\n1. Ve a tu panel de PromoteKit.\n2. Navega a **Configuración > Webhooks**.\n3. Haz clic en **Añadir endpoint**.\n4. Pega la URL del webhook que se muestra a continuación :\n```text\n {{webhookUrl}}\n ```\n5. Habilita el evento **Commission Created**.\n6. Guarda el endpoint.",
|
|
92
100
|
"Affiliate Created": "Afiliado creado",
|
|
93
101
|
"Affiliate Approved": "Aprobado por afiliado",
|
|
94
102
|
"Referral Created": "Referir creado",
|
|
95
|
-
"Referral Converted": "Referir convertido"
|
|
96
|
-
"Commission Created": "Comisión creada"
|
|
103
|
+
"Referral Converted": "Referir convertido"
|
|
97
104
|
}
|
package/src/i18n/fr.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Affiliate marketing platform integrated with Stripe.": "Plateforme de marketing d'affiliation intégrée à Stripe.",
|
|
3
3
|
"To get your API key:\n1. Log in to your PromoteKit dashboard.\n2. Go to **Settings > API Keys**.\n3. Click **Create API Key**.\n4. Copy the key and paste it here.\n": "To get your API key:\n1. Log in to your PromoteKit dashboard.\n2. Go to **Settings > API Keys**.\n3. Click **Create API Key**.\n4. Copy the key and paste it here.\n",
|
|
4
|
-
"List Affiliates": "
|
|
4
|
+
"List Affiliates": "Lister les affiliés",
|
|
5
5
|
"Find Affiliate": "Trouver un affilié",
|
|
6
6
|
"Create Affiliate": "Créer un affilié",
|
|
7
|
-
"Update Affiliate": "Mettre à jour
|
|
8
|
-
"List Referrals": "Lister les
|
|
9
|
-
"Find Referral": "Trouver
|
|
10
|
-
"Create Referral": "Créer
|
|
11
|
-
"List Commissions": "
|
|
12
|
-
"Find Commission": "Trouver une
|
|
7
|
+
"Update Affiliate": "Mettre à jour un affilié",
|
|
8
|
+
"List Referrals": "Lister les parrainages",
|
|
9
|
+
"Find Referral": "Trouver un parrainage",
|
|
10
|
+
"Create Referral": "Créer un parrainage",
|
|
11
|
+
"List Commissions": "Lister les commissions",
|
|
12
|
+
"Find Commission": "Trouver une commission",
|
|
13
13
|
"List Campaigns": "Lister les campagnes",
|
|
14
14
|
"Find Campaign": "Trouver une campagne",
|
|
15
15
|
"List Payouts": "Lister les paiements",
|
|
16
|
-
"Find Payout": "Trouver
|
|
16
|
+
"Find Payout": "Trouver un paiement",
|
|
17
17
|
"Custom API Call": "Appel d'API personnalisé",
|
|
18
|
-
"List all affiliates in your PromoteKit account.": "
|
|
19
|
-
"Get details of a specific affiliate by ID.": "
|
|
20
|
-
"Create a new affiliate in PromoteKit.": "
|
|
18
|
+
"List all affiliates in your PromoteKit account.": "Lister tous les affiliés de votre compte PromoteKit.",
|
|
19
|
+
"Get details of a specific affiliate by ID.": "Obtenir les détails d'un affilié spécifique par son ID.",
|
|
20
|
+
"Create a new affiliate in PromoteKit.": "Créer un nouvel affilié dans PromoteKit.",
|
|
21
21
|
"Update an existing affiliate in PromoteKit.": "Mettre à jour un affilié existant dans PromoteKit.",
|
|
22
|
-
"List all referrals in your PromoteKit account.": "Lister
|
|
23
|
-
"Get details of a specific referral by ID.": "Obtenir les détails d'
|
|
24
|
-
"Create a new referral in PromoteKit.": "Créer
|
|
25
|
-
"List all commissions in your PromoteKit account.": "Lister toutes les commissions
|
|
26
|
-
"Get details of a specific commission by ID.": "Obtenir les détails d'une commission spécifique par ID.",
|
|
22
|
+
"List all referrals in your PromoteKit account.": "Lister tous les parrainages de votre compte PromoteKit.",
|
|
23
|
+
"Get details of a specific referral by ID.": "Obtenir les détails d'un parrainage spécifique par son ID.",
|
|
24
|
+
"Create a new referral in PromoteKit.": "Créer un nouveau parrainage dans PromoteKit.",
|
|
25
|
+
"List all commissions in your PromoteKit account.": "Lister toutes les commissions de votre compte PromoteKit.",
|
|
26
|
+
"Get details of a specific commission by ID.": "Obtenir les détails d'une commission spécifique par son ID.",
|
|
27
27
|
"List all campaigns in your PromoteKit account.": "Lister toutes les campagnes de votre compte PromoteKit.",
|
|
28
|
-
"Get details of a specific campaign by ID.": "Obtenir les détails d'une campagne spécifique par ID.",
|
|
29
|
-
"List all payouts in your PromoteKit account.": "
|
|
30
|
-
"Get details of a specific payout by ID.": "
|
|
28
|
+
"Get details of a specific campaign by ID.": "Obtenir les détails d'une campagne spécifique par son ID.",
|
|
29
|
+
"List all payouts in your PromoteKit account.": "Lister tous les paiements de votre compte PromoteKit.",
|
|
30
|
+
"Get details of a specific payout by ID.": "Obtenir les détails d'un paiement spécifique par son ID.",
|
|
31
31
|
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
|
32
32
|
"Page": "Page",
|
|
33
33
|
"Limit": "Limite",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"First Name": "First Name",
|
|
37
37
|
"Last Name": "Last Name",
|
|
38
38
|
"Campaign": "Campagnes",
|
|
39
|
-
"Payout Email": "
|
|
39
|
+
"Payout Email": "E-mail de paiement",
|
|
40
40
|
"Approved": "Approuvé",
|
|
41
41
|
"Banned": "Banni",
|
|
42
|
-
"Referral ID": "ID
|
|
42
|
+
"Referral ID": "ID du parrainage",
|
|
43
43
|
"Affiliate": "Affilié",
|
|
44
|
-
"Commission ID": "
|
|
44
|
+
"Commission ID": "ID de la commission",
|
|
45
45
|
"Campaign ID": "ID de la campagne",
|
|
46
|
-
"Payout ID": "ID
|
|
46
|
+
"Payout ID": "ID du paiement",
|
|
47
47
|
"Method": "Méthode",
|
|
48
48
|
"Headers": "Headers",
|
|
49
49
|
"Query Parameters": "Paramètres de requête",
|
|
@@ -53,23 +53,23 @@
|
|
|
53
53
|
"No Error on Failure": "Aucune erreur en cas d'échec",
|
|
54
54
|
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
|
55
55
|
"Follow redirects": "Suivre les redirections",
|
|
56
|
-
"Page number to retrieve. Defaults to 1.": "Numéro de page à récupérer. Par défaut
|
|
57
|
-
"Number of affiliates per page (max 100). Defaults to 10.": "Nombre d'affiliés par page (max 100).
|
|
56
|
+
"Page number to retrieve. Defaults to 1.": "Numéro de page à récupérer. Par défaut : 1.",
|
|
57
|
+
"Number of affiliates per page (max 100). Defaults to 10.": "Nombre d'affiliés par page (max 100). Par défaut : 10.",
|
|
58
58
|
"The ID of the affiliate to retrieve.": "L'ID de l'affilié à récupérer.",
|
|
59
|
-
"The email address of the new affiliate.": "L'adresse
|
|
59
|
+
"The email address of the new affiliate.": "L'adresse e-mail du nouvel affilié.",
|
|
60
60
|
"Select the campaign for this affiliate.": "Sélectionnez la campagne pour cet affilié.",
|
|
61
61
|
"The ID of the affiliate to update.": "L'ID de l'affilié à mettre à jour.",
|
|
62
|
-
"The email address where the affiliate receives payouts.": "L'adresse
|
|
63
|
-
"Whether the affiliate is approved.": "
|
|
64
|
-
"Whether the affiliate is banned.": "
|
|
65
|
-
"Number of referrals per page (max 100). Defaults to 10.": "Nombre de
|
|
66
|
-
"The ID of the referral to retrieve.": "L'ID
|
|
67
|
-
"The email address of the referred person.": "L'adresse
|
|
62
|
+
"The email address where the affiliate receives payouts.": "L'adresse e-mail où l'affilié reçoit ses paiements.",
|
|
63
|
+
"Whether the affiliate is approved.": "Indique si l'affilié est approuvé.",
|
|
64
|
+
"Whether the affiliate is banned.": "Indique si l'affilié est banni.",
|
|
65
|
+
"Number of referrals per page (max 100). Defaults to 10.": "Nombre de parrainages par page (max 100). Par défaut : 10.",
|
|
66
|
+
"The ID of the referral to retrieve.": "L'ID du parrainage à récupérer.",
|
|
67
|
+
"The email address of the referred person.": "L'adresse e-mail de la personne parrainée.",
|
|
68
68
|
"Select the affiliate.": "Sélectionnez l'affilié.",
|
|
69
|
-
"Number of commissions per page (max 100). Defaults to 10.": "Nombre de commissions par page (max 100).
|
|
69
|
+
"Number of commissions per page (max 100). Defaults to 10.": "Nombre de commissions par page (max 100). Par défaut : 10.",
|
|
70
70
|
"The ID of the commission to retrieve.": "L'ID de la commission à récupérer.",
|
|
71
71
|
"The ID of the campaign to retrieve.": "L'ID de la campagne à récupérer.",
|
|
72
|
-
"Number of payouts per page (max 100). Defaults to 10.": "Nombre de paiements par page (max 100).
|
|
72
|
+
"Number of payouts per page (max 100). Defaults to 10.": "Nombre de paiements par page (max 100). Par défaut : 10.",
|
|
73
73
|
"The ID of the payout to retrieve.": "L'ID du paiement à récupérer.",
|
|
74
74
|
"Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
|
75
75
|
"Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Données du formulaire",
|
|
85
85
|
"Raw": "Brut",
|
|
86
|
-
"New Event": "Nouvel événement",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "Nouvel événement affilié",
|
|
87
|
+
"New Referral Event": "Nouvel événement de parrainage",
|
|
88
|
+
"New Commission Event": "Nouvel événement de commission",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Déclenche quand un événement d'affiliation PromoteKit est reçu.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Déclenche quand un événement PromoteKit de parrainage webhook est reçu.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Déclenche quand un webhook de commission PromoteKit est reçu.",
|
|
92
|
+
"Affiliate Event Types": "Types d'événements affiliés",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Types d'événements de parrainage",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Sélectionnez les types d'événements d'affiliation à écouter. Laissez vide pour recevoir tous les événements d'affiliation.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Instructions de configuration\n\n1. Accédez à votre tableau de bord PromoteKit.\n2. Ouvrez **Paramètres > Webhooks**.\n3. Cliquez sur **Ajouter un point de terminaison**.\n4. Collez l'URL du webhook affichée ci-dessous :\n```text\n {{webhookUrl}}\n ```\n5. Activez les types d'événements d'affilié que vous avez sélectionnés ci-dessus.\n6. Enregistrez le point de terminaison.\n\n**Besoin de flux différents pour des événements différents ?** Créez un flux séparé avec sa propre URL de webhook, et ajoutez dans PromoteKit un nouveau point de terminaison pour ce flux avec uniquement l'événement correspondant activé.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Sélectionnez les types d'événements de parrainage à écouter. Laissez vide pour recevoir tous les événements de parrainage.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Instructions de configuration\n\n1. Accédez à votre tableau de bord PromoteKit.\n2. Ouvrez **Paramètres > Webhooks**.\n3. Cliquez sur **Ajouter un point de terminaison**.\n4. Collez l'URL du webhook affichée ci-dessous.\n```text\n {{webhookUrl}}\n ```\n5. Activez les types d'événements de parrainage que vous avez sélectionnés ci-dessus.\n6. Enregistrez le point de terminaison.\n\n**Besoin de flux différents pour des événements différents ?** Créez un flux séparé avec sa propre URL de webhook, et ajoutez dans PromoteKit un nouveau point de terminaison pour ce flux avec uniquement l'événement correspondant activé.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Instructions d'installation\n\n1. Allez dans votre tableau de bord PromoteKit.\n2. Allez dans **Paramètres > Webhooks**.\n3. Cliquez sur **Ajouter un point de terminaison**.\n4. Collez l'URL du webhook affichée ci-dessous :\n```text\n {{webhookUrl}}\n ```\n5. Activer l'évènement **Commission créée**.\n6. Enregistrer le terminal.",
|
|
92
100
|
"Affiliate Created": "Affilié créé",
|
|
93
101
|
"Affiliate Approved": "Affilié approuvé",
|
|
94
102
|
"Referral Created": "Recommandation créée",
|
|
95
|
-
"Referral Converted": "
|
|
96
|
-
"Commission Created": "Commission créée"
|
|
103
|
+
"Referral Converted": "Parrainage converti"
|
|
97
104
|
}
|
package/src/i18n/ja.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "フォームデータ",
|
|
85
85
|
"Raw": "Raw",
|
|
86
|
-
"New Event": "
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "新しいアフィリエイトイベント",
|
|
87
|
+
"New Referral Event": "新しい紹介イベント",
|
|
88
|
+
"New Commission Event": "新しいコミッションイベント",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "PromoteKitアフィリエイトイベントを受信したときに発生します。",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "PromoteKit紹介Webhookイベントを受信したときに発生します。",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "PromoteKitコミッションWebhookイベントを受信したときに発生します。",
|
|
92
|
+
"Affiliate Event Types": "アフィリエイトイベントタイプ",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "紹介イベントの種類",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "リッスンするアフィリエイトイベントタイプを選択します。すべてのアフィリエイトイベントを受信するには空のままにします。",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### セットアップ手順\n\n1. PromoteKit のダッシュボードに移動します。\n2. **Settings > Webhooks** に移動します。\n3. **Add Endpoint** をクリックします。\n4. 下に表示されている webhook URL を貼り付けます :\n```text\n {{webhookUrl}}\n ```\n5. 上で選択したアフィリエイトイベントタイプを有効にします。\n6. エンドポイントを保存します。\n\n**イベントごとに異なる flow が必要ですか?** 独自の webhook URL を持つ別の flow を作成し、その flow 用に PromoteKit で新しいエンドポイントを追加して、該当するイベントのみを有効にします。",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "リッスンする紹介イベントタイプを選択します。すべての紹介イベントを受信するには空のままにします。",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### セットアップ手順\n\n1. PromoteKit のダッシュボードに移動します。\n2. **Settings > Webhooks** に移動します。\n3. **Add Endpoint** をクリックします。\n4. 下に表示されている webhook URL を貼り付けます。\n```text\n {{webhookUrl}}\n ```\n5. 上で選択したリファラルイベントタイプを有効にします。\n6. エンドポイントを保存します。\n\n**イベントごとに異なる flow が必要ですか?** 独自の webhook URL を持つ別の flow を作成し、その flow 用に PromoteKit で新しいエンドポイントを追加して、該当するイベントのみを有効にします。",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### セットアップ手順\n\n1. PromoteKit のダッシュボードに移動します。\n2. **Settings > Webhooks** に移動します。\n3. **Add Endpoint** をクリックします。\n4. 下に表示されている webhook URL を貼り付けます :\n```text\n {{webhookUrl}}\n ```\n5. **Commission Created** イベントを有効にします。\n6. エンドポイントを保存します。",
|
|
92
100
|
"Affiliate Created": "アフィリエイトが作成されました",
|
|
93
101
|
"Affiliate Approved": "アフィリエイト承認済み",
|
|
94
102
|
"Referral Created": "紹介が作成されました",
|
|
95
|
-
"Referral Converted": "紹介が変換されました"
|
|
96
|
-
"Commission Created": "コミッションが作成されました"
|
|
103
|
+
"Referral Converted": "紹介が変換されました"
|
|
97
104
|
}
|
package/src/i18n/nl.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Formulieren gegevens",
|
|
85
85
|
"Raw": "Onbewerkte",
|
|
86
|
-
"New Event": "
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "Nieuw Affiliate Evenement",
|
|
87
|
+
"New Referral Event": "Nieuwe verwijzingsgebeurtenis",
|
|
88
|
+
"New Commission Event": "Nieuw Commissie-evenement",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Triggers wanneer een PromoteKit affiliate evenement is ontvangen.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Activeert wanneer een PromoteKit referral webhook evenement is ontvangen.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Activeert wanneer een PromoteKit commissie webhook evenement is ontvangen.",
|
|
92
|
+
"Affiliate Event Types": "Affiliate Event Types",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Referral Evenement Types",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Selecteer de affiliate evenementtypes om naar te luisteren. Laat leeg om alle affiliate evenementen te ontvangen.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup instructies\n\n1. Ga naar het PromoteKit dashboard.\n2. Navigeer naar **Instellingen > Webhooks**.\n3. Klik **Eindpunt toevoegen**.\n4. Plak de webhook URL hieronder weergegeven:\n```text\n {{webhookUrl}}\n ```\n5. Schakel de partnertypen die u hierboven hebt geselecteerd in.\n6. Sla het eindpunt op.\n\n**Heb je verschillende stromen nodig voor verschillende gebeurtenissen? * Maak een aparte flow met zijn eigen webhook URL, en voeg een nieuw eindpunt in PromoteKit voor die stroom toe met alleen het overeenkomende evenement ingeschakeld.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Selecteer de referral event types om naar te luisteren. Laat leeg om alle referral events te ontvangen.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup instructies\n\n1. Ga naar het PromoteKit dashboard.\n2. Navigeer naar **Instellingen > Webhooks**.\n3. Klik **Eindpunt toevoegen**.\n4. Plak de webhook URL hieronder weergegeven.\n```text\n {{webhookUrl}}\n ```\n5. Schakel de referral event types in die je hierboven hebt geselecteerd.\n6. Sla het eindpunt op.\n\n**Heb je verschillende stromen nodig voor verschillende gebeurtenissen? * Maak een aparte flow met zijn eigen webhook URL, en voeg een nieuw eindpunt in PromoteKit voor die stroom toe met alleen het overeenkomende evenement ingeschakeld.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Setup instructies\n\n1. Ga naar het PromoteKit dashboard.\n2. Navigeer naar **Instellingen > Webhooks**.\n3. Klik op **Eindpunt toevoegen**.\n4. Plak de webhook URL hieronder weergegeven:\n```text\n {{webhookUrl}}\n ```\n5. Activeer de **Commissie gemaakt** event.\n6. Red het eindpunt.",
|
|
92
100
|
"Affiliate Created": "Affiliate aangemaakt",
|
|
93
101
|
"Affiliate Approved": "Affiliate goedgekeurd",
|
|
94
102
|
"Referral Created": "Verwijzing aangemaakt",
|
|
95
|
-
"Referral Converted": "Verwijzing geconverteerd"
|
|
96
|
-
"Commission Created": "Commissie aangemaakt"
|
|
103
|
+
"Referral Converted": "Verwijzing geconverteerd"
|
|
97
104
|
}
|
package/src/i18n/pt.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Dados de Formulário",
|
|
85
85
|
"Raw": "RAW",
|
|
86
|
-
"New Event": "Novo evento",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "Novo evento de afiliado",
|
|
87
|
+
"New Referral Event": "Novo Evento de Referência",
|
|
88
|
+
"New Commission Event": "Novo evento da Comissão",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Aciona quando um evento PromoteKit de afiliado é recebido.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Dispara quando um evento PromoteKit de indicação for recebido.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Dispara quando um evento do PromoteKit de comissão webhook for recebido.",
|
|
92
|
+
"Affiliate Event Types": "Tipos de Eventos de Associados",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Tipos de Evento de Referência",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Selecione os tipos de evento de afiliado para ouvir. Deixe em branco para receber todos os eventos de afiliados.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Instruções de configuração\n\n1. Vá para o seu painel PromoteKit.\n2. Navegue para **Configurações > Webhooks**.\n3. Clique em **Adicionar Endpoint**.\n4. Cole a URL do webhook mostrada abaixo:\n```text\n {{webhookUrl}}\n ```\n5. Habilita os tipos de evento de afiliado selecionados acima.\n6. Salve o endpoint.\n\n**Precisa de fluxos diferentes para eventos diferentes? * Criar um fluxo separado com seu próprio URL webhook, e adicionar um novo ponto de extremidade no PromoteKit para esse fluxo com apenas o evento correspondente habilitado.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Selecione os tipos de evento de referência para ouvir. Deixe em branco para receber todos os eventos de indicação.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Instruções de configuração\n\n1. Vá para o seu painel PromoteKit.\n2. Navegue para **Configurações > Webhooks**.\n3. Clique em **Adicionar Endpoint**.\n4. Cole a URL do webhook mostrada abaixo.\n```text\n {{webhookUrl}}\n ```\n5. Ativar os tipos de evento de referência selecionados acima.\n6. Salvar o endpoint.\n\n**Precisa de fluxos diferentes para eventos diferentes? * Criar um fluxo separado com seu próprio URL webhook, e adicionar um novo ponto de extremidade no PromoteKit para esse fluxo com apenas o evento correspondente habilitado.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Instruções de configuração\n\n1. Vá para o seu painel PromoteKit.\n2. Navegue para **Configurações > Webhooks**.\n3. Clique em **Adicionar Endpoint**.\n4. Cole a URL do webhook mostrada abaixo:\n```text\n {{webhookUrl}}\n ```\n5. Habilita o evento **Comissão Criada**.\n6. Salve o endpoint.",
|
|
92
100
|
"Affiliate Created": "Afiliado Criado",
|
|
93
101
|
"Affiliate Approved": "Afiliados aprovados",
|
|
94
102
|
"Referral Created": "Referência Criada",
|
|
95
|
-
"Referral Converted": "Referência convertida"
|
|
96
|
-
"Commission Created": "Comissão Criada"
|
|
103
|
+
"Referral Converted": "Referência convertida"
|
|
97
104
|
}
|
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "Form Data",
|
|
85
85
|
"Raw": "Raw",
|
|
86
|
-
"New Event": "New Event",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "New Affiliate Event",
|
|
87
|
+
"New Referral Event": "New Referral Event",
|
|
88
|
+
"New Commission Event": "New Commission Event",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Triggers when a PromoteKit affiliate event is received.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Triggers when a PromoteKit referral webhook event is received.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Triggers when a PromoteKit commission webhook event is received.",
|
|
92
|
+
"Affiliate Event Types": "Affiliate Event Types",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Referral Event Types",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Select the affiliate event types to listen for. Leave empty to receive all affiliate events.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Select the referral event types to listen for. Leave empty to receive all referral events.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.",
|
|
92
100
|
"Affiliate Created": "Affiliate Created",
|
|
93
101
|
"Affiliate Approved": "Affiliate Approved",
|
|
94
102
|
"Referral Created": "Referral Created",
|
|
95
|
-
"Referral Converted": "Referral Converted"
|
|
96
|
-
"Commission Created": "Commission Created"
|
|
103
|
+
"Referral Converted": "Referral Converted"
|
|
97
104
|
}
|
package/src/i18n/zh.json
CHANGED
|
@@ -83,15 +83,22 @@
|
|
|
83
83
|
"JSON": "JSON",
|
|
84
84
|
"Form Data": "表单数据",
|
|
85
85
|
"Raw": "原始文件",
|
|
86
|
-
"New Event": "New Event",
|
|
87
|
-
"
|
|
88
|
-
"Event
|
|
86
|
+
"New Affiliate Event": "New Affiliate Event",
|
|
87
|
+
"New Referral Event": "New Referral Event",
|
|
88
|
+
"New Commission Event": "New Commission Event",
|
|
89
|
+
"Triggers when a PromoteKit affiliate event is received.": "Triggers when a PromoteKit affiliate event is received.",
|
|
90
|
+
"Triggers when a PromoteKit referral webhook event is received.": "Triggers when a PromoteKit referral webhook event is received.",
|
|
91
|
+
"Triggers when a PromoteKit commission webhook event is received.": "Triggers when a PromoteKit commission webhook event is received.",
|
|
92
|
+
"Affiliate Event Types": "Affiliate Event Types",
|
|
89
93
|
"Markdown": "Markdown",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"Referral Event Types": "Referral Event Types",
|
|
95
|
+
"Select the affiliate event types to listen for. Leave empty to receive all affiliate events.": "Select the affiliate event types to listen for. Leave empty to receive all affiliate events.",
|
|
96
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the affiliate event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.",
|
|
97
|
+
"Select the referral event types to listen for. Leave empty to receive all referral events.": "Select the referral event types to listen for. Leave empty to receive all referral events.",
|
|
98
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below.\n```text\n {{webhookUrl}}\n ```\n5. Enable the referral event types you selected above.\n6. Save the endpoint.\n\n**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.",
|
|
99
|
+
"### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard.\n2. Navigate to **Settings > Webhooks**.\n3. Click **Add Endpoint**.\n4. Paste the webhook URL shown below :\n```text\n {{webhookUrl}}\n ```\n5. Enable the **Commission Created** event.\n6. Save the endpoint.",
|
|
92
100
|
"Affiliate Created": "Affiliate Created",
|
|
93
101
|
"Affiliate Approved": "Affiliate Approved",
|
|
94
102
|
"Referral Created": "Referral Created",
|
|
95
|
-
"Referral Converted": "Referral Converted"
|
|
96
|
-
"Commission Created": "Commission Created"
|
|
103
|
+
"Referral Converted": "Referral Converted"
|
|
97
104
|
}
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,cAAc,mEAsBzB,CAAC;AAEH,eAAO,MAAM,UAAU,mHA+BrB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,9 @@ const list_campaigns_1 = require("./lib/actions/list-campaigns");
|
|
|
18
18
|
const find_campaign_1 = require("./lib/actions/find-campaign");
|
|
19
19
|
const list_payouts_1 = require("./lib/actions/list-payouts");
|
|
20
20
|
const find_payout_1 = require("./lib/actions/find-payout");
|
|
21
|
-
const
|
|
21
|
+
const new_affiliate_event_1 = require("./lib/triggers/new-affiliate-event");
|
|
22
|
+
const new_referral_event_1 = require("./lib/triggers/new-referral-event");
|
|
23
|
+
const new_commission_event_1 = require("./lib/triggers/new-commission-event");
|
|
22
24
|
exports.promotekitAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
23
25
|
displayName: 'API Key',
|
|
24
26
|
description: `To get your API key:
|
|
@@ -75,6 +77,6 @@ exports.promotekit = (0, pieces_framework_1.createPiece)({
|
|
|
75
77
|
}),
|
|
76
78
|
}),
|
|
77
79
|
],
|
|
78
|
-
triggers: [
|
|
80
|
+
triggers: [new_affiliate_event_1.newAffiliateEvent, new_referral_event_1.newReferralEvent, new_commission_event_1.newCommissionEvent],
|
|
79
81
|
});
|
|
80
82
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAA+D;AAC/D,iEAA6D;AAC7D,qEAAiE;AACjE,qEAAiE;AACjE,iEAA6D;AAC7D,+DAA2D;AAC3D,mEAA+D;AAC/D,qEAAiE;AACjE,mEAA+D;AAC/D,iEAA6D;AAC7D,+DAA2D;AAC3D,6DAAyD;AACzD,2DAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAA+D;AAC/D,iEAA6D;AAC7D,qEAAiE;AACjE,qEAAiE;AACjE,iEAA6D;AAC7D,+DAA2D;AAC3D,mEAA+D;AAC/D,qEAAiE;AACjE,mEAA+D;AAC/D,iEAA6D;AAC7D,+DAA2D;AAC3D,6DAAyD;AACzD,2DAAuD;AACvD,4EAAuE;AACvE,0EAA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,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAChC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,uCAAiB,EAAE,qCAAgB,EAAE,yCAAkB,CAAC;CACpE,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newAffiliateEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
5
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
6
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
7
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
12
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
13
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=new-affiliate-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-affiliate-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-affiliate-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAU1F,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EA6E5B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newAffiliateEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const AFFILIATE_EVENT_OPTIONS = [
|
|
10
|
+
{ label: 'Affiliate Created', value: 'affiliate.created' },
|
|
11
|
+
{ label: 'Affiliate Approved', value: 'affiliate.approved' },
|
|
12
|
+
];
|
|
13
|
+
exports.newAffiliateEvent = (0, pieces_framework_1.createTrigger)({
|
|
14
|
+
auth: __1.promotekitAuth,
|
|
15
|
+
name: 'new_affiliate_event',
|
|
16
|
+
displayName: 'New Affiliate Event',
|
|
17
|
+
description: 'Triggers when a PromoteKit affiliate event is received.',
|
|
18
|
+
props: {
|
|
19
|
+
eventTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
20
|
+
displayName: 'Affiliate Event Types',
|
|
21
|
+
description: 'Select the affiliate event types to listen for. Leave empty to receive all affiliate events.',
|
|
22
|
+
required: false,
|
|
23
|
+
options: { options: AFFILIATE_EVENT_OPTIONS },
|
|
24
|
+
}),
|
|
25
|
+
instructions: pieces_framework_1.Property.MarkDown({
|
|
26
|
+
value: `### Setup Instructions
|
|
27
|
+
|
|
28
|
+
1. Go to your PromoteKit dashboard.
|
|
29
|
+
2. Navigate to **Settings > Webhooks**.
|
|
30
|
+
3. Click **Add Endpoint**.
|
|
31
|
+
4. Paste the webhook URL shown below :
|
|
32
|
+
\`\`\`text
|
|
33
|
+
{{webhookUrl}}
|
|
34
|
+
\`\`\`
|
|
35
|
+
5. Enable the affiliate event types you selected above.
|
|
36
|
+
6. Save the endpoint.
|
|
37
|
+
|
|
38
|
+
**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.`,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
sampleData: {
|
|
42
|
+
type: 'affiliate.created',
|
|
43
|
+
id: 'aff_sample',
|
|
44
|
+
email: 'affiliate@example.com',
|
|
45
|
+
first_name: 'John',
|
|
46
|
+
last_name: 'Doe',
|
|
47
|
+
approved: false,
|
|
48
|
+
banned: false,
|
|
49
|
+
created_at: '2024-01-01T00:00:00Z',
|
|
50
|
+
},
|
|
51
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
52
|
+
onEnable() {
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
onDisable() {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
run(context) {
|
|
63
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
var _a;
|
|
65
|
+
const payload = context.payload.body;
|
|
66
|
+
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
67
|
+
const isAffiliate = payload.type === 'affiliate.created' ||
|
|
68
|
+
payload.type === 'affiliate.approved';
|
|
69
|
+
if (!isAffiliate)
|
|
70
|
+
return [];
|
|
71
|
+
if (selected.length > 0 && !selected.includes(payload.type))
|
|
72
|
+
return [];
|
|
73
|
+
return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenAffiliate(payload.data))];
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
test(context) {
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
const response = yield (0, common_1.promotekitApiCall)({
|
|
80
|
+
token: context.auth.secret_text,
|
|
81
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
82
|
+
path: '/affiliates',
|
|
83
|
+
queryParams: { limit: '5' },
|
|
84
|
+
});
|
|
85
|
+
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
86
|
+
const eventType = (_b = selected[0]) !== null && _b !== void 0 ? _b : 'affiliate.created';
|
|
87
|
+
return response.body.data.map((item) => (Object.assign({ type: eventType }, common_1.promotekitCommon.flattenAffiliate(item))));
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=new-affiliate-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-affiliate-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-affiliate-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAEzD,MAAM,uBAAuB,GAAG;IAC9B,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAC1D,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;CAC7D,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAA,gCAAa,EAAC;IAC7C,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,yDAAyD;IACtE,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,yBAAyB,CAAC;YAC7C,WAAW,EAAE,uBAAuB;YAC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;gBAC5E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,MAAM,QAAQ,GAAa,MAAA,OAAO,CAAC,UAAU,CAAC,UAAU,mCAAI,EAAE,CAAC;YAC/D,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,CAAC,CAAC,mCAAI,mBAAmB,CAAC;YACrD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBACtC,IAAI,EAAE,SAAS,IACZ,yBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAC1C,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const
|
|
3
|
-
eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
2
|
+
export declare const newCommissionEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
4
3
|
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
5
4
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
6
|
-
eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
7
5
|
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
6
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
-
eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
10
7
|
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
8
|
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
12
|
-
eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
13
9
|
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
14
10
|
}>;
|
|
15
|
-
//# sourceMappingURL=new-event.d.ts.map
|
|
11
|
+
//# sourceMappingURL=new-commission-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-commission-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-commission-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAK1F,eAAO,MAAM,kBAAkB;;;;;;;;EA8D7B,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newCommissionEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.newCommissionEvent = (0, pieces_framework_1.createTrigger)({
|
|
10
|
+
auth: __1.promotekitAuth,
|
|
11
|
+
name: 'new_commission_event',
|
|
12
|
+
displayName: 'New Commission Event',
|
|
13
|
+
description: 'Triggers when a PromoteKit commission webhook event is received.',
|
|
14
|
+
props: {
|
|
15
|
+
instructions: pieces_framework_1.Property.MarkDown({
|
|
16
|
+
value: `### Setup Instructions
|
|
17
|
+
|
|
18
|
+
1. Go to your PromoteKit dashboard.
|
|
19
|
+
2. Navigate to **Settings > Webhooks**.
|
|
20
|
+
3. Click **Add Endpoint**.
|
|
21
|
+
4. Paste the webhook URL shown below :
|
|
22
|
+
\`\`\`text
|
|
23
|
+
{{webhookUrl}}
|
|
24
|
+
\`\`\`
|
|
25
|
+
5. Enable the **Commission Created** event.
|
|
26
|
+
6. Save the endpoint.`,
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
sampleData: {
|
|
30
|
+
type: 'commission.created',
|
|
31
|
+
id: 'com_sample',
|
|
32
|
+
revenue_amount: 100,
|
|
33
|
+
currency: 'usd',
|
|
34
|
+
commission_amount: 20,
|
|
35
|
+
payout_status: 'pending',
|
|
36
|
+
affiliate_id: 'aff_sample',
|
|
37
|
+
affiliate_email: 'affiliate@example.com',
|
|
38
|
+
created_at: '2024-01-01T00:00:00Z',
|
|
39
|
+
},
|
|
40
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
41
|
+
onEnable() {
|
|
42
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
onDisable() {
|
|
47
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
run(context) {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const payload = context.payload.body;
|
|
54
|
+
if (payload.type !== 'commission.created')
|
|
55
|
+
return [];
|
|
56
|
+
return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenCommission(payload.data))];
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
test(context) {
|
|
60
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const response = yield (0, common_1.promotekitApiCall)({
|
|
62
|
+
token: context.auth.secret_text,
|
|
63
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
64
|
+
path: '/commissions',
|
|
65
|
+
queryParams: { limit: '5' },
|
|
66
|
+
});
|
|
67
|
+
return response.body.data.map((item) => (Object.assign({ type: 'commission.created' }, common_1.promotekitCommon.flattenCommission(item))));
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=new-commission-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-commission-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-commission-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAE5C,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,kEAAkE;IAC/E,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,KAAK,EAAE;;;;;;;;;;sBAUS;SACjB,CAAC;KACH;IACD,UAAU,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,EAAE,EAAE,YAAY;QAChB,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,KAAK;QACf,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,SAAS;QACxB,YAAY,EAAE,YAAY;QAC1B,eAAe,EAAE,uBAAuB;QACxC,UAAU,EAAE,sBAAsB;KACnC;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAEvB,QAAQ;;YACZ,yDAAyD;QAC3D,CAAC;KAAA;IAEK,SAAS;;YACb,yDAAyD;QAC3D,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAG/B,CAAC;YACF,IAAI,OAAO,CAAC,IAAI,KAAK,oBAAoB;gBAAE,OAAO,EAAE,CAAC;YACrD,OAAO,iBAAG,IAAI,EAAE,OAAO,CAAC,IAAI,IAAK,yBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG,CAAC;QACvF,CAAC;KAAA;IAEK,IAAI,CAAC,OAAO;;YAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAsC;gBAC5E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBACtC,IAAI,EAAE,oBAAoB,IACvB,yBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC3C,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newReferralEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
5
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
6
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
7
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
12
|
+
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
13
|
+
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=new-referral-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-referral-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-referral-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAU1F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EA4E3B,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newReferralEvent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const common_1 = require("../common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const REFERRAL_EVENT_OPTIONS = [
|
|
10
|
+
{ label: 'Referral Created', value: 'referral.created' },
|
|
11
|
+
{ label: 'Referral Converted', value: 'referral.converted' },
|
|
12
|
+
];
|
|
13
|
+
exports.newReferralEvent = (0, pieces_framework_1.createTrigger)({
|
|
14
|
+
auth: __1.promotekitAuth,
|
|
15
|
+
name: 'new_referral_event',
|
|
16
|
+
displayName: 'New Referral Event',
|
|
17
|
+
description: 'Triggers when a PromoteKit referral webhook event is received.',
|
|
18
|
+
props: {
|
|
19
|
+
eventTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
20
|
+
displayName: 'Referral Event Types',
|
|
21
|
+
description: 'Select the referral event types to listen for. Leave empty to receive all referral events.',
|
|
22
|
+
required: false,
|
|
23
|
+
options: { options: REFERRAL_EVENT_OPTIONS },
|
|
24
|
+
}),
|
|
25
|
+
instructions: pieces_framework_1.Property.MarkDown({
|
|
26
|
+
value: `### Setup Instructions
|
|
27
|
+
|
|
28
|
+
1. Go to your PromoteKit dashboard.
|
|
29
|
+
2. Navigate to **Settings > Webhooks**.
|
|
30
|
+
3. Click **Add Endpoint**.
|
|
31
|
+
4. Paste the webhook URL shown below.
|
|
32
|
+
\`\`\`text
|
|
33
|
+
{{webhookUrl}}
|
|
34
|
+
\`\`\`
|
|
35
|
+
5. Enable the referral event types you selected above.
|
|
36
|
+
6. Save the endpoint.
|
|
37
|
+
|
|
38
|
+
**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.`,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
sampleData: {
|
|
42
|
+
type: 'referral.created',
|
|
43
|
+
id: 'ref_sample',
|
|
44
|
+
email: 'referral@example.com',
|
|
45
|
+
subscription_status: null,
|
|
46
|
+
affiliate_id: 'aff_sample',
|
|
47
|
+
affiliate_email: 'affiliate@example.com',
|
|
48
|
+
created_at: '2024-01-01T00:00:00Z',
|
|
49
|
+
},
|
|
50
|
+
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
51
|
+
onEnable() {
|
|
52
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
onDisable() {
|
|
57
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
// Webhook is configured manually in PromoteKit dashboard
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
run(context) {
|
|
62
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
var _a;
|
|
64
|
+
const payload = context.payload.body;
|
|
65
|
+
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
66
|
+
const isReferral = payload.type === 'referral.created' ||
|
|
67
|
+
payload.type === 'referral.converted';
|
|
68
|
+
if (!isReferral)
|
|
69
|
+
return [];
|
|
70
|
+
if (selected.length > 0 && !selected.includes(payload.type))
|
|
71
|
+
return [];
|
|
72
|
+
return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenReferral(payload.data))];
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
test(context) {
|
|
76
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const response = yield (0, common_1.promotekitApiCall)({
|
|
79
|
+
token: context.auth.secret_text,
|
|
80
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
81
|
+
path: '/referrals',
|
|
82
|
+
queryParams: { limit: '5' },
|
|
83
|
+
});
|
|
84
|
+
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
85
|
+
const eventType = (_b = selected[0]) !== null && _b !== void 0 ? _b : 'referral.created';
|
|
86
|
+
return response.body.data.map((item) => (Object.assign({ type: eventType }, common_1.promotekitCommon.flattenReferral(item))));
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=new-referral-event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-referral-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-referral-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAEzD,MAAM,sBAAsB,GAAG;IAC7B,EAAE,KAAK,EA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CAAC;YAC3B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;gBAAE,OAAO,EAAE,CAAC;YACvE,OAAO,iBAAG,IAAI,EAAE,OAAO,CAAC,IAAI,IAAK,yBAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG,CAAC;QACrF,CAAC;KAAA;IAEK,IAAI,CAAC,OAAO;;;YAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAsC;gBAC5E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,MAAM,QAAQ,GAAa,MAAA,OAAO,CAAC,UAAU,CAAC,UAAU,mCAAI,EAAE,CAAC;YAC/D,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,CAAC,CAAC,mCAAI,kBAAkB,CAAC;YACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBACtC,IAAI,EAAE,SAAS,IACZ,yBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,EACzC,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAaxC,eAAO,MAAM,QAAQ;;;;;;;;;;;;EA0EnB,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newEvent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const __1 = require("../..");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
-
const EVENT_TYPE_OPTIONS = [
|
|
10
|
-
{ label: 'Affiliate Created', value: 'affiliate.created' },
|
|
11
|
-
{ label: 'Affiliate Approved', value: 'affiliate.approved' },
|
|
12
|
-
{ label: 'Referral Created', value: 'referral.created' },
|
|
13
|
-
{ label: 'Referral Converted', value: 'referral.converted' },
|
|
14
|
-
{ label: 'Commission Created', value: 'commission.created' },
|
|
15
|
-
];
|
|
16
|
-
exports.newEvent = (0, pieces_framework_1.createTrigger)({
|
|
17
|
-
auth: __1.promotekitAuth,
|
|
18
|
-
name: 'new_event',
|
|
19
|
-
displayName: 'New Event',
|
|
20
|
-
description: 'Triggers when a PromoteKit webhook event is received.',
|
|
21
|
-
props: {
|
|
22
|
-
eventType: pieces_framework_1.Property.StaticDropdown({
|
|
23
|
-
displayName: 'Event Type',
|
|
24
|
-
description: 'The event type this trigger should respond to.',
|
|
25
|
-
required: true,
|
|
26
|
-
options: { options: EVENT_TYPE_OPTIONS },
|
|
27
|
-
}),
|
|
28
|
-
instructions: pieces_framework_1.Property.MarkDown({
|
|
29
|
-
value: `### Setup Instructions
|
|
30
|
-
|
|
31
|
-
1. Go to your PromoteKit dashboard
|
|
32
|
-
2. Navigate to **Settings > Webhooks**
|
|
33
|
-
3. Click **Add Endpoint**
|
|
34
|
-
4. Paste the webhook URL shown below
|
|
35
|
-
5. Enable the event type you selected above (and any others you need for separate flows)
|
|
36
|
-
6. Save the endpoint`,
|
|
37
|
-
}),
|
|
38
|
-
},
|
|
39
|
-
sampleData: {
|
|
40
|
-
id: 'sample-id',
|
|
41
|
-
created_at: '2024-01-01T00:00:00Z',
|
|
42
|
-
},
|
|
43
|
-
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
44
|
-
onEnable() {
|
|
45
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
onDisable() {
|
|
50
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
run(context) {
|
|
55
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const payload = context.payload.body;
|
|
57
|
-
if (payload.type !== context.propsValue.eventType)
|
|
58
|
-
return [];
|
|
59
|
-
return [flattenByType(payload.type, payload.data)];
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
test(context) {
|
|
63
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const eventType = context.propsValue.eventType;
|
|
65
|
-
if (eventType === 'affiliate.created' || eventType === 'affiliate.approved') {
|
|
66
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
67
|
-
token: context.auth.secret_text,
|
|
68
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
69
|
-
path: '/affiliates',
|
|
70
|
-
queryParams: { limit: '5' },
|
|
71
|
-
});
|
|
72
|
-
return response.body.data.map(common_1.promotekitCommon.flattenAffiliate);
|
|
73
|
-
}
|
|
74
|
-
if (eventType === 'referral.created' || eventType === 'referral.converted') {
|
|
75
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
76
|
-
token: context.auth.secret_text,
|
|
77
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
78
|
-
path: '/referrals',
|
|
79
|
-
queryParams: { limit: '5' },
|
|
80
|
-
});
|
|
81
|
-
return response.body.data.map(common_1.promotekitCommon.flattenReferral);
|
|
82
|
-
}
|
|
83
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
84
|
-
token: context.auth.secret_text,
|
|
85
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
86
|
-
path: '/commissions',
|
|
87
|
-
queryParams: { limit: '5' },
|
|
88
|
-
});
|
|
89
|
-
return response.body.data.map(common_1.promotekitCommon.flattenCommission);
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
function flattenByType(type, data) {
|
|
94
|
-
if (type === 'affiliate.created' || type === 'affiliate.approved') {
|
|
95
|
-
return common_1.promotekitCommon.flattenAffiliate(data);
|
|
96
|
-
}
|
|
97
|
-
if (type === 'referral.created' || type === 'referral.converted') {
|
|
98
|
-
return common_1.promotekitCommon.flattenReferral(data);
|
|
99
|
-
}
|
|
100
|
-
if (type === 'commission.created') {
|
|
101
|
-
return common_1.promotekitCommon.flattenCommission(data);
|
|
102
|
-
}
|
|
103
|
-
return data;
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=new-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAEzD,MAAM,kBAAkB,GAAG;IACzB,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAC1D,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC5D,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACxD,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC5D,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;CAC7D,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAA,gCAAa,EAAC;IACpC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EA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