@activepieces/piece-tavily 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -22
- package/src/i18n/de.json +24 -1
- package/src/i18n/es.json +24 -1
- package/src/i18n/fr.json +24 -1
- package/src/i18n/ja.json +24 -1
- package/src/i18n/nl.json +24 -1
- package/src/i18n/pt.json +24 -1
- package/src/i18n/translation.json +24 -1
- package/src/i18n/zh.json +24 -1
- package/src/index.d.ts +1 -1
- package/src/index.d.ts.map +1 -0
- package/src/index.js +10 -40
- package/src/index.js.map +1 -1
- package/src/lib/actions/extract.d.ts +1 -0
- package/src/lib/actions/extract.d.ts.map +1 -0
- package/src/lib/actions/extract.js +6 -3
- package/src/lib/actions/extract.js.map +1 -1
- package/src/lib/actions/search.d.ts +1 -0
- package/src/lib/actions/search.d.ts.map +1 -0
- package/src/lib/actions/search.js +6 -3
- package/src/lib/actions/search.js.map +1 -1
- package/src/lib/auth.d.ts +2 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +40 -0
- package/src/lib/auth.js.map +1 -0
- package/README.md +0 -25
package/package.json
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-tavily",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
8
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
9
|
+
},
|
|
4
10
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"axios-retry": "4.4.1",
|
|
9
|
-
"deepmerge-ts": "7.1.0",
|
|
10
|
-
"form-data": "4.0.4",
|
|
11
|
-
"mime-types": "2.1.35",
|
|
12
|
-
"nanoid": "3.3.8",
|
|
13
|
-
"semver": "7.6.0",
|
|
14
|
-
"socket.io-client": "4.8.1",
|
|
15
|
-
"zod": "4.1.13",
|
|
16
|
-
"@activepieces/pieces-common": "0.11.5",
|
|
17
|
-
"@activepieces/pieces-framework": "0.25.3",
|
|
18
|
-
"@activepieces/shared": "0.37.0",
|
|
11
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
+
"@activepieces/pieces-framework": "0.29.0",
|
|
13
|
+
"@activepieces/shared": "0.82.0",
|
|
19
14
|
"tslib": "2.6.2"
|
|
20
|
-
}
|
|
21
|
-
"resolutions": {
|
|
22
|
-
"rollup": "npm:@rollup/wasm-node"
|
|
23
|
-
},
|
|
24
|
-
"types": "./src/index.d.ts",
|
|
25
|
-
"main": "./src/index.js",
|
|
26
|
-
"type": "commonjs"
|
|
15
|
+
}
|
|
27
16
|
}
|
package/src/i18n/de.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nFolge diesen Schritten, um deinen Tavily API Schlüssel zu erhalten:\n\n1. Besuche [tavily](https://tavily.com/) und erstelle ein Konto.\n2. Melden Sie sich an und navigieren Sie zu Ihrem Dashboard.\n3. Suchen und kopieren Sie Ihren API-Schlüssel aus dem Dashboard.\n",
|
|
4
4
|
"Search": "Suche",
|
|
5
5
|
"Extract Content": "Inhalt extrahieren",
|
|
6
|
+
"Custom API Call": "Eigener API-Aufruf",
|
|
6
7
|
"Search for data based on a query.": "Suche nach Daten basierend auf einer Abfrage.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Rohweb-Inhalte von angegebenen URLs abrufen.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
|
8
10
|
"Search Query": "Suchanfrage",
|
|
9
11
|
"Search Depth": "Suchtiefe",
|
|
10
12
|
"Topic": "Thema",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Domains einschließen",
|
|
19
21
|
"Exclude Domains": "Domains ausschließen",
|
|
20
22
|
"URLs": "URLs",
|
|
23
|
+
"Method": "Methode",
|
|
24
|
+
"Headers": "Kopfzeilen",
|
|
25
|
+
"Query Parameters": "Abfrageparameter",
|
|
26
|
+
"Body Type": "Körpertyp",
|
|
27
|
+
"Body": "Körper",
|
|
28
|
+
"Response is Binary ?": "Antwort ist binär?",
|
|
29
|
+
"No Error on Failure": "Kein Fehler bei Fehler",
|
|
30
|
+
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
|
31
|
+
"Follow redirects": "Weiterleitungen folgen",
|
|
21
32
|
"The search query you want to execute with Tavily.": "Die Suchabfrage, die Sie mit Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "Die Tiefe der Suche. Es kann \"Basic\" oder \"fortgeschritten\" sein.",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "Die Kategorie der Suche, die bestimmt, welche unserer Agenten für die Suche verwendet werden.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "Eine Liste von Domains, die von den Suchergebnissen ausgenommen werden sollen.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "Die URLs, die Sie mit Tavily extrahieren möchten.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Fügen Sie eine Liste von Bildern hinzu, die aus den URLs extrahiert wurden.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Aktivieren für Dateien wie PDFs, Bilder usw.",
|
|
35
48
|
"Basic": "Einfache",
|
|
36
49
|
"Advanced": "Erweitert",
|
|
37
50
|
"General": "Allgemein",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Tag (kurz)",
|
|
44
57
|
"Week (Short)": "Woche (Kurz)",
|
|
45
58
|
"Month (Short)": "Monat (Kurz)",
|
|
46
|
-
"Year (Short)": "Jahr (Kurz)"
|
|
59
|
+
"Year (Short)": "Jahr (Kurz)",
|
|
60
|
+
"GET": "ERHALTEN",
|
|
61
|
+
"POST": "POST",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "LÖSCHEN",
|
|
65
|
+
"HEAD": "HEAD",
|
|
66
|
+
"None": "Keine",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Formulardaten",
|
|
69
|
+
"Raw": "Rohe"
|
|
47
70
|
}
|
package/src/i18n/es.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nSigue estos pasos para obtener tu clave API de Tavily:\n\n1. Visita [tavily](https://tavily.com/) y crea una cuenta.\n2. Inicie sesión y vaya a su panel de control.\n3. Localice y copie su clave API del panel de control.\n",
|
|
4
4
|
"Search": "Buscar",
|
|
5
5
|
"Extract Content": "Extraer contenido",
|
|
6
|
+
"Custom API Call": "Llamada API personalizada",
|
|
6
7
|
"Search for data based on a query.": "Buscar datos basados en una consulta.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Recuperar contenido web en bruto de URLs especificadas.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
|
8
10
|
"Search Query": "Buscar consulta",
|
|
9
11
|
"Search Depth": "Profundidad de búsqueda",
|
|
10
12
|
"Topic": "Tema",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Incluye Dominios",
|
|
19
21
|
"Exclude Domains": "Excluir dominios",
|
|
20
22
|
"URLs": "URLs",
|
|
23
|
+
"Method": "Método",
|
|
24
|
+
"Headers": "Encabezados",
|
|
25
|
+
"Query Parameters": "Parámetros de consulta",
|
|
26
|
+
"Body Type": "Tipo de cuerpo",
|
|
27
|
+
"Body": "Cuerpo",
|
|
28
|
+
"Response is Binary ?": "¿Respuesta es binaria?",
|
|
29
|
+
"No Error on Failure": "No hay ningún error en fallo",
|
|
30
|
+
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
|
|
31
|
+
"Follow redirects": "Seguir redirecciones",
|
|
21
32
|
"The search query you want to execute with Tavily.": "La consulta de búsqueda que desea ejecutar con Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "La profundidad de la búsqueda. Puede ser \"básica\" o \"avanzada\".",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "La categoría de la búsqueda. Esto determinará cuál de nuestros agentes será utilizado para la búsqueda.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "Una lista de dominios a excluir específicamente de los resultados de búsqueda.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "Las URL que desea extraer con Tavily.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Incluye una lista de imágenes extraídas de las URLs en la respuesta.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Activar para archivos como PDFs, imágenes, etc.",
|
|
35
48
|
"Basic": "Básico",
|
|
36
49
|
"Advanced": "Avanzado",
|
|
37
50
|
"General": "General",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Día (corto)",
|
|
44
57
|
"Week (Short)": "Semana (corta)",
|
|
45
58
|
"Month (Short)": "Mes (corto)",
|
|
46
|
-
"Year (Short)": "Año (corto)"
|
|
59
|
+
"Year (Short)": "Año (corto)",
|
|
60
|
+
"GET": "RECOGER",
|
|
61
|
+
"POST": "POST",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "BORRAR",
|
|
65
|
+
"HEAD": "LIMPIO",
|
|
66
|
+
"None": "Ninguna",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Datos de Formulario",
|
|
69
|
+
"Raw": "Rápido"
|
|
47
70
|
}
|
package/src/i18n/fr.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n",
|
|
4
4
|
"Search": "Rechercher",
|
|
5
5
|
"Extract Content": "Extraire le contenu",
|
|
6
|
+
"Custom API Call": "Appel d'API personnalisé",
|
|
6
7
|
"Search for data based on a query.": "Recherche de données basées sur une requête.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Récupérer le contenu web brut à partir d'URL spécifiées.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
|
8
10
|
"Search Query": "Requête de recherche",
|
|
9
11
|
"Search Depth": "Profondeur de recherche",
|
|
10
12
|
"Topic": "Sujet",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Inclure les domaines",
|
|
19
21
|
"Exclude Domains": "Exclure les domaines",
|
|
20
22
|
"URLs": "URLs",
|
|
23
|
+
"Method": "Méthode",
|
|
24
|
+
"Headers": "Headers",
|
|
25
|
+
"Query Parameters": "Paramètres de requête",
|
|
26
|
+
"Body Type": "Body Type",
|
|
27
|
+
"Body": "Body",
|
|
28
|
+
"Response is Binary ?": "La réponse est Binaire ?",
|
|
29
|
+
"No Error on Failure": "Aucune erreur en cas d'échec",
|
|
30
|
+
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
|
31
|
+
"Follow redirects": "Suivre les redirections",
|
|
21
32
|
"The search query you want to execute with Tavily.": "La requête de recherche que vous voulez exécuter avec Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "La profondeur de la recherche. Elle peut être « basique » ou « avancée ».",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "La catégorie de la recherche. Cela déterminera lequel de nos agents sera utilisé pour la recherche.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "Une liste de domaines à exclure spécifiquement des résultats de recherche.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "Les URLs que vous voulez extraire avec Tavily.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Inclure dans la réponse une liste d'images extraites des URLs.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
|
35
48
|
"Basic": "Basique",
|
|
36
49
|
"Advanced": "Avancé",
|
|
37
50
|
"General": "Général",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Jour (court)",
|
|
44
57
|
"Week (Short)": "Semaine (courte)",
|
|
45
58
|
"Month (Short)": "Mois (court)",
|
|
46
|
-
"Year (Short)": "Année (courte)"
|
|
59
|
+
"Year (Short)": "Année (courte)",
|
|
60
|
+
"GET": "GET",
|
|
61
|
+
"POST": "POST",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "DELETE",
|
|
65
|
+
"HEAD": "HEAD",
|
|
66
|
+
"None": "Aucun",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Données du formulaire",
|
|
69
|
+
"Raw": "Brut"
|
|
47
70
|
}
|
package/src/i18n/ja.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n",
|
|
4
4
|
"Search": "検索",
|
|
5
5
|
"Extract Content": "コンテンツを抽出",
|
|
6
|
+
"Custom API Call": "カスタムAPI呼び出し",
|
|
6
7
|
"Search for data based on a query.": "クエリに基づいてデータを検索します。",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "指定された URL から生のウェブコンテンツを取得します。",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
|
8
10
|
"Search Query": "検索クエリ",
|
|
9
11
|
"Search Depth": "深さを検索",
|
|
10
12
|
"Topic": "トピック",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "ドメインを含める",
|
|
19
21
|
"Exclude Domains": "除外ドメイン",
|
|
20
22
|
"URLs": "URL",
|
|
23
|
+
"Method": "方法",
|
|
24
|
+
"Headers": "ヘッダー",
|
|
25
|
+
"Query Parameters": "クエリパラメータ",
|
|
26
|
+
"Body Type": "ボディタイプ",
|
|
27
|
+
"Body": "本文",
|
|
28
|
+
"Response is Binary ?": "応答はバイナリですか?",
|
|
29
|
+
"No Error on Failure": "失敗時にエラーはありません",
|
|
30
|
+
"Timeout (in seconds)": "タイムアウト(秒)",
|
|
31
|
+
"Follow redirects": "リダイレクトをフォローする",
|
|
21
32
|
"The search query you want to execute with Tavily.": "Tavilyで実行したい検索クエリ。",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "検索の深さ。\"basic\"または\"advanced\"にすることができます。",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "検索カテゴリ。これは、検索に使用されるエージェントを決定します。",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "検索結果から特に除外するドメインのリスト。",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "Tavilyで抽出したいURL。",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "レスポンス内の URL から抽出された画像のリストを含めます。",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "PDF、画像などのファイルを有効にする",
|
|
35
48
|
"Basic": "基本",
|
|
36
49
|
"Advanced": "高度な設定",
|
|
37
50
|
"General": "全般",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "日 (短縮)",
|
|
44
57
|
"Week (Short)": "週 (短縮)",
|
|
45
58
|
"Month (Short)": "月 (短縮)",
|
|
46
|
-
"Year (Short)": "年 (短く)"
|
|
59
|
+
"Year (Short)": "年 (短く)",
|
|
60
|
+
"GET": "GET",
|
|
61
|
+
"POST": "POST",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "DELETE",
|
|
65
|
+
"HEAD": "HEAD",
|
|
66
|
+
"None": "なし",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "フォームデータ",
|
|
69
|
+
"Raw": "Raw"
|
|
47
70
|
}
|
package/src/i18n/nl.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nVolg deze stappen om je Tavily API Key te verkrijgen:\n\n1. Bezoek [tavily](https://tavily.com/) en maak een account aan.\n2. Log in en navigeer naar uw dashboard.\n3. Zoek en kopieer uw API-sleutel vanuit het dashboard.\n",
|
|
4
4
|
"Search": "Zoeken",
|
|
5
5
|
"Extract Content": "Uitpakken van inhoud",
|
|
6
|
+
"Custom API Call": "Custom API Call",
|
|
6
7
|
"Search for data based on a query.": "Zoeken naar gegevens gebaseerd op een zoekopdracht.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Haal ruwe webinhoud op van de opgegeven URL's.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
|
8
10
|
"Search Query": "Zoek query",
|
|
9
11
|
"Search Depth": "Zoek diepte",
|
|
10
12
|
"Topic": "Onderwerp",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Domeinen opnemen",
|
|
19
21
|
"Exclude Domains": "Domeinen uitsluiten",
|
|
20
22
|
"URLs": "URL's",
|
|
23
|
+
"Method": "Methode",
|
|
24
|
+
"Headers": "Kopteksten",
|
|
25
|
+
"Query Parameters": "Query parameters",
|
|
26
|
+
"Body Type": "Type lichaam",
|
|
27
|
+
"Body": "Lichaam",
|
|
28
|
+
"Response is Binary ?": "Antwoord is binair?",
|
|
29
|
+
"No Error on Failure": "Geen fout bij fout",
|
|
30
|
+
"Timeout (in seconds)": "Time-out (in seconden)",
|
|
31
|
+
"Follow redirects": "Volg omleidingen",
|
|
21
32
|
"The search query you want to execute with Tavily.": "De zoekopdracht die u wilt uitvoeren met Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "De diepte van de zoekopdracht. Het kan worden \"basic\" of \"geavanceerd\".",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "De categorie van de zoekopdracht. Dit bepaalt welke van onze medewerkers gebruikt wordt voor de zoekopdracht.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "Een lijst van domeinen om specifiek uit te sluiten van de zoekresultaten.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "De URL's die u met Tavily wilt extraheren.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Voeg een lijst van afbeeldingen toe uit de URL's in het antwoord.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc.",
|
|
35
48
|
"Basic": "Eenvoudig",
|
|
36
49
|
"Advanced": "Geavanceerd",
|
|
37
50
|
"General": "Algemeen",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Dag (Snel)",
|
|
44
57
|
"Week (Short)": "Week (Snel)",
|
|
45
58
|
"Month (Short)": "Maand (Snel)",
|
|
46
|
-
"Year (Short)": "Jaar (sorteren)"
|
|
59
|
+
"Year (Short)": "Jaar (sorteren)",
|
|
60
|
+
"GET": "KRIJG",
|
|
61
|
+
"POST": "POSTE",
|
|
62
|
+
"PATCH": "BEKIJK",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "VERWIJDEREN",
|
|
65
|
+
"HEAD": "HOOFD",
|
|
66
|
+
"None": "geen",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Formulieren gegevens",
|
|
69
|
+
"Raw": "Onbewerkte"
|
|
47
70
|
}
|
package/src/i18n/pt.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nSiga estes passos para obter sua chave de API de Tavily\n\n1. Visite [tavily](https://tavily.com/) e crie uma conta.\n2. Inicie sessão e navegue para o seu painel.\n3. Localize e copie sua chave de API a partir do painel de controle.\n",
|
|
4
4
|
"Search": "Pesquisar",
|
|
5
5
|
"Extract Content": "Extrair conteúdo",
|
|
6
|
+
"Custom API Call": "Chamada de API personalizada",
|
|
6
7
|
"Search for data based on a query.": "Pesquisar dados com base em uma consulta.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Recuperar conteúdo web bruto de URLs especificadas.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
|
8
10
|
"Search Query": "Consulta de Pesquisa",
|
|
9
11
|
"Search Depth": "Profundidade da Busca",
|
|
10
12
|
"Topic": "Tópico",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Incluir domínios",
|
|
19
21
|
"Exclude Domains": "Excluir domínios",
|
|
20
22
|
"URLs": "Links",
|
|
23
|
+
"Method": "Método",
|
|
24
|
+
"Headers": "Cabeçalhos",
|
|
25
|
+
"Query Parameters": "Parâmetros da consulta",
|
|
26
|
+
"Body Type": "Tipo de Corpo",
|
|
27
|
+
"Body": "Conteúdo",
|
|
28
|
+
"Response is Binary ?": "A resposta é binária ?",
|
|
29
|
+
"No Error on Failure": "Nenhum erro no Failure",
|
|
30
|
+
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
|
31
|
+
"Follow redirects": "Seguir redirecionamentos",
|
|
21
32
|
"The search query you want to execute with Tavily.": "A consulta de pesquisa que você deseja executar com Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "A profundidade da pesquisa. Pode ser \"básico\" ou \"avançado\".",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "A categoria da pesquisa. Isso determinará qual de nossos agentes será usado para a pesquisa.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "Uma lista de domínios para especificamente excluir dos resultados da pesquisa.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "As URLs que você deseja extrair com Tavily.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Inclua uma lista de imagens extraídas das URLs na resposta.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Habilitar para arquivos como PDFs, imagens, etc.",
|
|
35
48
|
"Basic": "Básico",
|
|
36
49
|
"Advanced": "Avançado",
|
|
37
50
|
"General": "Geral",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Dia (Curto)",
|
|
44
57
|
"Week (Short)": "Semana (Curto)",
|
|
45
58
|
"Month (Short)": "Mês (Curto)",
|
|
46
|
-
"Year (Short)": "Ano (Curto)"
|
|
59
|
+
"Year (Short)": "Ano (Curto)",
|
|
60
|
+
"GET": "OBTER",
|
|
61
|
+
"POST": "POSTAR",
|
|
62
|
+
"PATCH": "COMPRAR",
|
|
63
|
+
"PUT": "COLOCAR",
|
|
64
|
+
"DELETE": "EXCLUIR",
|
|
65
|
+
"HEAD": "CABEÇA",
|
|
66
|
+
"None": "Nenhuma",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Dados de Formulário",
|
|
69
|
+
"Raw": "RAW"
|
|
47
70
|
}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n",
|
|
4
4
|
"Search": "Search",
|
|
5
5
|
"Extract Content": "Extract Content",
|
|
6
|
+
"Custom API Call": "Custom API Call",
|
|
6
7
|
"Search for data based on a query.": "Search for data based on a query.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Retrieve raw web content from specified URLs.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
8
10
|
"Search Query": "Search Query",
|
|
9
11
|
"Search Depth": "Search Depth",
|
|
10
12
|
"Topic": "Topic",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Include Domains",
|
|
19
21
|
"Exclude Domains": "Exclude Domains",
|
|
20
22
|
"URLs": "URLs",
|
|
23
|
+
"Method": "Method",
|
|
24
|
+
"Headers": "Headers",
|
|
25
|
+
"Query Parameters": "Query Parameters",
|
|
26
|
+
"Body Type": "Body Type",
|
|
27
|
+
"Body": "Body",
|
|
28
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
29
|
+
"No Error on Failure": "No Error on Failure",
|
|
30
|
+
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
31
|
+
"Follow redirects": "Follow redirects",
|
|
21
32
|
"The search query you want to execute with Tavily.": "The search query you want to execute with Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "The depth of the search. It can be \"basic\" or \"advanced\".",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "The category of the search. This will determine which of our agents will be used for the search.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "A list of domains to specifically exclude from the search results.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "The URLs you want to extract with Tavily.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Include a list of images extracted from the URLs in the response.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
35
48
|
"Basic": "Basic",
|
|
36
49
|
"Advanced": "Advanced",
|
|
37
50
|
"General": "General",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Day (Short)",
|
|
44
57
|
"Week (Short)": "Week (Short)",
|
|
45
58
|
"Month (Short)": "Month (Short)",
|
|
46
|
-
"Year (Short)": "Year (Short)"
|
|
59
|
+
"Year (Short)": "Year (Short)",
|
|
60
|
+
"GET": "GET",
|
|
61
|
+
"POST": "POST",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "PUT",
|
|
64
|
+
"DELETE": "DELETE",
|
|
65
|
+
"HEAD": "HEAD",
|
|
66
|
+
"None": "None",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "Form Data",
|
|
69
|
+
"Raw": "Raw"
|
|
47
70
|
}
|
package/src/i18n/zh.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
"\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n": "\nFollow these steps to obtain your Tavily API Key:\n\n1. Visit [tavily](https://tavily.com/) and create an account.\n2. Log in and navigate to your dashboard.\n3. Locate and copy your API key from the dashboard.\n",
|
|
4
4
|
"Search": "搜索",
|
|
5
5
|
"Extract Content": "Extract Content",
|
|
6
|
+
"Custom API Call": "自定义 API 呼叫",
|
|
6
7
|
"Search for data based on a query.": "Search for data based on a query.",
|
|
7
8
|
"Retrieve raw web content from specified URLs.": "Retrieve raw web content from specified URLs.",
|
|
9
|
+
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
|
8
10
|
"Search Query": "Search Query",
|
|
9
11
|
"Search Depth": "Search Depth",
|
|
10
12
|
"Topic": "Topic",
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
"Include Domains": "Include Domains",
|
|
19
21
|
"Exclude Domains": "Exclude Domains",
|
|
20
22
|
"URLs": "URLs",
|
|
23
|
+
"Method": "方法",
|
|
24
|
+
"Headers": "信头",
|
|
25
|
+
"Query Parameters": "查询参数",
|
|
26
|
+
"Body Type": "Body Type",
|
|
27
|
+
"Body": "正文内容",
|
|
28
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
29
|
+
"No Error on Failure": "失败时没有错误",
|
|
30
|
+
"Timeout (in seconds)": "超时(秒)",
|
|
31
|
+
"Follow redirects": "Follow redirects",
|
|
21
32
|
"The search query you want to execute with Tavily.": "The search query you want to execute with Tavily.",
|
|
22
33
|
"The depth of the search. It can be \"basic\" or \"advanced\".": "The depth of the search. It can be \"basic\" or \"advanced\".",
|
|
23
34
|
"The category of the search. This will determine which of our agents will be used for the search.": "The category of the search. This will determine which of our agents will be used for the search.",
|
|
@@ -32,6 +43,8 @@
|
|
|
32
43
|
"A list of domains to specifically exclude from the search results.": "A list of domains to specifically exclude from the search results.",
|
|
33
44
|
"The URLs you want to extract with Tavily.": "The URLs you want to extract with Tavily.",
|
|
34
45
|
"Include a list of images extracted from the URLs in the response.": "Include a list of images extracted from the URLs in the response.",
|
|
46
|
+
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
|
47
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
35
48
|
"Basic": "Basic",
|
|
36
49
|
"Advanced": "Advanced",
|
|
37
50
|
"General": "A. 概况",
|
|
@@ -43,5 +56,15 @@
|
|
|
43
56
|
"Day (Short)": "Day (Short)",
|
|
44
57
|
"Week (Short)": "Week (Short)",
|
|
45
58
|
"Month (Short)": "Month (Short)",
|
|
46
|
-
"Year (Short)": "Year (Short)"
|
|
59
|
+
"Year (Short)": "Year (Short)",
|
|
60
|
+
"GET": "获取",
|
|
61
|
+
"POST": "帖子",
|
|
62
|
+
"PATCH": "PATCH",
|
|
63
|
+
"PUT": "弹出",
|
|
64
|
+
"DELETE": "删除",
|
|
65
|
+
"HEAD": "黑色",
|
|
66
|
+
"None": "无",
|
|
67
|
+
"JSON": "JSON",
|
|
68
|
+
"Form Data": "表单数据",
|
|
69
|
+
"Raw": "原始文件"
|
|
47
70
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const tavilyAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
2
1
|
export declare const tavily: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM,mHAgBjB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,49 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tavily =
|
|
3
|
+
exports.tavily = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
6
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
7
|
const shared_1 = require("@activepieces/shared");
|
|
8
8
|
const search_1 = require("./lib/actions/search");
|
|
9
9
|
const extract_1 = require("./lib/actions/extract");
|
|
10
|
-
const
|
|
11
|
-
Follow these steps to obtain your Tavily API Key:
|
|
12
|
-
|
|
13
|
-
1. Visit [tavily](https://tavily.com/) and create an account.
|
|
14
|
-
2. Log in and navigate to your dashboard.
|
|
15
|
-
3. Locate and copy your API key from the dashboard.
|
|
16
|
-
`;
|
|
17
|
-
exports.tavilyAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
18
|
-
description: markdownDescription,
|
|
19
|
-
displayName: 'API Key',
|
|
20
|
-
required: true,
|
|
21
|
-
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
22
|
-
try {
|
|
23
|
-
yield pieces_common_1.httpClient.sendRequest({
|
|
24
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
25
|
-
url: 'https://api.tavily.com/search',
|
|
26
|
-
headers: {
|
|
27
|
-
'Content-Type': 'application/json',
|
|
28
|
-
},
|
|
29
|
-
body: {
|
|
30
|
-
api_key: auth,
|
|
31
|
-
query: 'test',
|
|
32
|
-
search_depth: 'basic',
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
valid: true,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
catch (e) {
|
|
40
|
-
return {
|
|
41
|
-
valid: false,
|
|
42
|
-
error: 'Invalid API Key',
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
});
|
|
10
|
+
const auth_1 = require("./lib/auth");
|
|
47
11
|
exports.tavily = (0, pieces_framework_1.createPiece)({
|
|
48
12
|
displayName: 'Tavily',
|
|
49
13
|
description: 'Search engine tailored for AI agents.',
|
|
@@ -51,8 +15,14 @@ exports.tavily = (0, pieces_framework_1.createPiece)({
|
|
|
51
15
|
logoUrl: 'https://cdn.activepieces.com/pieces/tavily.jpg',
|
|
52
16
|
categories: [shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
|
|
53
17
|
authors: ['OsamaHaikal'],
|
|
54
|
-
auth:
|
|
55
|
-
actions: [search_1.searchAction, extract_1.extractAction
|
|
18
|
+
auth: auth_1.tavilyAuth,
|
|
19
|
+
actions: [search_1.searchAction, extract_1.extractAction,
|
|
20
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
21
|
+
baseUrl: () => 'https://api.tavily.com',
|
|
22
|
+
auth: auth_1.tavilyAuth,
|
|
23
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ({ Authorization: `Bearer ${auth.secret_text}` }); }),
|
|
24
|
+
})
|
|
25
|
+
],
|
|
56
26
|
triggers: [],
|
|
57
27
|
});
|
|
58
28
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAwE;AACxE,qEAA6D;AAC7D,iDAAqD;AACrD,iDAAoD;AACpD,mDAAsD;AACtD,qCAAwC;AAE3B,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IACjC,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,uCAAuC;IACpD,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,gDAAgD;IACzD,UAAU,EAAE,CAAC,sBAAa,CAAC,uBAAuB,CAAC;IACnD,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,IAAI,EAAE,iBAAU;IAChB,OAAO,EAAE,CAAC,qBAAY,EAAE,uBAAa;QACpC,IAAA,yCAAyB,EAAC;YACzB,OAAO,EAAE,GAAG,EAAE,CAAC,wBAAwB;YACvC,IAAI,EAAE,iBAAU;YAChB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE,0DAAC,OAAA,CAAC,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA,GAAA;SAC9E,CAAC;KACF;IACD,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC"}
|
|
@@ -2,3 +2,4 @@ export declare const extractAction: import("@activepieces/pieces-framework").IAc
|
|
|
2
2
|
urls: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
3
3
|
include_images: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
4
|
}>;
|
|
5
|
+
//# sourceMappingURL=extract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/extract.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;EAqCxB,CAAC"}
|
|
@@ -4,12 +4,12 @@ exports.extractAction = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
8
|
exports.extractAction = (0, pieces_framework_1.createAction)({
|
|
9
9
|
name: 'extract',
|
|
10
10
|
displayName: 'Extract Content',
|
|
11
11
|
description: 'Retrieve raw web content from specified URLs.',
|
|
12
|
-
auth:
|
|
12
|
+
auth: auth_1.tavilyAuth,
|
|
13
13
|
props: {
|
|
14
14
|
urls: pieces_framework_1.Property.Array({
|
|
15
15
|
displayName: 'URLs',
|
|
@@ -28,11 +28,14 @@ exports.extractAction = (0, pieces_framework_1.createAction)({
|
|
|
28
28
|
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
29
29
|
method: pieces_common_1.HttpMethod.POST,
|
|
30
30
|
url: 'https://api.tavily.com/extract',
|
|
31
|
+
authentication: {
|
|
32
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
33
|
+
token: auth.secret_text
|
|
34
|
+
},
|
|
31
35
|
headers: {
|
|
32
36
|
'Content-Type': 'application/json',
|
|
33
37
|
},
|
|
34
38
|
body: {
|
|
35
|
-
api_key: auth,
|
|
36
39
|
urls: propsValue.urls,
|
|
37
40
|
include_images: propsValue.include_images,
|
|
38
41
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../src/lib/actions/extract.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,kCAAqC;AAExB,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,iBAAU;IAChB,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACnB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAChC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,gCAAgC;gBACrC,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI,CAAC,WAAW;iBACxB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,cAAc,EAAE,UAAU,CAAC,cAAc;iBAC1C;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -12,3 +12,4 @@ export declare const searchAction: import("@activepieces/pieces-framework").IAct
|
|
|
12
12
|
include_domains: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
13
13
|
exclude_domains: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
14
14
|
}>;
|
|
15
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/search.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;;;;;;;;;;;EAgIvB,CAAC"}
|
|
@@ -4,12 +4,12 @@ exports.searchAction = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
8
|
exports.searchAction = (0, pieces_framework_1.createAction)({
|
|
9
9
|
name: 'search',
|
|
10
10
|
displayName: 'Search',
|
|
11
11
|
description: 'Search for data based on a query.',
|
|
12
|
-
auth:
|
|
12
|
+
auth: auth_1.tavilyAuth,
|
|
13
13
|
props: {
|
|
14
14
|
query: pieces_framework_1.Property.LongText({
|
|
15
15
|
displayName: 'Search Query',
|
|
@@ -109,11 +109,14 @@ exports.searchAction = (0, pieces_framework_1.createAction)({
|
|
|
109
109
|
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
110
110
|
method: pieces_common_1.HttpMethod.POST,
|
|
111
111
|
url: 'https://api.tavily.com/search',
|
|
112
|
+
authentication: {
|
|
113
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
114
|
+
token: auth.secret_text
|
|
115
|
+
},
|
|
112
116
|
headers: {
|
|
113
117
|
'Content-Type': 'application/json',
|
|
114
118
|
},
|
|
115
119
|
body: {
|
|
116
|
-
api_key: auth,
|
|
117
120
|
query: propsValue.query,
|
|
118
121
|
search_depth: propsValue.search_depth,
|
|
119
122
|
topic: propsValue.topic,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../src/lib/actions/search.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":"AAWA,eAAO,MAAM,UAAU,mEAwBrB,CAAC"}
|
package/src/lib/auth.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tavilyAuth = 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 markdownDescription = `
|
|
8
|
+
Follow these steps to obtain your Tavily API Key:
|
|
9
|
+
|
|
10
|
+
1. Visit [tavily](https://tavily.com/) and create an account.
|
|
11
|
+
2. Log in and navigate to your dashboard.
|
|
12
|
+
3. Locate and copy your API key from the dashboard.
|
|
13
|
+
`;
|
|
14
|
+
exports.tavilyAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
15
|
+
description: markdownDescription,
|
|
16
|
+
displayName: 'API Key',
|
|
17
|
+
required: true,
|
|
18
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
19
|
+
try {
|
|
20
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
21
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
22
|
+
url: 'https://api.tavily.com/usage',
|
|
23
|
+
authentication: {
|
|
24
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
25
|
+
token: auth
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
valid: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
return {
|
|
34
|
+
valid: false,
|
|
35
|
+
error: 'Invalid API Key',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,+DAAyF;AAEzF,MAAM,mBAAmB,GAAG;;;;;;CAM3B,CAAC;AAEW,QAAA,UAAU,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACxB,IAAI,CAAC;YACJ,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,8BAA8B;gBACnC,cAAc,EAAE;oBACf,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI;iBACX;aACD,CAAC,CAAC;YACH,OAAO;gBACN,KAAK,EAAE,IAAI;aACX,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO;gBACN,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,iBAAiB;aACxB,CAAC;QACH,CAAC;IACF,CAAC,CAAA;CACD,CAAC,CAAC"}
|
package/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Tavily
|
|
2
|
-
|
|
3
|
-
## Description
|
|
4
|
-
Tavily is an AI-powered search engine designed for accurate and real-time information retrieval. This piece enables integration with Tavily's API to perform searches and extract information.
|
|
5
|
-
|
|
6
|
-
## Actions
|
|
7
|
-
1. **Search**: Perform a search query using Tavily's AI search engine
|
|
8
|
-
- Supports both basic and advanced search depths
|
|
9
|
-
- Optional AI-generated answer
|
|
10
|
-
- Configurable result limits
|
|
11
|
-
- Raw content inclusion option
|
|
12
|
-
|
|
13
|
-
2. **Extract**: Extract structured data from a webpage using Tavily's extraction API
|
|
14
|
-
- Clean and formatted content extraction
|
|
15
|
-
- Supports various content types
|
|
16
|
-
- Removes ads and irrelevant content
|
|
17
|
-
|
|
18
|
-
## Authentication
|
|
19
|
-
This piece requires an API key from Tavily. To obtain your API key:
|
|
20
|
-
1. Visit https://tavily.com/ and sign up for an account
|
|
21
|
-
2. Navigate to your dashboard
|
|
22
|
-
3. Copy your API key from the dashboard
|
|
23
|
-
|
|
24
|
-
## Requirements
|
|
25
|
-
- Tavily API Key
|