fix: TypeScript errors in Stripe webhook + add stripe dependency
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:
parent
1c96c3a85e
commit
17f4cf765c
File diff suppressed because it is too large
Load Diff
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue