Skip to content

Commit 31c6677

Browse files
committed
Merge branch 'master' into 18952-action-expand-messaging-functionality-for-dixa
2 parents bb5619e + 13c885a commit 31c6677

File tree

82 files changed

+13465
-11844
lines changed

Some content is hidden

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

82 files changed

+13465
-11844
lines changed

components/aevent/aevent.app.mjs

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,58 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "aevent",
4-
propDefinitions: {},
56
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
7+
_apiUrl() {
8+
return "https://app.aevent.com/api";
9+
},
10+
_getHeaders() {
11+
return {
12+
"Authorization": `Bearer ${this.$auth.api_token}`,
13+
"Accept": "application/json",
14+
"Content-Type": "application/json",
15+
};
16+
},
17+
_makeRequest({
18+
$ = this, path, ...opts
19+
}) {
20+
return axios($, {
21+
url: `${this._apiUrl()}/${path}`,
22+
headers: this._getHeaders(),
23+
...opts,
24+
});
25+
},
26+
listRegistrants(args = {}) {
27+
return this._makeRequest({
28+
path: "registrants",
29+
...args,
30+
});
31+
},
32+
async *paginate({
33+
fn, params = {}, maxResults = null,
34+
}) {
35+
let hasMore = false;
36+
let count = 0;
37+
let page = 0;
38+
39+
do {
40+
params.page = page++;
41+
const { success: data } = await fn({
42+
params,
43+
});
44+
45+
for (const d of data) {
46+
yield d;
47+
48+
if (maxResults && ++count === maxResults) {
49+
return count;
50+
}
51+
}
52+
53+
hasMore = data.length;
54+
55+
} while (hasMore);
956
},
1057
},
1158
};

