@taskmagic/apps-webscraping-ai 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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # WebScraping AI
2
+
3
+ Scrape websites and extract data with WebScraping.AI.
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@taskmagic/apps-webscraping-ai",
3
+ "version": "0.0.1",
4
+ "dependencies": {
5
+ "@anthropic-ai/sdk": "0.33.1",
6
+ "@sinclair/typebox": "0.34.11",
7
+ "axios": "1.17.0",
8
+ "axios-retry": "4.4.1",
9
+ "deepmerge-ts": "7.1.0",
10
+ "mime-types": "2.1.35",
11
+ "nanoid": "3.3.8",
12
+ "openai": "4.67.1",
13
+ "replicate": "0.34.1",
14
+ "semver": "7.6.0",
15
+ "zod": "3.25.76",
16
+ "@taskmagic/pieces-common": "0.4.4",
17
+ "@taskmagic/pieces-framework": "0.7.46",
18
+ "@taskmagic/shared": "0.10.171",
19
+ "tslib": "1.14.1"
20
+ },
21
+ "overrides": {
22
+ "cross-spawn": "7.0.6",
23
+ "elliptic": "^6.6.1",
24
+ "fast-xml-parser": "^4.4.1",
25
+ "protobufjs": "^7.5.5",
26
+ "tmp": "^0.2.4",
27
+ "koa": "^2.16.4",
28
+ "picomatch": "^4.0.4",
29
+ "langsmith": "^0.6.0",
30
+ "serialize-javascript": "^6.0.2",
31
+ "elevenlabs": {
32
+ "form-data": "^4.0.4"
33
+ },
34
+ "@tryfabric/martian": {
35
+ "@notionhq/client": "$@notionhq/client"
36
+ },
37
+ "vite": {
38
+ "rollup": "npm:@rollup/wasm-node@^4.61.1"
39
+ }
40
+ },
41
+ "resolutions": {
42
+ "rollup": "npm:@rollup/wasm-node@^4.61.1"
43
+ },
44
+ "types": "./src/index.d.ts",
45
+ "main": "./src/index.js",
46
+ "type": "commonjs"
47
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const webscrapingAi: import("@taskmagic/pieces-framework").Piece<import("@taskmagic/pieces-framework").SecretTextProperty<true>>;
package/src/index.js ADDED
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webscrapingAi = void 0;
4
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
5
+ const shared_1 = require("@taskmagic/shared");
6
+ const ask_a_question_about_the_web_page_1 = require("./lib/actions/ask-a-question-about-the-web-page");
7
+ const extract_structured_data_1 = require("./lib/actions/extract-structured-data");
8
+ const get_account_information_1 = require("./lib/actions/get-account-information");
9
+ const get_page_html_1 = require("./lib/actions/get-page-html");
10
+ const scrape_website_text_1 = require("./lib/actions/scrape-website-text");
11
+ const common_1 = require("./lib/common");
12
+ exports.webscrapingAi = (0, pieces_framework_1.createPiece)({
13
+ displayName: 'WebScraping AI',
14
+ auth: common_1.webscrapingAiAuth,
15
+ minimumSupportedRelease: '0.30.0',
16
+ description: 'WebScraping AI is a powerful tool that allows you to scrape websites and extract data.',
17
+ categories: [shared_1.PieceCategory.DEVELOPER_TOOLS, shared_1.PieceCategory.ARTIFICIAL_INTELLIGENCE],
18
+ logoUrl: 'https://cdn.activepieces.com/pieces/webscraping-ai.png',
19
+ authors: ['LuizDMM', 'onyedikachi-david'],
20
+ ai: {
21
+ description: 'Scrape web pages and extract data with WebScraping.AI: fetch rendered HTML or visible text, ask an LLM a question about a page, pull structured fields, and check account credits.',
22
+ keywords: [
23
+ 'web scraping',
24
+ 'scrape website',
25
+ 'extract data',
26
+ 'headless browser',
27
+ 'render javascript',
28
+ 'proxy',
29
+ 'html',
30
+ 'crawl',
31
+ 'ai extraction',
32
+ ],
33
+ },
34
+ actions: [
35
+ ask_a_question_about_the_web_page_1.askAQuestionAboutTheWebPage,
36
+ get_page_html_1.getPageHtml,
37
+ scrape_website_text_1.scrapeWebsiteText,
38
+ extract_structured_data_1.extractStructuredData,
39
+ get_account_information_1.getAccountInformation,
40
+ ],
41
+ triggers: [],
42
+ });
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/webscraping-ai/src/index.ts"],"names":[],"mappings":";;;AAAA,kEAA0D;AAC1D,8CAAkD;AAClD,uGAA8F;AAC9F,mFAA8E;AAC9E,mFAA8E;AAC9E,+DAA0D;AAC1D,2EAAsE;AACtE,yCAAiD;AAEpC,QAAA,aAAa,GAAG,IAAA,8BAAW,EAAC;IACvC,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,0BAAiB;IACvB,uBAAuB,EAAE,QAAQ;IACjC,WAAW,EACT,wFAAwF;IAC1F,UAAU,EAAE,CAAC,sBAAa,CAAC,eAAe,EAAE,sBAAa,CAAC,uBAAuB,CAAC;IAClF,OAAO,EAAE,wDAAwD;IACjE,OAAO,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACzC,EAAE,EAAE;QACF,WAAW,EACT,oLAAoL;QACtL,QAAQ,EAAE;YACR,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,kBAAkB;YAClB,mBAAmB;YACnB,OAAO;YACP,MAAM;YACN,OAAO;YACP,eAAe;SAChB;KACF;IACD,OAAO,EAAE;QACP,+DAA2B;QAC3B,2BAAW;QACX,uCAAiB;QACjB,+CAAqB;QACrB,+CAAqB;KACtB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const askAQuestionAboutTheWebPage: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
3
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
4
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
5
+ format: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
6
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
7
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
8
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
9
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
10
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
11
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
12
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
13
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
14
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
15
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
16
+ question: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
17
+ }>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.askAQuestionAboutTheWebPage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const common_1 = require("../common");
7
+ exports.askAQuestionAboutTheWebPage = (0, pieces_framework_1.createAction)({
8
+ auth: common_1.webscrapingAiAuth,
9
+ name: 'askAQuestionAboutTheWebPage',
10
+ displayName: 'Ask a Question About the Web Page',
11
+ description: 'Gets an answer to a question about a given webpage.',
12
+ props: common_1.webscrapingAiCommon.askQuestionProperties,
13
+ run(_a) {
14
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
15
+ const apiKey = auth;
16
+ const { device, format, question } = propsValue, rest = tslib_1.__rest(propsValue, ["device", "format", "question"]);
17
+ const allowedCountries = [
18
+ 'us', 'gb', 'de', 'it', 'fr', 'ca', 'es', 'ru', 'jp', 'kr', 'in',
19
+ ];
20
+ const params = Object.assign(Object.assign({ apiKey,
21
+ question }, rest), { format: (format === 'json' || format === 'text') ? format : undefined, proxy: (rest.proxy === 'datacenter' || rest.proxy === 'residential') ? rest.proxy : undefined, country: (rest.country && allowedCountries.includes(rest.country))
22
+ ? rest.country
23
+ : undefined, headers: rest.headers && Array.isArray(rest.headers)
24
+ ? rest.headers
25
+ : undefined, device: device });
26
+ return yield common_1.webscrapingAiCommon.askQuestion(params);
27
+ });
28
+ },
29
+ });
30
+ //# sourceMappingURL=ask-a-question-about-the-web-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-a-question-about-the-web-page.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/actions/ask-a-question-about-the-web-page.ts"],"names":[],"mappings":";;;;AAAA,kEAA2D;AAC3D,sCAAuF;AAE1E,QAAA,2BAA2B,GAAG,IAAA,+BAAY,EAAC;IACtD,IAAI,EAAE,0BAAiB;IACvB,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,mCAAmC;IAChD,WAAW,EAAE,qDAAqD;IAClE,KAAK,EAAE,4BAAmB,CAAC,qBAAqB;IAC1C,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAc,CAAC;YAC9B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,KAAc,UAAU,EAAnB,IAAI,kBAAK,UAAU,EAAlD,gCAAqC,CAAa,CAAC;YAEzD,MAAM,gBAAgB,GAAG;gBACvB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;aACjE,CAAC;YAEF,MAAM,MAAM,iCACV,MAAM;gBACN,QAAQ,IACL,IAAI,KACP,MAAM,EAAE,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAE,MAA0B,CAAC,CAAC,CAAC,SAAS,EAC1F,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,KAAsC,CAAC,CAAC,CAAC,SAAS,EAC/H,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChE,CAAC,CAAE,IAAI,CAAC,OAA8B;oBACtC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;oBAClD,CAAC,CAAE,IAAI,CAAC,OAAkD;oBAC1D,CAAC,CAAC,SAAS,EACb,MAAM,EAAE,MAAqD,GAC9D,CAAC;YAEF,OAAO,MAAM,4BAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const extractStructuredData: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
3
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
4
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
5
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
6
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
7
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
8
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
9
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
10
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
11
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
12
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
13
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
14
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
15
+ fields: import("@taskmagic/pieces-framework").ObjectProperty<true>;
16
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractStructuredData = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const common_1 = require("../common");
7
+ exports.extractStructuredData = (0, pieces_framework_1.createAction)({
8
+ auth: common_1.webscrapingAiAuth,
9
+ name: 'extractStructuredData',
10
+ displayName: 'Extract structured data',
11
+ description: 'Returns structured data fields extracted from the webpage using an LLM model.',
12
+ props: common_1.webscrapingAiCommon.getPageStructuredDataProperties,
13
+ run(_a) {
14
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
15
+ const apiKey = auth;
16
+ const { fields, headers } = propsValue, rest = tslib_1.__rest(propsValue, ["fields", "headers"]);
17
+ const allowedCountries = [
18
+ 'us', 'gb', 'de', 'it', 'fr', 'ca', 'es', 'ru', 'jp', 'kr', 'in',
19
+ ];
20
+ const params = Object.assign(Object.assign({ apiKey }, rest), { proxy: (rest.proxy === 'datacenter' || rest.proxy === 'residential') ? rest.proxy : undefined, country: (rest.country && allowedCountries.includes(rest.country))
21
+ ? rest.country
22
+ : undefined, headers: headers && Array.isArray(headers)
23
+ ? headers
24
+ : undefined, fields: fields && typeof fields === 'object'
25
+ ? Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, String(v)]))
26
+ : {}, device: rest.device });
27
+ return yield common_1.webscrapingAiCommon.getPageStructuredData(params);
28
+ });
29
+ },
30
+ });
31
+ //# sourceMappingURL=extract-structured-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-structured-data.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/actions/extract-structured-data.ts"],"names":[],"mappings":";;;;AAAA,kEAA2D;AAC3D,sCAAuF;AAE1E,QAAA,qBAAqB,GAAG,IAAA,+BAAY,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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC5E,CAAC,CAAC,EAAE,EACN,MAAM,EAAE,IAAI,CAAC,MAAqD,GACnE,CAAC;YAEF,OAAO,MAAM,4BAAmB,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACjE,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const getAccountInformation: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {}>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAccountInformation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const common_1 = require("../common");
7
+ exports.getAccountInformation = (0, pieces_framework_1.createAction)({
8
+ auth: common_1.webscrapingAiAuth,
9
+ name: 'getAccountInformation',
10
+ displayName: 'Get Account Info',
11
+ description: 'Get account usage information including remaining API credits and concurrent requests.',
12
+ ai: {
13
+ probe: true,
14
+ },
15
+ props: {},
16
+ run(_a) {
17
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
18
+ const apiKey = auth;
19
+ return yield common_1.webscrapingAiCommon.getAccountInformation({ apiKey });
20
+ });
21
+ },
22
+ });
23
+ //# sourceMappingURL=get-account-information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-account-information.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/actions/get-account-information.ts"],"names":[],"mappings":";;;;AAAA,kEAA2D;AAC3D,sCAAmE;AAEtD,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,0BAAiB;IACvB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,wFAAwF;IACrG,EAAE,EAAE;QACF,KAAK,EAAE,IAAI;KACZ;IACD,KAAK,EAAE,EAAE;IACH,GAAG;qEAAC,EAAE,IAAI,EAAE;YAChB,MAAM,MAAM,GAAG,IAAc,CAAC;YAC9B,OAAO,MAAM,4BAAmB,CAAC,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QACrE,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const getPageHtml: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ returnScriptResult: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
3
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
4
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
5
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
6
+ format: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
7
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
8
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
9
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
10
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
11
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
12
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
13
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
14
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
15
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
16
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
17
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPageHtml = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const common_1 = require("../common");
7
+ exports.getPageHtml = (0, pieces_framework_1.createAction)({
8
+ auth: common_1.webscrapingAiAuth,
9
+ name: 'getPageHtml',
10
+ displayName: 'Get Page HTML',
11
+ description: 'Retrieves the raw HTML markup of a web page.',
12
+ props: common_1.webscrapingAiCommon.getPageHtmlProperties,
13
+ run(_a) {
14
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
15
+ const apiKey = auth;
16
+ const { format, headers, proxy, device, errorOn404, errorOnRedirect, returnScriptResult } = propsValue, rest = tslib_1.__rest(propsValue, ["format", "headers", "proxy", "device", "errorOn404", "errorOnRedirect", "returnScriptResult"]);
17
+ const allowedCountries = [
18
+ 'us', 'gb', 'de', 'it', 'fr', 'ca', 'es', 'ru', 'jp', 'kr', 'in',
19
+ ];
20
+ const params = Object.assign(Object.assign({ apiKey }, rest), { format: (format === 'json' || format === 'text') ? format : undefined, proxy: (proxy === 'datacenter' || proxy === 'residential') ? proxy : undefined, country: (rest.country && allowedCountries.includes(rest.country))
21
+ ? rest.country
22
+ : undefined, headers: headers && Array.isArray(headers)
23
+ ? headers
24
+ : undefined, device: device, errorOn404,
25
+ errorOnRedirect,
26
+ returnScriptResult });
27
+ return yield common_1.webscrapingAiCommon.getPageHtml(params);
28
+ });
29
+ },
30
+ });
31
+ //# sourceMappingURL=get-page-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-page-html.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/actions/get-page-html.ts"],"names":[],"mappings":";;;;AAAA,kEAA2D;AAC3D,sCAAuF;AAE1E,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,0BAAiB;IACvB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE,4BAAmB,CAAC,qBAAqB;IAC1C,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAc,CAAC;YAC9B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,KAAc,UAAU,EAAnB,IAAI,kBAAK,UAAU,EAAzG,+FAA4F,CAAa,CAAC;YAEhH,MAAM,gBAAgB,GAAG;gBACvB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;aACjE,CAAC;YAEF,MAAM,MAAM,iCACV,MAAM,IACH,IAAI,KACP,MAAM,EAAE,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAE,MAA0B,CAAC,CAAC,CAAC,SAAS,EAC1F,KAAK,EAAE,CAAC,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAE,KAAsC,CAAC,CAAC,CAAC,SAAS,EAChH,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChE,CAAC,CAAE,IAAI,CAAC,OAA8B;oBACtC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;oBACxC,CAAC,CAAE,OAAkD;oBACrD,CAAC,CAAC,SAAS,EACb,MAAM,EAAE,MAAqD,EAC7D,UAAU;gBACV,eAAe;gBACf,kBAAkB,GACnB,CAAC;YAEF,OAAO,MAAM,4BAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const scrapeWebsiteText: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
2
+ textFormat: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
3
+ returnLinks: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
4
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
5
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
6
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
7
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
8
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
9
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
10
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
11
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
12
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
13
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
14
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
15
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
16
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
17
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scrapeWebsiteText = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
6
+ const common_1 = require("../common");
7
+ exports.scrapeWebsiteText = (0, pieces_framework_1.createAction)({
8
+ auth: common_1.webscrapingAiAuth,
9
+ name: 'scrapeWebsiteText',
10
+ displayName: 'Scrape Website Text',
11
+ description: 'Returns the visible text content of a webpage specified by the URL.',
12
+ props: common_1.webscrapingAiCommon.getPageTextProperties,
13
+ run(_a) {
14
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
15
+ const apiKey = auth;
16
+ const { textFormat, headers, returnLinks } = propsValue, rest = tslib_1.__rest(propsValue, ["textFormat", "headers", "returnLinks"]);
17
+ const allowedCountries = [
18
+ 'us', 'gb', 'de', 'it', 'fr', 'ca', 'es', 'ru', 'jp', 'kr', 'in',
19
+ ];
20
+ const params = Object.assign(Object.assign({ apiKey }, rest), { textFormat: (textFormat === 'json' || textFormat === 'plain' || textFormat === 'xml')
21
+ ? textFormat
22
+ : undefined, returnLinks: (textFormat === 'json') ? returnLinks : undefined, proxy: (rest.proxy === 'datacenter' || rest.proxy === 'residential') ? rest.proxy : undefined, country: (rest.country && allowedCountries.includes(rest.country))
23
+ ? rest.country
24
+ : undefined, headers: headers && Array.isArray(headers)
25
+ ? headers
26
+ : undefined, device: rest.device });
27
+ return yield common_1.webscrapingAiCommon.getPageText(params);
28
+ });
29
+ },
30
+ });
31
+ //# sourceMappingURL=scrape-website-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scrape-website-text.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/actions/scrape-website-text.ts"],"names":[],"mappings":";;;;AAAA,kEAA2D;AAC3D,sCAAuF;AAE1E,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,0BAAiB;IACvB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,qEAAqE;IACvE,KAAK,EAAE,4BAAmB,CAAC,qBAAqB;IAC1C,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,MAAM,GAAG,IAAc,CAAC;YAC9B,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,KAAc,UAAU,EAAnB,IAAI,kBAAK,UAAU,EAA1D,wCAA6C,CAAa,CAAC;YAEjE,MAAM,gBAAgB,GAAG;gBACvB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;aACjE,CAAC;YAEF,MAAM,MAAM,iCACV,MAAM,IACH,IAAI,KACP,UAAU,EAAE,CAAC,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,KAAK,CAAC;oBACnF,CAAC,CAAE,UAAuC;oBAC1C,CAAC,CAAC,SAAS,EACb,WAAW,EAAE,CAAC,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAC9D,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAE,IAAI,CAAC,KAAsC,CAAC,CAAC,CAAC,SAAS,EAC/H,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChE,CAAC,CAAE,IAAI,CAAC,OAA8B;oBACtC,CAAC,CAAC,SAAS,EACb,OAAO,EAAE,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;oBACxC,CAAC,CAAE,OAAkD;oBACrD,CAAC,CAAC,SAAS,EACb,MAAM,EAAE,IAAI,CAAC,MAAqD,GACnE,CAAC;YAEF,OAAO,MAAM,4BAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACvD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,130 @@
1
+ export declare const webscrapingAiAuth: import("@taskmagic/pieces-framework").SecretTextProperty<true>;
2
+ export declare const webscrapingAiCommon: {
3
+ baseUrl: string;
4
+ endpoints: {
5
+ askQuestion: string;
6
+ getPageHtml: string;
7
+ getPageText: string;
8
+ getStructuredData: string;
9
+ getAccountInfo: string;
10
+ };
11
+ askQuestionProperties: {
12
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
13
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
14
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
15
+ format: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
16
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
17
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
18
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
19
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
20
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
21
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
22
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
23
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
24
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
25
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
26
+ question: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
27
+ };
28
+ getPageHtmlProperties: {
29
+ returnScriptResult: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
30
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
31
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
32
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
33
+ format: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
34
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
35
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
36
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
37
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
38
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
39
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
40
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
41
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
42
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
43
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
44
+ };
45
+ getPageTextProperties: {
46
+ textFormat: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
47
+ returnLinks: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
48
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
49
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
50
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
51
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
52
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
53
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
54
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
55
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
56
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
57
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
58
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
59
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
60
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
61
+ };
62
+ getPageStructuredDataProperties: {
63
+ device: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
64
+ errorOn404: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
65
+ errorOnRedirect: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
66
+ url: import("@taskmagic/pieces-framework").ShortTextProperty<true>;
67
+ headers: import("@taskmagic/pieces-framework").ArrayProperty<false> | import("@taskmagic/pieces-framework").ArrayProperty<true>;
68
+ timeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
69
+ js: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
70
+ jsTimeout: import("@taskmagic/pieces-framework").NumberProperty<false>;
71
+ waitFor: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
72
+ proxy: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
73
+ country: import("@taskmagic/pieces-framework").StaticDropdownProperty<string, false>;
74
+ customProxy: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
75
+ jsScript: import("@taskmagic/pieces-framework").LongTextProperty<false>;
76
+ fields: import("@taskmagic/pieces-framework").ObjectProperty<true>;
77
+ };
78
+ askQuestion: (params: askQuestionParams) => Promise<import("@taskmagic/pieces-common").HttpResponse<any>>;
79
+ getPageHtml: (params: getPageHtmlParams) => Promise<import("@taskmagic/pieces-common").HttpResponse<any>>;
80
+ getPageText: (params: getPageTextParams) => Promise<import("@taskmagic/pieces-common").HttpResponse<any>>;
81
+ getPageStructuredData: (params: getPageStructuredDataParams) => Promise<import("@taskmagic/pieces-common").HttpResponse<any>>;
82
+ getAccountInformation: ({ apiKey }: AuthenticationRequired) => Promise<import("@taskmagic/pieces-common").HttpResponse<any>>;
83
+ };
84
+ export type WebScrapingCountry = 'us' | 'gb' | 'de' | 'it' | 'fr' | 'ca' | 'es' | 'ru' | 'jp' | 'kr' | 'in';
85
+ type AuthenticationRequired = {
86
+ apiKey: string;
87
+ };
88
+ interface baseRequestParams extends AuthenticationRequired {
89
+ url: string;
90
+ headers?: Array<{
91
+ name: string;
92
+ value: string;
93
+ }>;
94
+ timeout?: number;
95
+ js?: boolean;
96
+ jsTimeout?: number;
97
+ waitFor?: string;
98
+ proxy?: 'datacenter' | 'residential';
99
+ country?: WebScrapingCountry;
100
+ customProxy?: string;
101
+ jsScript?: string;
102
+ }
103
+ interface askQuestionParams extends baseRequestParams {
104
+ question: string;
105
+ device?: 'desktop' | 'mobile' | 'tablet';
106
+ errorOn404?: boolean;
107
+ errorOnRedirect?: boolean;
108
+ format?: 'json' | 'text';
109
+ }
110
+ interface getPageHtmlParams extends baseRequestParams {
111
+ returnScriptResult?: boolean;
112
+ device?: 'desktop' | 'mobile' | 'tablet';
113
+ errorOn404?: boolean;
114
+ errorOnRedirect?: boolean;
115
+ format?: 'json' | 'text';
116
+ }
117
+ interface getPageTextParams extends baseRequestParams {
118
+ textFormat?: 'plain' | 'xml' | 'json';
119
+ returnLinks?: boolean;
120
+ device?: 'desktop' | 'mobile' | 'tablet';
121
+ errorOn404?: boolean;
122
+ errorOnRedirect?: boolean;
123
+ }
124
+ interface getPageStructuredDataParams extends baseRequestParams {
125
+ fields: Record<string, string>;
126
+ device?: 'desktop' | 'mobile' | 'tablet';
127
+ errorOn404?: boolean;
128
+ errorOnRedirect?: boolean;
129
+ }
130
+ export {};
@@ -0,0 +1,366 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.webscrapingAiCommon = exports.webscrapingAiAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@taskmagic/pieces-common");
6
+ const pieces_framework_1 = require("@taskmagic/pieces-framework");
7
+ const baseRequestProperties = {
8
+ url: pieces_framework_1.Property.ShortText({
9
+ displayName: 'URL',
10
+ description: 'URL of the target page.',
11
+ required: true,
12
+ }),
13
+ headers: pieces_framework_1.Property.Array({
14
+ displayName: 'Custom Headers',
15
+ description: 'Add custom HTTP headers (optional)',
16
+ required: false,
17
+ properties: {
18
+ name: pieces_framework_1.Property.ShortText({
19
+ displayName: 'Header Name',
20
+ description: 'Header name (e.g., User-Agent, Authorization)',
21
+ required: true,
22
+ }),
23
+ value: pieces_framework_1.Property.ShortText({
24
+ displayName: 'Header Value',
25
+ description: 'Header value',
26
+ required: true,
27
+ }),
28
+ },
29
+ }),
30
+ timeout: pieces_framework_1.Property.Number({
31
+ displayName: 'Timeout',
32
+ description: 'Maximum page load time in milliseconds (default: 10000, max: 30000)',
33
+ required: false,
34
+ defaultValue: 10000,
35
+ }),
36
+ js: pieces_framework_1.Property.Checkbox({
37
+ displayName: 'Enable JavaScript',
38
+ description: 'Execute JavaScript for dynamic content (recommended)',
39
+ defaultValue: true,
40
+ required: false,
41
+ }),
42
+ jsTimeout: pieces_framework_1.Property.Number({
43
+ displayName: 'JavaScript Timeout',
44
+ description: 'Maximum JavaScript execution time in milliseconds (default: 2000)',
45
+ required: false,
46
+ defaultValue: 2000,
47
+ }),
48
+ waitFor: pieces_framework_1.Property.ShortText({
49
+ displayName: 'Wait For',
50
+ description: 'CSS selector to wait for dynamic content (e.g., ".content-loaded")',
51
+ required: false,
52
+ }),
53
+ proxy: pieces_framework_1.Property.StaticDropdown({
54
+ displayName: 'Proxy Type',
55
+ description: 'Use residential proxies for sites that block datacenter IPs (more expensive)',
56
+ required: false,
57
+ defaultValue: 'datacenter',
58
+ options: {
59
+ options: [
60
+ { label: '🏢 Datacenter (Fast)', value: 'datacenter' },
61
+ { label: '🏠 Residential (Stealth)', value: 'residential' },
62
+ ],
63
+ },
64
+ }),
65
+ country: pieces_framework_1.Property.StaticDropdown({
66
+ displayName: 'Proxy Country',
67
+ description: 'Geographic location of the proxy server',
68
+ required: false,
69
+ defaultValue: 'us',
70
+ options: {
71
+ options: [
72
+ { label: 'United States', value: 'us' },
73
+ { label: 'Canada', value: 'ca' },
74
+ { label: 'United Kingdom', value: 'gb' },
75
+ { label: 'Germany', value: 'de' },
76
+ { label: 'France', value: 'fr' },
77
+ { label: 'Italy', value: 'it' },
78
+ { label: 'Spain', value: 'es' },
79
+ { label: 'Russia', value: 'ru' },
80
+ { label: 'Japan', value: 'jp' },
81
+ { label: 'South Korea', value: 'kr' },
82
+ { label: 'India', value: 'in' },
83
+ ],
84
+ },
85
+ }),
86
+ customProxy: pieces_framework_1.Property.ShortText({
87
+ displayName: 'Custom Proxy',
88
+ description: 'Your proxy URL in format: http://user:password@host:port',
89
+ required: false,
90
+ }),
91
+ jsScript: pieces_framework_1.Property.LongText({
92
+ displayName: 'JavaScript Code',
93
+ description: 'Custom JavaScript to execute (e.g., document.querySelector("button").click())',
94
+ required: false,
95
+ }),
96
+ };
97
+ exports.webscrapingAiAuth = pieces_framework_1.PieceAuth.SecretText({
98
+ displayName: 'API Key',
99
+ description: 'Your WebScraping.AI API key.',
100
+ required: true,
101
+ });
102
+ function toQueryParams(rawParams) {
103
+ return Object.fromEntries(Object.entries(rawParams)
104
+ .filter(([, value]) => value !== undefined)
105
+ .map(([key, value]) => [key, String(value)]));
106
+ }
107
+ exports.webscrapingAiCommon = {
108
+ baseUrl: 'https://api.webscraping.ai',
109
+ endpoints: {
110
+ askQuestion: '/ai/question',
111
+ getPageHtml: '/html',
112
+ getPageText: '/text',
113
+ getStructuredData: '/ai/fields',
114
+ getAccountInfo: '/account',
115
+ },
116
+ askQuestionProperties: Object.assign(Object.assign({ question: pieces_framework_1.Property.ShortText({
117
+ displayName: 'Question',
118
+ description: 'Question or instructions to ask the LLM model about the target page.',
119
+ required: true,
120
+ }) }, baseRequestProperties), { device: pieces_framework_1.Property.StaticDropdown({
121
+ displayName: 'Device Type',
122
+ description: 'Emulate specific device for responsive design testing',
123
+ required: false,
124
+ options: {
125
+ options: [
126
+ { label: 'Desktop', value: 'desktop' },
127
+ { label: 'Mobile', value: 'mobile' },
128
+ { label: 'Tablet', value: 'tablet' },
129
+ ],
130
+ },
131
+ }), errorOn404: pieces_framework_1.Property.Checkbox({
132
+ displayName: 'Error on 404',
133
+ description: 'Fail the action if the page returns a 404 error',
134
+ required: false,
135
+ }), errorOnRedirect: pieces_framework_1.Property.Checkbox({
136
+ displayName: 'Error on Redirect',
137
+ description: 'Fail the action if the page redirects to another URL',
138
+ required: false,
139
+ }), format: pieces_framework_1.Property.StaticDropdown({
140
+ displayName: 'Response Format',
141
+ description: 'Response format: Text (simple) or JSON (structured)',
142
+ required: false,
143
+ defaultValue: 'text',
144
+ options: {
145
+ options: [
146
+ { label: 'Text', value: 'text' },
147
+ { label: 'JSON', value: 'json' },
148
+ ],
149
+ },
150
+ }) }),
151
+ getPageHtmlProperties: Object.assign(Object.assign({}, baseRequestProperties), { returnScriptResult: pieces_framework_1.Property.Checkbox({
152
+ displayName: 'Return JavaScript Result',
153
+ description: 'Return result of the custom JavaScript code (js_script parameter) \
154
+ execution on the target page (false by default, page HTML will be returned).',
155
+ required: false,
156
+ }), device: pieces_framework_1.Property.StaticDropdown({
157
+ displayName: 'Device Type',
158
+ description: 'Emulate specific device for responsive design testing',
159
+ required: false,
160
+ options: {
161
+ options: [
162
+ { label: 'Desktop', value: 'desktop' },
163
+ { label: 'Mobile', value: 'mobile' },
164
+ { label: 'Tablet', value: 'tablet' },
165
+ ],
166
+ },
167
+ }), errorOn404: pieces_framework_1.Property.Checkbox({
168
+ displayName: 'Error on 404',
169
+ description: 'Fail the action if the page returns a 404 error',
170
+ required: false,
171
+ }), errorOnRedirect: pieces_framework_1.Property.Checkbox({
172
+ displayName: 'Error on Redirect',
173
+ description: 'Fail the action if the page redirects to another URL',
174
+ required: false,
175
+ }), format: pieces_framework_1.Property.StaticDropdown({
176
+ displayName: 'Response Format',
177
+ description: 'Response format: Text (simple) or JSON (structured)',
178
+ required: false,
179
+ defaultValue: 'text',
180
+ options: {
181
+ options: [
182
+ { label: 'Text', value: 'text' },
183
+ { label: 'JSON', value: 'json' },
184
+ ],
185
+ },
186
+ }) }),
187
+ getPageTextProperties: Object.assign(Object.assign({}, baseRequestProperties), { textFormat: pieces_framework_1.Property.StaticDropdown({
188
+ displayName: 'Text Format',
189
+ description: 'Response format: Plain text, JSON (with title/description/content), or XML',
190
+ required: false,
191
+ defaultValue: 'plain',
192
+ options: {
193
+ options: [
194
+ { label: 'Plain Text', value: 'plain' },
195
+ { label: 'JSON', value: 'json' },
196
+ { label: 'XML', value: 'xml' },
197
+ ],
198
+ },
199
+ }), returnLinks: pieces_framework_1.Property.Checkbox({
200
+ displayName: 'Return Links',
201
+ description: 'Include links in response (only works with JSON format)',
202
+ required: false,
203
+ }), device: pieces_framework_1.Property.StaticDropdown({
204
+ displayName: 'Device Type',
205
+ description: 'Emulate specific device for responsive design testing',
206
+ required: false,
207
+ options: {
208
+ options: [
209
+ { label: 'Desktop', value: 'desktop' },
210
+ { label: 'Mobile', value: 'mobile' },
211
+ { label: 'Tablet', value: 'tablet' },
212
+ ],
213
+ },
214
+ }), errorOn404: pieces_framework_1.Property.Checkbox({
215
+ displayName: 'Error on 404',
216
+ description: 'Fail the action if the page returns a 404 error',
217
+ required: false,
218
+ }), errorOnRedirect: pieces_framework_1.Property.Checkbox({
219
+ displayName: 'Error on Redirect',
220
+ description: 'Fail the action if the page redirects to another URL',
221
+ required: false,
222
+ }) }),
223
+ getPageStructuredDataProperties: Object.assign(Object.assign({ fields: pieces_framework_1.Property.Object({
224
+ displayName: 'Fields to Extract',
225
+ description: 'Define fields to extract (e.g., {"title": "Product title", "price": "Product price"})',
226
+ required: true,
227
+ }) }, baseRequestProperties), { device: pieces_framework_1.Property.StaticDropdown({
228
+ displayName: 'Device Type',
229
+ description: 'Emulate specific device for responsive design testing',
230
+ required: false,
231
+ options: {
232
+ options: [
233
+ { label: 'Desktop', value: 'desktop' },
234
+ { label: 'Mobile', value: 'mobile' },
235
+ { label: 'Tablet', value: 'tablet' },
236
+ ],
237
+ },
238
+ }), errorOn404: pieces_framework_1.Property.Checkbox({
239
+ displayName: 'Error on 404',
240
+ description: 'Fail the action if the page returns a 404 error',
241
+ required: false,
242
+ }), errorOnRedirect: pieces_framework_1.Property.Checkbox({
243
+ displayName: 'Error on Redirect',
244
+ description: 'Fail the action if the page redirects to another URL',
245
+ required: false,
246
+ }) }),
247
+ askQuestion: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
248
+ const queryParams = toQueryParams({
249
+ api_key: params.apiKey,
250
+ url: params.url,
251
+ question: params.question,
252
+ timeout: params.timeout,
253
+ js: params.js,
254
+ js_timeout: params.jsTimeout,
255
+ wait_for: params.waitFor,
256
+ proxy: params.proxy,
257
+ country: params.country,
258
+ custom_proxy: params.customProxy,
259
+ device: params.device,
260
+ error_on_404: params.errorOn404,
261
+ error_on_redirect: params.errorOnRedirect,
262
+ js_script: params.jsScript,
263
+ format: params.format,
264
+ headers: params.headers && Array.isArray(params.headers)
265
+ ? JSON.stringify(Object.fromEntries(params.headers.map((h) => [h.name, h.value])))
266
+ : undefined,
267
+ });
268
+ return yield pieces_common_1.httpClient.sendRequest({
269
+ method: pieces_common_1.HttpMethod.GET,
270
+ url: `${exports.webscrapingAiCommon.baseUrl}${exports.webscrapingAiCommon.endpoints.askQuestion}`,
271
+ queryParams,
272
+ });
273
+ }),
274
+ getPageHtml: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
275
+ const queryParams = toQueryParams({
276
+ api_key: params.apiKey,
277
+ url: params.url,
278
+ headers: params.headers && Array.isArray(params.headers)
279
+ ? JSON.stringify(Object.fromEntries(params.headers.map((h) => [h.name, h.value])))
280
+ : undefined,
281
+ timeout: params.timeout,
282
+ js: params.js,
283
+ js_timeout: params.jsTimeout,
284
+ wait_for: params.waitFor,
285
+ proxy: params.proxy,
286
+ country: params.country,
287
+ custom_proxy: params.customProxy,
288
+ device: params.device,
289
+ error_on_404: params.errorOn404,
290
+ error_on_redirect: params.errorOnRedirect,
291
+ js_script: params.jsScript,
292
+ return_script_result: params.returnScriptResult,
293
+ format: params.format,
294
+ });
295
+ return yield pieces_common_1.httpClient.sendRequest({
296
+ method: pieces_common_1.HttpMethod.GET,
297
+ url: `${exports.webscrapingAiCommon.baseUrl}${exports.webscrapingAiCommon.endpoints.getPageHtml}`,
298
+ queryParams,
299
+ });
300
+ }),
301
+ getPageText: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
302
+ const queryParams = toQueryParams({
303
+ api_key: params.apiKey,
304
+ text_format: params.textFormat,
305
+ return_links: params.returnLinks,
306
+ url: params.url,
307
+ headers: params.headers && Array.isArray(params.headers)
308
+ ? JSON.stringify(Object.fromEntries(params.headers.map((h) => [h.name, h.value])))
309
+ : undefined,
310
+ timeout: params.timeout,
311
+ js: params.js,
312
+ js_timeout: params.jsTimeout,
313
+ wait_for: params.waitFor,
314
+ proxy: params.proxy,
315
+ country: params.country,
316
+ custom_proxy: params.customProxy,
317
+ device: params.device,
318
+ error_on_404: params.errorOn404,
319
+ error_on_redirect: params.errorOnRedirect,
320
+ js_script: params.jsScript,
321
+ });
322
+ return yield pieces_common_1.httpClient.sendRequest({
323
+ method: pieces_common_1.HttpMethod.GET,
324
+ url: `${exports.webscrapingAiCommon.baseUrl}${exports.webscrapingAiCommon.endpoints.getPageText}`,
325
+ queryParams,
326
+ });
327
+ }),
328
+ getPageStructuredData: (params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
329
+ const filtered = toQueryParams({
330
+ api_key: params.apiKey,
331
+ url: params.url,
332
+ headers: params.headers && Array.isArray(params.headers)
333
+ ? JSON.stringify(Object.fromEntries(params.headers.map((h) => [h.name, h.value])))
334
+ : undefined,
335
+ timeout: params.timeout,
336
+ js: params.js,
337
+ js_timeout: params.jsTimeout,
338
+ wait_for: params.waitFor,
339
+ proxy: params.proxy,
340
+ country: params.country,
341
+ custom_proxy: params.customProxy,
342
+ device: params.device,
343
+ error_on_404: params.errorOn404,
344
+ error_on_redirect: params.errorOnRedirect,
345
+ js_script: params.jsScript,
346
+ });
347
+ const expandedFields = Object.fromEntries(Object.entries(params.fields || {}).map(([key, value]) => [
348
+ `fields[${key}]`,
349
+ value,
350
+ ]));
351
+ const queryParams = Object.assign(Object.assign({}, filtered), expandedFields);
352
+ return yield pieces_common_1.httpClient.sendRequest({
353
+ method: pieces_common_1.HttpMethod.GET,
354
+ url: `${exports.webscrapingAiCommon.baseUrl}${exports.webscrapingAiCommon.endpoints.getStructuredData}`,
355
+ queryParams,
356
+ });
357
+ }),
358
+ getAccountInformation: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ apiKey }) {
359
+ return yield pieces_common_1.httpClient.sendRequest({
360
+ method: pieces_common_1.HttpMethod.GET,
361
+ url: `${exports.webscrapingAiCommon.baseUrl}${exports.webscrapingAiCommon.endpoints.getAccountInfo}`,
362
+ queryParams: { api_key: apiKey },
363
+ });
364
+ }),
365
+ };
366
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/webscraping-ai/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,4DAIkC;AAClC,kEAAkE;AAElE,MAAM,qBAAqB,GAAG;IAC5B,GAAG,EAAE,2BAAQ,CAAC,SAAS,CAAC;QACtB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,yBAAyB;QACtC,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,OAAO,EAAE,2BAAQ,CAAC,KAAK,CAAC;QACtB,WAAW,EAAE,gBAAgB;QAC7B,WAAW,EAAE,oCAAoC;QACjD,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE;YACV,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;gBACvB,WAAW,EAAE,aAAa;gBAC1B,WAAW,EAAE,+CAA+C;gBAC5D,QAAQ,EAAE,IAAI;aACf,CAAC;YACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;gBACxB,WAAW,EAAE,cAAc;gBAC3B,WAAW,EAAE,cAAc;gBAC3B,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;KACF,CAAC;IACF,OAAO,EAAE,2BAAQ,CAAC,MAAM,CAAC;QACvB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,qEAAqE;QAClF,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;KACpB,CAAC;IACF,EAAE,EAAE,2BAAQ,CAAC,QAAQ,CAAC;QACpB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,sDAAsD;QACnE,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACF,SAAS,EAAE,2BAAQ,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,mEAAmE;QAChF,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,IAAI;KACnB,CAAC;IACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;QAC1B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