@activepieces/piece-exa 0.1.5 → 0.1.7

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.
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getContentsAction = 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 common_1 = require("../common");
8
- const auth_1 = require("../auth");
9
- exports.getContentsAction = (0, pieces_framework_1.createAction)({
10
- name: 'get_contents',
11
- displayName: 'Get Contents',
12
- description: 'Retrieve clean HTML content from specified URLs.',
13
- auth: auth_1.exaAuth,
14
- props: {
15
- urls: pieces_framework_1.Property.Array({
16
- displayName: 'URLs',
17
- required: true,
18
- description: 'Array of URLs to crawl',
19
- }),
20
- text: pieces_framework_1.Property.Checkbox({
21
- displayName: 'Return Full Text',
22
- description: 'If true, returns full page text. If false, disables text return.',
23
- required: false,
24
- defaultValue: true,
25
- }),
26
- livecrawl: pieces_framework_1.Property.StaticDropdown({
27
- displayName: 'Livecrawl Option',
28
- description: 'Options for livecrawling pages.',
29
- required: false,
30
- options: {
31
- options: [
32
- { label: 'Never', value: 'never' },
33
- { label: 'Fallback', value: 'fallback' },
34
- { label: 'Always', value: 'always' },
35
- { label: 'Auto', value: 'auto' },
36
- ],
37
- },
38
- }),
39
- livecrawlTimeout: pieces_framework_1.Property.Number({
40
- displayName: 'Livecrawl Timeout (ms)',
41
- description: 'Timeout for livecrawling in milliseconds.',
42
- required: false,
43
- }),
44
- subpages: pieces_framework_1.Property.Number({
45
- displayName: 'Number of Subpages',
46
- description: 'Number of subpages to crawl.',
47
- required: false,
48
- }),
49
- subpageTarget: pieces_framework_1.Property.ShortText({
50
- displayName: 'Subpage Target',
51
- description: 'Keyword(s) to find specific subpages.',
52
- required: false,
53
- }),
54
- },
55
- run(context) {
56
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
- const apiKey = context.auth.secret_text;
58
- const body = {
59
- urls: context.propsValue.urls,
60
- };
61
- if (context.propsValue.text !== undefined)
62
- body['text'] = context.propsValue.text;
63
- if (context.propsValue.livecrawl)
64
- body['livecrawl'] = context.propsValue.livecrawl;
65
- if (context.propsValue.livecrawlTimeout !== undefined)
66
- body['livecrawlTimeout'] = context.propsValue.livecrawlTimeout;
67
- if (context.propsValue.subpages !== undefined)
68
- body['subpages'] = context.propsValue.subpages;
69
- if (context.propsValue.subpageTarget)
70
- body['subpageTarget'] = context.propsValue.subpageTarget;
71
- const response = yield (0, common_1.makeRequest)(apiKey, pieces_common_1.HttpMethod.POST, '/contents', body);
72
- return response.results;
73
- });
74
- },
75
- });
76
- //# sourceMappingURL=get-contents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-contents.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-contents.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAwC;AACxC,kCAAkC;AAErB,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,cAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACnB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wBAAwB;SACtC,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACtB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACjC,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,KAAK;YACf,OAAO,EA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AAC,gBAAgB,CAAC;YACtH,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,KAAK,SAAS;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC9F,IAAI,OAAO,CAAC,UAAU,CAAC,aAAa;gBAAE,IAAI,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;YAG/F,MAAM,QAAQ,GAAI,MAAM,IAAA,oBAAW,EAAC,MAAM,EAAE,0BAAU,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAmC,CAAC;YAClH,OAAO,QAAQ,CAAC,OAAO,CAAC;QAC1B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,14 +0,0 @@
1
- export declare const performSearchAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- query: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
4
- category: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
- numResults: import("@activepieces/pieces-framework").NumberProperty<false>;
6
- includeDomains: import("@activepieces/pieces-framework").ArrayProperty<false>;
7
- excludeDomains: import("@activepieces/pieces-framework").ArrayProperty<false>;
8
- startCrawlDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
9
- endCrawlDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
10
- startPublishedDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
11
- endPublishedDate: import("@activepieces/pieces-framework").DateTimeProperty<false>;
12
- includeText: import("@activepieces/pieces-framework").ArrayProperty<false>;
13
- excludeText: import("@activepieces/pieces-framework").ArrayProperty<false>;
14
- }>;
@@ -1,123 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.performSearchAction = 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 common_1 = require("../common");
8
- const auth_1 = require("../auth");
9
- exports.performSearchAction = (0, pieces_framework_1.createAction)({
10
- name: 'perform_search',
11
- displayName: 'Perform Search',
12
- description: "Search the web using semantic or keyword-based search.",
13
- auth: auth_1.exaAuth,
14
- props: {
15
- query: pieces_framework_1.Property.ShortText({
16
- displayName: 'Query',
17
- description: 'Search query to find related articles and data.',
18
- required: true,
19
- }),
20
- type: pieces_framework_1.Property.StaticDropdown({
21
- displayName: 'Search Type',
22
- description: 'Type of search to perform.',
23
- required: false,
24
- defaultValue: 'auto',
25
- options: {
26
- options: [
27
- { label: 'Auto', value: 'auto' },
28
- { label: 'Keyword', value: 'keyword' },
29
- { label: 'Neural', value: 'neural' },
30
- ],
31
- },
32
- }),
33
- category: pieces_framework_1.Property.StaticDropdown({
34
- displayName: 'Category',
35
- description: 'Category of data to focus the search on.',
36
- required: false,
37
- options: {
38
- options: [
39
- { label: 'Company', value: 'company' },
40
- { label: 'Research Paper', value: 'research paper' },
41
- { label: 'News', value: 'news' },
42
- { label: 'PDF', value: 'pdf' },
43
- { label: 'GitHub', value: 'github' },
44
- { label: 'Tweet', value: 'tweet' },
45
- { label: 'Personal Site', value: 'personal site' },
46
- { label: 'LinkedIn Profile', value: 'linkedin profile' },
47
- { label: 'Financial Report', value: 'financial report' },
48
- ],
49
- },
50
- }),
51
- numResults: pieces_framework_1.Property.Number({
52
- displayName: 'Number of Results',
53
- description: 'Number of results to return (max 100).',
54
- required: false,
55
- defaultValue: 10,
56
- }),
57
- includeDomains: pieces_framework_1.Property.Array({
58
- displayName: 'Include Domains',
59
- description: 'Limit results to only these domains.',
60
- required: false,
61
- }),
62
- excludeDomains: pieces_framework_1.Property.Array({
63
- displayName: 'Exclude Domains',
64
- description: 'Exclude results from these domains.',
65
- required: false,
66
- }),
67
- startCrawlDate: pieces_framework_1.Property.DateTime({
68
- displayName: 'Start Crawl Date',
69
- description: 'Only include results crawled after this ISO date.',
70
- required: false,
71
- }),
72
- endCrawlDate: pieces_framework_1.Property.DateTime({
73
- displayName: 'End Crawl Date',
74
- description: 'Only include results crawled before this ISO date.',
75
- required: false,
76
- }),
77
- startPublishedDate: pieces_framework_1.Property.DateTime({
78
- displayName: 'Start Published Date',
79
- description: 'Only include results published after this ISO date.',
80
- required: false,
81
- }),
82
- endPublishedDate: pieces_framework_1.Property.DateTime({
83
- displayName: 'End Published Date',
84
- description: 'Only include results published before this ISO date.',
85
- required: false,
86
- }),
87
- includeText: pieces_framework_1.Property.Array({
88
- displayName: 'Include Text',
89
- description: 'Strings that must be present in the text of results.',
90
- required: false,
91
- }),
92
- excludeText: pieces_framework_1.Property.Array({
93
- displayName: 'Exclude Text',
94
- description: 'Strings that must not be present in the text of results.',
95
- required: false,
96
- }),
97
- },
98
- run(context) {
99
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
100
- const apiKey = context.auth.secret_text;
101
- const body = {
102
- query: context.propsValue.query,
103
- contents: {
104
- text: true
105
- }
106
- };
107
- const optionalProps = [
108
- 'type', 'category', 'numResults', 'includeDomains', 'excludeDomains',
109
- 'startCrawlDate', 'endCrawlDate', 'startPublishedDate', 'endPublishedDate',
110
- 'includeText', 'excludeText',
111
- ];
112
- for (const prop of optionalProps) {
113
- const val = context.propsValue[prop];
114
- if (val !== undefined && val !== null && val !== '') {
115
- body[prop] = val;
116
- }
117
- }
118
- const response = yield (0, common_1.makeRequest)(apiKey, pieces_common_1.HttpMethod.POST, '/search', body);
119
- return response.results;
120
- });
121
- },
122
- });
123
- //# sourceMappingURL=perform-search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"perform-search.js","sourceRoot":"","sources":["../../../../src/lib/actions/perform-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAwC;AACxC,kCAAkC;AAErB,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,WAAW,E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WAAW,EAAE,2BAAQ,CAAC,KAAK,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;YAExC,MAAM,IAAI,GAA4B;gBACpC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;gBAC9B,QAAQ,EAAC;oBACR,IAAI,EAAC,IAAI;iBACT;aACH,CAAC;YAEF,MAAM,aAAa,GAAG;gBACpB,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB;gBACpE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB;gBAC1E,aAAa,EAAE,aAAa;aAC7B,CAAC;YAEF,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;gBACjC,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,IAAuC,CAAC,CAAC;gBACxE,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;oBACpD,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;gBACnB,CAAC;YACH,CAAC;YAED,MAAM,QAAQ,GAAI,MAAM,IAAA,oBAAW,EAAC,MAAM,EAAE,0BAAU,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAmC,CAAC;YAChH,OAAO,QAAQ,CAAC,OAAO,CAAC;QAC1B,CAAC;KAAA;CACF,CAAC,CAAC"}
package/src/lib/auth.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const exaAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
package/src/lib/auth.js DELETED
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exaAuth = 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 common_1 = require("./common");
8
- const markdownDescription = `
9
- Obtain your API key from [Dashboard Setting](https://dashboard.exa.ai/api-keys).
10
- `;
11
- exports.exaAuth = pieces_framework_1.PieceAuth.SecretText({
12
- displayName: 'API Key',
13
- description: markdownDescription,
14
- required: true,
15
- validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
16
- try {
17
- yield (0, common_1.makeRequest)(auth, pieces_common_1.HttpMethod.POST, '/search', { query: 'Activepieces' });
18
- return {
19
- valid: true
20
- };
21
- }
22
- catch (e) {
23
- return {
24
- valid: false,
25
- error: 'Invalid API Key.'
26
- };
27
- }
28
- })
29
- });
30
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,+DAAyD;AACzD,qCAAuC;AAEvC,MAAM,mBAAmB,GAAG;;CAE3B,CAAC;AAEW,QAAA,OAAO,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC1C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,mBAAmB;IAChC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAC,KAAc,EAAE,oDAAT,EAAC,IAAI,EAAC;QACpB,IACA,CAAC;YACC,MAAM,IAAA,oBAAW,EAAC,IAAI,EAAC,0BAAU,CAAC,IAAI,EACpC,SAAS,EAAC,EAAC,KAAK,EAAC,cAAc,EAAC,CACjC,CAAA;YAED,OAAM;gBACJ,KAAK,EAAC,IAAI;aACX,CAAA;QAEH,CAAC;QAAA,OAAM,CAAC,EACR,CAAC;YACC,OAAM;gBACJ,KAAK,EAAC,KAAK;gBACX,KAAK,EAAC,kBAAkB;aACzB,CAAA;QACH,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { HttpMethod } from '@activepieces/pieces-common';
2
- export declare const BASE_URL = "https://api.exa.ai";
3
- export declare function makeRequest(auth: string, method: HttpMethod, path: string, body?: unknown): Promise<any>;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BASE_URL = void 0;
4
- exports.makeRequest = makeRequest;
5
- const tslib_1 = require("tslib");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- exports.BASE_URL = 'https://api.exa.ai';
8
- function makeRequest(auth, method, path, body) {
9
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
- const response = yield pieces_common_1.httpClient.sendRequest({
11
- method,
12
- url: `${exports.BASE_URL}${path}`,
13
- headers: {
14
- 'x-api-key': `${auth}`,
15
- 'Content-Type': 'application/json',
16
- },
17
- body,
18
- });
19
- return response.body;
20
- });
21
- }
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAIA,kCAYC;;AAhBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,oBAAoB,CAAC;AAE7C,SAAsB,WAAW,CAAC,IAAY,EAAE,MAAkB,EAAE,IAAY,EAAE,IAAc;;QAC9F,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YAC5C,MAAM;YACN,GAAG,EAAE,GAAG,gBAAQ,GAAG,IAAI,EAAE;YACzB,OAAO,EAAE;gBACP,WAAW,EAAE,GAAG,IAAI,EAAE;gBACtB,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI;SACL,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CAAA"}