@voyantjs/bookings 0.6.8 → 0.7.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/README.md +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/pii.d.ts +10 -9
- package/dist/pii.d.ts.map +1 -1
- package/dist/pii.js +33 -33
- package/dist/products-ref.d.ts +93 -1
- package/dist/products-ref.d.ts.map +1 -1
- package/dist/products-ref.js +12 -1
- package/dist/routes-groups.d.ts +25 -5
- package/dist/routes-groups.d.ts.map +1 -1
- package/dist/routes-groups.js +3 -3
- package/dist/routes-public.d.ts +19 -21
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +1 -1
- package/dist/routes-shared.d.ts +3 -2
- package/dist/routes-shared.d.ts.map +1 -1
- package/dist/routes.d.ts +283 -188
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +89 -102
- package/dist/schema/travel-details.d.ts +27 -27
- package/dist/schema/travel-details.d.ts.map +1 -1
- package/dist/schema/travel-details.js +19 -14
- package/dist/schema-core.d.ts +194 -305
- package/dist/schema-core.d.ts.map +1 -1
- package/dist/schema-core.js +19 -10
- package/dist/schema-items.d.ts +15 -15
- package/dist/schema-items.d.ts.map +1 -1
- package/dist/schema-items.js +12 -12
- package/dist/schema-operations.d.ts +1 -1
- package/dist/schema-operations.js +3 -3
- package/dist/schema-relations.d.ts +26 -9
- package/dist/schema-relations.d.ts.map +1 -1
- package/dist/schema-relations.js +36 -21
- package/dist/schema-shared.d.ts +3 -2
- package/dist/schema-shared.d.ts.map +1 -1
- package/dist/schema-shared.js +4 -5
- package/dist/schema-staff.d.ts +267 -0
- package/dist/schema-staff.d.ts.map +1 -0
- package/dist/schema-staff.js +31 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -0
- package/dist/service-groups.d.ts +3 -7
- package/dist/service-groups.d.ts.map +1 -1
- package/dist/service-groups.js +6 -10
- package/dist/service-public.d.ts +102 -55
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +119 -54
- package/dist/service.d.ts +327 -104
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +530 -130
- package/dist/transactions-ref.d.ts +930 -66
- package/dist/transactions-ref.d.ts.map +1 -1
- package/dist/transactions-ref.js +56 -2
- package/dist/validation-public.d.ts +29 -69
- package/dist/validation-public.d.ts.map +1 -1
- package/dist/validation-public.js +21 -20
- package/dist/validation-shared.d.ts +4 -5
- package/dist/validation-shared.d.ts.map +1 -1
- package/dist/validation-shared.js +2 -10
- package/dist/validation.d.ts +248 -44
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +103 -28
- package/package.json +6 -6
package/dist/routes-public.d.ts
CHANGED
|
@@ -60,9 +60,9 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
60
60
|
expiredAt: string | null;
|
|
61
61
|
cancelledAt: string | null;
|
|
62
62
|
completedAt: string | null;
|
|
63
|
-
|
|
63
|
+
travelers: {
|
|
64
64
|
id: string;
|
|
65
|
-
participantType: "
|
|
65
|
+
participantType: "other" | "traveler" | "occupant";
|
|
66
66
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
67
67
|
firstName: string;
|
|
68
68
|
lastName: string;
|
|
@@ -95,9 +95,9 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
95
95
|
optionId: string | null;
|
|
96
96
|
optionUnitId: string | null;
|
|
97
97
|
pricingCategoryId: string | null;
|
|
98
|
-
|
|
98
|
+
travelerLinks: {
|
|
99
99
|
id: string;
|
|
100
|
-
|
|
100
|
+
travelerId: string;
|
|
101
101
|
role: string;
|
|
102
102
|
isPrimary: boolean;
|
|
103
103
|
}[];
|
|
@@ -118,9 +118,8 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
118
118
|
releasedAt: string | null;
|
|
119
119
|
}[];
|
|
120
120
|
checklist: {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
hasPrimaryParticipant: boolean;
|
|
121
|
+
hasTravelers: boolean;
|
|
122
|
+
hasPrimaryTraveler: boolean;
|
|
124
123
|
hasItems: boolean;
|
|
125
124
|
hasAllocations: boolean;
|
|
126
125
|
readyForConfirmation: boolean;
|
|
@@ -248,7 +247,7 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
248
247
|
version: number;
|
|
249
248
|
createdAt: string;
|
|
250
249
|
updatedAt: string;
|
|
251
|
-
}
|
|
250
|
+
};
|
|
252
251
|
};
|
|
253
252
|
outputFormat: "json";
|
|
254
253
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -336,9 +335,9 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
336
335
|
expiredAt: string | null;
|
|
337
336
|
cancelledAt: string | null;
|
|
338
337
|
completedAt: string | null;
|
|
339
|
-
|
|
338
|
+
travelers: {
|
|
340
339
|
id: string;
|
|
341
|
-
participantType: "
|
|
340
|
+
participantType: "other" | "traveler" | "occupant";
|
|
342
341
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
343
342
|
firstName: string;
|
|
344
343
|
lastName: string;
|
|
@@ -371,9 +370,9 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
371
370
|
optionId: string | null;
|
|
372
371
|
optionUnitId: string | null;
|
|
373
372
|
pricingCategoryId: string | null;
|
|
374
|
-
|
|
373
|
+
travelerLinks: {
|
|
375
374
|
id: string;
|
|
376
|
-
|
|
375
|
+
travelerId: string;
|
|
377
376
|
role: string;
|
|
378
377
|
isPrimary: boolean;
|
|
379
378
|
}[];
|
|
@@ -394,9 +393,8 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
394
393
|
releasedAt: string | null;
|
|
395
394
|
}[];
|
|
396
395
|
checklist: {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
hasPrimaryParticipant: boolean;
|
|
396
|
+
hasTravelers: boolean;
|
|
397
|
+
hasPrimaryTraveler: boolean;
|
|
400
398
|
hasItems: boolean;
|
|
401
399
|
hasAllocations: boolean;
|
|
402
400
|
readyForConfirmation: boolean;
|
|
@@ -518,9 +516,9 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
518
516
|
confirmedAt: string | null;
|
|
519
517
|
cancelledAt: string | null;
|
|
520
518
|
completedAt: string | null;
|
|
521
|
-
|
|
519
|
+
travelers: {
|
|
522
520
|
id: string;
|
|
523
|
-
participantType: "
|
|
521
|
+
participantType: "other" | "traveler" | "occupant";
|
|
524
522
|
firstName: string;
|
|
525
523
|
lastName: string;
|
|
526
524
|
isPrimary: boolean;
|
|
@@ -546,16 +544,16 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
546
544
|
optionId: string | null;
|
|
547
545
|
optionUnitId: string | null;
|
|
548
546
|
pricingCategoryId: string | null;
|
|
549
|
-
|
|
547
|
+
travelerLinks: {
|
|
550
548
|
id: string;
|
|
551
|
-
|
|
549
|
+
travelerId: string;
|
|
552
550
|
role: string;
|
|
553
551
|
isPrimary: boolean;
|
|
554
552
|
}[];
|
|
555
553
|
}[];
|
|
556
554
|
documents: {
|
|
557
555
|
id: string;
|
|
558
|
-
|
|
556
|
+
travelerId: string | null;
|
|
559
557
|
type: "visa" | "other" | "insurance" | "health" | "passport_copy";
|
|
560
558
|
fileName: string;
|
|
561
559
|
fileUrl: string;
|
|
@@ -563,7 +561,7 @@ export declare const publicBookingRoutes: import("hono/hono-base").HonoBase<Env,
|
|
|
563
561
|
fulfillments: {
|
|
564
562
|
id: string;
|
|
565
563
|
bookingItemId: string | null;
|
|
566
|
-
|
|
564
|
+
travelerId: string | null;
|
|
567
565
|
fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
|
|
568
566
|
deliveryChannel: "email" | "other" | "download" | "api" | "wallet";
|
|
569
567
|
status: "pending" | "issued" | "reissued" | "revoked" | "failed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,oBAAoB,CAAA;AAsCvD,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"routes-public.d.ts","sourceRoot":"","sources":["../src/routes-public.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,oBAAoB,CAAA;AAsCvD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAmI5B,CAAA;AAEJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
|
package/dist/routes-public.js
CHANGED
|
@@ -17,7 +17,7 @@ function sessionConflictError(status) {
|
|
|
17
17
|
case "hold_expired":
|
|
18
18
|
return "Booking session hold has expired";
|
|
19
19
|
case "participant_not_found":
|
|
20
|
-
return "Booking session
|
|
20
|
+
return "Booking session traveler not found";
|
|
21
21
|
case "pricing_unavailable":
|
|
22
22
|
return "Pricing is not available for the selected booking session items";
|
|
23
23
|
case "quantity_change_requires_reallocation":
|
package/dist/routes-shared.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ModuleContainer } from "@voyantjs/core";
|
|
1
|
+
import type { EventBus, ModuleContainer } from "@voyantjs/core";
|
|
2
2
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
3
3
|
import type { Context } from "hono";
|
|
4
4
|
export type KmsBindings = Partial<{
|
|
@@ -25,6 +25,7 @@ export type Env = {
|
|
|
25
25
|
Variables: {
|
|
26
26
|
container?: ModuleContainer;
|
|
27
27
|
db: PostgresJsDatabase;
|
|
28
|
+
eventBus?: EventBus;
|
|
28
29
|
userId?: string;
|
|
29
30
|
actor?: "staff" | "customer" | "partner" | "supplier";
|
|
30
31
|
callerType?: "session" | "api_key" | "internal";
|
|
@@ -38,7 +39,7 @@ export type Env = {
|
|
|
38
39
|
scopes?: string[] | null;
|
|
39
40
|
isInternalRequest?: boolean;
|
|
40
41
|
bookingId: string;
|
|
41
|
-
|
|
42
|
+
travelerId: string;
|
|
42
43
|
action: "read" | "update" | "delete";
|
|
43
44
|
}) => boolean | Promise<boolean>;
|
|
44
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-shared.d.ts","sourceRoot":"","sources":["../src/routes-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes-shared.d.ts","sourceRoot":"","sources":["../src/routes-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAA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