learning_ai_common_plat/services/platform-service/package.json
saravanakumardb1 3022e634b8 feat(billing): migrate to Stripe SDK v20 (API shape changes)
Bump stripe 17 -> 20 and adapt to the breaking API changes:
- PromotionCode: coupon moved under `promotion` ({ type: 'coupon', coupon }).
  mapPromo now reads p.promotion.coupon; create now passes
  promotion: { type: 'coupon', coupon: id } instead of a top-level coupon.
- Subscription.current_period_end removed (now per subscription item). Add
  getSubscriptionPeriodEnd() = max(items[].current_period_end) and use it in the
  customer.subscription.updated webhook handler.
- Update the promos route test fixture to the new promotion.coupon shape.

Verified: platform-service build (tsc) clean; promos (14) + stripe/subscriptions/
billing tests pass; full suite 1692/1692.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-31 04:00:13 -07:00

53 lines
1.9 KiB
JSON

{
"name": "@lysnrai/platform-service",
"version": "0.1.0",
"private": true,
"description": "Platform Service — consolidated: auth, audit, notifications, flags, blob, invitations, referrals, promos, subscriptions, usage, plans, licenses, stripe, items, comments, votes, public",
"type": "module",
"scripts": {
"dev": "tsx watch src/server.ts",
"build": "tsc",
"start": "node dist/server.js",
"pretest": "pnpm --dir ../.. --filter @bytelyst/auth --filter @bytelyst/blob --filter @bytelyst/storage --filter @bytelyst/config --filter @bytelyst/cosmos --filter @bytelyst/datastore --filter @bytelyst/errors --filter @bytelyst/queue --filter @bytelyst/events --filter @bytelyst/fastify-core build",
"test": "vitest run --pool forks",
"test:watch": "vitest",
"lint": "eslint src/",
"gen:module": "tsx scripts/gen-module.ts"
},
"dependencies": {
"@azure/cosmos": "^4.9.3",
"@bytelyst/auth": "workspace:*",
"@bytelyst/blob": "workspace:*",
"@bytelyst/config": "workspace:*",
"@bytelyst/cosmos": "workspace:*",
"@bytelyst/datastore": "workspace:*",
"@bytelyst/devops": "workspace:*",
"@bytelyst/errors": "workspace:*",
"@bytelyst/events": "workspace:*",
"@bytelyst/fastify-core": "workspace:*",
"@bytelyst/queue": "workspace:*",
"@bytelyst/storage": "workspace:*",
"@fastify/cors": "^11.2.0",
"@fastify/rate-limit": "^10.3.0",
"@fastify/swagger": "^9.4.2",
"@fastify/swagger-ui": "^5.2.5",
"bcryptjs": "^3.0.3",
"fastify": "^5.2.1",
"fastify-metrics": "^10.3.0",
"fastify-zod-openapi": "^5.5.0",
"jose": "^6.2.3",
"nodemailer": "^6.10.1",
"stripe": "^20.4.1",
"yaml": "^2.8.2",
"zod": "^3.24.2",
"zod-openapi": "^5.4.6"
},
"devDependencies": {
"@types/bcryptjs": "^3.0.0",
"@types/node": "^22.12.0",
"tsx": "^4.19.2",
"typescript": "^5.7.3",
"vitest": "^3.0.5"
}
}