Compare commits
432 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
579638f932 | ||
![]() |
48871c82a6 | ||
![]() |
14056c42ef | ||
![]() |
90fe1576de | ||
![]() |
d61cf13985 | ||
![]() |
dfe6dfd0c6 | ||
![]() |
c138c7d0e9 | ||
![]() |
d542be947e | ||
![]() |
c76366e72e | ||
![]() |
75abfda783 | ||
![]() |
f3d8d7d4ad | ||
![]() |
7255eccb22 | ||
![]() |
a0decb70cc | ||
![]() |
532f562495 | ||
![]() |
27e58ae925 | ||
![]() |
abf30dfc1a | ||
![]() |
218b8ce86e | ||
![]() |
4867ffcb4b | ||
![]() |
e34c3b411d | ||
![]() |
c91b8be1a6 | ||
![]() |
9cb41644a1 | ||
![]() |
8c01cea147 | ||
![]() |
58eb55e90a | ||
![]() |
bb05e82e15 | ||
![]() |
5ab95ea175 | ||
![]() |
a25c4f1d1e | ||
![]() |
15287de8af | ||
![]() |
49b4d6b511 | ||
![]() |
d5b4a5d4ac | ||
![]() |
de480b491c | ||
![]() |
a949fda1fc | ||
![]() |
3e28af670c | ||
![]() |
b5310afb90 | ||
![]() |
da81ecf915 | ||
![]() |
f597066d16 | ||
![]() |
ec30606b24 | ||
![]() |
20dce14f17 | ||
![]() |
821742de85 | ||
![]() |
74dc108f62 | ||
![]() |
a05fe856bb | ||
![]() |
d13f51a32d | ||
![]() |
3dbe599cb3 | ||
![]() |
cf966dd83c | ||
![]() |
4e62f3654f | ||
![]() |
970d926563 | ||
![]() |
ff49c747ba | ||
![]() |
c46b8a5f4f | ||
![]() |
485324e204 | ||
![]() |
4696a03db1 | ||
![]() |
7885de36a9 | ||
![]() |
fac4339207 | ||
![]() |
9c70519021 | ||
![]() |
9ae77ecd5d | ||
![]() |
1c8e6f278d | ||
![]() |
c0a190a9f2 | ||
![]() |
e29e2a62f0 | ||
![]() |
1580640a35 | ||
![]() |
33c84b7fcc | ||
![]() |
9773ce75b0 | ||
![]() |
c310e8d152 | ||
![]() |
af251c7b81 | ||
![]() |
122483de0c | ||
![]() |
42c2131144 | ||
![]() |
71bc7a62c2 | ||
![]() |
87bfff07db | ||
![]() |
1cb5b780d2 | ||
![]() |
2f6acd4d6e | ||
![]() |
c2e2351505 | ||
![]() |
d847b5480b | ||
![]() |
32749ee58e | ||
![]() |
a531b8b5fe | ||
![]() |
148a0c5bb0 | ||
![]() |
39f9a58200 | ||
![]() |
edd113d344 | ||
![]() |
c641e8729b | ||
![]() |
2c4b13e4b5 | ||
![]() |
48fcf4dda7 | ||
![]() |
acfd980d4f | ||
![]() |
db9bfab812 | ||
![]() |
d32820ee09 | ||
![]() |
0f823fd19e | ||
![]() |
4308ed5850 | ||
![]() |
b9cd7c3983 | ||
![]() |
fa607aa961 | ||
![]() |
6900b71841 | ||
![]() |
bb230d67e8 | ||
![]() |
4f076ec3e3 | ||
![]() |
96a6cbfb95 | ||
![]() |
5bdc5aed72 | ||
![]() |
d38b0f088b | ||
![]() |
892710f705 | ||
![]() |
fbf898be64 | ||
![]() |
e3e2ecc1e1 | ||
![]() |
b59807d221 | ||
![]() |
163ad52285 | ||
![]() |
4023a6d1cc | ||
![]() |
ec827e5dc0 | ||
![]() |
a8f4fb7c22 | ||
![]() |
bc195ed452 | ||
![]() |
41568904ab | ||
![]() |
79050af391 | ||
![]() |
2e5b44c424 | ||
![]() |
7a437660d1 | ||
![]() |
47510e24d5 | ||
![]() |
91c9ef3068 | ||
![]() |
240854e4ac | ||
![]() |
0e4fc7efbc | ||
![]() |
b47e859225 | ||
![]() |
62a1072682 | ||
![]() |
c6f2a97591 | ||
![]() |
d66be231b3 | ||
![]() |
f73ffc8711 | ||
![]() |
e4c17c1bc7 | ||
![]() |
997e729535 | ||
![]() |
e0e313b8d1 | ||
![]() |
f0bd763e72 | ||
![]() |
6a7a90536b | ||
![]() |
ac8ddedfb5 | ||
![]() |
6fcd126ff8 | ||
![]() |
55d0966d48 | ||
![]() |
2583e08f7a | ||
![]() |
de72e62470 | ||
![]() |
91993dbb07 | ||
![]() |
d87ee4daa3 | ||
![]() |
6791e002ff | ||
![]() |
4ca84aa515 | ||
![]() |
8189cbc171 | ||
![]() |
73edb45ff7 | ||
![]() |
0bbe362660 | ||
![]() |
a76bee51fc | ||
![]() |
6e42b52414 | ||
![]() |
aed61209fa | ||
![]() |
f5d796ea77 | ||
![]() |
ecb04b4ba9 | ||
![]() |
dabb01e237 | ||
![]() |
c2d27d0fd4 | ||
![]() |
e62bd75fdf | ||
![]() |
2e917bd62b | ||
![]() |
e0492c4264 | ||
![]() |
7db68e2f96 | ||
![]() |
e9b05a37d1 | ||
![]() |
5613259536 | ||
![]() |
3209ff16ac | ||
![]() |
a49c8602d1 | ||
![]() |
7caa055e00 | ||
![]() |
0d62bc6c78 | ||
![]() |
bc0861fd9e | ||
![]() |
f280052d93 | ||
![]() |
21da49f79d | ||
![]() |
19a5ccf942 | ||
![]() |
0234b4ad81 | ||
![]() |
59ee9c21f3 | ||
![]() |
00317fed24 | ||
![]() |
42f6311ca8 | ||
![]() |
0f77a1ec03 | ||
![]() |
8268cd4d09 | ||
![]() |
c868070337 | ||
![]() |
2981fa5946 | ||
![]() |
623ec66a79 | ||
![]() |
b51bae14ec | ||
![]() |
05a3016557 | ||
![]() |
9250456e7b | ||
![]() |
163d6a7a28 | ||
![]() |
4ce9976dbc | ||
![]() |
f6490990de | ||
![]() |
f24ff606ac | ||
![]() |
3ff53744b5 | ||
![]() |
0b33c10ed8 | ||
![]() |
3fa87701ed | ||
![]() |
e5e0c6fa2a | ||
![]() |
0b38a0b6af | ||
![]() |
44b228777a | ||
![]() |
dd4f658d14 | ||
![]() |
9c66f47bca | ||
![]() |
138a34d6a4 | ||
![]() |
8f2af2e863 | ||
![]() |
c732fe16b3 | ||
![]() |
9be75e56e7 | ||
![]() |
e7d1f26034 | ||
![]() |
c554fff048 | ||
![]() |
0268521aaa | ||
![]() |
89b1cb9353 | ||
![]() |
8a17c5eaab | ||
![]() |
f4a1ad6c8c | ||
![]() |
93d76d8d79 | ||
![]() |
0b956a71b9 | ||
![]() |
26be72f76d | ||
![]() |
737391c721 | ||
![]() |
9c1d21fd1b | ||
![]() |
ef4a4c8611 | ||
![]() |
13c0a8ceaa | ||
![]() |
c2976080f6 | ||
![]() |
0a1b6931af | ||
![]() |
5009319f91 | ||
![]() |
4db8683bd6 | ||
![]() |
d35cf8d31e | ||
![]() |
5fef16131a | ||
![]() |
8b2235ee26 | ||
![]() |
2d8faf849e | ||
![]() |
c9de9fa185 | ||
![]() |
0618877d58 | ||
![]() |
f6b4e7eef8 | ||
![]() |
7abe44da19 | ||
![]() |
9006a0c25f | ||
![]() |
f8389ff8ab | ||
![]() |
894afe8f92 | ||
![]() |
115394ac8c | ||
![]() |
de42eda65f | ||
![]() |
0b7591edce | ||
![]() |
a043a044ca | ||
![]() |
b1f2727beb | ||
![]() |
d6e78a48a0 | ||
![]() |
589fe0f5f3 | ||
![]() |
244eeeb816 | ||
![]() |
4d5fc50f1a | ||
![]() |
dc0273148c | ||
![]() |
5e6f4bfb88 | ||
![]() |
bc0e18d074 | ||
![]() |
24d09fda4c | ||
![]() |
5e20ac07d1 | ||
![]() |
37c78e6bbd | ||
![]() |
7dcfb1081b | ||
![]() |
01407cf040 | ||
![]() |
eb814c2fb0 | ||
![]() |
d3caadf4af | ||
![]() |
5769c82fca | ||
![]() |
3754783ce2 | ||
![]() |
55ebe2cc0b | ||
![]() |
23c1a42163 | ||
![]() |
c879ffa768 | ||
![]() |
32f7bbfbab | ||
![]() |
84d5b3b158 | ||
![]() |
c8dae9ea9a | ||
![]() |
cbfb5dd8a6 | ||
![]() |
09b2b7350c | ||
![]() |
e146793d32 | ||
![]() |
0bad2ead10 | ||
![]() |
25176884e7 | ||
![]() |
266d4cddb0 | ||
![]() |
6e529a4205 | ||
![]() |
d2cce278bd | ||
![]() |
b774a62f8c | ||
![]() |
66c12e1a92 | ||
![]() |
184d748890 | ||
![]() |
8cc732c8d1 | ||
![]() |
c688d67e4b | ||
![]() |
3408be2840 | ||
![]() |
e126066132 | ||
![]() |
cfec447d8a | ||
![]() |
805d1fdd52 | ||
![]() |
9299948072 | ||
![]() |
b02960a5ec | ||
![]() |
8134b6db6a | ||
![]() |
cd16a3cc15 | ||
![]() |
074e7828f3 | ||
![]() |
5f7d1f9219 | ||
![]() |
b29c6105a1 | ||
![]() |
1297f5d43c | ||
![]() |
f94a5385d7 | ||
![]() |
8ef2000e45 | ||
![]() |
30d496076b | ||
![]() |
5de06d4482 | ||
![]() |
97fa983305 | ||
![]() |
dccc3c5bc1 | ||
![]() |
ed12465975 | ||
![]() |
b78be222d7 | ||
![]() |
342990e1bf | ||
![]() |
2e5dfdbb0d | ||
![]() |
1790ef0ee6 | ||
![]() |
712a5756e2 | ||
![]() |
bf6ff6b0f7 | ||
![]() |
c6003b6695 | ||
![]() |
8352540fcb | ||
![]() |
22299868fa | ||
![]() |
0d126a8e2b | ||
![]() |
776d027dfa | ||
![]() |
fa9b6d1006 | ||
![]() |
89aa7ffc73 | ||
![]() |
fd971449ca | ||
![]() |
f7cd57e549 | ||
![]() |
34aadbfb09 | ||
![]() |
167195a01c | ||
![]() |
b0abf94191 | ||
![]() |
1009c71e72 | ||
![]() |
29b1695159 | ||
![]() |
44f782221f | ||
![]() |
bab25c51d9 | ||
![]() |
89277e1665 | ||
![]() |
1e9c5a1682 | ||
![]() |
0c75486c7a | ||
![]() |
8c39739880 | ||
![]() |
ace1f84094 | ||
![]() |
2cfd6739ca | ||
![]() |
e0d6f0d653 | ||
![]() |
a4d3b387d0 | ||
![]() |
7394aca02d | ||
![]() |
e812725182 | ||
![]() |
bb76bfcd8b | ||
![]() |
6ff6d0a7dc | ||
![]() |
ddc9867058 | ||
![]() |
ba0d46c6cd | ||
![]() |
369f04fdbc | ||
![]() |
09dd8abe23 | ||
![]() |
8c692758ae | ||
![]() |
32d39b88bd | ||
![]() |
8bd66da511 | ||
![]() |
f86799e494 | ||
![]() |
8d10f26f56 | ||
![]() |
297543f9dd | ||
![]() |
0c53ee8460 | ||
![]() |
862842e3e1 | ||
![]() |
a4fad360df | ||
![]() |
3ba4c8b3bf | ||
![]() |
2992236be4 | ||
![]() |
82161f028e | ||
![]() |
1bcaec144b | ||
![]() |
852d4bba0a | ||
![]() |
af56fa2830 | ||
![]() |
813646e392 | ||
![]() |
1ce31eefc6 | ||
![]() |
fdf53844e1 | ||
![]() |
be57a82302 | ||
![]() |
fb82e863e0 | ||
![]() |
101483409f | ||
![]() |
6fe863eec1 | ||
![]() |
fbb6526aac | ||
![]() |
5556aea913 | ||
![]() |
95dc5fb849 | ||
![]() |
062199d0e3 | ||
![]() |
53ce327516 | ||
![]() |
61a1ce57c2 | ||
![]() |
687295f772 | ||
![]() |
e5366534ed | ||
![]() |
66fe84e126 | ||
![]() |
0b6c28422c | ||
![]() |
ea667bb6a9 | ||
![]() |
c9ba219de1 | ||
![]() |
9df1b29d70 | ||
![]() |
3e34359fa9 | ||
![]() |
1818930d2f | ||
![]() |
c03e674001 | ||
![]() |
10a25b82e0 | ||
![]() |
3b2489d738 | ||
![]() |
5c4ca3c84f | ||
![]() |
06c4b7ed2e | ||
![]() |
5591f6ccc9 | ||
![]() |
63dfb6947e | ||
![]() |
b089069b8e | ||
![]() |
e76a99fd68 | ||
![]() |
a4ea6c1fad | ||
![]() |
64ebdce1b2 | ||
![]() |
2709491d59 | ||
![]() |
81beedede6 | ||
![]() |
33a2386d74 | ||
![]() |
0df5e5283e | ||
![]() |
560407b972 | ||
![]() |
f8c25ae508 | ||
![]() |
c524277665 | ||
![]() |
a70fb009c7 | ||
![]() |
11e67f2ea3 | ||
![]() |
e7118ffe15 | ||
![]() |
79e9455244 | ||
![]() |
6ca8e8958a | ||
![]() |
d3dc207166 | ||
![]() |
51e200533b | ||
![]() |
b8a25b87d8 | ||
![]() |
f4fe0a0d4f | ||
![]() |
1d4f829d29 | ||
![]() |
4afa79fca4 | ||
![]() |
ec22184087 | ||
![]() |
413f3db5b4 | ||
![]() |
8ddfcce787 | ||
![]() |
562341adfe | ||
![]() |
9519ec53ef | ||
![]() |
35bada360d | ||
![]() |
1f39765efe | ||
![]() |
cce5b3b533 | ||
![]() |
e77a03b855 | ||
![]() |
7a54ff212e | ||
![]() |
01340f4597 | ||
![]() |
af6fa80d20 | ||
![]() |
e7474dcb9e | ||
![]() |
0eb906d5df | ||
![]() |
c7babf227c | ||
![]() |
d5c81c14f5 | ||
![]() |
59278378e5 | ||
![]() |
990e69143d | ||
![]() |
c413ae06dc | ||
![]() |
456f8a30cc | ||
![]() |
19c4561feb | ||
![]() |
1392fed023 | ||
![]() |
ca81e14d63 | ||
![]() |
8e7a8a02ec | ||
![]() |
e45dfa94ed | ||
![]() |
a153787ae6 | ||
![]() |
cf37c43bc7 | ||
![]() |
d0aa2bca69 | ||
![]() |
7b3811e6ee | ||
![]() |
4054f551d4 | ||
![]() |
4eeda10f3f | ||
![]() |
4231784ed2 | ||
![]() |
61ff6986d3 | ||
![]() |
09bc0bba1e | ||
![]() |
b2bda8479e | ||
![]() |
09b255f99e | ||
![]() |
0800642a2a | ||
![]() |
48b2b006c0 | ||
![]() |
af4c1f08ec | ||
![]() |
87b26b6342 | ||
![]() |
706fb8d82f | ||
![]() |
f7ca59bd5f | ||
![]() |
6540d0ea53 | ||
![]() |
5995038e21 | ||
![]() |
337ba6ea87 | ||
![]() |
04c6183752 | ||
![]() |
0b63922f46 | ||
![]() |
81c39d7d93 | ||
![]() |
164d31dfbc | ||
![]() |
1a833aad52 | ||
![]() |
77246c1fde | ||
![]() |
56c08a3587 | ||
![]() |
ce6214dc0f | ||
![]() |
22002d50ac | ||
![]() |
ab4e94695d | ||
![]() |
47a01cec7e | ||
![]() |
0cf9bc1a32 | ||
![]() |
6552ebcd3c | ||
![]() |
5af1d94fc0 | ||
![]() |
a4ec7b3047 | ||
![]() |
66f5003d91 | ||
![]() |
0c754e4b4b | ||
![]() |
e008087c4a |
@@ -34,7 +34,6 @@ cd $CURRENT_DIR
|
|||||||
|
|
||||||
echo "Installing and linking dependencies..."
|
echo "Installing and linking dependencies..."
|
||||||
yarn
|
yarn
|
||||||
yarn lerna bootstrap
|
|
||||||
|
|
||||||
echo "Migrating database..."
|
echo "Migrating database..."
|
||||||
cd packages/backend
|
cd packages/backend
|
||||||
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
|||||||
cache-dependency-path: yarn.lock
|
cache-dependency-path: yarn.lock
|
||||||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
- run: yarn --frozen-lockfile && yarn lerna bootstrap
|
- run: yarn --frozen-lockfile
|
||||||
- run: cd packages/backend && yarn start
|
- run: cd packages/backend && yarn start
|
||||||
env:
|
env:
|
||||||
ENCRYPTION_KEY: sample_encryption_key
|
ENCRYPTION_KEY: sample_encryption_key
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
cache-dependency-path: yarn.lock
|
cache-dependency-path: yarn.lock
|
||||||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
- run: yarn --frozen-lockfile && yarn lerna bootstrap
|
- run: yarn --frozen-lockfile
|
||||||
- run: cd packages/backend && yarn start:worker
|
- run: cd packages/backend && yarn start:worker
|
||||||
env:
|
env:
|
||||||
ENCRYPTION_KEY: sample_encryption_key
|
ENCRYPTION_KEY: sample_encryption_key
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
cache-dependency-path: yarn.lock
|
cache-dependency-path: yarn.lock
|
||||||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
- run: yarn --frozen-lockfile && yarn lerna bootstrap
|
- run: yarn --frozen-lockfile
|
||||||
- run: cd packages/web && yarn build
|
- run: cd packages/web && yarn build
|
||||||
env:
|
env:
|
||||||
CI: false
|
CI: false
|
||||||
|
2
.github/workflows/playwright.yml
vendored
2
.github/workflows/playwright.yml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn && yarn lerna bootstrap
|
run: yarn
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps
|
||||||
- name: Build Automatisch web
|
- name: Build Automatisch web
|
||||||
|
10
lerna.json
10
lerna.json
@@ -1,13 +1,11 @@
|
|||||||
{
|
{
|
||||||
"packages": [
|
"packages": ["packages/*"],
|
||||||
"packages/*"
|
"version": "0.14.0",
|
||||||
],
|
|
||||||
"version": "0.10.0",
|
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
|
||||||
"command": {
|
"command": {
|
||||||
"add": {
|
"add": {
|
||||||
"exact": true
|
"exact": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
"eslint": "^8.13.0",
|
"eslint": "^8.13.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"lerna": "^4.0.0",
|
"lerna": "^8.0.0",
|
||||||
"prettier": "^2.5.1"
|
"prettier": "^2.5.1"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@@ -10,7 +10,7 @@ import process from 'process';
|
|||||||
async function fetchAdminRole() {
|
async function fetchAdminRole() {
|
||||||
const role = await Role.query()
|
const role = await Role.query()
|
||||||
.where({
|
.where({
|
||||||
key: 'admin',
|
name: 'Admin',
|
||||||
})
|
})
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.first();
|
.first();
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
"start:worker": "node src/worker.js",
|
"start:worker": "node src/worker.js",
|
||||||
"pretest": "APP_ENV=test node ./test/setup/prepare-test-env.js",
|
"pretest": "APP_ENV=test node ./test/setup/prepare-test-env.js",
|
||||||
"test": "APP_ENV=test vitest run",
|
"test": "APP_ENV=test vitest run",
|
||||||
|
"test:watch": "APP_ENV=test vitest watch",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"db:create": "node ./bin/database/create.js",
|
"db:create": "node ./bin/database/create.js",
|
||||||
"db:seed:user": "node ./bin/database/seed-user.js",
|
"db:seed:user": "node ./bin/database/seed-user.js",
|
||||||
@@ -22,8 +23,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bull-board/express": "^3.10.1",
|
"@bull-board/express": "^3.10.1",
|
||||||
"@casl/ability": "^6.5.0",
|
"@casl/ability": "^6.5.0",
|
||||||
"@graphql-tools/graphql-file-loader": "^7.3.4",
|
|
||||||
"@graphql-tools/load": "^7.5.2",
|
|
||||||
"@node-saml/passport-saml": "^4.0.4",
|
"@node-saml/passport-saml": "^4.0.4",
|
||||||
"@rudderstack/rudder-sdk-node": "^1.1.2",
|
"@rudderstack/rudder-sdk-node": "^1.1.2",
|
||||||
"@sentry/node": "^7.42.0",
|
"@sentry/node": "^7.42.0",
|
||||||
@@ -38,13 +37,9 @@
|
|||||||
"debug": "~2.6.9",
|
"debug": "~2.6.9",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"express": "~4.18.2",
|
"express": "~4.18.2",
|
||||||
"express-async-handler": "^1.2.0",
|
"express-async-errors": "^3.1.1",
|
||||||
"express-basic-auth": "^1.2.1",
|
"express-basic-auth": "^1.2.1",
|
||||||
"express-graphql": "^0.12.0",
|
|
||||||
"fast-xml-parser": "^4.0.11",
|
"fast-xml-parser": "^4.0.11",
|
||||||
"graphql-middleware": "^6.1.15",
|
|
||||||
"graphql-shield": "^7.5.0",
|
|
||||||
"graphql-tools": "^8.2.0",
|
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"http-errors": "~1.6.3",
|
"http-errors": "~1.6.3",
|
||||||
"http-proxy-agent": "^7.0.0",
|
"http-proxy-agent": "^7.0.0",
|
||||||
@@ -106,7 +101,9 @@
|
|||||||
"access": "public"
|
"access": "public"
|
||||||
},
|
},
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
"watch": [ "src/" ],
|
"watch": [
|
||||||
|
"src/"
|
||||||
|
],
|
||||||
"ext": "js"
|
"ext": "js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import createError from 'http-errors';
|
import createError from 'http-errors';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
|
import 'express-async-errors';
|
||||||
import cors from 'cors';
|
import cors from 'cors';
|
||||||
|
|
||||||
import appConfig from './config/app.js';
|
import appConfig from './config/app.js';
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.airtable.com',
|
apiBaseUrl: 'https://api.airtable.com',
|
||||||
iconUrl: '{BASE_URL}/apps/airtable/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/airtable/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/airtable/connection',
|
authDocUrl: '{DOCS_URL}/apps/airtable/connection',
|
||||||
primaryColor: 'FFBF00',
|
primaryColor: '#FFBF00',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://cloud.appwrite.io',
|
apiBaseUrl: 'https://cloud.appwrite.io',
|
||||||
iconUrl: '{BASE_URL}/apps/appwrite/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/appwrite/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/appwrite/connection',
|
authDocUrl: '{DOCS_URL}/apps/appwrite/connection',
|
||||||
primaryColor: 'FD366E',
|
primaryColor: '#FD366E',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/azure-openai/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/azure-openai/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/azure-openai/connection',
|
authDocUrl: '{DOCS_URL}/apps/azure-openai/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://carbone.io',
|
baseUrl: 'https://carbone.io',
|
||||||
apiBaseUrl: 'https://api.carbone.io',
|
apiBaseUrl: 'https://api.carbone.io',
|
||||||
primaryColor: '6f42c1',
|
primaryColor: '#6f42c1',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -12,8 +12,8 @@ export default defineApp({
|
|||||||
baseUrl: 'https://clickup.com',
|
baseUrl: 'https://clickup.com',
|
||||||
apiBaseUrl: 'https://api.clickup.com/api',
|
apiBaseUrl: 'https://api.clickup.com/api',
|
||||||
iconUrl: '{BASE_URL}/apps/clickup/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/clickup/assets/favicon.svg',
|
||||||
authDocUrl: 'https://automatisch.io/docs/apps/clickup/connection',
|
authDocUrl: '{DOCS_URL}/apps/clickup/connection',
|
||||||
primaryColor: 'FD71AF',
|
primaryColor: '#FD71AF',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -33,6 +33,7 @@ export default defineAction({
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
variables: true,
|
variables: true,
|
||||||
|
valueType: 'parse',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@@ -8,7 +8,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/code/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/code/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/code/connection',
|
authDocUrl: '{DOCS_URL}/apps/code/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '001F52',
|
primaryColor: '#001F52',
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '001F52',
|
primaryColor: '#001F52',
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://deepl.com',
|
baseUrl: 'https://deepl.com',
|
||||||
apiBaseUrl: 'https://api.deepl.com',
|
apiBaseUrl: 'https://api.deepl.com',
|
||||||
primaryColor: '0d2d45',
|
primaryColor: '#0d2d45',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '001F52',
|
primaryColor: '#001F52',
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -14,7 +14,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://discord.com',
|
baseUrl: 'https://discord.com',
|
||||||
apiBaseUrl: 'https://discord.com/api',
|
apiBaseUrl: 'https://discord.com/api',
|
||||||
primaryColor: '5865f2',
|
primaryColor: '#5865f2',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
dynamicData,
|
dynamicData,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://disqus.com/api',
|
apiBaseUrl: 'https://disqus.com/api',
|
||||||
iconUrl: '{BASE_URL}/apps/disqus/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/disqus/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/disqus/connection',
|
authDocUrl: '{DOCS_URL}/apps/disqus/connection',
|
||||||
primaryColor: '2E9FFF',
|
primaryColor: '#2E9FFF',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://dropbox.com',
|
baseUrl: 'https://dropbox.com',
|
||||||
apiBaseUrl: 'https://api.dropboxapi.com',
|
apiBaseUrl: 'https://api.dropboxapi.com',
|
||||||
primaryColor: '0061ff',
|
primaryColor: '#0061ff',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '001F52',
|
primaryColor: '#001F52',
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
iconUrl: '{BASE_URL}/apps/flickr/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/flickr/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/flickr/connection',
|
authDocUrl: '{DOCS_URL}/apps/flickr/connection',
|
||||||
docUrl: 'https://automatisch.io/docs/flickr',
|
docUrl: 'https://automatisch.io/docs/flickr',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.flickr.com/',
|
baseUrl: 'https://www.flickr.com/',
|
||||||
apiBaseUrl: 'https://www.flickr.com/services',
|
apiBaseUrl: 'https://www.flickr.com/services',
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://flowers-software.com',
|
baseUrl: 'https://flowers-software.com',
|
||||||
apiBaseUrl: 'https://webapp.flowers-software.com/api',
|
apiBaseUrl: 'https://webapp.flowers-software.com/api',
|
||||||
primaryColor: '02AFC7',
|
primaryColor: '#02AFC7',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '001F52',
|
primaryColor: '#001F52',
|
||||||
actions,
|
actions,
|
||||||
dynamicFields,
|
dynamicFields,
|
||||||
});
|
});
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/ghost/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/ghost/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/ghost/connection',
|
authDocUrl: '{DOCS_URL}/apps/ghost/connection',
|
||||||
primaryColor: '15171A',
|
primaryColor: '#15171A',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.github.com',
|
apiBaseUrl: 'https://api.github.com',
|
||||||
iconUrl: '{BASE_URL}/apps/github/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/github/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/github/connection',
|
authDocUrl: '{DOCS_URL}/apps/github/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://gitlab.com',
|
apiBaseUrl: 'https://gitlab.com',
|
||||||
iconUrl: '{BASE_URL}/apps/gitlab/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/gitlab/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/gitlab/connection',
|
authDocUrl: '{DOCS_URL}/apps/gitlab/connection',
|
||||||
primaryColor: 'FC6D26',
|
primaryColor: '#FC6D26',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://www.googleapis.com/calendar',
|
apiBaseUrl: 'https://www.googleapis.com/calendar',
|
||||||
iconUrl: '{BASE_URL}/apps/google-calendar/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/google-calendar/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/google-calendar/connection',
|
authDocUrl: '{DOCS_URL}/apps/google-calendar/connection',
|
||||||
primaryColor: '448AFF',
|
primaryColor: '#448AFF',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://www.googleapis.com/drive',
|
apiBaseUrl: 'https://www.googleapis.com/drive',
|
||||||
iconUrl: '{BASE_URL}/apps/google-drive/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/google-drive/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/google-drive/connection',
|
authDocUrl: '{DOCS_URL}/apps/google-drive/connection',
|
||||||
primaryColor: '1FA463',
|
primaryColor: '#1FA463',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://forms.googleapis.com',
|
apiBaseUrl: 'https://forms.googleapis.com',
|
||||||
iconUrl: '{BASE_URL}/apps/google-forms/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/google-forms/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/google-forms/connection',
|
authDocUrl: '{DOCS_URL}/apps/google-forms/connection',
|
||||||
primaryColor: '673AB7',
|
primaryColor: '#673AB7',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://sheets.googleapis.com',
|
apiBaseUrl: 'https://sheets.googleapis.com',
|
||||||
iconUrl: '{BASE_URL}/apps/google-sheets/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/google-sheets/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/google-sheets/connection',
|
authDocUrl: '{DOCS_URL}/apps/google-sheets/connection',
|
||||||
primaryColor: '0F9D58',
|
primaryColor: '#0F9D58',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://tasks.googleapis.com',
|
apiBaseUrl: 'https://tasks.googleapis.com',
|
||||||
iconUrl: '{BASE_URL}/apps/google-tasks/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/google-tasks/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/google-tasks/connection',
|
authDocUrl: '{DOCS_URL}/apps/google-tasks/connection',
|
||||||
primaryColor: '0066DA',
|
primaryColor: '#0066DA',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://app.tryhelix.ai',
|
apiBaseUrl: 'https://app.tryhelix.ai',
|
||||||
iconUrl: '{BASE_URL}/apps/helix/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/helix/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/helix/connection',
|
authDocUrl: '{DOCS_URL}/apps/helix/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.hubspot.com',
|
baseUrl: 'https://www.hubspot.com',
|
||||||
apiBaseUrl: 'https://api.hubapi.com',
|
apiBaseUrl: 'https://api.hubapi.com',
|
||||||
primaryColor: 'F95C35',
|
primaryColor: '#F95C35',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://invoicing.co/api',
|
apiBaseUrl: 'https://invoicing.co/api',
|
||||||
iconUrl: '{BASE_URL}/apps/invoice-ninja/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/invoice-ninja/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/invoice-ninja/connection',
|
authDocUrl: '{DOCS_URL}/apps/invoice-ninja/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -9,11 +9,11 @@ export default defineApp({
|
|||||||
name: 'Jotform',
|
name: 'Jotform',
|
||||||
key: 'jotform',
|
key: 'jotform',
|
||||||
iconUrl: '{BASE_URL}/apps/jotform/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/jotform/assets/favicon.svg',
|
||||||
authDocUrl: 'https://automatisch.io/docs/apps/jotform/connection',
|
authDocUrl: '{DOCS_URL}/apps/jotform/connection',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.jotform.com',
|
baseUrl: 'https://www.jotform.com',
|
||||||
apiBaseUrl: 'https://api.jotform.com',
|
apiBaseUrl: 'https://api.jotform.com',
|
||||||
primaryColor: 'FF6100',
|
primaryColor: '#FF6100',
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -12,8 +12,8 @@ export default defineApp({
|
|||||||
baseUrl: 'https://mailchimp.com',
|
baseUrl: 'https://mailchimp.com',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/mailchimp/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/mailchimp/assets/favicon.svg',
|
||||||
authDocUrl: 'https://automatisch.io/docs/apps/mailchimp/connection',
|
authDocUrl: '{DOCS_URL}/apps/mailchimp/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -7,11 +7,11 @@ export default defineApp({
|
|||||||
name: 'MailerLite',
|
name: 'MailerLite',
|
||||||
key: 'mailerlite',
|
key: 'mailerlite',
|
||||||
iconUrl: '{BASE_URL}/apps/mailerlite/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/mailerlite/assets/favicon.svg',
|
||||||
authDocUrl: 'https://automatisch.io/docs/apps/mailerlite/connection',
|
authDocUrl: '{DOCS_URL}/apps/mailerlite/connection',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.mailerlite.com',
|
baseUrl: 'https://www.mailerlite.com',
|
||||||
apiBaseUrl: 'https://connect.mailerlite.com/api',
|
apiBaseUrl: 'https://connect.mailerlite.com/api',
|
||||||
primaryColor: '09C269',
|
primaryColor: '#09C269',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
authDocUrl: '{DOCS_URL}/apps/mattermost/connection',
|
authDocUrl: '{DOCS_URL}/apps/mattermost/connection',
|
||||||
baseUrl: 'https://mattermost.com',
|
baseUrl: 'https://mattermost.com',
|
||||||
apiBaseUrl: '', // there is no cloud version of this app, user always need to provide address of own instance when creating connection
|
apiBaseUrl: '', // there is no cloud version of this app, user always need to provide address of own instance when creating connection
|
||||||
primaryColor: '4a154b',
|
primaryColor: '#4a154b',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addXRequestedWithHeader, addAuthHeader],
|
beforeRequest: [setBaseUrl, addXRequestedWithHeader, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.miro.com',
|
apiBaseUrl: 'https://api.miro.com',
|
||||||
iconUrl: '{BASE_URL}/apps/miro/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/miro/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/miro/connection',
|
authDocUrl: '{DOCS_URL}/apps/miro/connection',
|
||||||
primaryColor: 'F2CA02',
|
primaryColor: '#F2CA02',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.notion.com',
|
apiBaseUrl: 'https://api.notion.com',
|
||||||
iconUrl: '{BASE_URL}/apps/notion/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/notion/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/notion/connection',
|
authDocUrl: '{DOCS_URL}/apps/notion/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader, addNotionVersionHeader],
|
beforeRequest: [addAuthHeader, addNotionVersionHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://ntfy.sh',
|
baseUrl: 'https://ntfy.sh',
|
||||||
apiBaseUrl: 'https://ntfy.sh',
|
apiBaseUrl: 'https://ntfy.sh',
|
||||||
primaryColor: '56bda8',
|
primaryColor: '#56bda8',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://odoo.com',
|
baseUrl: 'https://odoo.com',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '9c5789',
|
primaryColor: '#9c5789',
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.openai.com',
|
apiBaseUrl: 'https://api.openai.com',
|
||||||
iconUrl: '{BASE_URL}/apps/openai/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/openai/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/openai/connection',
|
authDocUrl: '{DOCS_URL}/apps/openai/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/pipedrive/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/pipedrive/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/pipedrive/connection',
|
authDocUrl: '{DOCS_URL}/apps/pipedrive/connection',
|
||||||
primaryColor: 'FFFFFF',
|
primaryColor: '#FFFFFF',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://placetel.de',
|
baseUrl: 'https://placetel.de',
|
||||||
apiBaseUrl: 'https://api.placetel.de',
|
apiBaseUrl: 'https://api.placetel.de',
|
||||||
primaryColor: '069dd9',
|
primaryColor: '#069dd9',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '336791',
|
primaryColor: '#336791',
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.pushover.net',
|
apiBaseUrl: 'https://api.pushover.net',
|
||||||
iconUrl: '{BASE_URL}/apps/pushover/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/pushover/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/pushover/connection',
|
authDocUrl: '{DOCS_URL}/apps/pushover/connection',
|
||||||
primaryColor: '249DF1',
|
primaryColor: '#249DF1',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://oauth.reddit.com',
|
apiBaseUrl: 'https://oauth.reddit.com',
|
||||||
iconUrl: '{BASE_URL}/apps/reddit/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/reddit/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/reddit/connection',
|
authDocUrl: '{DOCS_URL}/apps/reddit/connection',
|
||||||
primaryColor: 'FF4500',
|
primaryColor: '#FF4500',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.remove.bg',
|
baseUrl: 'https://www.remove.bg',
|
||||||
apiBaseUrl: 'https://api.remove.bg/v1.0',
|
apiBaseUrl: 'https://api.remove.bg/v1.0',
|
||||||
primaryColor: '55636c',
|
primaryColor: '#55636c',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -9,6 +9,6 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: 'ff8800',
|
primaryColor: '#ff8800',
|
||||||
triggers,
|
triggers,
|
||||||
});
|
});
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://salesforce.com',
|
baseUrl: 'https://salesforce.com',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '00A1E0',
|
primaryColor: '#00A1E0',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -9,7 +9,7 @@ export default defineApp({
|
|||||||
authDocUrl: '{DOCS_URL}/apps/scheduler/connection',
|
authDocUrl: '{DOCS_URL}/apps/scheduler/connection',
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '0059F7',
|
primaryColor: '#0059F7',
|
||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
triggers,
|
triggers,
|
||||||
});
|
});
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/self-hosted-llm/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/self-hosted-llm/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/self-hosted-llm/connection',
|
authDocUrl: '{DOCS_URL}/apps/self-hosted-llm/connection',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://signalwire.com',
|
baseUrl: 'https://signalwire.com',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '044cf6',
|
primaryColor: '#044cf6',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://slack.com',
|
baseUrl: 'https://slack.com',
|
||||||
apiBaseUrl: 'https://slack.com/api',
|
apiBaseUrl: 'https://slack.com/api',
|
||||||
primaryColor: '4a154b',
|
primaryColor: '#4a154b',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '2DAAE1',
|
primaryColor: '#2DAAE1',
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://spotify.com',
|
baseUrl: 'https://spotify.com',
|
||||||
apiBaseUrl: 'https://api.spotify.com',
|
apiBaseUrl: 'https://api.spotify.com',
|
||||||
primaryColor: '000000',
|
primaryColor: '#000000',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://www.strava.com',
|
baseUrl: 'https://www.strava.com',
|
||||||
apiBaseUrl: 'https://www.strava.com/api',
|
apiBaseUrl: 'https://www.strava.com/api',
|
||||||
primaryColor: 'fc4c01',
|
primaryColor: '#fc4c01',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://stripe.com',
|
baseUrl: 'https://stripe.com',
|
||||||
apiBaseUrl: 'https://api.stripe.com',
|
apiBaseUrl: 'https://api.stripe.com',
|
||||||
primaryColor: '635bff',
|
primaryColor: '#635bff',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://telegram.org',
|
baseUrl: 'https://telegram.org',
|
||||||
apiBaseUrl: 'https://api.telegram.org',
|
apiBaseUrl: 'https://api.telegram.org',
|
||||||
primaryColor: '2AABEE',
|
primaryColor: '#2AABEE',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://todoist.com',
|
baseUrl: 'https://todoist.com',
|
||||||
apiBaseUrl: 'https://api.todoist.com/rest/v2',
|
apiBaseUrl: 'https://api.todoist.com/rest/v2',
|
||||||
primaryColor: 'e44332',
|
primaryColor: '#e44332',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
iconUrl: '{BASE_URL}/apps/trello/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/trello/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/trello/connection',
|
authDocUrl: '{DOCS_URL}/apps/trello/connection',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
primaryColor: '0079bf',
|
primaryColor: '#0079bf',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
actions,
|
actions,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://twilio.com',
|
baseUrl: 'https://twilio.com',
|
||||||
apiBaseUrl: 'https://api.twilio.com',
|
apiBaseUrl: 'https://api.twilio.com',
|
||||||
primaryColor: 'e1000f',
|
primaryColor: '#e1000f',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://twitter.com',
|
baseUrl: 'https://twitter.com',
|
||||||
apiBaseUrl: 'https://api.twitter.com',
|
apiBaseUrl: 'https://api.twitter.com',
|
||||||
primaryColor: '1da1f2',
|
primaryColor: '#1da1f2',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://typeform.com',
|
baseUrl: 'https://typeform.com',
|
||||||
apiBaseUrl: 'https://api.typeform.com',
|
apiBaseUrl: 'https://api.typeform.com',
|
||||||
primaryColor: '262627',
|
primaryColor: '#262627',
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -14,7 +14,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '39a86d',
|
primaryColor: '#39a86d',
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
supportsConnections: false,
|
supportsConnections: false,
|
||||||
baseUrl: '',
|
baseUrl: '',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '0059F7',
|
primaryColor: '#0059F7',
|
||||||
actions,
|
actions,
|
||||||
triggers,
|
triggers,
|
||||||
});
|
});
|
||||||
|
@@ -8,7 +8,7 @@ export default {
|
|||||||
key: 'instanceUrl',
|
key: 'instanceUrl',
|
||||||
label: 'WordPress instance URL',
|
label: 'WordPress instance URL',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: false,
|
required: true,
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
value: null,
|
value: null,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
|
@@ -13,7 +13,7 @@ export default defineApp({
|
|||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
baseUrl: 'https://wordpress.com',
|
baseUrl: 'https://wordpress.com',
|
||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
primaryColor: '464342',
|
primaryColor: '#464342',
|
||||||
beforeRequest: [setBaseUrl, addAuthHeader],
|
beforeRequest: [setBaseUrl, addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
triggers,
|
triggers,
|
||||||
|
@@ -4,6 +4,7 @@ export default defineTrigger({
|
|||||||
name: 'New comment',
|
name: 'New comment',
|
||||||
key: 'newComment',
|
key: 'newComment',
|
||||||
description: 'Triggers when a new comment is created.',
|
description: 'Triggers when a new comment is created.',
|
||||||
|
pollInterval: 15,
|
||||||
arguments: [
|
arguments: [
|
||||||
{
|
{
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
|
@@ -3,6 +3,7 @@ import defineTrigger from '../../../../helpers/define-trigger.js';
|
|||||||
export default defineTrigger({
|
export default defineTrigger({
|
||||||
name: 'New page',
|
name: 'New page',
|
||||||
key: 'newPage',
|
key: 'newPage',
|
||||||
|
pollInterval: 15,
|
||||||
description: 'Triggers when a new page is created.',
|
description: 'Triggers when a new page is created.',
|
||||||
arguments: [
|
arguments: [
|
||||||
{
|
{
|
||||||
|
@@ -3,6 +3,7 @@ import defineTrigger from '../../../../helpers/define-trigger.js';
|
|||||||
export default defineTrigger({
|
export default defineTrigger({
|
||||||
name: 'New post',
|
name: 'New post',
|
||||||
key: 'newPost',
|
key: 'newPost',
|
||||||
|
pollInterval: 15,
|
||||||
description: 'Triggers when a new post is created.',
|
description: 'Triggers when a new post is created.',
|
||||||
arguments: [
|
arguments: [
|
||||||
{
|
{
|
||||||
|
@@ -11,7 +11,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.xero.com',
|
apiBaseUrl: 'https://api.xero.com',
|
||||||
iconUrl: '{BASE_URL}/apps/xero/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/xero/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/xero/connection',
|
authDocUrl: '{DOCS_URL}/apps/xero/connection',
|
||||||
primaryColor: '13B5EA',
|
primaryColor: '#13B5EA',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://api.ynab.com/v1',
|
apiBaseUrl: 'https://api.ynab.com/v1',
|
||||||
iconUrl: '{BASE_URL}/apps/you-need-a-budget/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/you-need-a-budget/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/you-need-a-budget/connection',
|
authDocUrl: '{DOCS_URL}/apps/you-need-a-budget/connection',
|
||||||
primaryColor: '19223C',
|
primaryColor: '#19223C',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -10,7 +10,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: 'https://www.googleapis.com/youtube',
|
apiBaseUrl: 'https://www.googleapis.com/youtube',
|
||||||
iconUrl: '{BASE_URL}/apps/youtube/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/youtube/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/youtube/connection',
|
authDocUrl: '{DOCS_URL}/apps/youtube/connection',
|
||||||
primaryColor: 'FF0000',
|
primaryColor: '#FF0000',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -3,6 +3,7 @@ import defineTrigger from '../../../../helpers/define-trigger.js';
|
|||||||
export default defineTrigger({
|
export default defineTrigger({
|
||||||
name: 'New video by search',
|
name: 'New video by search',
|
||||||
key: 'newVideoBySearch',
|
key: 'newVideoBySearch',
|
||||||
|
pollInterval: 15,
|
||||||
description:
|
description:
|
||||||
'Triggers when a new video is uploaded that matches a specific search string.',
|
'Triggers when a new video is uploaded that matches a specific search string.',
|
||||||
arguments: [
|
arguments: [
|
||||||
|
@@ -3,6 +3,7 @@ import defineTrigger from '../../../../helpers/define-trigger.js';
|
|||||||
export default defineTrigger({
|
export default defineTrigger({
|
||||||
name: 'New video in channel',
|
name: 'New video in channel',
|
||||||
key: 'newVideoInChannel',
|
key: 'newVideoInChannel',
|
||||||
|
pollInterval: 15,
|
||||||
description:
|
description:
|
||||||
'Triggers when a new video is published to a specific Youtube channel.',
|
'Triggers when a new video is published to a specific Youtube channel.',
|
||||||
arguments: [
|
arguments: [
|
||||||
|
@@ -12,7 +12,7 @@ export default defineApp({
|
|||||||
apiBaseUrl: '',
|
apiBaseUrl: '',
|
||||||
iconUrl: '{BASE_URL}/apps/zendesk/assets/favicon.svg',
|
iconUrl: '{BASE_URL}/apps/zendesk/assets/favicon.svg',
|
||||||
authDocUrl: '{DOCS_URL}/apps/zendesk/connection',
|
authDocUrl: '{DOCS_URL}/apps/zendesk/connection',
|
||||||
primaryColor: '17494d',
|
primaryColor: '#17494d',
|
||||||
supportsConnections: true,
|
supportsConnections: true,
|
||||||
beforeRequest: [addAuthHeader],
|
beforeRequest: [addAuthHeader],
|
||||||
auth,
|
auth,
|
||||||
|
@@ -52,7 +52,7 @@ const appConfig = {
|
|||||||
isDev: appEnv === 'development',
|
isDev: appEnv === 'development',
|
||||||
isTest: appEnv === 'test',
|
isTest: appEnv === 'test',
|
||||||
isProd: appEnv === 'production',
|
isProd: appEnv === 'production',
|
||||||
version: '0.13.1',
|
version: '0.14.0',
|
||||||
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',
|
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',
|
||||||
postgresSchema: process.env.POSTGRES_SCHEMA || 'public',
|
postgresSchema: process.env.POSTGRES_SCHEMA || 'public',
|
||||||
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
|
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
|
||||||
|
@@ -2,7 +2,7 @@ import appConfig from './app.js';
|
|||||||
|
|
||||||
const corsOptions = {
|
const corsOptions = {
|
||||||
origin: appConfig.webAppUrl,
|
origin: appConfig.webAppUrl,
|
||||||
methods: 'GET,HEAD,POST,DELETE',
|
methods: 'GET,HEAD,POST,PATCH,DELETE',
|
||||||
credentials: true,
|
credentials: true,
|
||||||
optionsSuccessStatus: 200,
|
optionsSuccessStatus: 200,
|
||||||
};
|
};
|
||||||
|
@@ -32,7 +32,7 @@ describe('POST /api/v1/access-tokens', () => {
|
|||||||
})
|
})
|
||||||
.expect(422);
|
.expect(422);
|
||||||
|
|
||||||
expect(response.body.errors.general).toEqual([
|
expect(response.body.errors.general).toStrictEqual([
|
||||||
'Incorrect email or password.',
|
'Incorrect email or password.',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@@ -11,5 +11,5 @@ export default async (request, response) => {
|
|||||||
|
|
||||||
await accessToken.revoke();
|
await accessToken.revoke();
|
||||||
|
|
||||||
response.status(204).send();
|
response.status(204).end();
|
||||||
};
|
};
|
||||||
|
@@ -0,0 +1,25 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import AppConfig from '../../../../../models/app-config.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const appConfig = await AppConfig.query()
|
||||||
|
.findOne({ key: request.params.appKey })
|
||||||
|
.throwIfNotFound();
|
||||||
|
|
||||||
|
const appAuthClient = await appConfig
|
||||||
|
.$relatedQuery('appAuthClients')
|
||||||
|
.insert(appAuthClientParams(request));
|
||||||
|
|
||||||
|
renderObject(response, appAuthClient, { status: 201 });
|
||||||
|
};
|
||||||
|
|
||||||
|
const appAuthClientParams = (request) => {
|
||||||
|
const { active, appKey, name, formattedAuthDefaults } = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
active,
|
||||||
|
appKey,
|
||||||
|
name,
|
||||||
|
formattedAuthDefaults,
|
||||||
|
};
|
||||||
|
};
|
@@ -0,0 +1,94 @@
|
|||||||
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
|
import app from '../../../../../app.js';
|
||||||
|
import createAuthTokenByUserId from '../../../../../helpers/create-auth-token-by-user-id.js';
|
||||||
|
import { createUser } from '../../../../../../test/factories/user.js';
|
||||||
|
import { createRole } from '../../../../../../test/factories/role.js';
|
||||||
|
import createAppAuthClientMock from '../../../../../../test/mocks/rest/api/v1/admin/apps/create-auth-client.js';
|
||||||
|
import { createAppConfig } from '../../../../../../test/factories/app-config.js';
|
||||||
|
import * as license from '../../../../../helpers/license.ee.js';
|
||||||
|
|
||||||
|
describe('POST /api/v1/admin/apps/:appKey/auth-clients', () => {
|
||||||
|
let currentUser, adminRole, token;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return created response for valid app config', async () => {
|
||||||
|
await createAppConfig({
|
||||||
|
key: 'gitlab',
|
||||||
|
});
|
||||||
|
|
||||||
|
const appAuthClient = {
|
||||||
|
active: true,
|
||||||
|
appKey: 'gitlab',
|
||||||
|
name: 'First auth client',
|
||||||
|
formattedAuthDefaults: {
|
||||||
|
clientid: 'sample client ID',
|
||||||
|
clientSecret: 'sample client secret',
|
||||||
|
instanceUrl: 'https://gitlab.com',
|
||||||
|
oAuthRedirectUrl: 'http://localhost:3001/app/gitlab/connection/add',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.post('/api/v1/admin/apps/gitlab/auth-clients')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appAuthClient)
|
||||||
|
.expect(201);
|
||||||
|
|
||||||
|
const expectedPayload = createAppAuthClientMock(appAuthClient);
|
||||||
|
expect(response.body).toMatchObject(expectedPayload);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return not found response for not existing app config', async () => {
|
||||||
|
const appAuthClient = {
|
||||||
|
active: true,
|
||||||
|
appKey: 'gitlab',
|
||||||
|
name: 'First auth client',
|
||||||
|
formattedAuthDefaults: {
|
||||||
|
clientid: 'sample client ID',
|
||||||
|
clientSecret: 'sample client secret',
|
||||||
|
instanceUrl: 'https://gitlab.com',
|
||||||
|
oAuthRedirectUrl: 'http://localhost:3001/app/gitlab/connection/add',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
await request(app)
|
||||||
|
.post('/api/v1/admin/apps/gitlab/auth-clients')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appAuthClient)
|
||||||
|
.expect(404);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return bad request response for missing required fields', async () => {
|
||||||
|
await createAppConfig({
|
||||||
|
key: 'gitlab',
|
||||||
|
});
|
||||||
|
|
||||||
|
const appAuthClient = {
|
||||||
|
appKey: 'gitlab',
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.post('/api/v1/admin/apps/gitlab/auth-clients')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appAuthClient)
|
||||||
|
.expect(422);
|
||||||
|
|
||||||
|
expect(response.body.meta.type).toStrictEqual('ModelValidation');
|
||||||
|
expect(response.body.errors).toMatchObject({
|
||||||
|
name: ["must have required property 'name'"],
|
||||||
|
formattedAuthDefaults: [
|
||||||
|
"must have required property 'formattedAuthDefaults'",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,21 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import AppConfig from '../../../../../models/app-config.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const createdAppConfig = await AppConfig.query().insertAndFetch(
|
||||||
|
appConfigParams(request)
|
||||||
|
);
|
||||||
|
|
||||||
|
renderObject(response, createdAppConfig, { status: 201 });
|
||||||
|
};
|
||||||
|
|
||||||
|
const appConfigParams = (request) => {
|
||||||
|
const { customConnectionAllowed, shared, disabled } = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
key: request.params.appKey,
|
||||||
|
customConnectionAllowed,
|
||||||
|
shared,
|
||||||
|
disabled,
|
||||||
|
};
|
||||||
|
};
|
@@ -0,0 +1,67 @@
|
|||||||
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
|
import app from '../../../../../app.js';
|
||||||
|
import createAuthTokenByUserId from '../../../../../helpers/create-auth-token-by-user-id.js';
|
||||||
|
import { createUser } from '../../../../../../test/factories/user.js';
|
||||||
|
import { createRole } from '../../../../../../test/factories/role.js';
|
||||||
|
import createAppConfigMock from '../../../../../../test/mocks/rest/api/v1/admin/apps/create-config.js';
|
||||||
|
import { createAppConfig } from '../../../../../../test/factories/app-config.js';
|
||||||
|
import * as license from '../../../../../helpers/license.ee.js';
|
||||||
|
|
||||||
|
describe('POST /api/v1/admin/apps/:appKey/config', () => {
|
||||||
|
let currentUser, adminRole, token;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return created app config', async () => {
|
||||||
|
const appConfig = {
|
||||||
|
customConnectionAllowed: true,
|
||||||
|
shared: true,
|
||||||
|
disabled: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.post('/api/v1/admin/apps/gitlab/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appConfig)
|
||||||
|
.expect(201);
|
||||||
|
|
||||||
|
const expectedPayload = createAppConfigMock({
|
||||||
|
...appConfig,
|
||||||
|
key: 'gitlab',
|
||||||
|
});
|
||||||
|
expect(response.body).toMatchObject(expectedPayload);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return HTTP 422 for already existing app config', async () => {
|
||||||
|
const appConfig = {
|
||||||
|
key: 'gitlab',
|
||||||
|
customConnectionAllowed: true,
|
||||||
|
shared: true,
|
||||||
|
disabled: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
await createAppConfig(appConfig);
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.post('/api/v1/admin/apps/gitlab/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send({
|
||||||
|
disabled: false,
|
||||||
|
})
|
||||||
|
.expect(422);
|
||||||
|
|
||||||
|
expect(response.body.meta.type).toStrictEqual('UniqueViolationError');
|
||||||
|
expect(response.body.errors).toMatchObject({
|
||||||
|
key: ["'key' must be unique."],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -15,7 +15,7 @@ describe('GET /api/v1/admin/apps/:appKey/auth-clients/:appAuthClientId', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
adminRole = await createRole({ key: 'admin' });
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
currentUser = await createUser({ roleId: adminRole.id });
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
currentAppAuthClient = await createAppAuthClient({
|
currentAppAuthClient = await createAppAuthClient({
|
||||||
@@ -32,7 +32,7 @@ describe('GET /api/v1/admin/apps/:appKey/auth-clients/:appAuthClientId', () => {
|
|||||||
.expect(200);
|
.expect(200);
|
||||||
|
|
||||||
const expectedPayload = getAppAuthClientMock(currentAppAuthClient);
|
const expectedPayload = getAppAuthClientMock(currentAppAuthClient);
|
||||||
expect(response.body).toEqual(expectedPayload);
|
expect(response.body).toStrictEqual(expectedPayload);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return not found response for not existing app auth client ID', async () => {
|
it('should return not found response for not existing app auth client ID', async () => {
|
||||||
|
@@ -14,7 +14,7 @@ describe('GET /api/v1/admin/apps/:appKey/auth-clients', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
adminRole = await createRole({ key: 'admin' });
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
currentUser = await createUser({ roleId: adminRole.id });
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
token = await createAuthTokenByUserId(currentUser.id);
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
@@ -39,6 +39,6 @@ describe('GET /api/v1/admin/apps/:appKey/auth-clients', () => {
|
|||||||
appAuthClientOne,
|
appAuthClientOne,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(response.body).toEqual(expectedPayload);
|
expect(response.body).toStrictEqual(expectedPayload);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import AppAuthClient from '../../../../../models/app-auth-client.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const appAuthClient = await AppAuthClient.query()
|
||||||
|
.findById(request.params.appAuthClientId)
|
||||||
|
.throwIfNotFound();
|
||||||
|
|
||||||
|
await appAuthClient.$query().patchAndFetch(appAuthClientParams(request));
|
||||||
|
|
||||||
|
renderObject(response, appAuthClient);
|
||||||
|
};
|
||||||
|
|
||||||
|
const appAuthClientParams = (request) => {
|
||||||
|
const { active, name, formattedAuthDefaults } = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
active,
|
||||||
|
name,
|
||||||
|
formattedAuthDefaults,
|
||||||
|
};
|
||||||
|
};
|
@@ -0,0 +1,104 @@
|
|||||||
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import request from 'supertest';
|
||||||
|
import Crypto from 'crypto';
|
||||||
|
|
||||||
|
import app from '../../../../../app.js';
|
||||||
|
import createAuthTokenByUserId from '../../../../../helpers/create-auth-token-by-user-id.js';
|
||||||
|
import { createUser } from '../../../../../../test/factories/user.js';
|
||||||
|
import { createRole } from '../../../../../../test/factories/role.js';
|
||||||
|
import updateAppAuthClientMock from '../../../../../../test/mocks/rest/api/v1/admin/apps/update-auth-client.js';
|
||||||
|
import { createAppConfig } from '../../../../../../test/factories/app-config.js';
|
||||||
|
import { createAppAuthClient } from '../../../../../../test/factories/app-auth-client.js';
|
||||||
|
import * as license from '../../../../../helpers/license.ee.js';
|
||||||
|
|
||||||
|
describe('PATCH /api/v1/admin/apps/:appKey/auth-clients', () => {
|
||||||
|
let currentUser, adminRole, token;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
|
|
||||||
|
await createAppConfig({
|
||||||
|
key: 'gitlab',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return updated entity for valid app auth client', async () => {
|
||||||
|
const appAuthClient = {
|
||||||
|
active: true,
|
||||||
|
appKey: 'gitlab',
|
||||||
|
formattedAuthDefaults: {
|
||||||
|
clientid: 'sample client ID',
|
||||||
|
clientSecret: 'sample client secret',
|
||||||
|
instanceUrl: 'https://gitlab.com',
|
||||||
|
oAuthRedirectUrl: 'http://localhost:3001/app/gitlab/connection/add',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const existingAppAuthClient = await createAppAuthClient({
|
||||||
|
appKey: 'gitlab',
|
||||||
|
name: 'First auth client',
|
||||||
|
});
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch(
|
||||||
|
`/api/v1/admin/apps/gitlab/auth-clients/${existingAppAuthClient.id}`
|
||||||
|
)
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appAuthClient)
|
||||||
|
.expect(200);
|
||||||
|
|
||||||
|
const expectedPayload = updateAppAuthClientMock({
|
||||||
|
...existingAppAuthClient,
|
||||||
|
...appAuthClient,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(response.body).toMatchObject(expectedPayload);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return not found response for not existing app auth client', async () => {
|
||||||
|
const notExistingAppAuthClientId = Crypto.randomUUID();
|
||||||
|
|
||||||
|
await request(app)
|
||||||
|
.patch(
|
||||||
|
`/api/v1/admin/apps/gitlab/auth-clients/${notExistingAppAuthClientId}`
|
||||||
|
)
|
||||||
|
.set('Authorization', token)
|
||||||
|
.expect(404);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return bad request response for invalid UUID', async () => {
|
||||||
|
await request(app)
|
||||||
|
.patch('/api/v1/admin/apps/gitlab/auth-clients/invalidAuthClientUUID')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.expect(400);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return HTTP 422 for invalid payload', async () => {
|
||||||
|
const appAuthClient = {
|
||||||
|
formattedAuthDefaults: 'invalid input',
|
||||||
|
};
|
||||||
|
|
||||||
|
const existingAppAuthClient = await createAppAuthClient({
|
||||||
|
appKey: 'gitlab',
|
||||||
|
name: 'First auth client',
|
||||||
|
});
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch(
|
||||||
|
`/api/v1/admin/apps/gitlab/auth-clients/${existingAppAuthClient.id}`
|
||||||
|
)
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appAuthClient)
|
||||||
|
.expect(422);
|
||||||
|
|
||||||
|
expect(response.body.meta.type).toBe('ModelValidation');
|
||||||
|
expect(response.body.errors).toMatchObject({
|
||||||
|
formattedAuthDefaults: ['must be object'],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,27 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import AppConfig from '../../../../../models/app-config.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const appConfig = await AppConfig.query()
|
||||||
|
.findOne({
|
||||||
|
key: request.params.appKey,
|
||||||
|
})
|
||||||
|
.throwIfNotFound();
|
||||||
|
|
||||||
|
await appConfig.$query().patchAndFetch({
|
||||||
|
...appConfigParams(request),
|
||||||
|
key: request.params.appKey,
|
||||||
|
});
|
||||||
|
|
||||||
|
renderObject(response, appConfig);
|
||||||
|
};
|
||||||
|
|
||||||
|
const appConfigParams = (request) => {
|
||||||
|
const { customConnectionAllowed, shared, disabled } = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
customConnectionAllowed,
|
||||||
|
shared,
|
||||||
|
disabled,
|
||||||
|
};
|
||||||
|
};
|
@@ -0,0 +1,91 @@
|
|||||||
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
|
import app from '../../../../../app.js';
|
||||||
|
import createAuthTokenByUserId from '../../../../../helpers/create-auth-token-by-user-id.js';
|
||||||
|
import { createUser } from '../../../../../../test/factories/user.js';
|
||||||
|
import { createRole } from '../../../../../../test/factories/role.js';
|
||||||
|
import createAppConfigMock from '../../../../../../test/mocks/rest/api/v1/admin/apps/create-config.js';
|
||||||
|
import { createAppConfig } from '../../../../../../test/factories/app-config.js';
|
||||||
|
import * as license from '../../../../../helpers/license.ee.js';
|
||||||
|
|
||||||
|
describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
|
||||||
|
let currentUser, adminRole, token;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return updated app config', async () => {
|
||||||
|
const appConfig = {
|
||||||
|
key: 'gitlab',
|
||||||
|
customConnectionAllowed: true,
|
||||||
|
shared: true,
|
||||||
|
disabled: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
await createAppConfig(appConfig);
|
||||||
|
|
||||||
|
const newAppConfigValues = {
|
||||||
|
shared: false,
|
||||||
|
disabled: true,
|
||||||
|
customConnectionAllowed: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch('/api/v1/admin/apps/gitlab/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(newAppConfigValues)
|
||||||
|
.expect(200);
|
||||||
|
|
||||||
|
const expectedPayload = createAppConfigMock({
|
||||||
|
...newAppConfigValues,
|
||||||
|
key: 'gitlab',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(response.body).toMatchObject(expectedPayload);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return not found response for unexisting app config', async () => {
|
||||||
|
const appConfig = {
|
||||||
|
shared: false,
|
||||||
|
disabled: true,
|
||||||
|
customConnectionAllowed: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
await request(app)
|
||||||
|
.patch('/api/v1/admin/apps/gitlab/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(appConfig)
|
||||||
|
.expect(404);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return HTTP 422 for invalid app config data', async () => {
|
||||||
|
const appConfig = {
|
||||||
|
key: 'gitlab',
|
||||||
|
customConnectionAllowed: true,
|
||||||
|
shared: true,
|
||||||
|
disabled: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
await createAppConfig(appConfig);
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch('/api/v1/admin/apps/gitlab/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send({
|
||||||
|
disabled: 'invalid value type',
|
||||||
|
})
|
||||||
|
.expect(422);
|
||||||
|
|
||||||
|
expect(response.body.meta.type).toStrictEqual('ModelValidation');
|
||||||
|
expect(response.body.errors).toMatchObject({
|
||||||
|
disabled: ['must be boolean'],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@@ -0,0 +1,28 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import Config from '../../../../../models/config.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const config = await Config.query().updateFirstOrInsert(
|
||||||
|
configParams(request)
|
||||||
|
);
|
||||||
|
|
||||||
|
renderObject(response, config);
|
||||||
|
};
|
||||||
|
|
||||||
|
const configParams = (request) => {
|
||||||
|
const {
|
||||||
|
logoSvgData,
|
||||||
|
palettePrimaryDark,
|
||||||
|
palettePrimaryLight,
|
||||||
|
palettePrimaryMain,
|
||||||
|
title,
|
||||||
|
} = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
logoSvgData,
|
||||||
|
palettePrimaryDark,
|
||||||
|
palettePrimaryLight,
|
||||||
|
palettePrimaryMain,
|
||||||
|
title,
|
||||||
|
};
|
||||||
|
};
|
@@ -0,0 +1,88 @@
|
|||||||
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
||||||
|
import request from 'supertest';
|
||||||
|
|
||||||
|
import app from '../../../../../app.js';
|
||||||
|
import createAuthTokenByUserId from '../../../../../helpers/create-auth-token-by-user-id.js';
|
||||||
|
import { createUser } from '../../../../../../test/factories/user.js';
|
||||||
|
import { createRole } from '../../../../../../test/factories/role.js';
|
||||||
|
import { updateConfig } from '../../../../../../test/factories/config.js';
|
||||||
|
import * as license from '../../../../../helpers/license.ee.js';
|
||||||
|
|
||||||
|
describe('PATCH /api/v1/admin/config', () => {
|
||||||
|
let currentUser, adminRole, token;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
vi.spyOn(license, 'hasValidLicense').mockResolvedValue(true);
|
||||||
|
|
||||||
|
adminRole = await createRole({ name: 'Admin' });
|
||||||
|
currentUser = await createUser({ roleId: adminRole.id });
|
||||||
|
|
||||||
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return updated config', async () => {
|
||||||
|
const title = 'Test environment - Automatisch';
|
||||||
|
const palettePrimaryMain = '#00adef';
|
||||||
|
const palettePrimaryDark = '#222222';
|
||||||
|
const palettePrimaryLight = '#f90707';
|
||||||
|
const logoSvgData =
|
||||||
|
'<svg width="25" height="25" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100"><rect width="100%" height="100%" fill="white" /><text x="10" y="40" font-family="Arial" font-size="40" fill="black">A</text></svg>';
|
||||||
|
|
||||||
|
const appConfig = {
|
||||||
|
title,
|
||||||
|
palettePrimaryMain: palettePrimaryMain,
|
||||||
|
palettePrimaryDark: palettePrimaryDark,
|
||||||
|
palettePrimaryLight: palettePrimaryLight,
|
||||||
|
logoSvgData: logoSvgData,
|
||||||
|
};
|
||||||
|
|
||||||
|
await updateConfig(appConfig);
|
||||||
|
|
||||||
|
const newTitle = 'Updated title';
|
||||||
|
|
||||||
|
const newConfigValues = {
|
||||||
|
title: newTitle,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch('/api/v1/admin/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(newConfigValues)
|
||||||
|
.expect(200);
|
||||||
|
|
||||||
|
expect(response.body.data.title).toStrictEqual(newTitle);
|
||||||
|
expect(response.body.meta.type).toStrictEqual('Config');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return created config for unexisting config', async () => {
|
||||||
|
const newTitle = 'Updated title';
|
||||||
|
|
||||||
|
const newConfigValues = {
|
||||||
|
title: newTitle,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch('/api/v1/admin/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(newConfigValues)
|
||||||
|
.expect(200);
|
||||||
|
|
||||||
|
expect(response.body.data.title).toStrictEqual(newTitle);
|
||||||
|
expect(response.body.meta.type).toStrictEqual('Config');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should return null for deleted config entry', async () => {
|
||||||
|
const newConfigValues = {
|
||||||
|
title: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await request(app)
|
||||||
|
.patch('/api/v1/admin/config')
|
||||||
|
.set('Authorization', token)
|
||||||
|
.send(newConfigValues)
|
||||||
|
.expect(200);
|
||||||
|
|
||||||
|
expect(response.body.data.title).toBeNull();
|
||||||
|
expect(response.body.meta.type).toStrictEqual('Config');
|
||||||
|
});
|
||||||
|
});
|
@@ -11,7 +11,7 @@ describe('GET /api/v1/admin/permissions/catalog', () => {
|
|||||||
let role, currentUser, token;
|
let role, currentUser, token;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
role = await createRole({ key: 'admin' });
|
role = await createRole({ name: 'Admin' });
|
||||||
currentUser = await createUser({ roleId: role.id });
|
currentUser = await createUser({ roleId: role.id });
|
||||||
|
|
||||||
token = await createAuthTokenByUserId(currentUser.id);
|
token = await createAuthTokenByUserId(currentUser.id);
|
||||||
@@ -27,6 +27,6 @@ describe('GET /api/v1/admin/permissions/catalog', () => {
|
|||||||
|
|
||||||
const expectedPayload = await getPermissionsCatalogMock();
|
const expectedPayload = await getPermissionsCatalogMock();
|
||||||
|
|
||||||
expect(response.body).toEqual(expectedPayload);
|
expect(response.body).toStrictEqual(expectedPayload);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
import { renderObject } from '../../../../../helpers/renderer.js';
|
||||||
|
import Role from '../../../../../models/role.js';
|
||||||
|
|
||||||
|
export default async (request, response) => {
|
||||||
|
const roleData = roleParams(request);
|
||||||
|
|
||||||
|
const roleWithPermissions = await Role.query().insertGraphAndFetch(roleData, {
|
||||||
|
relate: ['permissions'],
|
||||||
|
});
|
||||||
|
|
||||||
|
renderObject(response, roleWithPermissions, { status: 201 });
|
||||||
|
};
|
||||||
|
|
||||||
|
const roleParams = (request) => {
|
||||||
|
const { name, description, permissions } = request.body;
|
||||||
|
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
description,
|
||||||
|
permissions,
|
||||||
|
};
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user