Skip to content

Commit 3c5c02d

Browse files
authored
Merge branch 'master' into issue-14085
2 parents f76e21a + 129369a commit 3c5c02d

File tree

760 files changed

+8085
-41441
lines changed

Some content is hidden

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

760 files changed

+8085
-41441
lines changed

.github/workflows/docs.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint SDK Markdown Files
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize]
6+
paths:
7+
- 'packages/sdk/**/*.md'
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Lint markdown files
22+
uses: DavidAnson/markdownlint-cli2-action@v17
23+
with:
24+
globs: 'packages/sdk/**/*.md'

.github/workflows/pipedream-sdk-test.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ on:
66
paths:
77
- 'packages/sdk/**'
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
test:
1115
runs-on: ubuntu-latest
1216

1317
steps:
1418
- name: Checkout code
15-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
1620

1721
- name: Set up Node.js
1822
uses: actions/setup-node@v3

components/air/air.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+
};

components/alchemy/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

components/alchemy/alchemy.app.mjs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { axios } from "@pipedream/platform";
2+
import constants from "./common/constants.mjs";
3+
4+
export default {
5+
type: "app",
6+
app: "alchemy",
7+
propDefinitions: {
8+
network: {
9+
type: "string",
10+
label: "Network",
11+
description: "Network of the webhook",
12+
options: constants.NETWORKS,
13+
},
14+
query: {
15+
type: "string",
16+
label: "GraphQL Query",
17+
description: "Create a custom GraphQL query or select `Full Block Receipts` to get all log events for every new block",
18+
options: [
19+
{
20+
label: "Full Block Receipts",
21+
value: constants.FULL_BLOCK_RECEIPTS,
22+
},
23+
],
24+
},
25+
},
26+
methods: {
27+
_baseUrl() {
28+
return "https://dashboard.alchemy.com/api";
29+
},
30+
_makeRequest({
31+
$ = this,
32+
path,
33+
...opts
34+
}) {
35+
return axios($, {
36+
url: `${this._baseUrl()}${path}`,
37+
headers: {
38+
"X-Alchemy-Token": this.$auth.auth_token,
39+
},
40+
...opts,
41+
});
42+
},
43+
createWebhook(opts = {}) {
44+
return this._makeRequest({
45+
method: "POST",
46+
path: "/create-webhook",
47+
...opts,
48+
});
49+
},
50+
deleteWebhook(opts = {}) {
51+
return this._makeRequest({
52+
method: "DELETE",
53+
path: "/delete-webhook",
54+
...opts,
55+
});
56+
},
57+
},
58+
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
const NETWORKS = [
2+
"ETH_MAINNET",
3+
"ETH_SEPOLIA",
4+
"ETH_HOLESKY",
5+
"ARBMAINNET",
6+
"ARBSEPOLIA",
7+
"ARBNOVA_MAINNET",
8+
"MATICMAINNET",
9+
"MATICMUMBAI",
10+
"OPTMAINNET",
11+
"OPTGOERLI",
12+
"BASE_MAINNET",
13+
"BASE_SEPOLIA",
14+
"ZKSYNC_MAINNET",
15+
"ZKSYNC_SEPOLIA",
16+
"LINEA_MAINNET",
17+
"LINEA_SEPOLIA",
18+
"GNOSIS_MAINNET",
19+
"GNOSIS_CHIADO",
20+
"FANTOM_MAINNET",
21+
"FANTOM_TESTNET",
22+
"METIS_MAINNET",
23+
"BLAST_MAINNET",
24+
"BLAST_SEPOLIA",
25+
"SHAPE_SEPOLIA",
26+
"ZETACHAIN_MAINNET",
27+
"ZETACHAIN_TESTNET",
28+
"WORLDCHAIN_MAINNET",
29+
"WORLDCHAIN_SEPOLIA",
30+
"BNB_MAINNET",
31+
"BNB_TESTNET",
32+
"AVAX_MAINNET",
33+
"AVAX_FUJI",
34+
"SONEIUM_MINATO",
35+
"GEIST_POLTER",
36+
];
37+
38+
const FULL_BLOCK_RECEIPTS = `
39+
{
40+
block {
41+
hash,
42+
number,
43+
timestamp,
44+
logs(filter: {addresses: [], topics: []}) {
45+
data,
46+
topics,
47+
index,
48+
account {
49+
address
50+
},
51+
transaction {
52+
hash,
53+
nonce,
54+
index,
55+
from {
56+
address
57+
},
58+
to {
59+
address
60+
},
61+
value,
62+
gasPrice,
63+
maxFeePerGas,
64+
maxPriorityFeePerGas,
65+
gas,
66+
status,
67+
gasUsed,
68+
cumulativeGasUsed,
69+
effectiveGasPrice,
70+
createdContract {
71+
address
72+
}
73+
}
74+
}
75+
}
76+
}
77+
`;
78+
79+
export default {
80+
NETWORKS,
81+
FULL_BLOCK_RECEIPTS,
82+
};

components/alchemy/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "@pipedream/alchemy",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"description": "Pipedream Alchemy Components",
5-
"main": "dist/app/alchemy.app.mjs",
5+
"main": "alchemy.app.mjs",
66
"keywords": [
77
"pipedream",
88
"alchemy"
99
],
10-
"files": [
11-
"dist"
12-
],
1310
"homepage": "https://pipedream.com/apps/alchemy",
1411
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1512
"publishConfig": {
1613
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1717
}
1818
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import alchemy from "../../alchemy.app.mjs";
2+
3+
export default {
4+
key: "alchemy-new-graphql-query-instant",
5+
name: "New GraphQL Query (Instant)",
6+
description: "Emit new event when a new GraphQL query is uploaded to Alchemy's Custom Webhook service. [See the documentation](https://docs.alchemy.com/reference/create-webhook)",
7+
version: "0.0.1",
8+
type: "source",
9+
dedupe: "unique",
10+
props: {
11+
alchemy,
12+
db: "$.service.db",
13+
http: {
14+
type: "$.interface.http",
15+
customResponse: true,
16+
},
17+
network: {
18+
propDefinition: [
19+
alchemy,
20+
"network",
21+
],
22+
},
23+
query: {
24+
propDefinition: [
25+
alchemy,
26+
"query",
27+
],
28+
},
29+
},
30+
hooks: {
31+
async activate() {
32+
const { data: { id } } = await this.alchemy.createWebhook({
33+
data: {
34+
network: this.network,
35+
webhook_type: "GRAPHQL",
36+
webhook_url: this.http.endpoint,
37+
graphql_query: this.query,
38+
},
39+
});
40+
this._setHookId(id);
41+
},
42+
async deactivate() {
43+
const hookId = this._getHookId();
44+
if (hookId) {
45+
await this.alchemy.deleteWebhook({
46+
params: {
47+
webhook_id: hookId,
48+
},
49+
});
50+
}
51+
},
52+
},
53+
methods: {
54+
_getHookId() {
55+
return this.db.get("hookId");
56+
},
57+
_setHookId(hookId) {
58+
this.db.set("hookId", hookId);
59+
},
60+
generateMeta(body) {
61+
return {
62+
id: body.id,
63+
summary: `New Event ID: ${body.id}`,
64+
ts: Date.parse(body.createdAt),
65+
};
66+
},
67+
},
68+
async run(event) {
69+
this.http.respond({
70+
status: 200,
71+
});
72+
73+
const { body } = event;
74+
const meta = this.generateMeta(body);
75+
this.$emit(body, meta);
76+
},
77+
};

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",

0 commit comments

Comments
 (0)