Skip to content

Commit 25ad38b

Browse files
committed
Merge branch 'master' into 15151-launchdarkly-oauth-components
2 parents 8049e51 + 21bddc4 commit 25ad38b

File tree

185 files changed

+3577
-227
lines changed

Some content is hidden

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

185 files changed

+3577
-227
lines changed

components/bluesky/actions/create-post/create-post.mjs

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "bluesky-create-post",
66
name: "Create Post",
77
description: "Creates a new post on Bluesky. [See the documentation](https://docs.bsky.app/docs/api/com-atproto-repo-create-record).",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
app,
@@ -15,6 +15,40 @@ export default {
1515
description: "The text content of the post.",
1616
},
1717
},
18+
methods: {
19+
parseUrls(text) {
20+
const spans = [];
21+
const urlRegex = /(?:[$|\W])(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*[-a-zA-Z0-9@%_+~#//=])?)/g;
22+
23+
let match;
24+
while ((match = urlRegex.exec(text)) !== null) {
25+
spans.push({
26+
start: match.index + 1,
27+
end: urlRegex.lastIndex,
28+
url: match[1],
29+
});
30+
}
31+
return spans;
32+
},
33+
parseFacets(text) {
34+
const facets = [];
35+
for (const link of this.parseUrls(text)) {
36+
facets.push({
37+
index: {
38+
byteStart: link["start"],
39+
byteEnd: link["end"],
40+
},
41+
features: [
42+
{
43+
["$type"]: "app.bsky.richtext.facet#link",
44+
uri: link["url"],
45+
},
46+
],
47+
});
48+
}
49+
return facets;
50+
},
51+
},
1852
async run({ $ }) {
1953
const {
2054
app,
@@ -28,6 +62,7 @@ export default {
2862
record: {
2963
["$type"]: constants.RESOURCE_TYPE.POST,
3064
text,
65+
facets: this.parseFacets(text),
3166
createdAt: new Date().toISOString(),
3267
},
3368
},

components/bluesky/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/bluesky",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Bluesky Components",
55
"main": "bluesky.app.mjs",
66
"keywords": [
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: "bluesnap",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/bluesnap/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/bluesnap",
3+
"version": "0.0.1",
4+
"description": "Pipedream BlueSnap Components",
5+
"main": "bluesnap.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"bluesnap"
9+
],
10+
"homepage": "https://pipedream.com/apps/bluesnap",
11+
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
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: "callminer",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/callminer/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/callminer",
3+
"version": "0.0.1",
4+
"description": "Pipedream CallMiner Components",
5+
"main": "callminer.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"callminer"
9+
],
10+
"homepage": "https://pipedream.com/apps/callminer",
11+
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/charthop/charthop.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import app from "../../chat_data.app.mjs";
2+
3+
export default {
4+
key: "chat_data-create-chatbot",
5+
name: "Create Chatbot",
6+
description: "Create a chatbot with the specified properties. [See the documentation](https://www.chat-data.com/api-reference#tag/Chatbot-Operations/operation/chatbotCreate)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
chatbotName: {
12+
propDefinition: [
13+
app,
14+
"chatbotName",
15+
],
16+
},
17+
sourceText: {
18+
propDefinition: [
19+
app,
20+
"sourceText",
21+
],
22+
},
23+
urlsToScrape: {
24+
propDefinition: [
25+
app,
26+
"urlsToScrape",
27+
],
28+
},
29+
customBackend: {
30+
propDefinition: [
31+
app,
32+
"customBackend",
33+
],
34+
},
35+
model: {
36+
propDefinition: [
37+
app,
38+
"model",
39+
],
40+
},
41+
},
42+
43+
async run({ $ }) {
44+
const response = await this.app.createChatbot({
45+
$,
46+
data: {
47+
chatbotName: this.chatbotName,
48+
sourceText: this.sourceText,
49+
urlsToScrape: this.urlsToScrape,
50+
customBackend: this.customBackend,
51+
model: this.model,
52+
},
53+
});
54+
$.export("$summary", `Successfully created Chatbot with ID '${response.chatbotId}'`);
55+
return response;
56+
},
57+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import app from "../../chat_data.app.mjs";
2+
3+
export default {
4+
key: "chat_data-delete-chatbot",
5+
name: "Delete Chatbot",
6+
description: "Delete a chatbot with the specified ID. [See the documentation](https://www.chat-data.com/api-reference#tag/Chatbot-Operations/operation/chatbotDelete)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
chatbotId: {
12+
propDefinition: [
13+
app,
14+
"chatbotId",
15+
],
16+
},
17+
},
18+
19+
async run({ $ }) {
20+
const response = await this.app.deleteChatbot({
21+
$,
22+
chatbotId: this.chatbotId,
23+
});
24+
25+
$.export("$summary", `Successfully deleted Chatbot with ID '${this.chatbotId}'`);
26+
27+
return response;
28+
},
29+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import app from "../../chat_data.app.mjs";
2+
3+
export default {
4+
key: "chat_data-get-chatbot-details",
5+
6+
name: "Get Chatbot Status",
7+
description: "Get status of the Chatbot with the specified ID. [See the documentation](https://www.chat-data.com/api-reference#tag/Chatbot-Operations/operation/GetChatbotStatus)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
app,
12+
chatbotId: {
13+
propDefinition: [
14+
app,
15+
"chatbotId",
16+
],
17+
},
18+
},
19+
20+
async run({ $ }) {
21+
const response = await this.app.getChatbotStatus({
22+
$,
23+
chatbotId: this.chatbotId,
24+
});
25+
26+
$.export("$summary", `Successfully retrieved status of the Chatbot with ID '${this.chatbotId}'`);
27+
28+
return response;
29+
},
30+
};

0 commit comments

Comments
 (0)