Skip to content

Commit d0e0356

Browse files
authored
[Components] Full Enrich - new components (#16029)
1 parent b79f82f commit d0e0356

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import app from "../../fullenrich.app.mjs";
2+
3+
export default {
4+
key: "fullenrich-check-if-api-key-is-valid",
5+
name: "Check If API Key Is Valid",
6+
description: "Check if the FullEnrich API key is valid. [See the documentation](https://docs.fullenrich.com/checkkey).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
methods: {
13+
checkApiKeyIsValid() {
14+
return this.app._makeRequest({
15+
path: "/account/keys/verify",
16+
});
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.checkApiKeyIsValid();
21+
$.export("$summary", "Successfully verified the API key.");
22+
return response;
23+
},
24+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import app from "../../fullenrich.app.mjs";
2+
3+
export default {
4+
key: "fullenrich-get-current-credit-balance",
5+
name: "Get Current Credit Balance",
6+
description: "Provides the current balance of credits available in your workspace. [See the documentation](https://docs.fullenrich.com/getcredit).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
methods: {
13+
getCurrentCreditBalance() {
14+
return this.app._makeRequest({
15+
path: "/account/credits",
16+
});
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.getCurrentCreditBalance();
21+
$.export("$summary", `Successfully retrieved current credit balance of \`${response.balance}\` credits.`);
22+
return response;
23+
},
24+
};

components/fullenrich/package.json

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

0 commit comments

Comments
 (0)