@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.
- package/dist/action-ledger-drift.d.ts.map +1 -1
- package/dist/action-ledger-drift.js +7 -2
- package/dist/pricing-assignment/age.d.ts +33 -0
- package/dist/pricing-assignment/age.d.ts.map +1 -0
- package/dist/pricing-assignment/age.js +109 -0
- package/dist/pricing-assignment/draft.d.ts +69 -0
- package/dist/pricing-assignment/draft.d.ts.map +1 -0
- package/dist/pricing-assignment/draft.js +284 -0
- package/dist/pricing-assignment/types.d.ts +113 -0
- package/dist/pricing-assignment/types.d.ts.map +1 -0
- package/dist/pricing-assignment/types.js +30 -0
- package/dist/pricing-assignment/unit-helpers.d.ts +11 -0
- package/dist/pricing-assignment/unit-helpers.d.ts.map +1 -0
- package/dist/pricing-assignment/unit-helpers.js +19 -0
- package/dist/pricing-assignment/verify.d.ts +67 -0
- package/dist/pricing-assignment/verify.d.ts.map +1 -0
- package/dist/pricing-assignment/verify.js +121 -0
- package/dist/pricing-assignment.d.ts +4 -275
- package/dist/pricing-assignment.d.ts.map +1 -1
- package/dist/pricing-assignment.js +4 -558
- package/dist/routes-admin.d.ts +2894 -0
- package/dist/routes-admin.d.ts.map +1 -0
- package/dist/routes-admin.js +2111 -0
- package/dist/routes-public.d.ts +9 -2
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +8 -0
- package/dist/routes.d.ts +1 -2893
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +1 -2110
- package/dist/schema-core.d.ts.map +1 -1
- package/dist/schema-core.js +3 -1
- package/dist/schema-items.d.ts +1 -1
- package/dist/schema-items.d.ts.map +1 -1
- package/dist/schema-items.js +3 -1
- package/dist/service-core.d.ts +6240 -0
- package/dist/service-core.d.ts.map +1 -0
- package/dist/service-core.js +4350 -0
- package/dist/service-public-core.d.ts +907 -0
- package/dist/service-public-core.d.ts.map +1 -0
- package/dist/service-public-core.js +1176 -0
- package/dist/service-public.d.ts +1 -906
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +1 -1175
- package/dist/service.d.ts +1 -6239
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +1 -4304
- package/dist/workflows/refund-booking.d.ts.map +1 -1
- package/dist/workflows/refund-booking.js +7 -1
- package/package.json +6 -6
package/dist/routes-public.d.ts
CHANGED
|
@@ -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" | "
|
|
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" | "
|
|
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;
|
|
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"}
|
package/dist/routes-public.js
CHANGED
|
@@ -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,
|