fix: TypeScript errors in Stripe webhook + add stripe dependency
Build and Push Docker Image / lint-and-typecheck (push) Successful in 1m33s Details
Build and Push Docker Image / build (push) Successful in 4m23s Details

Cast Stripe Session object for type compatibility and fix
stripeSessionId unknown type in configJson. Added stripe package
as dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-02-07 08:18:01 +01:00
parent 1c96c3a85e
commit 17f4cf765c
3 changed files with 777 additions and 84 deletions

853
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -56,7 +56,7 @@
"react-hook-form": "^7.54.2",
"recharts": "^3.6.0",
"ssh2": "^1.17.0",
"stripe": "^17.0.0",
"stripe": "^17.7.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"undici": "^7.18.2",
@ -64,7 +64,6 @@
"zustand": "^5.0.3"
},
"devDependencies": {
"dotenv": "^16.5.0",
"@eslint/eslintrc": "^3.3.3",
"@testing-library/react": "^16.3.1",
"@types/bcryptjs": "^2.4.6",
@ -75,6 +74,7 @@
"@types/react-dom": "^19.0.2",
"@vitejs/plugin-react": "^5.1.2",
"autoprefixer": "^10.4.20",
"dotenv": "^16.5.0",
"eslint": "^9.39.2",
"eslint-config-next": "16.1.1",
"eslint-plugin-react-hooks": "^7.0.1",

View File

@ -77,7 +77,7 @@ export async function POST(request: NextRequest) {
try {
switch (event.type) {
case 'checkout.session.completed': {
await handleCheckoutSessionCompleted(event.data.object)
await handleCheckoutSessionCompleted(event.data.object as unknown as Record<string, unknown>)
break
}
@ -182,7 +182,7 @@ async function handleCheckoutSessionCompleted(
tools: planMapping.tools,
tier: planMapping.tier,
domain,
stripeSessionId: session.id,
stripeSessionId: session.id as string,
stripeCustomerId,
stripeSubscriptionId,
},