Skip to content

Commit fe3c42b

Browse files
committed
Reverting tolstoy
1 parent 619f7d5 commit fe3c42b

File tree

7 files changed

+58
-16
lines changed

7 files changed

+58
-16
lines changed

components/serveravatar/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.js
22
*.mjs
3-
dist
3+
dist

components/serveravatar/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/serveravatar",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Pipedream Server Avatar Components",
55
"main": "dist/app/serveravatar.app.mjs",
66
"types": "dist/app/serveravatar.app.d.ts",
@@ -18,10 +18,11 @@
1818
"access": "public"
1919
},
2020
"devDependencies": {
21-
"@types/node": "^17.0.36"
21+
"@types/node": "^17.0.36",
22+
"@pipedream/types": "^0.3.2"
2223
},
2324
"dependencies": {
2425
"@pipedream/helpers": "^1.3.9",
25-
"@pipedream/platform": "^0.10.0"
26+
"@pipedream/platform": "^3.1.0"
2627
}
2728
}

components/tolstoy/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.js
2+
*.mjs
3+
dist
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { defineApp } from "@pipedream/types";
2+
import { axios } from "@pipedream/platform";
3+
4+
export default defineApp({
5+
type: "app",
6+
app: "tolstoy",
7+
propDefinitions: {},
8+
methods: {
9+
_apiKey() {
10+
return this.$auth.api_key;
11+
},
12+
_apiUrl() {
13+
return "https://api.gotolstoy.com";
14+
},
15+
async _makeRequest({
16+
$ = this, path, ...args
17+
}) {
18+
return axios($, {
19+
url: `${this._apiUrl()}${path}`,
20+
headers: {
21+
Authorization: `Bearer ${this._apiKey()}`,
22+
},
23+
...args,
24+
});
25+
},
26+
async createWebhook({ ...args }) {
27+
return this._makeRequest({
28+
path: "/webhooks/",
29+
method: "post",
30+
...args,
31+
});
32+
},
33+
async removeWebhook(webhookId) {
34+
return this._makeRequest({
35+
path: `/webhooks/${webhookId}`,
36+
method: "delete",
37+
});
38+
},
39+
},
40+
});

components/tolstoy/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
"name": "@pipedream/tolstoy",
33
"version": "0.0.4",
44
"description": "Pipedream Tolstoy Components",
5-
"main": "tolstoy.app.mjs",
5+
"main": "dist/app/tolstoy.app.mjs",
66
"keywords": [
77
"pipedream",
88
"tolstoy"
99
],
10+
"files": [
11+
"dist"
12+
],
1013
"homepage": "https://pipedream.com/apps/tolstoy",
1114
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1215
"publishConfig": {
1316
"access": "public"
1417
},
1518
"dependencies": {
1619
"@pipedream/platform": "^1.1.0"
20+
},
21+
"devDependencies": {
22+
"@pipedream/types": "^0.3.2"
1723
}
1824
}

components/tolstoy/tolstoy.app.mjs

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

components/tolstoy/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../tsconfig.components.json"
3+
}

0 commit comments

Comments
 (0)