@voyantjs/bookings 0.119.1 → 0.119.3

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.
Files changed (49) hide show
  1. package/dist/action-ledger-drift.d.ts.map +1 -1
  2. package/dist/action-ledger-drift.js +7 -2
  3. package/dist/pricing-assignment/age.d.ts +33 -0
  4. package/dist/pricing-assignment/age.d.ts.map +1 -0
  5. package/dist/pricing-assignment/age.js +109 -0
  6. package/dist/pricing-assignment/draft.d.ts +69 -0
  7. package/dist/pricing-assignment/draft.d.ts.map +1 -0
  8. package/dist/pricing-assignment/draft.js +284 -0
  9. package/dist/pricing-assignment/types.d.ts +113 -0
  10. package/dist/pricing-assignment/types.d.ts.map +1 -0
  11. package/dist/pricing-assignment/types.js +30 -0
  12. package/dist/pricing-assignment/unit-helpers.d.ts +11 -0
  13. package/dist/pricing-assignment/unit-helpers.d.ts.map +1 -0
  14. package/dist/pricing-assignment/unit-helpers.js +19 -0
  15. package/dist/pricing-assignment/verify.d.ts +67 -0
  16. package/dist/pricing-assignment/verify.d.ts.map +1 -0
  17. package/dist/pricing-assignment/verify.js +121 -0
  18. package/dist/pricing-assignment.d.ts +4 -275
  19. package/dist/pricing-assignment.d.ts.map +1 -1
  20. package/dist/pricing-assignment.js +4 -558
  21. package/dist/routes-admin.d.ts +2894 -0
  22. package/dist/routes-admin.d.ts.map +1 -0
  23. package/dist/routes-admin.js +2111 -0
  24. package/dist/routes-public.d.ts +9 -2
  25. package/dist/routes-public.d.ts.map +1 -1
  26. package/dist/routes-public.js +8 -0
  27. package/dist/routes.d.ts +1 -2893
  28. package/dist/routes.d.ts.map +1 -1
  29. package/dist/routes.js +1 -2110
  30. package/dist/schema-core.d.ts.map +1 -1
  31. package/dist/schema-core.js +3 -1
  32. package/dist/schema-items.d.ts +1 -1
  33. package/dist/schema-items.d.ts.map +1 -1
  34. package/dist/schema-items.js +3 -1
  35. package/dist/service-core.d.ts +6240 -0
  36. package/dist/service-core.d.ts.map +1 -0
  37. package/dist/service-core.js +4350 -0
  38. package/dist/service-public-core.d.ts +907 -0
  39. package/dist/service-public-core.d.ts.map +1 -0
  40. package/dist/service-public-core.js +1176 -0
  41. package/dist/service-public.d.ts +1 -906
  42. package/dist/service-public.d.ts.map +1 -1
  43. package/dist/service-public.js +1 -1175
  44. package/dist/service.d.ts +1 -6239
  45. package/dist/service.d.ts.map +1 -1
  46. package/dist/service.js +1 -4304
  47. package/dist/workflows/refund-booking.d.ts.map +1 -1
  48. package/dist/workflows/refund-booking.js +7 -1
  49. package/package.json +6 -6
@@ -506,6 +506,13 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
506
506
  };
507
507
  outputFormat: "json";
508
508
  status: 404;
509
+ } | {
510
+ input: {};
511
+ output: {
512
+ error: string;
513
+ };
514
+ outputFormat: "json";
515
+ status: 429;
509
516
  } | {
510
517
  input: {};
511
518
  output: {
@@ -567,7 +574,7 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
567
574
  id: string;
568
575
  bookingItemId: string | null;
569
576
  travelerId: string | null;
570
- fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
577
+ fulfillmentType: "other" | "pdf" | "voucher" | "ticket" | "qr_code" | "barcode" | "mobile";
571
578
  deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
572
579
  status: "failed" | "pending" | "revoked" | "issued" | "reissued";
573
580
  artifactUrl: string | null;
@@ -656,7 +663,7 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
656
663
  id: string;
657
664
  bookingItemId: string | null;
658
665
  travelerId: string | null;
659
- fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
666
+ fulfillmentType: "other" | "pdf" | "voucher" | "ticket" | "qr_code" | "barcode" | "mobile";
660
667
  deliveryChannel: "api" | "email" | "other" | "download" | "wallet";
661
668
  status: "failed" | "pending" | "revoked" | "issued" | "reissued";
662
669
  artifactUrl: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,oBAAoB,CAAA;AAyKtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;+BA0BsC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0LxE,CAAA;AAEJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
1
+ {"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,oBAAoB,CAAA;AAiLtE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;+BA0BsC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiMxE,CAAA;AAEJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
@@ -112,6 +112,9 @@ async function enforceGuestBookingLookupRateLimit(c, bookingCode) {
112
112
  c.header("Retry-After", "60");
113
113
  return c.json({ error: "Too Many Requests" }, 429);
114
114
  }
115
+ function bookingLookupRateLimitKey(input) {
116
+ return input.bookingCode ?? input.bookingNumber ?? input.bookingId ?? "unknown";
117
+ }
115
118
  function getRouteRuntime(c) {
116
119
  const container = c.var.container;
117
120
  try {
@@ -213,6 +216,11 @@ export const publicBookingRoutes = new Hono()
213
216
  })
214
217
  .get("/overview", async (c) => {
215
218
  const query = await parseQuery(c, publicBookingOverviewAccessQuerySchema);
219
+ if (query.email) {
220
+ const rateLimited = await enforceGuestBookingLookupRateLimit(c, bookingLookupRateLimitKey(query));
221
+ if (rateLimited)
222
+ return rateLimited;
223
+ }
216
224
  const overview = query.email
217
225
  ? await publicBookingsService.getOverview(c.get("db"), {
218
226
  bookingId: query.bookingId,