@voyantjs/bookings 0.4.5 → 0.5.0

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/routes.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { publicBookingRoutes } from "./routes-public.js";
2
2
  import { type Env } from "./routes-shared.js";
3
- export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, {
3
+ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, ({
4
4
  "/": {
5
5
  $get: {
6
6
  input: {};
@@ -1526,6 +1526,7 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, {
1526
1526
  } | null;
1527
1527
  sellCurrency: string;
1528
1528
  bookingId: string;
1529
+ optionUnitId: string | null;
1529
1530
  title: string;
1530
1531
  description: string | null;
1531
1532
  itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
@@ -1536,7 +1537,6 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, {
1536
1537
  costCurrency: string | null;
1537
1538
  unitCostAmountCents: number | null;
1538
1539
  totalCostAmountCents: number | null;
1539
- optionUnitId: string | null;
1540
1540
  pricingCategoryId: string | null;
1541
1541
  sourceSnapshotId: string | null;
1542
1542
  sourceOfferId: string | null;
@@ -2051,6 +2051,40 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, {
2051
2051
  status: import("hono/utils/http-status").ContentfulStatusCode;
2052
2052
  };
2053
2053
  };
2054
+ } & {
2055
+ "/:id/group": {
2056
+ $get: {
2057
+ input: {
2058
+ param: {
2059
+ id: string;
2060
+ };
2061
+ };
2062
+ output: {
2063
+ data: {
2064
+ id: string;
2065
+ productId: string | null;
2066
+ createdAt: string;
2067
+ updatedAt: string;
2068
+ metadata: {
2069
+ [x: string]: import("hono/utils/types").JSONValue;
2070
+ } | null;
2071
+ kind: "other" | "shared_room";
2072
+ label: string;
2073
+ primaryBookingId: string | null;
2074
+ optionUnitId: string | null;
2075
+ membership: {
2076
+ id: string;
2077
+ createdAt: string;
2078
+ role: "primary" | "shared";
2079
+ bookingId: string;
2080
+ groupId: string;
2081
+ };
2082
+ } | null;
2083
+ };
2084
+ outputFormat: "json";
2085
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2086
+ };
2087
+ };
2054
2088
  } & {
2055
2089
  "/:id/notes": {
2056
2090
  $get: {
@@ -2206,7 +2240,350 @@ export declare const bookingRoutes: import("hono/hono-base").HonoBase<Env, {
2206
2240
  status: 200;
2207
2241
  };
2208
2242
  };
2209
- }, "/", "/:id/documents/:documentId">;
2243
+ }) | import("hono/types").MergeSchemaPath<{
2244
+ "/": {
2245
+ $get: {
2246
+ input: {};
2247
+ output: {
2248
+ data: {
2249
+ id: string;
2250
+ productId: string | null;
2251
+ createdAt: string;
2252
+ updatedAt: string;
2253
+ metadata: {
2254
+ [x: string]: import("hono/utils/types").JSONValue;
2255
+ } | null;
2256
+ kind: "other" | "shared_room";
2257
+ label: string;
2258
+ primaryBookingId: string | null;
2259
+ optionUnitId: string | null;
2260
+ }[];
2261
+ total: number;
2262
+ limit: number;
2263
+ offset: number;
2264
+ };
2265
+ outputFormat: "json";
2266
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2267
+ };
2268
+ };
2269
+ } & {
2270
+ "/": {
2271
+ $post: {
2272
+ input: {};
2273
+ output: {
2274
+ data: {
2275
+ id: string;
2276
+ productId: string | null;
2277
+ createdAt: string;
2278
+ updatedAt: string;
2279
+ metadata: {
2280
+ [x: string]: import("hono/utils/types").JSONValue;
2281
+ } | null;
2282
+ kind: "other" | "shared_room";
2283
+ label: string;
2284
+ primaryBookingId: string | null;
2285
+ optionUnitId: string | null;
2286
+ };
2287
+ };
2288
+ outputFormat: "json";
2289
+ status: 201;
2290
+ };
2291
+ };
2292
+ } & {
2293
+ "/:id": {
2294
+ $get: {
2295
+ input: {
2296
+ param: {
2297
+ id: string;
2298
+ };
2299
+ };
2300
+ output: {
2301
+ error: string;
2302
+ };
2303
+ outputFormat: "json";
2304
+ status: 404;
2305
+ } | {
2306
+ input: {
2307
+ param: {
2308
+ id: string;
2309
+ };
2310
+ };
2311
+ output: {
2312
+ data: {
2313
+ members: {
2314
+ id: string;
2315
+ createdAt: string;
2316
+ role: "primary" | "shared";
2317
+ bookingId: string;
2318
+ groupId: string;
2319
+ booking: {
2320
+ id: string;
2321
+ status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
2322
+ createdAt: string;
2323
+ updatedAt: string;
2324
+ organizationId: string | null;
2325
+ startDate: string | null;
2326
+ endDate: string | null;
2327
+ bookingNumber: string;
2328
+ personId: string | null;
2329
+ sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
2330
+ externalBookingRef: string | null;
2331
+ communicationLanguage: string | null;
2332
+ sellCurrency: string;
2333
+ baseCurrency: string | null;
2334
+ sellAmountCents: number | null;
2335
+ baseSellAmountCents: number | null;
2336
+ costAmountCents: number | null;
2337
+ baseCostAmountCents: number | null;
2338
+ marginPercent: number | null;
2339
+ pax: number | null;
2340
+ internalNotes: string | null;
2341
+ holdExpiresAt: string | null;
2342
+ confirmedAt: string | null;
2343
+ expiredAt: string | null;
2344
+ cancelledAt: string | null;
2345
+ completedAt: string | null;
2346
+ redeemedAt: string | null;
2347
+ } | null;
2348
+ }[];
2349
+ id: string;
2350
+ productId: string | null;
2351
+ createdAt: string;
2352
+ updatedAt: string;
2353
+ metadata: {
2354
+ [x: string]: import("hono/utils/types").JSONValue;
2355
+ } | null;
2356
+ kind: "other" | "shared_room";
2357
+ label: string;
2358
+ primaryBookingId: string | null;
2359
+ optionUnitId: string | null;
2360
+ };
2361
+ };
2362
+ outputFormat: "json";
2363
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2364
+ };
2365
+ };
2366
+ } & {
2367
+ "/:id": {
2368
+ $patch: {
2369
+ input: {
2370
+ param: {
2371
+ id: string;
2372
+ };
2373
+ };
2374
+ output: {
2375
+ error: string;
2376
+ };
2377
+ outputFormat: "json";
2378
+ status: 404;
2379
+ } | {
2380
+ input: {
2381
+ param: {
2382
+ id: string;
2383
+ };
2384
+ };
2385
+ output: {
2386
+ data: {
2387
+ id: string;
2388
+ productId: string | null;
2389
+ createdAt: string;
2390
+ updatedAt: string;
2391
+ metadata: {
2392
+ [x: string]: import("hono/utils/types").JSONValue;
2393
+ } | null;
2394
+ kind: "other" | "shared_room";
2395
+ label: string;
2396
+ primaryBookingId: string | null;
2397
+ optionUnitId: string | null;
2398
+ };
2399
+ };
2400
+ outputFormat: "json";
2401
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2402
+ };
2403
+ };
2404
+ } & {
2405
+ "/:id": {
2406
+ $delete: {
2407
+ input: {
2408
+ param: {
2409
+ id: string;
2410
+ };
2411
+ };
2412
+ output: {
2413
+ error: string;
2414
+ };
2415
+ outputFormat: "json";
2416
+ status: 404;
2417
+ } | {
2418
+ input: {
2419
+ param: {
2420
+ id: string;
2421
+ };
2422
+ };
2423
+ output: {
2424
+ success: true;
2425
+ };
2426
+ outputFormat: "json";
2427
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2428
+ };
2429
+ };
2430
+ } & {
2431
+ "/:id/members": {
2432
+ $get: {
2433
+ input: {
2434
+ param: {
2435
+ id: string;
2436
+ };
2437
+ };
2438
+ output: {
2439
+ data: {
2440
+ id: string;
2441
+ createdAt: string;
2442
+ role: "primary" | "shared";
2443
+ bookingId: string;
2444
+ groupId: string;
2445
+ booking: {
2446
+ id: string;
2447
+ status: "cancelled" | "draft" | "on_hold" | "confirmed" | "in_progress" | "completed" | "expired";
2448
+ createdAt: string;
2449
+ updatedAt: string;
2450
+ organizationId: string | null;
2451
+ startDate: string | null;
2452
+ endDate: string | null;
2453
+ bookingNumber: string;
2454
+ personId: string | null;
2455
+ sourceType: "internal" | "direct" | "manual" | "affiliate" | "ota" | "reseller" | "api_partner";
2456
+ externalBookingRef: string | null;
2457
+ communicationLanguage: string | null;
2458
+ sellCurrency: string;
2459
+ baseCurrency: string | null;
2460
+ sellAmountCents: number | null;
2461
+ baseSellAmountCents: number | null;
2462
+ costAmountCents: number | null;
2463
+ baseCostAmountCents: number | null;
2464
+ marginPercent: number | null;
2465
+ pax: number | null;
2466
+ internalNotes: string | null;
2467
+ holdExpiresAt: string | null;
2468
+ confirmedAt: string | null;
2469
+ expiredAt: string | null;
2470
+ cancelledAt: string | null;
2471
+ completedAt: string | null;
2472
+ redeemedAt: string | null;
2473
+ } | null;
2474
+ }[];
2475
+ };
2476
+ outputFormat: "json";
2477
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2478
+ };
2479
+ };
2480
+ } & {
2481
+ "/:id/members": {
2482
+ $post: {
2483
+ input: {
2484
+ param: {
2485
+ id: string;
2486
+ };
2487
+ };
2488
+ output: {
2489
+ error: string;
2490
+ };
2491
+ outputFormat: "json";
2492
+ status: 404;
2493
+ } | {
2494
+ input: {
2495
+ param: {
2496
+ id: string;
2497
+ };
2498
+ };
2499
+ output: {
2500
+ error: string;
2501
+ currentGroupId: string;
2502
+ };
2503
+ outputFormat: "json";
2504
+ status: 409;
2505
+ } | {
2506
+ input: {
2507
+ param: {
2508
+ id: string;
2509
+ };
2510
+ };
2511
+ output: {
2512
+ data: {
2513
+ id: string;
2514
+ createdAt: string;
2515
+ role: "primary" | "shared";
2516
+ bookingId: string;
2517
+ groupId: string;
2518
+ };
2519
+ };
2520
+ outputFormat: "json";
2521
+ status: 201;
2522
+ };
2523
+ };
2524
+ } & {
2525
+ "/:id/members/:bookingId": {
2526
+ $delete: {
2527
+ input: {
2528
+ param: {
2529
+ id: string;
2530
+ } & {
2531
+ bookingId: string;
2532
+ };
2533
+ };
2534
+ output: {
2535
+ error: string;
2536
+ };
2537
+ outputFormat: "json";
2538
+ status: 404;
2539
+ } | {
2540
+ input: {
2541
+ param: {
2542
+ id: string;
2543
+ } & {
2544
+ bookingId: string;
2545
+ };
2546
+ };
2547
+ output: {
2548
+ success: true;
2549
+ };
2550
+ outputFormat: "json";
2551
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2552
+ };
2553
+ };
2554
+ } & {
2555
+ "/:id/passengers": {
2556
+ $get: {
2557
+ input: {
2558
+ param: {
2559
+ id: string;
2560
+ };
2561
+ };
2562
+ output: {
2563
+ data: {
2564
+ id: string;
2565
+ notes: string | null;
2566
+ createdAt: string;
2567
+ updatedAt: string;
2568
+ email: string | null;
2569
+ firstName: string;
2570
+ lastName: string;
2571
+ personId: string | null;
2572
+ bookingId: string;
2573
+ participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
2574
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
2575
+ phone: string | null;
2576
+ preferredLanguage: string | null;
2577
+ accessibilityNeeds: string | null;
2578
+ specialRequests: string | null;
2579
+ isPrimary: boolean;
2580
+ }[];
2581
+ };
2582
+ outputFormat: "json";
2583
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2584
+ };
2585
+ };
2586
+ }, "/groups">, "/", "/:id/documents/:documentId">;
2210
2587
  export type BookingRoutes = typeof bookingRoutes;
2211
2588
  export type PublicBookingRoutes = typeof publicBookingRoutes;
2212
2589
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,KAAK,GAAG,EAAiB,MAAM,oBAAoB,CAAA;AA2J5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDA05Ba,CAAA;AAEvC,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAA;AAChD,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
package/dist/routes.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import { createKmsProviderFromEnv } from "@voyantjs/utils";
2
2
  import { Hono } from "hono";
3
3
  import { createBookingPiiService } from "./pii.js";
4
+ import { bookingGroupRoutes } from "./routes-groups.js";
4
5
  import { getRuntimeEnv } from "./routes-shared.js";
5
6
  import { bookingPiiAccessLog } from "./schema.js";
6
7
  import { bookingsService } from "./service.js";
8
+ import { bookingGroupsService } from "./service-groups.js";
7
9
  import { publicBookingsService } from "./service-public.js";
8
10
  import { bookingListQuerySchema, cancelBookingSchema, confirmBookingSchema, convertProductSchema, createBookingSchema, expireBookingSchema, expireStaleBookingsSchema, extendBookingHoldSchema, insertBookingDocumentSchema, insertBookingFulfillmentSchema, insertBookingItemParticipantSchema, insertBookingItemSchema, insertBookingNoteSchema, insertParticipantSchema, insertPassengerSchema, insertSupplierStatusSchema, internalBookingOverviewLookupQuerySchema, recordBookingRedemptionSchema, reserveBookingFromTransactionSchema, reserveBookingSchema, updateBookingFulfillmentSchema, updateBookingItemSchema, updateBookingSchema, updateBookingStatusSchema, updateParticipantSchema, updatePassengerSchema, updateSupplierStatusSchema, upsertParticipantTravelDetailsSchema, } from "./validation.js";
9
11
  function hasPiiScope(scopes, action) {
@@ -632,6 +634,11 @@ export const bookingRoutes = new Hono()
632
634
  // 26. GET /:id/activity — List activity log
633
635
  .get("/:id/activity", async (c) => {
634
636
  return c.json({ data: await bookingsService.listActivity(c.get("db"), c.req.param("id")) });
637
+ })
638
+ // 26a. GET /:id/group — Shared-room group membership for this booking (or null)
639
+ .get("/:id/group", async (c) => {
640
+ const result = await bookingGroupsService.getBookingGroupForBooking(c.get("db"), c.req.param("id"));
641
+ return c.json({ data: result ?? null });
635
642
  })
636
643
  // ==========================================================================
637
644
  // Notes
@@ -674,4 +681,8 @@ export const bookingRoutes = new Hono()
674
681
  return c.json({ error: "Document not found" }, 404);
675
682
  }
676
683
  return c.json({ success: true }, 200);
677
- });
684
+ })
685
+ // ==========================================================================
686
+ // Booking Groups (shared-room / split-booking model)
687
+ // ==========================================================================
688
+ .route("/groups", bookingGroupRoutes);