@activepieces/piece-smartlead 0.0.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 +17 -0
- package/src/i18n/de.json +45 -0
- package/src/i18n/es.json +45 -0
- package/src/i18n/fr.json +45 -0
- package/src/i18n/it.json +45 -0
- package/src/i18n/ja.json +45 -0
- package/src/i18n/pt.json +45 -0
- package/src/i18n/translation.json +45 -0
- package/src/i18n/zh.json +45 -0
- package/src/index.d.ts +2 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +40 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/add-leads-to-campaign.d.ts +9 -0
- package/src/lib/actions/add-leads-to-campaign.d.ts.map +1 -0
- package/src/lib/actions/add-leads-to-campaign.js +108 -0
- package/src/lib/actions/add-leads-to-campaign.js.map +1 -0
- package/src/lib/actions/create-campaign.d.ts +5 -0
- package/src/lib/actions/create-campaign.d.ts.map +1 -0
- package/src/lib/actions/create-campaign.js +43 -0
- package/src/lib/actions/create-campaign.js.map +1 -0
- package/src/lib/actions/get-campaign-statistics.d.ts +4 -0
- package/src/lib/actions/get-campaign-statistics.d.ts.map +1 -0
- package/src/lib/actions/get-campaign-statistics.js +33 -0
- package/src/lib/actions/get-campaign-statistics.js.map +1 -0
- package/src/lib/actions/update-campaign-settings.d.ts +11 -0
- package/src/lib/actions/update-campaign-settings.d.ts.map +1 -0
- package/src/lib/actions/update-campaign-settings.js +97 -0
- package/src/lib/actions/update-campaign-settings.js.map +1 -0
- package/src/lib/auth.d.ts +2 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +44 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/client.d.ts +10 -0
- package/src/lib/common/client.d.ts.map +1 -0
- package/src/lib/common/client.js +30 -0
- package/src/lib/common/client.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-smartlead",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@activepieces/pieces-common": "0.12.0",
|
|
9
|
+
"@activepieces/pieces-framework": "0.26.0",
|
|
10
|
+
"@activepieces/shared": "0.47.0",
|
|
11
|
+
"tslib": "2.6.2"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
15
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/i18n/de.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Leistungsstarke Plattform für Kaltakquise per E-Mail mit Rotation mehrerer Konten, E-Mail-Warmup, gemeinsamem Posteingang und erweiterten Analysen.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "So erhältst du deinen API-Schlüssel:\n1. Melde dich bei deinem SmartLead-Konto an\n2. Gehe zu **Einstellungen → Allgemeine Einstellungen → API**\n3. Kopiere deinen API-Schlüssel\n\nDer API-Schlüssel wird bei allen API-Anfragen als Query-Parameter übergeben.",
|
|
5
|
+
"API Key": "API-Schlüssel",
|
|
6
|
+
"Create Campaign": "Kampagne erstellen",
|
|
7
|
+
"Add Leads to Campaign": "Leads zur Kampagne hinzufügen",
|
|
8
|
+
"Get Campaign Statistics": "Kampagnenstatistiken abrufen",
|
|
9
|
+
"Update Campaign Settings": "Kampagneneinstellungen aktualisieren",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Erstelle eine neue Kaltakquise-Kampagne in SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Füge einer Kampagne einen oder mehrere Leads mit Validierung und Deduplizierung hinzu. Maximal 400 Leads pro Anfrage.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Rufe umfassende Analysen für eine Kampagne ab, einschließlich Öffnungsraten, Klickraten, Antwortraten und Engagement-Statistiken.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Aktualisiere Kampagneneinstellungen einschließlich Tracking, Versandlimits und Stoppbedingungen.",
|
|
14
|
+
"Campaign Name": "Kampagnenname",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "Kunden-ID",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "Kampagnen-ID",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Lead-Liste",
|
|
23
|
+
"Ignore Global Block List": "Globale Sperrliste ignorieren",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Abmeldeliste ignorieren",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Duplikate in anderen Kampagnen ignorieren",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Community-Bounce-Liste ignorieren",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Öffnungen verfolgen",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Klicks verfolgen",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Bedingung zum Stoppen von Leads",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "KI-ESP-Zuordnung aktivieren",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Als Klartext senden",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Follow-up-Prozentsatz",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/es.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Potente plataforma de alcance por correo en frío con rotación de múltiples cuentas, calentamiento de correo, bandeja unificada y analíticas avanzadas.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "Para obtener tu clave API:\n1. Inicia sesión en tu cuenta de SmartLead\n2. Ve a **Configuración → Configuración general → API**\n3. Copia tu clave API\n\nLa clave API se envía como parámetro de consulta en todas las solicitudes a la API.",
|
|
5
|
+
"API Key": "Clave API",
|
|
6
|
+
"Create Campaign": "Crear campaña",
|
|
7
|
+
"Add Leads to Campaign": "Agregar leads a la campaña",
|
|
8
|
+
"Get Campaign Statistics": "Obtener estadísticas de la campaña",
|
|
9
|
+
"Update Campaign Settings": "Actualizar configuración de la campaña",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Crea una nueva campaña de correo en frío en SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Agrega uno o más leads a una campaña con validación y eliminación de duplicados. Máximo 400 leads por solicitud.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Obtén analíticas completas de una campaña, incluidas tasas de apertura, clics, respuestas y estadísticas de interacción.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Actualiza la configuración de la campaña, incluido el seguimiento, los límites de envío y las condiciones de detención.",
|
|
14
|
+
"Campaign Name": "Nombre de la campaña",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "ID del cliente",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "ID de la campaña",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Lista de leads",
|
|
23
|
+
"Ignore Global Block List": "Ignorar lista global de bloqueo",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Ignorar lista de cancelación de suscripción",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Ignorar duplicados en otras campañas",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Ignorar lista comunitaria de rebotes",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Rastrear aperturas",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Rastrear clics",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Condición para detener leads",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "Habilitar coincidencia de ESP con IA",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Enviar como texto sin formato",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Porcentaje de seguimiento",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/fr.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Puissante plateforme de prospection par email à froid avec rotation multi-comptes, échauffement des emails, boîte de réception unifiée et analyses avancées.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "Pour obtenir votre clé API :\n1. Connectez-vous à votre compte SmartLead\n2. Allez dans **Paramètres → Paramètres généraux → API**\n3. Copiez votre clé API\n\nLa clé API est transmise comme paramètre de requête dans tous les appels API.",
|
|
5
|
+
"API Key": "Clé API",
|
|
6
|
+
"Create Campaign": "Créer une campagne",
|
|
7
|
+
"Add Leads to Campaign": "Ajouter des prospects à la campagne",
|
|
8
|
+
"Get Campaign Statistics": "Obtenir les statistiques de la campagne",
|
|
9
|
+
"Update Campaign Settings": "Mettre à jour les paramètres de la campagne",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Créez une nouvelle campagne d’emailing à froid dans SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Ajoutez un ou plusieurs prospects à une campagne avec validation et déduplication. Maximum 400 prospects par requête.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Récupérez des analyses complètes pour une campagne, y compris les taux d’ouverture, de clic, de réponse et les statistiques d’engagement.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Mettez à jour les paramètres de la campagne, y compris le suivi, les limites d’envoi et les conditions d’arrêt.",
|
|
14
|
+
"Campaign Name": "Nom de la campagne",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "ID client",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "ID de campagne",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Liste de prospects",
|
|
23
|
+
"Ignore Global Block List": "Ignorer la liste globale de blocage",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Ignorer la liste de désabonnement",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Ignorer les doublons dans les autres campagnes",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Ignorer la liste communautaire des rebonds",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Suivre les ouvertures",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Suivre les clics",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Condition d’arrêt pour les prospects",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "Activer l’association ESP par IA",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Envoyer en texte brut",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Pourcentage de relance",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/it.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Potente piattaforma di outreach email a freddo con rotazione multi-account, riscaldamento email, casella unificata e analisi avanzate.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "Per ottenere la tua chiave API:\n1. Accedi al tuo account SmartLead\n2. Vai su **Impostazioni → Impostazioni generali → API**\n3. Copia la tua chiave API\n\nLa chiave API viene passata come parametro di query in tutte le richieste API.",
|
|
5
|
+
"API Key": "Chiave API",
|
|
6
|
+
"Create Campaign": "Crea campagna",
|
|
7
|
+
"Add Leads to Campaign": "Aggiungi lead alla campagna",
|
|
8
|
+
"Get Campaign Statistics": "Ottieni statistiche della campagna",
|
|
9
|
+
"Update Campaign Settings": "Aggiorna impostazioni della campagna",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Crea una nuova campagna email a freddo in SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Aggiungi uno o più lead a una campagna con validazione e deduplicazione. Massimo 400 lead per richiesta.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Recupera analisi complete per una campagna, incluse percentuali di apertura, clic, risposta e statistiche di coinvolgimento.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Aggiorna le impostazioni della campagna, inclusi tracciamento, limiti di invio e condizioni di arresto.",
|
|
14
|
+
"Campaign Name": "Nome campagna",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "ID cliente",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "ID campagna",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Elenco lead",
|
|
23
|
+
"Ignore Global Block List": "Ignora lista globale di blocco",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Ignora lista di disiscrizione",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Ignora duplicati in altre campagne",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Ignora lista bounce della community",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Traccia aperture",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Traccia clic",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Condizione di arresto lead",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "Abilita abbinamento ESP con IA",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Invia come testo semplice",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Percentuale di follow-up",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/ja.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "複数アカウントのローテーション、メールウォームアップ、統合受信箱、高度な分析を備えた強力なコールドメール配信プラットフォーム。",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "APIキーを取得するには:\n1. SmartLeadアカウントにログインします\n2. **Settings → General Settings → API** に移動します\n3. APIキーをコピーします\n\nAPIキーはすべてのAPIリクエストでクエリパラメータとして送信されます。",
|
|
5
|
+
"API Key": "APIキー",
|
|
6
|
+
"Create Campaign": "キャンペーンを作成",
|
|
7
|
+
"Add Leads to Campaign": "リードをキャンペーンに追加",
|
|
8
|
+
"Get Campaign Statistics": "キャンペーン統計を取得",
|
|
9
|
+
"Update Campaign Settings": "キャンペーン設定を更新",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "SmartLeadで新しいコールドメールキャンペーンを作成します",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "検証と重複排除を行いながら、1件以上のリードをキャンペーンに追加します。1リクエストあたり最大400件です。",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "開封率、クリック率、返信率、エンゲージメント統計を含む包括的なキャンペーン分析を取得します。",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "トラッキング、送信制限、停止条件を含むキャンペーン設定を更新します。",
|
|
14
|
+
"Campaign Name": "キャンペーン名",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "クライアントID",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "キャンペーンID",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "リード一覧",
|
|
23
|
+
"Ignore Global Block List": "グローバルブロックリストを無視",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "配信停止リストを無視",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "他のキャンペーン内の重複を無視",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "コミュニティバウンスリストを無視",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "開封を追跡",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "クリックを追跡",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "リード停止条件",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "AI ESPマッチングを有効化",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "プレーンテキストで送信",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "フォローアップ率",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/pt.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Plataforma poderosa de prospecção por e-mail frio com rotação de múltiplas contas, aquecimento de e-mail, caixa de entrada unificada e análises avançadas.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "Para obter sua chave de API:\n1. Faça login na sua conta SmartLead\n2. Vá para **Configurações → Configurações gerais → API**\n3. Copie sua chave de API\n\nA chave de API é enviada como parâmetro de consulta em todas as requisições da API.",
|
|
5
|
+
"API Key": "Chave de API",
|
|
6
|
+
"Create Campaign": "Criar campanha",
|
|
7
|
+
"Add Leads to Campaign": "Adicionar leads à campanha",
|
|
8
|
+
"Get Campaign Statistics": "Obter estatísticas da campanha",
|
|
9
|
+
"Update Campaign Settings": "Atualizar configurações da campanha",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Crie uma nova campanha de e-mail frio no SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Adicione um ou mais leads a uma campanha com validação e remoção de duplicados. Máximo de 400 leads por requisição.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Recupere análises completas de uma campanha, incluindo taxas de abertura, cliques, respostas e estatísticas de engajamento.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Atualize as configurações da campanha, incluindo rastreamento, limites de envio e condições de parada.",
|
|
14
|
+
"Campaign Name": "Nome da campanha",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "ID do cliente",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "ID da campanha",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Lista de leads",
|
|
23
|
+
"Ignore Global Block List": "Ignorar lista global de bloqueio",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Ignorar lista de descadastro",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Ignorar duplicados em outras campanhas",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Ignorar lista comunitária de bounces",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Rastrear aberturas",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Rastrear cliques",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Condição para interromper leads",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "Ativar correspondência de ESP com IA",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Enviar como texto simples",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Percentual de follow-up",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n",
|
|
5
|
+
"API Key": "API Key",
|
|
6
|
+
"Create Campaign": "Create Campaign",
|
|
7
|
+
"Add Leads to Campaign": "Add Leads to Campaign",
|
|
8
|
+
"Get Campaign Statistics": "Get Campaign Statistics",
|
|
9
|
+
"Update Campaign Settings": "Update Campaign Settings",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "Create a new cold email campaign in SmartLead",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "Update campaign settings including tracking, stop conditions, and deliverability options.",
|
|
14
|
+
"Campaign Name": "Campaign Name",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "Client ID",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "Campaign ID",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "Lead List",
|
|
23
|
+
"Ignore Global Block List": "Ignore Global Block List",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "Ignore Unsubscribe List",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "Ignore Duplicates in Other Campaigns",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "Ignore Community Bounce List",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "Track Opens",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "Track Clicks",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "Stop Lead Condition",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "Enable AI ESP Matching",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "Send as Plain Text",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "Follow Up Percentage",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/i18n/zh.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"SmartLead": "SmartLead",
|
|
3
|
+
"Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.": "强大的冷邮件外联平台,支持多账户轮换、邮箱预热、统一收件箱和高级分析。",
|
|
4
|
+
"To obtain your API key:\n1. Log in to your SmartLead account\n2. Go to **Profile -> Settings → API Key **\n3. Copy your API key\n\nThe API key is passed as a query parameter to all API requests.\n": "获取 API 密钥的方法:\n1. 登录你的 SmartLead 账户\n2. 进入 **Settings → General Settings → API**\n3. 复制你的 API 密钥\n\nAPI 密钥会作为查询参数传递给所有 API 请求。",
|
|
5
|
+
"API Key": "API 密钥",
|
|
6
|
+
"Create Campaign": "创建活动",
|
|
7
|
+
"Add Leads to Campaign": "将潜在客户添加到活动",
|
|
8
|
+
"Get Campaign Statistics": "获取活动统计",
|
|
9
|
+
"Update Campaign Settings": "更新活动设置",
|
|
10
|
+
"Create a new cold email campaign in SmartLead": "在 SmartLead 中创建新的冷邮件活动",
|
|
11
|
+
"Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.": "向活动中添加一个或多个潜在客户,并进行校验与去重。每次请求最多 400 个潜在客户。",
|
|
12
|
+
"Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.": "获取活动的完整分析数据,包括打开率、点击率、回复率和互动统计。",
|
|
13
|
+
"Update campaign settings including tracking, stop conditions, and deliverability options.": "更新活动设置,包括跟踪、发送限制和停止条件。",
|
|
14
|
+
"Campaign Name": "活动名称",
|
|
15
|
+
"Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.": "Name of the campaign. Defaults to \"Untitled Campaign\" if not provided.",
|
|
16
|
+
"Client ID": "客户 ID",
|
|
17
|
+
"Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.": "Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.",
|
|
18
|
+
"Campaign ID": "活动 ID",
|
|
19
|
+
"The ID of the campaign to add leads to": "The ID of the campaign to add leads to",
|
|
20
|
+
"The ID of the campaign to get statistics for": "The ID of the campaign to get statistics for",
|
|
21
|
+
"The ID of the campaign to update": "The ID of the campaign to update",
|
|
22
|
+
"Lead List": "潜在客户列表",
|
|
23
|
+
"Ignore Global Block List": "忽略全局阻止列表",
|
|
24
|
+
"Skip global block list validation": "Skip global block list validation",
|
|
25
|
+
"Ignore Unsubscribe List": "忽略退订列表",
|
|
26
|
+
"Include previously unsubscribed leads": "Include previously unsubscribed leads",
|
|
27
|
+
"Ignore Duplicates in Other Campaigns": "忽略其他活动中的重复项",
|
|
28
|
+
"Allow the same lead in multiple campaigns": "Allow the same lead in multiple campaigns",
|
|
29
|
+
"Ignore Community Bounce List": "忽略社区退信列表",
|
|
30
|
+
"Skip community bounce list check": "Skip community bounce list check",
|
|
31
|
+
"Track Opens": "跟踪打开",
|
|
32
|
+
"Enable email open tracking": "Enable email open tracking",
|
|
33
|
+
"Track Clicks": "跟踪点击",
|
|
34
|
+
"Enable link click tracking": "Enable link click tracking",
|
|
35
|
+
"Stop Lead Condition": "停止潜在客户条件",
|
|
36
|
+
"When to stop emailing a lead": "When to stop emailing a lead",
|
|
37
|
+
"Unsubscribe Text": "Unsubscribe Text",
|
|
38
|
+
"Custom unsubscribe text added to campaign emails": "Custom unsubscribe text added to campaign emails",
|
|
39
|
+
"Enable AI ESP Matching": "启用 AI ESP 匹配",
|
|
40
|
+
"Use AI to intelligently pair leads with optimal email accounts": "Use AI to intelligently pair leads with optimal email accounts",
|
|
41
|
+
"Send as Plain Text": "以纯文本发送",
|
|
42
|
+
"Send emails as plain text for better deliverability with technical audiences": "Send emails as plain text for better deliverability with technical audiences",
|
|
43
|
+
"Follow Up Percentage": "跟进百分比",
|
|
44
|
+
"Percentage of leads to follow up with (0-100)": "Percentage of leads to follow up with (0-100)"
|
|
45
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS,mHAwBpB,CAAC"}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.smartlead = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
+
const auth_1 = require("./lib/auth");
|
|
9
|
+
const client_1 = require("./lib/common/client");
|
|
10
|
+
const create_campaign_1 = require("./lib/actions/create-campaign");
|
|
11
|
+
const add_leads_to_campaign_1 = require("./lib/actions/add-leads-to-campaign");
|
|
12
|
+
const get_campaign_statistics_1 = require("./lib/actions/get-campaign-statistics");
|
|
13
|
+
const update_campaign_settings_1 = require("./lib/actions/update-campaign-settings");
|
|
14
|
+
exports.smartlead = (0, pieces_framework_1.createPiece)({
|
|
15
|
+
displayName: 'SmartLead',
|
|
16
|
+
description: 'Powerful cold email outreach platform with multi-account rotation, email warmup, unified inbox, and advanced analytics.',
|
|
17
|
+
auth: auth_1.smartleadAuth,
|
|
18
|
+
minimumSupportedRelease: '0.36.1',
|
|
19
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/smartlead.png',
|
|
20
|
+
categories: [shared_1.PieceCategory.MARKETING, shared_1.PieceCategory.SALES_AND_CRM],
|
|
21
|
+
authors: ['Harmatta'],
|
|
22
|
+
actions: [
|
|
23
|
+
create_campaign_1.createCampaignAction,
|
|
24
|
+
add_leads_to_campaign_1.addLeadsToCampaignAction,
|
|
25
|
+
get_campaign_statistics_1.getCampaignStatisticsAction,
|
|
26
|
+
update_campaign_settings_1.updateCampaignSettingsAction,
|
|
27
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
28
|
+
auth: auth_1.smartleadAuth,
|
|
29
|
+
baseUrl: () => client_1.BASE_URL,
|
|
30
|
+
authLocation: 'queryParams',
|
|
31
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
return ({
|
|
33
|
+
api_key: auth.secret_text,
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
triggers: [],
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,+DAAwE;AAExE,qCAA2C;AAC3C,gDAA+C;AAC/C,mEAAqE;AACrE,+EAA+E;AAC/E,mFAAoF;AACpF,qFAAsF;AAEzE,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC;IACnC,WAAW,EAAE,WAAW;IACxB,WAAW,EACT,yHAAyH;IAC3H,IAAI,EAAE,oBAAa;IACnB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,mDAAmD;IAC5D,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,EAAE,sBAAa,CAAC,aAAa,CAAC;IAClE,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,OAAO,EAAE;QACP,sCAAoB;QACpB,gDAAwB;QACxB,qDAA2B;QAC3B,uDAA4B;QAC5B,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,oBAAa;YACnB,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAQ;YACvB,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,OAAO,EAAE,IAAI,CAAC,WAAW;iBAC1B,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const addLeadsToCampaignAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
campaign_id: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
3
|
+
lead_list: import("@activepieces/pieces-framework").JsonProperty<true>;
|
|
4
|
+
ignore_global_block_list: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
+
ignore_unsubscribe_list: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
+
ignore_duplicate_leads_in_other_campaign: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
+
ignore_community_bounce_list: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=add-leads-to-campaign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-leads-to-campaign.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/add-leads-to-campaign.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;;;;;;EAuHnC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addLeadsToCampaignAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
exports.addLeadsToCampaignAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.smartleadAuth,
|
|
11
|
+
name: 'add_leads_to_campaign',
|
|
12
|
+
displayName: 'Add Leads to Campaign',
|
|
13
|
+
description: 'Add one or more leads to a campaign with validation and deduplication. Maximum 400 leads per request.',
|
|
14
|
+
props: {
|
|
15
|
+
campaign_id: pieces_framework_1.Property.Number({
|
|
16
|
+
displayName: 'Campaign ID',
|
|
17
|
+
description: 'The ID of the campaign to add leads to',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
lead_list: pieces_framework_1.Property.Json({
|
|
21
|
+
displayName: 'Lead List',
|
|
22
|
+
description: `Array of lead objects. Each lead must have an "email" field. Optional fields: first_name, last_name, phone_number, company_name, website, location, linkedin_profile, company_url, custom_fields (object).
|
|
23
|
+
|
|
24
|
+
Example:
|
|
25
|
+
\`\`\`json
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
"email": "john@example.com",
|
|
29
|
+
"first_name": "John",
|
|
30
|
+
"last_name": "Doe",
|
|
31
|
+
"company_name": "Acme Corp",
|
|
32
|
+
"custom_fields": { "job_title": "CEO" }
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
\`\`\``,
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
ignore_global_block_list: pieces_framework_1.Property.Checkbox({
|
|
39
|
+
displayName: 'Ignore Global Block List',
|
|
40
|
+
description: 'Skip global block list validation',
|
|
41
|
+
required: false,
|
|
42
|
+
defaultValue: false,
|
|
43
|
+
}),
|
|
44
|
+
ignore_unsubscribe_list: pieces_framework_1.Property.Checkbox({
|
|
45
|
+
displayName: 'Ignore Unsubscribe List',
|
|
46
|
+
description: 'Include previously unsubscribed leads',
|
|
47
|
+
required: false,
|
|
48
|
+
defaultValue: false,
|
|
49
|
+
}),
|
|
50
|
+
ignore_duplicate_leads_in_other_campaign: pieces_framework_1.Property.Checkbox({
|
|
51
|
+
displayName: 'Ignore Duplicates in Other Campaigns',
|
|
52
|
+
description: 'Allow the same lead in multiple campaigns',
|
|
53
|
+
required: false,
|
|
54
|
+
defaultValue: false,
|
|
55
|
+
}),
|
|
56
|
+
ignore_community_bounce_list: pieces_framework_1.Property.Checkbox({
|
|
57
|
+
displayName: 'Ignore Community Bounce List',
|
|
58
|
+
description: 'Skip community bounce list check',
|
|
59
|
+
required: false,
|
|
60
|
+
defaultValue: false,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
run(context) {
|
|
64
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const { campaign_id, lead_list, ignore_global_block_list, ignore_unsubscribe_list, ignore_duplicate_leads_in_other_campaign, ignore_community_bounce_list, } = context.propsValue;
|
|
66
|
+
const apiKey = context.auth.secret_text;
|
|
67
|
+
const leads = typeof lead_list === 'string'
|
|
68
|
+
? JSON.parse(lead_list)
|
|
69
|
+
: lead_list;
|
|
70
|
+
if (!Array.isArray(leads)) {
|
|
71
|
+
throw new Error('lead_list must be a JSON array of lead objects with at least an "email" field');
|
|
72
|
+
}
|
|
73
|
+
if (leads.length === 0) {
|
|
74
|
+
throw new Error('lead_list must contain at least one lead.');
|
|
75
|
+
}
|
|
76
|
+
if (leads.length > 400) {
|
|
77
|
+
throw new Error(`Maximum 400 leads per request. Got ${leads.length}. Split into multiple requests.`);
|
|
78
|
+
}
|
|
79
|
+
for (let i = 0; i < leads.length; i++) {
|
|
80
|
+
if (!leads[i].email || typeof leads[i].email !== 'string') {
|
|
81
|
+
throw new Error(`Lead at index ${i} is missing a required "email" field.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const body = {
|
|
85
|
+
lead_list: leads,
|
|
86
|
+
};
|
|
87
|
+
const settings = {};
|
|
88
|
+
if (ignore_global_block_list)
|
|
89
|
+
settings['ignore_global_block_list'] = true;
|
|
90
|
+
if (ignore_unsubscribe_list)
|
|
91
|
+
settings['ignore_unsubscribe_list'] = true;
|
|
92
|
+
if (ignore_duplicate_leads_in_other_campaign)
|
|
93
|
+
settings['ignore_duplicate_leads_in_other_campaign'] = true;
|
|
94
|
+
if (ignore_community_bounce_list)
|
|
95
|
+
settings['ignore_community_bounce_list'] = true;
|
|
96
|
+
if (Object.keys(settings).length > 0) {
|
|
97
|
+
body['settings'] = settings;
|
|
98
|
+
}
|
|
99
|
+
return yield (0, client_1.smartleadRequest)({
|
|
100
|
+
endpoint: `campaigns/${campaign_id}/leads`,
|
|
101
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
102
|
+
apiKey,
|
|
103
|
+
body,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=add-leads-to-campaign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-leads-to-campaign.js","sourceRoot":"","sources":["../../../../src/lib/actions/add-leads-to-campaign.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const createCampaignAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
client_id: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
4
|
+
}>;
|
|
5
|
+
//# sourceMappingURL=create-campaign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-campaign.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-campaign.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;EAmC/B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCampaignAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
exports.createCampaignAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.smartleadAuth,
|
|
11
|
+
name: 'create_campaign',
|
|
12
|
+
displayName: 'Create Campaign',
|
|
13
|
+
description: 'Create a new cold email campaign in SmartLead',
|
|
14
|
+
props: {
|
|
15
|
+
name: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Campaign Name',
|
|
17
|
+
description: 'Name of the campaign. Defaults to "Untitled Campaign" if not provided.',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
client_id: pieces_framework_1.Property.Number({
|
|
21
|
+
displayName: 'Client ID',
|
|
22
|
+
description: 'Associate the campaign with a specific client (for agency/white-label accounts). Leave empty to use your default.',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const { name, client_id } = context.propsValue;
|
|
29
|
+
const apiKey = context.auth.secret_text;
|
|
30
|
+
const body = { name };
|
|
31
|
+
if (client_id !== undefined && client_id !== null) {
|
|
32
|
+
body['client_id'] = client_id;
|
|
33
|
+
}
|
|
34
|
+
return yield (0, client_1.smartleadRequest)({
|
|
35
|
+
endpoint: 'campaigns/create',
|
|
36
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
37
|
+
apiKey,
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=create-campaign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-campaign.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-campaign.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6CAAoD;AACpD,kCAAwC;AAE3B,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,wEAAwE;YAC1E,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACzB,WAAW,EAAE,WAAW;YACxB,WAAW,EACT,mHAAmH;YACrH,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;YAExC,MAAM,IAAI,GAA4B,EAAE,IAAI,EAAE,CAAC;YAC/C,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;gBAClD,IAAI,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;YAChC,CAAC;YAED,OAAO,MAAM,IAAA,yBAAgB,EAAC;gBAC5B,QAAQ,EAAE,kBAAkB;gBAC5B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,MAAM;gBACN,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getCampaignStatisticsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
campaign_id: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=get-campaign-statistics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-campaign-statistics.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-campaign-statistics.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B;;EAuBtC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCampaignStatisticsAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
exports.getCampaignStatisticsAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.smartleadAuth,
|
|
11
|
+
name: 'get_campaign_statistics',
|
|
12
|
+
displayName: 'Get Campaign Statistics',
|
|
13
|
+
description: 'Retrieve comprehensive analytics for a campaign including open rates, click rates, reply rates, and engagement statistics.',
|
|
14
|
+
props: {
|
|
15
|
+
campaign_id: pieces_framework_1.Property.Number({
|
|
16
|
+
displayName: 'Campaign ID',
|
|
17
|
+
description: 'The ID of the campaign to get statistics for',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { campaign_id } = context.propsValue;
|
|
24
|
+
const apiKey = context.auth.secret_text;
|
|
25
|
+
return yield (0, client_1.smartleadRequest)({
|
|
26
|
+
endpoint: `campaigns/${campaign_id}/analytics`,
|
|
27
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
28
|
+
apiKey,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=get-campaign-statistics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-campaign-statistics.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-campaign-statistics.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6CAAoD;AACpD,kCAAwC;AAE3B,QAAA,2BAA2B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EACT,4HAA4H;IAC9H,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC3B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;YAExC,OAAO,MAAM,IAAA,yBAAgB,EAAC;gBAC5B,QAAQ,EAAE,aAAa,WAAW,YAAY;gBAC9C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const updateCampaignSettingsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
campaign_id: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
3
|
+
track_open: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
track_click: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
+
stop_lead_settings: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
6
|
+
unsubscribe_text: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
7
|
+
enable_ai_esp_matching: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
+
send_as_plain_text: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
9
|
+
follow_up_percentage: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=update-campaign-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-campaign-settings.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-campaign-settings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B;;;;;;;;;EA8GvC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateCampaignSettingsAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
|
+
exports.updateCampaignSettingsAction = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.smartleadAuth,
|
|
11
|
+
name: 'update_campaign_settings',
|
|
12
|
+
displayName: 'Update Campaign Settings',
|
|
13
|
+
description: 'Update campaign settings including tracking, stop conditions, and deliverability options.',
|
|
14
|
+
props: {
|
|
15
|
+
campaign_id: pieces_framework_1.Property.Number({
|
|
16
|
+
displayName: 'Campaign ID',
|
|
17
|
+
description: 'The ID of the campaign to update',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
track_open: pieces_framework_1.Property.Checkbox({
|
|
21
|
+
displayName: 'Track Opens',
|
|
22
|
+
description: 'Enable email open tracking',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
track_click: pieces_framework_1.Property.Checkbox({
|
|
26
|
+
displayName: 'Track Clicks',
|
|
27
|
+
description: 'Enable link click tracking',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
stop_lead_settings: pieces_framework_1.Property.StaticDropdown({
|
|
31
|
+
displayName: 'Stop Lead Condition',
|
|
32
|
+
description: 'When to stop emailing a lead',
|
|
33
|
+
required: false,
|
|
34
|
+
options: {
|
|
35
|
+
options: [
|
|
36
|
+
{ label: 'Reply to an email', value: 'REPLY_TO_AN_EMAIL' },
|
|
37
|
+
{ label: 'Opened email', value: 'OPENED_EMAIL' },
|
|
38
|
+
{ label: 'Clicked link', value: 'CLICKED_LINK' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
unsubscribe_text: pieces_framework_1.Property.LongText({
|
|
43
|
+
displayName: 'Unsubscribe Text',
|
|
44
|
+
description: 'Custom unsubscribe text added to campaign emails',
|
|
45
|
+
required: false,
|
|
46
|
+
}),
|
|
47
|
+
enable_ai_esp_matching: pieces_framework_1.Property.Checkbox({
|
|
48
|
+
displayName: 'Enable AI ESP Matching',
|
|
49
|
+
description: 'Use AI to intelligently pair leads with optimal email accounts',
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
52
|
+
send_as_plain_text: pieces_framework_1.Property.Checkbox({
|
|
53
|
+
displayName: 'Send as Plain Text',
|
|
54
|
+
description: 'Send emails as plain text for better deliverability with technical audiences',
|
|
55
|
+
required: false,
|
|
56
|
+
}),
|
|
57
|
+
follow_up_percentage: pieces_framework_1.Property.Number({
|
|
58
|
+
displayName: 'Follow Up Percentage',
|
|
59
|
+
description: 'Percentage of leads to follow up with (0-100)',
|
|
60
|
+
required: false,
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
run(context) {
|
|
64
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const { campaign_id, track_open, track_click, stop_lead_settings, unsubscribe_text, enable_ai_esp_matching, send_as_plain_text, follow_up_percentage, } = context.propsValue;
|
|
66
|
+
const apiKey = context.auth.secret_text;
|
|
67
|
+
const body = {};
|
|
68
|
+
if (track_open !== undefined || track_click !== undefined) {
|
|
69
|
+
body['track_settings'] = Object.assign(Object.assign({}, (track_open !== undefined && { track_open })), (track_click !== undefined && { track_click }));
|
|
70
|
+
}
|
|
71
|
+
if (stop_lead_settings !== undefined)
|
|
72
|
+
body['stop_lead_settings'] = stop_lead_settings;
|
|
73
|
+
if (unsubscribe_text !== undefined && unsubscribe_text !== '')
|
|
74
|
+
body['unsubscribe_text'] = unsubscribe_text;
|
|
75
|
+
if (enable_ai_esp_matching !== undefined)
|
|
76
|
+
body['enable_ai_esp_matching'] = enable_ai_esp_matching;
|
|
77
|
+
if (send_as_plain_text !== undefined)
|
|
78
|
+
body['send_as_plain_text'] = send_as_plain_text;
|
|
79
|
+
if (follow_up_percentage !== undefined) {
|
|
80
|
+
if (follow_up_percentage < 0 || follow_up_percentage > 100) {
|
|
81
|
+
throw new Error(`follow_up_percentage must be between 0 and 100. Got ${follow_up_percentage}.`);
|
|
82
|
+
}
|
|
83
|
+
body['follow_up_percentage'] = follow_up_percentage;
|
|
84
|
+
}
|
|
85
|
+
if (Object.keys(body).length === 0) {
|
|
86
|
+
throw new Error('At least one setting must be provided to update.');
|
|
87
|
+
}
|
|
88
|
+
return yield (0, client_1.smartleadRequest)({
|
|
89
|
+
endpoint: `campaigns/${campaign_id}/settings`,
|
|
90
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
91
|
+
apiKey,
|
|
92
|
+
body,
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=update-campaign-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-campaign-settings.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-campaign-settings.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,mEAyBxB,CAAC"}
|
package/src/lib/auth.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.smartleadAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const client_1 = require("./common/client");
|
|
8
|
+
const markdownDescription = `
|
|
9
|
+
To obtain your API key:
|
|
10
|
+
1. Log in to your SmartLead account
|
|
11
|
+
2. Go to **Profile -> Settings → API Key **
|
|
12
|
+
3. Copy your API key
|
|
13
|
+
|
|
14
|
+
The API key is passed as a query parameter to all API requests.
|
|
15
|
+
`;
|
|
16
|
+
exports.smartleadAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
17
|
+
displayName: 'API Key',
|
|
18
|
+
description: markdownDescription,
|
|
19
|
+
required: true,
|
|
20
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
21
|
+
var _b;
|
|
22
|
+
try {
|
|
23
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
24
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
25
|
+
url: `${client_1.BASE_URL}/campaigns`,
|
|
26
|
+
queryParams: {
|
|
27
|
+
api_key: auth,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
return { valid: true };
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const status = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status;
|
|
34
|
+
if (status === 401 || status === 403) {
|
|
35
|
+
return {
|
|
36
|
+
valid: false,
|
|
37
|
+
error: 'Invalid API key. Please check your Smartlead API credentials.',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,+DAAqE;AACrE,4CAA2C;AAE3C,MAAM,mBAAmB,GAAG;;;;;;;CAO3B,CAAC;AAEW,QAAA,aAAa,GAAG,4BAAS,CAAC,UAAU,CAAC;IAChD,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,mBAAmB;IAChC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;;QACvB,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,iBAAQ,YAAY;gBAC5B,WAAW,EAAE;oBACX,OAAO,EAAE,IAAI;iBACd;aACF,CAAC,CAAC;YACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,MAAC,KAA4C,aAA5C,KAAK,uBAAL,KAAK,CAAyC,QAAQ,0CAAE,MAAM,CAAC;YAC/E,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrC,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,+DAA+D;iBACvE,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpMethod } from '@activepieces/pieces-common';
|
|
2
|
+
export declare const BASE_URL = "https://server.smartlead.ai/api/v1";
|
|
3
|
+
export declare function smartleadRequest<T = Record<string, unknown>>({ endpoint, method, apiKey, body, queryParams, }: {
|
|
4
|
+
endpoint: string;
|
|
5
|
+
method: HttpMethod;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
body?: Record<string, unknown>;
|
|
8
|
+
queryParams?: Record<string, string | number | boolean>;
|
|
9
|
+
}): Promise<T>;
|
|
10
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,6BAA6B,CAAC;AAErE,eAAO,MAAM,QAAQ,uCAAuC,CAAC;AAE7D,wBAAsB,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAClE,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAI,EACJ,WAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC,CAAC,CAAC,CAsBb"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BASE_URL = void 0;
|
|
4
|
+
exports.smartleadRequest = smartleadRequest;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
exports.BASE_URL = 'https://server.smartlead.ai/api/v1';
|
|
8
|
+
function smartleadRequest(_a) {
|
|
9
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ endpoint, method, apiKey, body, queryParams = {}, }) {
|
|
10
|
+
const allParams = {
|
|
11
|
+
api_key: apiKey,
|
|
12
|
+
};
|
|
13
|
+
for (const [k, value] of Object.entries(queryParams)) {
|
|
14
|
+
if (value !== undefined && value !== null) {
|
|
15
|
+
allParams[k] = String(value);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
19
|
+
method,
|
|
20
|
+
url: `${exports.BASE_URL}/${endpoint}`,
|
|
21
|
+
headers: {
|
|
22
|
+
'Content-Type': 'application/json',
|
|
23
|
+
},
|
|
24
|
+
queryParams: allParams,
|
|
25
|
+
body,
|
|
26
|
+
});
|
|
27
|
+
return response.body;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,4CAkCC;;AAtCD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,oCAAoC,CAAC;AAE7D,SAAsB,gBAAgB;iEAA8B,EAClE,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAI,EACJ,WAAW,GAAG,EAAE,GAOjB;QACC,MAAM,SAAS,GAA2B;YACxC,OAAO,EAAE,MAAM;SAChB,CAAC;QAEF,KAAK,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;YACrD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBAC1C,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YAC5C,MAAM;YACN,GAAG,EAAE,GAAG,gBAAQ,IAAI,QAAQ,EAAE;YAC9B,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,WAAW,EAAE,SAAS;YACtB,IAAI;SACL,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAS,CAAC;IAC5B,CAAC;CAAA"}
|