Merge branch 'dev'
This commit is contained in:
commit
1ba361b9db
8 changed files with 154 additions and 179 deletions
12
package.json
12
package.json
|
@ -23,7 +23,7 @@
|
||||||
"@trpc/next": "10.37.1",
|
"@trpc/next": "10.37.1",
|
||||||
"@trpc/react-query": "10.37.1",
|
"@trpc/react-query": "10.37.1",
|
||||||
"@trpc/server": "10.37.1",
|
"@trpc/server": "10.37.1",
|
||||||
"@unkey/api": "^0.6.11",
|
"@unkey/api": "^0.6.13",
|
||||||
"@upstash/ratelimit": "^0.4.3",
|
"@upstash/ratelimit": "^0.4.3",
|
||||||
"@upstash/redis": "^1.22.0",
|
"@upstash/redis": "^1.22.0",
|
||||||
"ably": "^1.2.43",
|
"ably": "^1.2.43",
|
||||||
|
@ -46,11 +46,11 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/eslint": "^8.44.2",
|
"@types/eslint": "^8.44.2",
|
||||||
"@types/json2csv": "^5.0.3",
|
"@types/json2csv": "^5.0.3",
|
||||||
"@types/node": "^20.5.1",
|
"@types/node": "^20.5.3",
|
||||||
"@types/react": "^18.2.20",
|
"@types/react": "^18.2.21",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||||
"@typescript-eslint/parser": "^6.4.0",
|
"@typescript-eslint/parser": "^6.4.1",
|
||||||
"daisyui": "^3.5.1",
|
"daisyui": "^3.6.1",
|
||||||
"drizzle-kit": "^0.19.13",
|
"drizzle-kit": "^0.19.13",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-next": "^13.4.19",
|
"eslint-config-next": "^13.4.19",
|
||||||
|
|
158
pnpm-lock.yaml
generated
158
pnpm-lock.yaml
generated
|
@ -36,8 +36,8 @@ dependencies:
|
||||||
specifier: 10.37.1
|
specifier: 10.37.1
|
||||||
version: 10.37.1
|
version: 10.37.1
|
||||||
'@unkey/api':
|
'@unkey/api':
|
||||||
specifier: ^0.6.11
|
specifier: ^0.6.13
|
||||||
version: 0.6.11
|
version: 0.6.13
|
||||||
'@upstash/ratelimit':
|
'@upstash/ratelimit':
|
||||||
specifier: ^0.4.3
|
specifier: ^0.4.3
|
||||||
version: 0.4.3
|
version: 0.4.3
|
||||||
|
@ -101,20 +101,20 @@ devDependencies:
|
||||||
specifier: ^5.0.3
|
specifier: ^5.0.3
|
||||||
version: 5.0.3
|
version: 5.0.3
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^20.5.1
|
specifier: ^20.5.3
|
||||||
version: 20.5.1
|
version: 20.5.3
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: ^18.2.20
|
specifier: ^18.2.21
|
||||||
version: 18.2.20
|
version: 18.2.21
|
||||||
'@typescript-eslint/eslint-plugin':
|
'@typescript-eslint/eslint-plugin':
|
||||||
specifier: ^6.4.0
|
specifier: ^6.4.1
|
||||||
version: 6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.1.6)
|
version: 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6)
|
||||||
'@typescript-eslint/parser':
|
'@typescript-eslint/parser':
|
||||||
specifier: ^6.4.0
|
specifier: ^6.4.1
|
||||||
version: 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
version: 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
daisyui:
|
daisyui:
|
||||||
specifier: ^3.5.1
|
specifier: ^3.6.1
|
||||||
version: 3.5.1
|
version: 3.6.1
|
||||||
drizzle-kit:
|
drizzle-kit:
|
||||||
specifier: ^0.19.13
|
specifier: ^0.19.13
|
||||||
version: 0.19.13
|
version: 0.19.13
|
||||||
|
@ -1563,7 +1563,7 @@ packages:
|
||||||
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
|
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/connect': 3.4.35
|
'@types/connect': 3.4.35
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/cacheable-request@6.0.3:
|
/@types/cacheable-request@6.0.3:
|
||||||
|
@ -1571,14 +1571,14 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/http-cache-semantics': 4.0.1
|
'@types/http-cache-semantics': 4.0.1
|
||||||
'@types/keyv': 3.1.4
|
'@types/keyv': 3.1.4
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
'@types/responselike': 1.0.0
|
'@types/responselike': 1.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/connect@3.4.35:
|
/@types/connect@3.4.35:
|
||||||
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
|
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/cookies@0.7.7:
|
/@types/cookies@0.7.7:
|
||||||
|
@ -1587,7 +1587,7 @@ packages:
|
||||||
'@types/connect': 3.4.35
|
'@types/connect': 3.4.35
|
||||||
'@types/express': 4.17.14
|
'@types/express': 4.17.14
|
||||||
'@types/keygrip': 1.0.2
|
'@types/keygrip': 1.0.2
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/eslint@8.44.2:
|
/@types/eslint@8.44.2:
|
||||||
|
@ -1604,7 +1604,7 @@ packages:
|
||||||
/@types/express-serve-static-core@4.17.35:
|
/@types/express-serve-static-core@4.17.35:
|
||||||
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
|
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
'@types/qs': 6.9.7
|
'@types/qs': 6.9.7
|
||||||
'@types/range-parser': 1.2.4
|
'@types/range-parser': 1.2.4
|
||||||
'@types/send': 0.17.1
|
'@types/send': 0.17.1
|
||||||
|
@ -1634,7 +1634,7 @@ packages:
|
||||||
/@types/json2csv@5.0.3:
|
/@types/json2csv@5.0.3:
|
||||||
resolution: {integrity: sha512-ZJEv6SzhPhgpBpxZU4n/TZekbZqI4EcyXXRwms1lAITG2kIAtj85PfNYafUOY1zy8bWs5ujaub0GU4copaA0sw==}
|
resolution: {integrity: sha512-ZJEv6SzhPhgpBpxZU4n/TZekbZqI4EcyXXRwms1lAITG2kIAtj85PfNYafUOY1zy8bWs5ujaub0GU4copaA0sw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/json5@0.0.29:
|
/@types/json5@0.0.29:
|
||||||
|
@ -1648,7 +1648,7 @@ packages:
|
||||||
/@types/keyv@3.1.4:
|
/@types/keyv@3.1.4:
|
||||||
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
|
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/mime@1.3.2:
|
/@types/mime@1.3.2:
|
||||||
|
@ -1662,7 +1662,7 @@ packages:
|
||||||
/@types/node-fetch@2.6.2:
|
/@types/node-fetch@2.6.2:
|
||||||
resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==}
|
resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
form-data: 3.0.1
|
form-data: 3.0.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
@ -1674,8 +1674,8 @@ packages:
|
||||||
resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==}
|
resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/node@20.5.1:
|
/@types/node@20.5.3:
|
||||||
resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==}
|
resolution: {integrity: sha512-ITI7rbWczR8a/S6qjAW7DMqxqFMjjTo61qZVWJ1ubPvbIQsL5D/TvwjYEalM8Kthpe3hTzOGrF2TGbAu2uyqeA==}
|
||||||
|
|
||||||
/@types/normalize-package-data@2.4.1:
|
/@types/normalize-package-data@2.4.1:
|
||||||
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
||||||
|
@ -1684,7 +1684,7 @@ packages:
|
||||||
/@types/pg@8.6.6:
|
/@types/pg@8.6.6:
|
||||||
resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==}
|
resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
pg-protocol: 1.6.0
|
pg-protocol: 1.6.0
|
||||||
pg-types: 2.2.0
|
pg-types: 2.2.0
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -1701,8 +1701,8 @@ packages:
|
||||||
resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==}
|
resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/react@18.2.20:
|
/@types/react@18.2.21:
|
||||||
resolution: {integrity: sha512-WKNtmsLWJM/3D5mG4U84cysVY31ivmyw85dE84fOCk5Hx78wezB/XEjVPWl2JTZ5FkEeaTJf+VgUAUn3PE7Isw==}
|
resolution: {integrity: sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/prop-types': 15.7.5
|
'@types/prop-types': 15.7.5
|
||||||
'@types/scheduler': 0.16.3
|
'@types/scheduler': 0.16.3
|
||||||
|
@ -1712,7 +1712,7 @@ packages:
|
||||||
/@types/responselike@1.0.0:
|
/@types/responselike@1.0.0:
|
||||||
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
|
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/scheduler@0.16.3:
|
/@types/scheduler@0.16.3:
|
||||||
|
@ -1727,7 +1727,7 @@ packages:
|
||||||
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
|
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/mime': 1.3.2
|
'@types/mime': 1.3.2
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/serve-static@1.15.2:
|
/@types/serve-static@1.15.2:
|
||||||
|
@ -1735,11 +1735,11 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/http-errors': 2.0.1
|
'@types/http-errors': 2.0.1
|
||||||
'@types/mime': 3.0.1
|
'@types/mime': 3.0.1
|
||||||
'@types/node': 20.5.1
|
'@types/node': 20.5.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@typescript-eslint/eslint-plugin@6.4.0(@typescript-eslint/parser@6.4.0)(eslint@8.47.0)(typescript@5.1.6):
|
/@typescript-eslint/eslint-plugin@6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==}
|
resolution: {integrity: sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
|
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
|
||||||
|
@ -1750,11 +1750,11 @@ packages:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/regexpp': 4.6.2
|
'@eslint-community/regexpp': 4.6.2
|
||||||
'@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
'@typescript-eslint/scope-manager': 6.4.0
|
'@typescript-eslint/scope-manager': 6.4.1
|
||||||
'@typescript-eslint/type-utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/type-utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
'@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
'@typescript-eslint/visitor-keys': 6.4.0
|
'@typescript-eslint/visitor-keys': 6.4.1
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
graphemer: 1.4.0
|
graphemer: 1.4.0
|
||||||
|
@ -1767,8 +1767,8 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.1.6):
|
/@typescript-eslint/parser@6.4.1(eslint@8.47.0)(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==}
|
resolution: {integrity: sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^7.0.0 || ^8.0.0
|
eslint: ^7.0.0 || ^8.0.0
|
||||||
|
@ -1777,10 +1777,10 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/scope-manager': 6.4.0
|
'@typescript-eslint/scope-manager': 6.4.1
|
||||||
'@typescript-eslint/types': 6.4.0
|
'@typescript-eslint/types': 6.4.1
|
||||||
'@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6)
|
'@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6)
|
||||||
'@typescript-eslint/visitor-keys': 6.4.0
|
'@typescript-eslint/visitor-keys': 6.4.1
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
typescript: 5.1.6
|
typescript: 5.1.6
|
||||||
|
@ -1788,16 +1788,16 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/scope-manager@6.4.0:
|
/@typescript-eslint/scope-manager@6.4.1:
|
||||||
resolution: {integrity: sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==}
|
resolution: {integrity: sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 6.4.0
|
'@typescript-eslint/types': 6.4.1
|
||||||
'@typescript-eslint/visitor-keys': 6.4.0
|
'@typescript-eslint/visitor-keys': 6.4.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/type-utils@6.4.0(eslint@8.47.0)(typescript@5.1.6):
|
/@typescript-eslint/type-utils@6.4.1(eslint@8.47.0)(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==}
|
resolution: {integrity: sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^7.0.0 || ^8.0.0
|
eslint: ^7.0.0 || ^8.0.0
|
||||||
|
@ -1806,8 +1806,8 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6)
|
'@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6)
|
||||||
'@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
ts-api-utils: 1.0.2(typescript@5.1.6)
|
ts-api-utils: 1.0.2(typescript@5.1.6)
|
||||||
|
@ -1816,13 +1816,13 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/types@6.4.0:
|
/@typescript-eslint/types@6.4.1:
|
||||||
resolution: {integrity: sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==}
|
resolution: {integrity: sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/typescript-estree@6.4.0(typescript@5.1.6):
|
/@typescript-eslint/typescript-estree@6.4.1(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==}
|
resolution: {integrity: sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '*'
|
typescript: '*'
|
||||||
|
@ -1830,8 +1830,8 @@ packages:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 6.4.0
|
'@typescript-eslint/types': 6.4.1
|
||||||
'@typescript-eslint/visitor-keys': 6.4.0
|
'@typescript-eslint/visitor-keys': 6.4.1
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
globby: 11.1.0
|
globby: 11.1.0
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
|
@ -1842,8 +1842,8 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/utils@6.4.0(eslint@8.47.0)(typescript@5.1.6):
|
/@typescript-eslint/utils@6.4.1(eslint@8.47.0)(typescript@5.1.6):
|
||||||
resolution: {integrity: sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==}
|
resolution: {integrity: sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^7.0.0 || ^8.0.0
|
eslint: ^7.0.0 || ^8.0.0
|
||||||
|
@ -1851,9 +1851,9 @@ packages:
|
||||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0)
|
'@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0)
|
||||||
'@types/json-schema': 7.0.12
|
'@types/json-schema': 7.0.12
|
||||||
'@types/semver': 7.5.0
|
'@types/semver': 7.5.0
|
||||||
'@typescript-eslint/scope-manager': 6.4.0
|
'@typescript-eslint/scope-manager': 6.4.1
|
||||||
'@typescript-eslint/types': 6.4.0
|
'@typescript-eslint/types': 6.4.1
|
||||||
'@typescript-eslint/typescript-estree': 6.4.0(typescript@5.1.6)
|
'@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6)
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
semver: 7.5.4
|
semver: 7.5.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -1861,16 +1861,16 @@ packages:
|
||||||
- typescript
|
- typescript
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/visitor-keys@6.4.0:
|
/@typescript-eslint/visitor-keys@6.4.1:
|
||||||
resolution: {integrity: sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==}
|
resolution: {integrity: sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/types': 6.4.0
|
'@typescript-eslint/types': 6.4.1
|
||||||
eslint-visitor-keys: 3.4.3
|
eslint-visitor-keys: 3.4.3
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@unkey/api@0.6.11:
|
/@unkey/api@0.6.13:
|
||||||
resolution: {integrity: sha512-KmltppyG6WIZttav5hQav8XCZ+6hHufvofZWAbrfJv+EO68vRSGajTfxDEKi2KQi6QT39jRdcC91ZIF5+gno0w==}
|
resolution: {integrity: sha512-fYIph+wLd+lIuYqc2qXjQ52Zm/jDOhsLiZgOPNOlYzESU1ouU5Tm/9PNYb9lXgzeTqL3rU/EWtR8GoLHu/BfjA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@upstash/core-analytics@0.0.6:
|
/@upstash/core-analytics@0.0.6:
|
||||||
|
@ -2545,8 +2545,8 @@ packages:
|
||||||
type: 1.2.0
|
type: 1.2.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/daisyui@3.5.1:
|
/daisyui@3.6.1:
|
||||||
resolution: {integrity: sha512-7GG+9QXnr2qQMCqnyFU8TxpaOYJigXiEtmzoivmiiZZHvxqIwYdaMAkgivqTVxEgy3Hot3m1suzZjmt1zUrvmA==}
|
resolution: {integrity: sha512-H330IdmNoQy0i6ImktBIvIVsyYujl1N2R73rDiWFjgIGPzXIFRMFh2PcmErcSzpLJmZ28jPMEwQJEJaNp6uN5g==}
|
||||||
engines: {node: '>=16.9.0'}
|
engines: {node: '>=16.9.0'}
|
||||||
dependencies:
|
dependencies:
|
||||||
colord: 2.9.3
|
colord: 2.9.3
|
||||||
|
@ -3133,11 +3133,11 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@next/eslint-plugin-next': 13.4.19
|
'@next/eslint-plugin-next': 13.4.19
|
||||||
'@rushstack/eslint-patch': 1.3.3
|
'@rushstack/eslint-patch': 1.3.3
|
||||||
'@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0)
|
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0)
|
||||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
||||||
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0)
|
eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0)
|
||||||
eslint-plugin-react: 7.33.2(eslint@8.47.0)
|
eslint-plugin-react: 7.33.2(eslint@8.47.0)
|
||||||
eslint-plugin-react-hooks: 4.6.0(eslint@8.47.0)
|
eslint-plugin-react-hooks: 4.6.0(eslint@8.47.0)
|
||||||
|
@ -3157,7 +3157,7 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0):
|
/eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0):
|
||||||
resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==}
|
resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -3167,8 +3167,8 @@ packages:
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
enhanced-resolve: 5.15.0
|
enhanced-resolve: 5.15.0
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
||||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
||||||
fast-glob: 3.3.1
|
fast-glob: 3.3.1
|
||||||
get-tsconfig: 4.7.0
|
get-tsconfig: 4.7.0
|
||||||
is-core-module: 2.13.0
|
is-core-module: 2.13.0
|
||||||
|
@ -3180,7 +3180,7 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0):
|
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0):
|
||||||
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
|
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -3201,16 +3201,16 @@ packages:
|
||||||
eslint-import-resolver-webpack:
|
eslint-import-resolver-webpack:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
debug: 3.2.7
|
debug: 3.2.7
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0)
|
eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0):
|
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0):
|
||||||
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
|
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -3220,7 +3220,7 @@ packages:
|
||||||
'@typescript-eslint/parser':
|
'@typescript-eslint/parser':
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.1.6)
|
'@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6)
|
||||||
array-includes: 3.1.6
|
array-includes: 3.1.6
|
||||||
array.prototype.findlastindex: 1.2.2
|
array.prototype.findlastindex: 1.2.2
|
||||||
array.prototype.flat: 1.3.1
|
array.prototype.flat: 1.3.1
|
||||||
|
@ -3229,7 +3229,7 @@ packages:
|
||||||
doctrine: 2.1.0
|
doctrine: 2.1.0
|
||||||
eslint: 8.47.0
|
eslint: 8.47.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0)
|
||||||
has: 1.0.3
|
has: 1.0.3
|
||||||
is-core-module: 2.13.0
|
is-core-module: 2.13.0
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
import {
|
|
||||||
Body,
|
|
||||||
Container,
|
|
||||||
Head,
|
|
||||||
Heading,
|
|
||||||
Hr,
|
|
||||||
Html,
|
|
||||||
Img,
|
|
||||||
Preview,
|
|
||||||
Section,
|
|
||||||
Tailwind,
|
|
||||||
Text,
|
|
||||||
} from "@react-email/components";
|
|
||||||
import * as React from "react";
|
|
||||||
|
|
||||||
interface GoodbyeTemplateProps {
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const baseUrl = process.env.VERCEL_URL
|
|
||||||
? `https://${process.env.VERCEL_URL}`
|
|
||||||
: "http://localhost:3000";
|
|
||||||
|
|
||||||
export const Goodbye = ({ name }: GoodbyeTemplateProps) => (
|
|
||||||
<Html>
|
|
||||||
<Head />
|
|
||||||
<Preview>Sorry to see you go... 😭</Preview>
|
|
||||||
<Tailwind>
|
|
||||||
<Body className="bg-white my-auto mx-auto font-sans">
|
|
||||||
<Container className="border border-solid border-[#eaeaea] rounded my-[40px] mx-auto p-[20px] w-[465px]">
|
|
||||||
<Section className="mt-[32px]">
|
|
||||||
<Img
|
|
||||||
src={`${baseUrl}/logo.webp`}
|
|
||||||
width="40"
|
|
||||||
height="37"
|
|
||||||
alt={`Sprint Padawan Logo`}
|
|
||||||
className="my-0 mx-auto"
|
|
||||||
/>
|
|
||||||
</Section>
|
|
||||||
<Heading className="text-4xl">Farewell, {name}...</Heading>
|
|
||||||
<Text>{"Were sorry to see you go."}</Text>
|
|
||||||
<Text>
|
|
||||||
Your data has been deleted, including all room history, user data,
|
|
||||||
votes, etc.
|
|
||||||
</Text>
|
|
||||||
<Hr className="border border-solid border-[#eaeaea] my-[26px] mx-0 w-full" />
|
|
||||||
<Text>— The Sprint Padawan team</Text>
|
|
||||||
</Container>
|
|
||||||
</Body>
|
|
||||||
</Tailwind>
|
|
||||||
</Html>
|
|
||||||
);
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
Img,
|
Img,
|
||||||
Preview,
|
Preview,
|
||||||
Section,
|
Section,
|
||||||
Tailwind,
|
|
||||||
Text,
|
Text,
|
||||||
} from "@react-email/components";
|
} from "@react-email/components";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
@ -25,33 +24,28 @@ export const Welcome = ({ name }: WelcomeTemplateProps) => (
|
||||||
<Html>
|
<Html>
|
||||||
<Head />
|
<Head />
|
||||||
<Preview>🎉 Welcome to Sprint Padawan! 🎉</Preview>
|
<Preview>🎉 Welcome to Sprint Padawan! 🎉</Preview>
|
||||||
<Tailwind>
|
<Body>
|
||||||
<Body className="bg-white my-auto mx-auto font-sans">
|
<Container>
|
||||||
<Container className="border border-solid border-[#eaeaea] rounded my-[40px] mx-auto p-[20px] w-[465px]">
|
<Section>
|
||||||
<Section className="mt-[32px]">
|
|
||||||
<Img
|
<Img
|
||||||
src={`${baseUrl}/logo.webp`}
|
src={`${baseUrl}/logo.webp`}
|
||||||
width="40"
|
width="40"
|
||||||
height="37"
|
height="37"
|
||||||
alt={`Sprint Padawan Logo`}
|
alt={`Sprint Padawan Logo`}
|
||||||
className="my-0 mx-auto"
|
|
||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
<Heading className="text-black text-[24px] font-normal text-center p-0 my-[30px] mx-0">
|
<Heading>
|
||||||
🎉 Welcome to Sprint Padawan, <strong>{name}</strong>! 🎉
|
🎉 Welcome to Sprint Padawan, <strong>{name}</strong>! 🎉
|
||||||
</Heading>
|
</Heading>
|
||||||
<Text className="text-black text-[14px] leading-[24px]">
|
<Text>Hello {name},</Text>
|
||||||
Hello {name},
|
|
||||||
</Text>
|
|
||||||
<Text>Thank you for signing up for Sprint Padawan!</Text>
|
<Text>Thank you for signing up for Sprint Padawan!</Text>
|
||||||
<Text>
|
<Text>
|
||||||
If at any point you encounter issues, please let me know at
|
If at any point you encounter issues, please let me know at
|
||||||
support@sprintpadawan.dev.
|
support@sprintpadawan.dev.
|
||||||
</Text>
|
</Text>
|
||||||
<Hr className="border border-solid border-[#eaeaea] my-[26px] mx-0 w-full" />
|
<Hr />
|
||||||
<Text>— The Sprint Padawan team</Text>
|
<Text>— Atridad Lahiji</Text>
|
||||||
</Container>
|
</Container>
|
||||||
</Body>
|
</Body>
|
||||||
</Tailwind>
|
|
||||||
</Html>
|
</Html>
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,7 +3,11 @@ import {
|
||||||
onUserCreatedHandler,
|
onUserCreatedHandler,
|
||||||
onUserDeletedHandler,
|
onUserDeletedHandler,
|
||||||
} from "~/server/webhookHelpers";
|
} from "~/server/webhookHelpers";
|
||||||
import { WebhookEventBodySchema, WebhookEvents } from "~/utils/types";
|
import {
|
||||||
|
type WebhookEventBody,
|
||||||
|
WebhookEventBodySchema,
|
||||||
|
WebhookEvents,
|
||||||
|
} from "~/utils/types";
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
runtime: "edge",
|
runtime: "edge",
|
||||||
|
@ -12,12 +16,17 @@ export const config = {
|
||||||
|
|
||||||
export default async function handler(req: NextRequest) {
|
export default async function handler(req: NextRequest) {
|
||||||
try {
|
try {
|
||||||
const requestBody = WebhookEventBodySchema.parse(await req.json());
|
const eventBody = (await req.json()) as WebhookEventBody;
|
||||||
|
const { data, type } = WebhookEventBodySchema.parse(eventBody);
|
||||||
let success = false;
|
let success = false;
|
||||||
|
|
||||||
switch (requestBody.type) {
|
switch (type) {
|
||||||
case WebhookEvents.USER_CREATED:
|
case WebhookEvents.USER_CREATED:
|
||||||
success = await onUserCreatedHandler(requestBody.data.id);
|
success = await onUserCreatedHandler(
|
||||||
|
data.id,
|
||||||
|
`${data.first_name} ${data.last_name}`,
|
||||||
|
data.email_addresses?.map((email) => email.email_address) || []
|
||||||
|
);
|
||||||
if (success) {
|
if (success) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ result: "USER CREATED" },
|
{ result: "USER CREATED" },
|
||||||
|
@ -31,7 +40,7 @@ export default async function handler(req: NextRequest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
case WebhookEvents.USER_DELETED:
|
case WebhookEvents.USER_DELETED:
|
||||||
success = await onUserDeletedHandler(requestBody.data.id);
|
success = await onUserDeletedHandler(data.id);
|
||||||
|
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ result: "USER DELETED" },
|
{ result: "USER DELETED" },
|
||||||
|
@ -44,7 +53,8 @@ export default async function handler(req: NextRequest) {
|
||||||
{ status: 400, statusText: "INVALID WEBHOOK EVENT TYPE" }
|
{ status: 400, statusText: "INVALID WEBHOOK EVENT TYPE" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ result: "INVALID WEBHOOK EVENT BODY" },
|
{ result: "INVALID WEBHOOK EVENT BODY" },
|
||||||
{ status: 400, statusText: "INVALID WEBHOOK EVENT BODY" }
|
{ status: 400, statusText: "INVALID WEBHOOK EVENT BODY" }
|
||||||
|
|
|
@ -9,7 +9,9 @@ export const validateApiKey = async (key: string) => {
|
||||||
const res = await unkey.keys.verify({
|
const res = await unkey.keys.verify({
|
||||||
key,
|
key,
|
||||||
});
|
});
|
||||||
return res.valid;
|
// @ts-ignore This is broken...
|
||||||
|
const isValid = res.result?.valid || (res.valid as boolean);
|
||||||
|
return isValid;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,10 @@ import { eq } from "drizzle-orm";
|
||||||
import { db } from "./db";
|
import { db } from "./db";
|
||||||
import { rooms } from "./schema";
|
import { rooms } from "./schema";
|
||||||
import { env } from "~/env.mjs";
|
import { env } from "~/env.mjs";
|
||||||
|
import { Welcome } from "~/components/templates/Welcome";
|
||||||
|
import { Resend } from "resend";
|
||||||
|
|
||||||
|
const resend = new Resend(env.RESEND_API_KEY);
|
||||||
|
|
||||||
export const onUserDeletedHandler = async (userId: string) => {
|
export const onUserDeletedHandler = async (userId: string) => {
|
||||||
try {
|
try {
|
||||||
|
@ -13,7 +17,11 @@ export const onUserDeletedHandler = async (userId: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const onUserCreatedHandler = async (userId: string) => {
|
export const onUserCreatedHandler = async (
|
||||||
|
userId: string,
|
||||||
|
userName: string,
|
||||||
|
userEmails: string[]
|
||||||
|
) => {
|
||||||
const userUpdateResponse = await fetch(
|
const userUpdateResponse = await fetch(
|
||||||
`https://api.clerk.com/v1/users/${userId}/metadata`,
|
`https://api.clerk.com/v1/users/${userId}/metadata`,
|
||||||
{
|
{
|
||||||
|
@ -33,5 +41,14 @@ export const onUserCreatedHandler = async (userId: string) => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
userEmails.forEach((userEmail) => {
|
||||||
|
void resend.sendEmail({
|
||||||
|
from: "no-reply@sprintpadawan.dev",
|
||||||
|
to: userEmail,
|
||||||
|
subject: "🎉 Welcome to Sprint Padawan! 🎉",
|
||||||
|
react: Welcome({ name: userName }),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return userUpdateResponse.ok;
|
return userUpdateResponse.ok;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,14 +23,18 @@ export const WebhookEventBodySchema = z.object({
|
||||||
.array(
|
.array(
|
||||||
z.object({
|
z.object({
|
||||||
email_address: z.string().email(),
|
email_address: z.string().email(),
|
||||||
id: z.string(),
|
id: z.string().optional(),
|
||||||
verification: z.object({
|
verification: z
|
||||||
status: z.string(),
|
.object({
|
||||||
strategy: z.string(),
|
status: z.string().optional(),
|
||||||
}),
|
strategy: z.string().optional(),
|
||||||
|
})
|
||||||
|
.optional(),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.optional(),
|
.optional(),
|
||||||
|
first_name: z.string().optional(),
|
||||||
|
last_name: z.string().optional(),
|
||||||
}),
|
}),
|
||||||
type: z.string(),
|
type: z.string(),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue