Skip to content

Commit 1f5a2e5

Browse files
authored
Merge branch 'master' into issue-14359
2 parents 8b1ef6d + 0ded330 commit 1f5a2e5

File tree

65 files changed

+1898
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1898
-194
lines changed

components/anthropic/actions/chat/chat.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import constants from "../common/constants.mjs";
33

44
export default {
55
name: "Chat",
6-
version: "0.0.8",
6+
version: "0.0.9",
77
key: "anthropic-chat",
88
description: "The Chat API. [See the documentation](https://docs.anthropic.com/claude/reference/messages_post)",
99
type: "action",

components/anthropic/actions/common/constants.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export default {
22
MESSAGE_MODELS: [
3+
"claude-3-5-sonnet-20241022",
34
"claude-3-5-sonnet-20240620",
45
"claude-3-opus-20240229",
56
"claude-3-sonnet-20240229",

components/anthropic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/anthropic",
3-
"version": "0.0.10",
3+
"version": "0.0.11",
44
"description": "Pipedream Anthropic (Claude) Components",
55
"main": "anthropic.app.mjs",
66
"keywords": [
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import enrichley from "../../enrichley.app.mjs";
2+
3+
export default {
4+
key: "enrichley-validate-email",
5+
name: "Validate Email",
6+
description: "Checks the validity of a single email address using Enrichley. [See the documentation](https://enrichley.readme.io/reference/validatesingleemail)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
enrichley,
11+
email: {
12+
type: "string",
13+
label: "Email",
14+
description: "The email address to validate",
15+
},
16+
},
17+
async run({ $ }) {
18+
const response = await this.enrichley.validateEmail({
19+
$,
20+
data: {
21+
email: this.email,
22+
},
23+
});
24+
$.export("$summary", `Successfully retrieved status for email: ${this.email}`);
25+
return response;
26+
},
27+
};
Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "enrichley",
4-
propDefinitions: {},
56
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
7+
_baseUrl() {
8+
return "https://api.enrichley.io/api/v1";
9+
},
10+
_makeRequest({
11+
$ = this,
12+
path,
13+
...opts
14+
}) {
15+
return axios($, {
16+
url: `${this._baseUrl()}${path}`,
17+
headers: {
18+
"Accept": "application/json",
19+
"X-API-Key": `${this.$auth.api_key}`,
20+
},
21+
...opts,
22+
});
23+
},
24+
validateEmail(opts = {}) {
25+
return this._makeRequest({
26+
method: "POST",
27+
path: "/validate-single-email",
28+
...opts,
29+
});
930
},
1031
},
11-
};
32+
};

components/enrichley/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/enrichley",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Enrichley Components",
55
"main": "enrichley.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1417
}
15-
}
18+
}

components/fal_ai/fal_ai.app.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "fal_ai",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/fal_ai/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/fal_ai",
3+
"version": "0.0.1",
4+
"description": "Pipedream fal.ai Components",
5+
"main": "fal_ai.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"fal_ai"
9+
],
10+
"homepage": "https://pipedream.com/apps/fal_ai",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import { ConfigurationError } from "@pipedream/platform";
2+
import app from "../../heyy.app.mjs";
3+
import utils from "../../common/utils.mjs";
4+
5+
export default {
6+
key: "heyy-create-contact",
7+
name: "Create Contact",
8+
description: "Creates a new contact for the business. [See the documentation](https://documenter.getpostman.com/view/27408936/2sA2r3a6DW#a1249b8d-10cf-446a-be35-eb8793ffa967).",
9+
version: "0.0.1",
10+
type: "action",
11+
props: {
12+
app,
13+
phoneNumber: {
14+
propDefinition: [
15+
app,
16+
"phoneNumber",
17+
],
18+
},
19+
firstName: {
20+
propDefinition: [
21+
app,
22+
"firstName",
23+
],
24+
},
25+
lastName: {
26+
propDefinition: [
27+
app,
28+
"lastName",
29+
],
30+
},
31+
email: {
32+
propDefinition: [
33+
app,
34+
"email",
35+
],
36+
},
37+
labels: {
38+
propDefinition: [
39+
app,
40+
"labels",
41+
],
42+
},
43+
attributes: {
44+
propDefinition: [
45+
app,
46+
"attributes",
47+
],
48+
},
49+
},
50+
methods: {
51+
createContact(args = {}) {
52+
return this.app.post({
53+
path: "/contacts",
54+
...args,
55+
});
56+
},
57+
},
58+
async run({ $ }) {
59+
const {
60+
createContact,
61+
phoneNumber,
62+
firstName,
63+
lastName,
64+
email,
65+
labels,
66+
attributes,
67+
} = this;
68+
69+
if (!utils.isPhoneNumberValid(phoneNumber)) {
70+
throw new ConfigurationError(`The phone number \`${phoneNumber}\` is invalid. Please provide a valid phone number.`);
71+
}
72+
73+
const response = await createContact({
74+
$,
75+
data: {
76+
phoneNumber,
77+
firstName,
78+
lastName,
79+
email,
80+
...(labels?.length && {
81+
labels: labels.map((name) => ({
82+
name,
83+
})),
84+
}),
85+
attributes:
86+
attributes && Object.entries(attributes)
87+
.reduce((acc, [
88+
externalId,
89+
value,
90+
]) => ([
91+
...acc,
92+
{
93+
externalId,
94+
value,
95+
},
96+
]), []),
97+
},
98+
});
99+
$.export("$summary", `Successfully created contact with ID \`${response.data.id}\`.`);
100+
return response;
101+
},
102+
};

0 commit comments

Comments
 (0)