components/aevent/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/aevent",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream AEvent Components",
55
"main": "aevent.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.1.1"
1417
}
1518
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
2+
import aevent from "../../aevent.app.mjs";
3+
import sampleEmit from "./test-event.mjs";
4+
5+
export default {
6+
key: "aevent-new-registrant",
7+
name: "New Registrant",
8+
description: "Emit new event when a new registrant is added. [See the Documentation](https://app.aevent.com/#/settings)",
9+
version: "0.0.1",
10+
type: "source",
11+
dedupe: "unique",
12+
props: {
13+
aevent,
14+
db: "$.service.db",
15+
timer: {
16+
type: "$.interface.timer",
17+
default: {
18+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
19+
},
20+
},
21+
},
22+
methods: {
23+
_getLastDate() {
24+
return this.db.get("lastDate") || 0;
25+
},
26+
_setLastDate(lastDate) {
27+
this.db.set("lastDate", lastDate);
28+
},
29+
async emitEvent(maxResults = false) {
30+
const lastDate = this._getLastDate();
31+
const response = this.aevent.paginate({
32+
fn: this.aevent.listRegistrants,
33+
params: {
34+
lastDate,
35+
},
36+
maxResults,
37+
});
38+
39+
let responseArray = [];
40+
for await (const item of response) {
41+
if (item.registrationTime <= lastDate) break;
42+
responseArray.push(item);
43+
}
44+
45+
if (responseArray.length) {
46+
this._setLastDate(responseArray[0].registrationTime);
47+
}
48+
49+
for (const item of responseArray.reverse()) {
50+
this.$emit(item, {
51+
id: item.uuid,
52+
summary: `New registrant: ${item.email || item.uuid}`,
53+
ts: item.registrationTime,
54+
});
55+
}
56+
},
57+
},
58+
hooks: {
59+
async deploy() {
60+
await this.emitEvent(25);
61+
},
62+
},
63+
async run() {
64+
await this.emitEvent();
65+
},
66+
sampleEmit,
67+
};
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
export default {
2+
"email": "email@example.com",
3+
"firstName": "Test",
4+
"lastName": "Example",
5+
"phone": "+12342342323",
6+
"uuid": "unique-id",
7+
"customFields": {
8+
"Field": ""
9+
},
10+
"integrations": "{\"registration\": {\"agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0\", \"browser\": \"Chrome\", \"operating_system\": \"Windows\"}}",
11+
"webinarID": "webinar-id",
12+
"joinURL": "https://aevent.stream/123abc/123abc",
13+
"webinarTimeline": "timeline-id",
14+
"uniqueID":1,
15+
"unsub":0,
16+
"registrationTime":1762884255,
17+
"timeline": {
18+
"uniqueID":2,
19+
"webinarTimeline": "timeline-id",
20+
"nodeID": "events",
21+
"blocks": "{\"0\": [{\"id\": \"_cxkn4qzpt\", \"day\": \"0\", \"key\": \"0\", \"tag\": null, \"amPm\": 1, \"days\": \"0\", \"hours\": null, \"model\": {\"id\": \"_cxkn4qzpt\", \"message\": \"Welcome to the event everyone, so glad you made it here !\\n\\n\", \"isDelete\": false, \"imagefile\": null, \"action_days\": \"0\", \"fromEventID\": [], \"action_hours\": null, \"fromEventName\": \"\", \"action_groupID\": \"3\", \"action_isAfter\": 1, \"action_isExact\": false, \"action_minutes\": \"5\", \"action_actionTitle\": \"Auto Chat to Audience\"}, \"action\": \"webinar-livechat\", \"dayKey\": \"0\", \"nodeID\": 5, \"groupID\": \"3\", \"isAfter\": 1, \"isExact\": false, \"minutes\": \"5\", \"groupName\": \"Registrants\", \"actionIcon\": \"message-processing\", \"actionTitle\": \"Auto Chat to Audience\", \"insertDayKey\": 0, \"integrationID\": \"adminwebinar\", \"integrationName\": \"LIVE Event Automations\", \"integrationType\": \"WEBINAR\"}, {\"id\": \"_125f969xg\", \"day\": \"0\", \"key\": \"0\", \"tag\": null, \"amPm\": 1, \"days\": \"0\", \"hours\": null, \"model\": {\"id\": \"_125f969xg\", \"message\": \"Welcome to the event everyone, so glad you made it here !\\nHere's the link to join:\\nwww.yourctapage.com\\n\\n\", \"isDelete\": false, \"imagefile\": null, \"action_days\": \"0\", \"fromEventID\": [], \"action_hours\": null, \"action_nodeID\": 5, \"fromEventName\": \"\", \"action_groupID\": \"3\", \"action_isAfter\": 1, \"action_isExact\": false, \"action_minutes\": \"30\", \"action_groupName\": \"Registrants\", \"action_actionTitle\": \"Auto Chat to Audience\"}, \"action\": \"webinar-livechat\", \"dayKey\": \"0\", \"nodeID\": 30, \"groupID\": \"3\", \"isAfter\": 1, \"isExact\": false, \"minutes\": \"30\", \"groupName\": \"Registrants\", \"nodeIdKey\": \"_125f969xg\", \"actionIcon\": \"message-processing\", \"actionTitle\": \"Auto Chat to Audience\", \"insertDayKey\": 0, \"integrationID\": \"adminwebinar\", \"integrationName\": \"LIVE Event Automations\", \"integrationType\": \"WEBINAR\"}], \"+1\": [], \"+2\": [], \"+3\": [], \"+4\": [], \"+5\": [], \"+6\": [], \"+7\": [], \"+8\": [], \"+9\": [], \"-1\": [], \"-2\": [], \"-3\": [], \"-4\": [], \"-5\": [], \"-6\": [], \"-7\": [], \"-8\": [], \"-9\": [], \"+10\": [], \"+11\": [], \"+12\": [], \"+13\": [], \"+14\": [], \"+15\": [], \"+16\": [], \"+17\": [], \"+18\": [], \"+19\": [], \"+20\": [], \"+21\": [], \"+22\": [], \"+23\": [], \"+24\": [], \"+25\": [], \"+26\": [], \"+27\": [], \"+28\": [], \"+29\": [], \"+30\": [], \"+31\": [], \"+32\": [], \"+33\": [], \"+34\": [], \"+35\": [], \"+36\": [], \"+37\": [], \"+38\": [], \"+39\": [], \"+40\": [], \"+41\": [], \"+42\": [], \"+43\": [], \"+44\": [], \"+45\": [], \"-10\": [], \"-11\": [], \"-12\": [], \"-13\": [], \"-14\": [], \"-15\": [], \"-16\": [], \"-17\": [], \"-18\": [], \"-19\": [], \"-20\": [], \"-21\": [], \"-22\": [], \"-23\": [], \"-24\": [], \"-25\": [], \"-26\": [], \"-27\": [], \"-28\": [], \"-29\": [], \"-30\": [], \"-31\": [], \"-32\": [], \"-33\": [], \"-34\": [], \"-35\": [], \"-36\": [], \"-37\": [], \"-38\": [], \"-39\": [], \"-40\": [], \"-41\": [], \"-42\": [], \"-43\": [], \"-44\": [], \"-45\": []}",
22+
"created_at": "2025-05-13T22:47:28.000000Z",
23+
"updated_at": "2025-11-11T17:57:18.000000Z",
24+
"version": null,
25+
"deleted_at": null,
26+
"level": null,
27+
"registration_setting": {
28+
"uniqueID":5,
29+
"generalSettingID": "general-setting-id",
30+
"nodeID": "registration",
31+
"blocks": "{\"type\": \"multi-option\", \"block\": 0, \"joinStart\": \"15\", \"setupType\": \"page\", \"whitelist\": {\"domains\": \"\", \"enabled\": false}, \"buttonType\": \"defaultButton\", \"customForms\": [{\"name\": \"Field\", \"type\": \"custom_form\"}], \"replayStart\": \"45\", \"customeEnable\": false, \"registrationBody\": \"Test\", \"registrationStart\": \"15\", \"isInnerPageEnabled\": true, \"registrationSubject\": \"Test\"}",
32+
"created_at": "2025-05-13T22:47:27.000000Z",
33+
"updated_at": "2025-11-11T18:03:02.000000Z",
34+
"version": null,
35+
"deleted_at": null,
36+
"timelineID": "timeline-id",
37+
"type": "multi-option",
38+
"block":0,
39+
"joinStart": "15",
40+
"setupType": "page",
41+
"whitelist": {
42+
"domains": "",
43+
"enabled":false
44+
},
45+
"buttonType": "defaultButton",
46+
"customForms":[
47+
{
48+
"name": "Field",
49+
"type": "custom_form"
50+
}
51+
],
52+
"replayStart": "45",
53+
"customeEnable":false,
54+
"registrationBody": "registration-body",
55+
"registrationStart": "15",
56+
"isInnerPageEnabled":true,
57+
"registrationSubject": "registration-subject",
58+
"timeline": {
59+
"uniqueID":2,
60+
"webinarTimeline": "unique-timeline-id",
61+
"nodeID": "events",
62+
"blocks": "{\"0\": [{\"id\": \"_cxkn4qzpt\", \"day\": \"0\", \"key\": \"0\", \"tag\": null, \"amPm\": 1, \"days\": \"0\", \"hours\": null, \"model\": {\"id\": \"_cxkn4qzpt\", \"message\": \"Welcome to the event everyone, so glad you made it here !\\n\\n\", \"isDelete\": false, \"imagefile\": null, \"action_days\": \"0\", \"fromEventID\": [], \"action_hours\": null, \"fromEventName\": \"\", \"action_groupID\": \"3\", \"action_isAfter\": 1, \"action_isExact\": false, \"action_minutes\": \"5\", \"action_actionTitle\": \"Auto Chat to Audience\"}, \"action\": \"webinar-livechat\", \"dayKey\": \"0\", \"nodeID\": 5, \"groupID\": \"3\", \"isAfter\": 1, \"isExact\": false, \"minutes\": \"5\", \"groupName\": \"Registrants\", \"actionIcon\": \"message-processing\", \"actionTitle\": \"Auto Chat to Audience\", \"insertDayKey\": 0, \"integrationID\": \"adminwebinar\", \"integrationName\": \"LIVE Event Automations\", \"integrationType\": \"WEBINAR\"}, {\"id\": \"_125f969xg\", \"day\": \"0\", \"key\": \"0\", \"tag\": null, \"amPm\": 1, \"days\": \"0\", \"hours\": null, \"model\": {\"id\": \"_125f969xg\", \"message\": \"Welcome to the event everyone, so glad you made it here !\\nHere's the link to join:\\nwww.yourctapage.com\\n\\n\", \"isDelete\": false, \"imagefile\": null, \"action_days\": \"0\", \"fromEventID\": [], \"action_hours\": null, \"action_nodeID\": 5, \"fromEventName\": \"\", \"action_groupID\": \"3\", \"action_isAfter\": 1, \"action_isExact\": false, \"action_minutes\": \"30\", \"action_groupName\": \"Registrants\", \"action_actionTitle\": \"Auto Chat to Audience\"}, \"action\": \"webinar-livechat\", \"dayKey\": \"0\", \"nodeID\": 30, \"groupID\": \"3\", \"isAfter\": 1, \"isExact\": false, \"minutes\": \"30\", \"groupName\": \"Registrants\", \"nodeIdKey\": \"_125f969xg\", \"actionIcon\": \"message-processing\", \"actionTitle\": \"Auto Chat to Audience\", \"insertDayKey\": 0, \"integrationID\": \"adminwebinar\", \"integrationName\": \"LIVE Event Automations\", \"integrationType\": \"WEBINAR\"}], \"+1\": [], \"+2\": [], \"+3\": [], \"+4\": [], \"+5\": [], \"+6\": [], \"+7\": [], \"+8\": [], \"+9\": [], \"-1\": [], \"-2\": [], \"-3\": [], \"-4\": [], \"-5\": [], \"-6\": [], \"-7\": [], \"-8\": [], \"-9\": [], \"+10\": [], \"+11\": [], \"+12\": [], \"+13\": [], \"+14\": [], \"+15\": [], \"+16\": [], \"+17\": [], \"+18\": [], \"+19\": [], \"+20\": [], \"+21\": [], \"+22\": [], \"+23\": [], \"+24\": [], \"+25\": [], \"+26\": [], \"+27\": [], \"+28\": [], \"+29\": [], \"+30\": [], \"+31\": [], \"+32\": [], \"+33\": [], \"+34\": [], \"+35\": [], \"+36\": [], \"+37\": [], \"+38\": [], \"+39\": [], \"+40\": [], \"+41\": [], \"+42\": [], \"+43\": [], \"+44\": [], \"+45\": [], \"-10\": [], \"-11\": [], \"-12\": [], \"-13\": [], \"-14\": [], \"-15\": [], \"-16\": [], \"-17\": [], \"-18\": [], \"-19\": [], \"-20\": [], \"-21\": [], \"-22\": [], \"-23\": [], \"-24\": [], \"-25\": [], \"-26\": [], \"-27\": [], \"-28\": [], \"-29\": [], \"-30\": [], \"-31\": [], \"-32\": [], \"-33\": [], \"-34\": [], \"-35\": [], \"-36\": [], \"-37\": [], \"-38\": [], \"-39\": [], \"-40\": [], \"-41\": [], \"-42\": [], \"-43\": [], \"-44\": [], \"-45\": []}",
63+
"created_at": "2025-05-13T22:47:28.000000Z",
64+
"updated_at": "2025-11-11T17:57:18.000000Z",
65+
"version": null,
66+
"deleted_at": null,
67+
"level": null
68+
}
69+
}
70+
},
71+
"attendance": {
72+
"groups":[
73+
"Registrants",
74+
"Non-Attendee"
75+
]
76+
},
77+
"added":[
78+
"AEvent.Stream"
79+
],
80+
"pending":[],
81+
"timelineName": "timeline-name",
82+
"failed":false,
83+
"banned":false,
84+
"webinarSubject": "webinar-subject",
85+
"registrationDate": "11/11/2025 - 1:04 PM EST"
86+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import arxiv from "../../arxiv.app.mjs";
2+
import fs from "fs";
3+
4+
export default {
5+
key: "arxiv-search-articles",
6+
name: "Search Articles",
7+
description: "Search for articles on arXiv. [See the documentation](https://info.arxiv.org/help/api/user-manual.html#2-api-quickstart)",
8+
version: "0.0.1",
9+
type: "action",
10+
annotations: {
11+
destructiveHint: false,
12+
openWorldHint: true,
13+
readOnlyHint: true,
14+
},
15+
props: {
16+
arxiv,
17+
searchQuery: {
18+
type: "string",
19+
label: "Search Query",
20+
description: "The search query to use. Example: `all:electron`. [See the documentation](https://info.arxiv.org/help/api/user-manual.html#51-details-of-query-construction) for information on constructing a search query.",
21+
optional: true,
22+
},
23+
idList: {
24+
type: "string[]",
25+
label: "ID List",
26+
description: "A list of arXiv article IDs to search for. Example ID: `2505.08081v1`",
27+
optional: true,
28+
},
29+
start: {
30+
type: "integer",
31+
label: "Start",
32+
description: "The index of the first result to return. Defaults to 0.",
33+
optional: true,
34+
},
35+
maxResults: {
36+
type: "integer",
37+
label: "Max Results",
38+
description: "The maximum number of results to return. Defaults to 10.",
39+
optional: true,
40+
},
41+
filename: {
42+
type: "string",
43+
label: "Filename",
44+
description: "A filename to save the result as an xml file to the /tmp directory. Example: `arxiv-search-results.xml`",
45+
optional: true,
46+
},
47+
syncDir: {
48+
type: "dir",
49+
accessMode: "write",
50+
sync: true,
51+
},
52+
},
53+
async run({ $ }) {
54+
const response = await this.arxiv.search({
55+
$,
56+
params: {
57+
search_query: this.searchQuery,
58+
id_list: this.idList
59+
? this.idList.join(",")
60+
: undefined,
61+
start: this.start,
62+
max_results: this.maxResults,
63+
},
64+
});
65+
66+
if (!this.filename) {
67+
$.export("$summary", "Successfully searched for articles");
68+
return response;
69+
}
70+
71+
const filePath = `/tmp/${this.filename}`;
72+
fs.writeFileSync(filePath, response, "utf8");
73+
74+
$.export("$summary", `Successfully saved search results to ${filePath}`);
75+
return {
76+
filePath,
77+
fileContent: response,
78+
};
79+
},
80+
};

components/arxiv/arxiv.app.mjs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "arxiv",
46
propDefinitions: {},
57
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
8+
_baseUrl() {
9+
return "https://export.arxiv.org/api";
10+
},
11+
_makeRequest({
12+
$ = this, path, ...opts
13+
}) {
14+
return axios($, {
15+
url: `${this._baseUrl()}${path}`,
16+
...opts,
17+
});
18+
},
19+
search(opts = {}) {
20+
return this._makeRequest({
21+
path: "/query",
22+
...opts,
23+
});
924
},
1025
},
1126
};

components/arxiv/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/arxiv",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream arXiv Components",
55
"main": "arxiv.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.1.1"
1417
}
1518
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import app from "../../blocknative.app.mjs";
2+
3+
export default {
4+
key: "blocknative-get-chains",
5+
name: "Get Chains",
6+
description: "Get a list of supported chains. [See the documentation](https://docs.blocknative.com/gas-prediction/gas-platform-1)",
7+
version: "0.0.1",
8+
annotations: {
9+
destructiveHint: false,
10+
openWorldHint: true,
11+
readOnlyHint: true,
12+
},
13+
type: "action",
14+
props: {
15+
app,
16+
},
17+
async run({ $ }) {
18+
const response = await this.app.getChains({
19+
$,
20+
});
21+
$.export("$summary", "Successfully retrieved " + response.length + " chains");
22+
return response;
23+
},
24+
};

0 commit comments

Comments
 (0)