@voyantjs/finance 0.62.3 → 0.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,oBAAoB,CAAA;AAStE,MAAM,WAAW,yBAAyB;IACxC,0BAA0B,CAAC,EAAE,CAC3B,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;CAC5C;AA+CD,wBAAgB,yBAAyB,CAAC,OAAO,GAAE,yBAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAwJhF;AAED,eAAO,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAA8B,CAAA;AAE9D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
@@ -84,10 +84,14 @@ export function createPublicFinanceRoutes(options = {}) {
84
84
  : notFound(c, "Booking payment options not found");
85
85
  })
86
86
  .get("/payment-sessions/:sessionId", async (c) => {
87
+ // No capability check: the session id is itself the bearer
88
+ // credential — anyone the operator shared `/pay/:sessionId` with
89
+ // needs to read it, and the projection is already redacted
90
+ // (no PII beyond payerEmail/payerName which the operator chose
91
+ // to share when issuing the link). Trip-issued sessions already
92
+ // worked this way (no bookingId attached → no check); admin-
93
+ // initiated booking sessions need the same access.
87
94
  const session = await publicFinanceService.getPaymentSession(c.get("db"), c.req.param("sessionId"));
88
- if (session?.bookingId) {
89
- await requireBookingCheckoutCapability(c, session.bookingId, "payment:read");
90
- }
91
95
  return session ? c.json({ data: session }) : notFound(c, "Payment session not found");
92
96
  })
93
97
  .post("/bookings/:bookingId/payment-schedules/:scheduleId/payment-session", bookingCheckoutCapability("payment:start"), idempotencyKey(), async (c) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/finance",
3
- "version": "0.62.3",
3
+ "version": "0.63.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -49,14 +49,14 @@
49
49
  "drizzle-orm": "^0.45.2",
50
50
  "hono": "^4.12.10",
51
51
  "zod": "^4.3.6",
52
- "@voyantjs/action-ledger": "0.62.3",
53
- "@voyantjs/bookings": "0.62.3",
54
- "@voyantjs/core": "0.62.3",
55
- "@voyantjs/db": "0.62.3",
56
- "@voyantjs/hono": "0.62.3",
57
- "@voyantjs/products": "0.62.3",
58
- "@voyantjs/utils": "0.62.3",
59
- "@voyantjs/storage": "0.62.3"
52
+ "@voyantjs/action-ledger": "0.63.1",
53
+ "@voyantjs/bookings": "0.63.1",
54
+ "@voyantjs/core": "0.63.1",
55
+ "@voyantjs/db": "0.63.1",
56
+ "@voyantjs/hono": "0.63.1",
57
+ "@voyantjs/products": "0.63.1",
58
+ "@voyantjs/utils": "0.63.1",
59
+ "@voyantjs/storage": "0.63.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "typescript": "^6.0.2",