Skip to content

Commit b0364a7

Browse files
committed
[FIX] Lusha API Authentication Issue
1 parent 36a8917 commit b0364a7

File tree

8 files changed

+15
-13
lines changed

8 files changed

+15
-13
lines changed

components/lusha/actions/company-enrich/company-enrich.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "lusha-company-enrich",
55
name: "Enrich Companies",
66
description: "Enriches company information based on provided company IDs. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich/enrichprospectingcompanies)",
7-
version: "0.0.4",
7+
version: "0.0.5",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/lusha/actions/company-search/company-search.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "lusha-company-search",
66
name: "Search Companies",
77
description: "Search for companies using various filters. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich/searchprospectingcompanies)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/lusha/actions/contact-enrich/contact-enrich.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "lusha-contact-enrich",
55
name: "Enrich Contacts",
66
description: "Enriches contacts based on provided IDs. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich/enrichprospectingcontacts)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/lusha/actions/contact-search/contact-search.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "lusha-contact-search",
66
name: "Search Contacts",
77
description: "Search for contacts using various filters. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich/searchprospectingcontacts)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/lusha/actions/search-and-enrich-companies/search-and-enrich-companies.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "lusha-search-and-enrich-companies",
66
name: "Search and Enrich Companies",
77
description: "Search for companies and enrich them. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich)",
8-
version: "0.0.2",
8+
version: "0.0.3",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/lusha/actions/search-and-enrich-contacts/search-and-enrich-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "lusha-search-and-enrich-contacts",
66
name: "Search and Enrich Contacts",
77
description: "Search for contacts and enrich them. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich)",
8-
version: "0.0.2",
8+
version: "0.0.3",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/lusha/lusha.app.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export default {
179179
$ = this, path, ...opts
180180
}) {
181181
return axios($, {
182+
debug: true,
182183
url: `${this._baseUrl()}${path}`,
183184
headers: this._headers(),
184185
...opts,
@@ -261,30 +262,31 @@ export default {
261262
});
262263
},
263264
async *paginate({
264-
fn, params = {}, maxResults = null, ...opts
265+
fn, data = {}, maxResults = null, ...opts
265266
}) {
266267
let hasMore = false;
267268
let count = 0;
268269
let page = -1;
269270

270271
do {
271-
params.pages = {
272+
data.pages = {
272273
page: ++page,
273274
size: 50,
274275
};
275-
const { data } = await fn({
276-
params,
276+
const response = await fn({
277+
data,
277278
...opts,
278279
});
279-
for (const d of data) {
280+
const results = response.data || [];
281+
for (const d of results) {
280282
yield d;
281283

282284
if (maxResults && ++count === maxResults) {
283285
return count;
284286
}
285287
}
286288

287-
hasMore = data.length;
289+
hasMore = results.length;
288290

289291
} while (hasMore);
290292
},

components/lusha/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/lusha",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Pipedream Lusha Components",
55
"main": "lusha.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)