@voyant-travel/cruises 0.131.0 → 0.133.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/service-core.d.ts +89 -104
- package/dist/service-core.d.ts.map +1 -1
- package/dist/service-core.js +4 -3
- package/dist/service-prices.d.ts +28 -33
- package/dist/service-prices.d.ts.map +1 -1
- package/dist/service-prices.js +2 -1
- package/dist/service-sailings.d.ts +20 -25
- package/dist/service-sailings.d.ts.map +1 -1
- package/dist/service-sailings.js +2 -1
- package/dist/service-search.d.ts.map +1 -1
- package/dist/service-search.js +3 -3
- package/dist/service-ships.d.ts +24 -29
- package/dist/service-ships.d.ts.map +1 -1
- package/dist/service-ships.js +2 -1
- package/dist/service.d.ts +161 -191
- package/dist/service.d.ts.map +1 -1
- package/package.json +6 -5
package/dist/service-core.d.ts
CHANGED
|
@@ -4,38 +4,33 @@ import type { CruiseDay } from "./schema-itinerary.js";
|
|
|
4
4
|
import { type CruiseMutationRuntime } from "./service-shared.js";
|
|
5
5
|
import type { CruiseListQuery, InsertCruise, InsertVoyageGroup, InsertVoyageGroupSegment, UpdateCruise, UpdateVoyageGroup, UpdateVoyageGroupSegment, VoyageGroupListQuery, VoyageGroupSegmentListQuery } from "./validation-core.js";
|
|
6
6
|
export declare const cruiseCoreService: {
|
|
7
|
-
listVoyageGroups(db: PostgresJsDatabase, query: VoyageGroupListQuery): Promise<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}[];
|
|
35
|
-
total: number;
|
|
36
|
-
limit: number;
|
|
37
|
-
offset: number;
|
|
38
|
-
}>;
|
|
7
|
+
listVoyageGroups(db: PostgresJsDatabase, query: VoyageGroupListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
8
|
+
id: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
name: string;
|
|
11
|
+
groupKind: "combination" | "grand_voyage" | "world_cruise" | "cruise_tour";
|
|
12
|
+
lineSupplierId: string | null;
|
|
13
|
+
nights: number;
|
|
14
|
+
embarkPortFacilityId: string | null;
|
|
15
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
16
|
+
disembarkPortFacilityId: string | null;
|
|
17
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
18
|
+
description: string | null;
|
|
19
|
+
shortDescription: string | null;
|
|
20
|
+
highlights: string[] | null;
|
|
21
|
+
regions: string[] | null;
|
|
22
|
+
themes: string[] | null;
|
|
23
|
+
heroImageUrl: string | null;
|
|
24
|
+
mapImageUrl: string | null;
|
|
25
|
+
status: "live" | "draft" | "awaiting_review" | "archived";
|
|
26
|
+
lowestPriceCached: string | null;
|
|
27
|
+
lowestPriceCurrencyCached: string | null;
|
|
28
|
+
earliestDepartureCached: string | null;
|
|
29
|
+
latestDepartureCached: string | null;
|
|
30
|
+
externalRefs: Record<string, string> | null;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
}>>;
|
|
39
34
|
getVoyageGroupById(db: PostgresJsDatabase, id: string, options?: {
|
|
40
35
|
withSegments?: boolean;
|
|
41
36
|
}): Promise<(CruiseVoyageGroup & {
|
|
@@ -44,81 +39,71 @@ export declare const cruiseCoreService: {
|
|
|
44
39
|
createVoyageGroup(db: PostgresJsDatabase, data: InsertVoyageGroup): Promise<CruiseVoyageGroup>;
|
|
45
40
|
updateVoyageGroup(db: PostgresJsDatabase, id: string, data: UpdateVoyageGroup): Promise<CruiseVoyageGroup | null>;
|
|
46
41
|
archiveVoyageGroup(db: PostgresJsDatabase, id: string): Promise<CruiseVoyageGroup | null>;
|
|
47
|
-
listVoyageGroupSegments(db: PostgresJsDatabase, query: VoyageGroupSegmentListQuery): Promise<{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}[];
|
|
72
|
-
total: number;
|
|
73
|
-
limit: number;
|
|
74
|
-
offset: number;
|
|
75
|
-
}>;
|
|
42
|
+
listVoyageGroupSegments(db: PostgresJsDatabase, query: VoyageGroupSegmentListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
43
|
+
id: string;
|
|
44
|
+
voyageGroupId: string;
|
|
45
|
+
sortOrder: number;
|
|
46
|
+
segmentKind: "other" | "cruise" | "land" | "hotel" | "transfer" | "rail" | "air";
|
|
47
|
+
segmentRole: "core" | "pre_extension" | "post_extension";
|
|
48
|
+
title: string;
|
|
49
|
+
description: string | null;
|
|
50
|
+
cruiseId: string | null;
|
|
51
|
+
sailingId: string | null;
|
|
52
|
+
startDay: number | null;
|
|
53
|
+
endDay: number | null;
|
|
54
|
+
startDate: string | null;
|
|
55
|
+
endDate: string | null;
|
|
56
|
+
embarkPortFacilityId: string | null;
|
|
57
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
58
|
+
disembarkPortFacilityId: string | null;
|
|
59
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
60
|
+
nights: number | null;
|
|
61
|
+
externalRefs: Record<string, string> | null;
|
|
62
|
+
metadata: Record<string, unknown> | null;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
}>>;
|
|
76
66
|
createVoyageGroupSegment(db: PostgresJsDatabase, data: InsertVoyageGroupSegment): Promise<CruiseVoyageGroupSegment>;
|
|
77
67
|
updateVoyageGroupSegment(db: PostgresJsDatabase, id: string, data: UpdateVoyageGroupSegment): Promise<CruiseVoyageGroupSegment | null>;
|
|
78
68
|
deleteVoyageGroupSegment(db: PostgresJsDatabase, id: string): Promise<boolean>;
|
|
79
|
-
listCruises(db: PostgresJsDatabase, query: CruiseListQuery): Promise<{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}[];
|
|
118
|
-
total: number;
|
|
119
|
-
limit: number;
|
|
120
|
-
offset: number;
|
|
121
|
-
}>;
|
|
69
|
+
listCruises(db: PostgresJsDatabase, query: CruiseListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
70
|
+
id: string;
|
|
71
|
+
slug: string;
|
|
72
|
+
name: string;
|
|
73
|
+
cruiseType: "ocean" | "river" | "expedition" | "coastal";
|
|
74
|
+
lineSupplierId: string | null;
|
|
75
|
+
defaultShipId: string | null;
|
|
76
|
+
nights: number;
|
|
77
|
+
embarkPortFacilityId: string | null;
|
|
78
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
79
|
+
disembarkPortFacilityId: string | null;
|
|
80
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
81
|
+
description: string | null;
|
|
82
|
+
shortDescription: string | null;
|
|
83
|
+
highlights: string[] | null;
|
|
84
|
+
inclusionsHtml: string | null;
|
|
85
|
+
exclusionsHtml: string | null;
|
|
86
|
+
regionIds: string[] | null;
|
|
87
|
+
waterwayIds: string[] | null;
|
|
88
|
+
portIds: string[] | null;
|
|
89
|
+
countryIso: string[] | null;
|
|
90
|
+
regions: string[] | null;
|
|
91
|
+
waterways: string[] | null;
|
|
92
|
+
ports: string[] | null;
|
|
93
|
+
countries: string[] | null;
|
|
94
|
+
themes: string[] | null;
|
|
95
|
+
heroImageUrl: string | null;
|
|
96
|
+
mapImageUrl: string | null;
|
|
97
|
+
status: "live" | "draft" | "awaiting_review" | "archived";
|
|
98
|
+
lowestPriceCached: string | null;
|
|
99
|
+
lowestPriceCurrencyCached: string | null;
|
|
100
|
+
earliestDepartureCached: string | null;
|
|
101
|
+
latestDepartureCached: string | null;
|
|
102
|
+
externalRefs: Record<string, string> | null;
|
|
103
|
+
customerPaymentPolicy: unknown;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
updatedAt: Date;
|
|
106
|
+
}>>;
|
|
122
107
|
getCruiseById(db: PostgresJsDatabase, id: string, options?: {
|
|
123
108
|
withSailings?: boolean;
|
|
124
109
|
withDays?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-core.d.ts","sourceRoot":"","sources":["../src/service-core.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-core.d.ts","sourceRoot":"","sources":["../src/service-core.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAOjE,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EAIzB,MAAM,kBAAkB,CAAA;AAOzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGtD,OAAO,EACL,KAAK,qBAAqB,EAI3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,iBAAiB;yBACD,kBAAkB,SAAS,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAoCpE,kBAAkB,MAClB,MAAM,YACD;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAClC,OAAO,CACN,CAAC,iBAAiB,GAAG;QACnB,QAAQ,CAAC,EAAE,wBAAwB,EAAE,CAAA;KACtC,CAAC,GACF,IAAI,CACP;0BAoBK,kBAAkB,QAChB,iBAAiB,GACtB,OAAO,CAAC,iBAAiB,CAAC;0BAUvB,kBAAkB,MAClB,MAAM,QACJ,iBAAiB,GACtB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;2BASP,kBAAkB,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;gCAS7D,kBAAkB,SAAS,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;iCAiClF,kBAAkB,QAChB,wBAAwB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;iCAU9B,kBAAkB,MAClB,MAAM,QACJ,wBAAwB,GAC7B,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;iCASR,kBAAkB,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;oBAQ9D,kBAAkB,SAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA8B1D,kBAAkB,MAClB,MAAM,YACD;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GACtD,OAAO,CACN,CAAC,MAAM,GAAG;QACR,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAA;QAC1B,IAAI,CAAC,EAAE,SAAS,EAAE,CAAA;KACnB,CAAC,GACF,IAAI,CACP;qBAuBK,kBAAkB,QAChB,YAAY,YACT,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC;qBAYZ,kBAAkB,MAClB,MAAM,QACJ,YAAY,YACT,qBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;sBAcnB,kBAAkB,MAClB,MAAM,YACD,qBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;kCAcnB,kBAAkB,YACZ,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAwC1B,CAAA"}
|
package/dist/service-core.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { listResponse } from "@voyant-travel/types";
|
|
1
2
|
import { and, asc, count, desc, eq, ilike, or, sql } from "drizzle-orm";
|
|
2
3
|
import { CRUISE_CREATED_EVENT, CRUISE_DELETED_EVENT, CRUISE_UPDATED_EVENT, emitCruiseLifecycleEvent, } from "./events.js";
|
|
3
4
|
import { cruiseSailings, cruises, cruiseVoyageGroupSegments, cruiseVoyageGroups, } from "./schema-core.js";
|
|
@@ -35,7 +36,7 @@ export const cruiseCoreService = {
|
|
|
35
36
|
.offset(offset),
|
|
36
37
|
db.select({ value: count() }).from(cruiseVoyageGroups).where(where),
|
|
37
38
|
]);
|
|
38
|
-
return
|
|
39
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
39
40
|
},
|
|
40
41
|
async getVoyageGroupById(db, id, options = {}) {
|
|
41
42
|
const [row] = await db
|
|
@@ -107,7 +108,7 @@ export const cruiseCoreService = {
|
|
|
107
108
|
.offset(offset),
|
|
108
109
|
db.select({ value: count() }).from(cruiseVoyageGroupSegments).where(where),
|
|
109
110
|
]);
|
|
110
|
-
return
|
|
111
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
111
112
|
},
|
|
112
113
|
async createVoyageGroupSegment(db, data) {
|
|
113
114
|
const [row] = await db
|
|
@@ -161,7 +162,7 @@ export const cruiseCoreService = {
|
|
|
161
162
|
.offset(offset),
|
|
162
163
|
db.select({ value: count() }).from(cruises).where(where),
|
|
163
164
|
]);
|
|
164
|
-
return
|
|
165
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
165
166
|
},
|
|
166
167
|
async getCruiseById(db, id, options = {}) {
|
|
167
168
|
const [row] = await db.select().from(cruises).where(eq(cruises.id, id)).limit(1);
|
package/dist/service-prices.d.ts
CHANGED
|
@@ -2,39 +2,34 @@ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
|
2
2
|
import type { CruisePrice } from "./schema-pricing.js";
|
|
3
3
|
import type { InsertPrice, InsertPriceComponent, PriceListQuery, UpdatePrice } from "./validation-pricing.js";
|
|
4
4
|
export declare const cruisePriceRowsService: {
|
|
5
|
-
listPrices(db: PostgresJsDatabase, query: PriceListQuery): Promise<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}[];
|
|
34
|
-
total: number;
|
|
35
|
-
limit: number;
|
|
36
|
-
offset: number;
|
|
37
|
-
}>;
|
|
5
|
+
listPrices(db: PostgresJsDatabase, query: PriceListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
6
|
+
id: string;
|
|
7
|
+
sailingId: string;
|
|
8
|
+
cabinCategoryId: string;
|
|
9
|
+
occupancy: number;
|
|
10
|
+
fareCode: string | null;
|
|
11
|
+
fareCodeName: string | null;
|
|
12
|
+
fareVariant: "cruise_only" | "air_inclusive";
|
|
13
|
+
currency: string;
|
|
14
|
+
pricePerPerson: string;
|
|
15
|
+
originalPricePerPerson: string | null;
|
|
16
|
+
secondGuestPricePerPerson: string | null;
|
|
17
|
+
singlePricePerPerson: string | null;
|
|
18
|
+
singleSupplementPercent: string | null;
|
|
19
|
+
availability: "available" | "on_request" | "wait_list" | "sold_out" | "limited";
|
|
20
|
+
availabilityCount: number | null;
|
|
21
|
+
priceCatalogId: string | null;
|
|
22
|
+
priceScheduleId: string | null;
|
|
23
|
+
bookingDeadline: string | null;
|
|
24
|
+
earlyBookingDeadline: string | null;
|
|
25
|
+
earlyBookingBonusDescription: string | null;
|
|
26
|
+
requiresRequest: boolean;
|
|
27
|
+
notes: string | null;
|
|
28
|
+
externalRefs: Record<string, string> | null;
|
|
29
|
+
lastSyncedAt: Date | null;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
}>>;
|
|
38
33
|
createPrice(db: PostgresJsDatabase, data: InsertPrice): Promise<CruisePrice>;
|
|
39
34
|
updatePrice(db: PostgresJsDatabase, id: string, data: UpdatePrice): Promise<CruisePrice | null>;
|
|
40
35
|
replaceSailingPricing(db: PostgresJsDatabase, sailingId: string, payload: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-prices.d.ts","sourceRoot":"","sources":["../src/service-prices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-prices.d.ts","sourceRoot":"","sources":["../src/service-prices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EAAE,WAAW,EAA2C,MAAM,qBAAqB,CAAA;AAG/F,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAEhC,eAAO,MAAM,sBAAsB;mBACZ,kBAAkB,SAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA0BxC,kBAAkB,QAAQ,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;oBAU5E,kBAAkB,MAClB,MAAM,QACJ,WAAW,GAChB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;8BAUxB,kBAAkB,aACX,MAAM,WACR;QACP,MAAM,EAAE,KAAK,CAAC,WAAW,GAAG;YAAE,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAA;SAAE,CAAC,CAAA;KAC3F,GACA,OAAO,CAAC,WAAW,EAAE,CAAC;CAyC1B,CAAA"}
|
package/dist/service-prices.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { listResponse } from "@voyant-travel/types";
|
|
1
2
|
import { and, asc, count, eq } from "drizzle-orm";
|
|
2
3
|
import { cruiseSailings } from "./schema-core.js";
|
|
3
4
|
import { cruisePriceComponents, cruisePrices } from "./schema-pricing.js";
|
|
@@ -31,7 +32,7 @@ export const cruisePriceRowsService = {
|
|
|
31
32
|
.offset(offset),
|
|
32
33
|
db.select({ value: count() }).from(cruisePrices).where(where),
|
|
33
34
|
]);
|
|
34
|
-
return
|
|
35
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
35
36
|
},
|
|
36
37
|
async createPrice(db, data) {
|
|
37
38
|
const [row] = await db
|
|
@@ -6,31 +6,26 @@ import { type EffectiveItineraryDay } from "./service-itinerary.js";
|
|
|
6
6
|
import type { InsertSailing, SailingListQuery, UpdateSailing } from "./validation-core.js";
|
|
7
7
|
import type { ReplaceCruiseDays, ReplaceSailingDays } from "./validation-itinerary.js";
|
|
8
8
|
export declare const cruiseSailingsService: {
|
|
9
|
-
listSailings(db: PostgresJsDatabase, query: SailingListQuery): Promise<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}[];
|
|
30
|
-
total: number;
|
|
31
|
-
limit: number;
|
|
32
|
-
offset: number;
|
|
33
|
-
}>;
|
|
9
|
+
listSailings(db: PostgresJsDatabase, query: SailingListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
10
|
+
id: string;
|
|
11
|
+
cruiseId: string;
|
|
12
|
+
shipId: string;
|
|
13
|
+
departureDate: string;
|
|
14
|
+
returnDate: string;
|
|
15
|
+
embarkPortFacilityId: string | null;
|
|
16
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
17
|
+
disembarkPortFacilityId: string | null;
|
|
18
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
19
|
+
direction: "upstream" | "downstream" | "round_trip" | "one_way" | null;
|
|
20
|
+
availabilityNote: string | null;
|
|
21
|
+
isCharter: boolean;
|
|
22
|
+
salesStatus: "open" | "on_request" | "wait_list" | "sold_out" | "closed";
|
|
23
|
+
externalRefs: Record<string, string> | null;
|
|
24
|
+
customerPaymentPolicy: unknown;
|
|
25
|
+
lastSyncedAt: Date | null;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
}>>;
|
|
34
29
|
getSailingById(db: PostgresJsDatabase, id: string, options?: {
|
|
35
30
|
withPricing?: boolean;
|
|
36
31
|
withItinerary?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-sailings.d.ts","sourceRoot":"","sources":["../src/service-sailings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-sailings.d.ts","sourceRoot":"","sources":["../src/service-sailings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,kBAAkB,CAAA;AAEvE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE5E,OAAO,EAAE,KAAK,qBAAqB,EAAY,MAAM,wBAAwB,CAAA;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEtF,eAAO,MAAM,qBAAqB;qBACT,kBAAkB,SAAS,gBAAgB;;;;;;;;;;;;;;;;;;;;uBAwB5D,kBAAkB,MAClB,MAAM,YACD;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAC1D,OAAO,CACN,CAAC,aAAa,GAAG;QACf,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;QACtB,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;QACxC,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAA;KACxC,CAAC,GACF,IAAI,CACP;sBAkCuB,kBAAkB,QAAQ,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;sBAkClF,kBAAkB,MAClB,MAAM,QACJ,aAAa,GAClB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;8BAa1B,kBAAkB,aACX,MAAM,GAChB,OAAO,CAAC,qBAAqB,EAAE,CAAC;0BA0B7B,kBAAkB,WACb,iBAAiB,GACzB,OAAO,CAAC,SAAS,EAAE,CAAC;2BAajB,kBAAkB,WACb,kBAAkB,GAC1B,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAa/B,CAAA"}
|
package/dist/service-sailings.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { listResponse } from "@voyant-travel/types";
|
|
1
2
|
import { and, asc, count, eq, gte, inArray, lte } from "drizzle-orm";
|
|
2
3
|
import { cruiseSailings } from "./schema-core.js";
|
|
3
4
|
import { cruiseDays, cruiseSailingDays } from "./schema-itinerary.js";
|
|
@@ -29,7 +30,7 @@ export const cruiseSailingsService = {
|
|
|
29
30
|
.offset(offset),
|
|
30
31
|
db.select({ value: count() }).from(cruiseSailings).where(where),
|
|
31
32
|
]);
|
|
32
|
-
return
|
|
33
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
33
34
|
},
|
|
34
35
|
async getSailingById(db, id, options = {}) {
|
|
35
36
|
const [row] = await db.select().from(cruiseSailings).where(eq(cruiseSailings.id, id)).limit(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-search.d.ts","sourceRoot":"","sources":["../src/service-search.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"service-search.d.ts","sourceRoot":"","sources":["../src/service-search.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAKnE,OAAO,EACL,KAAK,oBAAoB,EAG1B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,aAAa,EACb,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,YAAY,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,aAAa,EACb,sBAAsB,GACvB,MAAM,2BAA2B,CAAA;AAElC,eAAO,MAAM,oBAAoB;cAGf,kBAAkB,SAAS,gBAAgB,GAAG,OAAO,CAAC,sBAAsB,CAAC;kBA2FzE,kBAAkB,QAAQ,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;oBAYrF,kBAAkB,SACf,oBAAoB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;mBAoD1B,kBAAkB,WACb,oBAAoB,EAAE,GAC9B,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;oBAaV,kBAAkB,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;uBASjE,kBAAkB,kBACN,MAAM,GACrB,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;kCAczB,kBAAkB,kBACN,MAAM,WACb,aAAa,CAAC,MAAM,CAAC,uBACT,MAAM,GAAG,IAAI,GACjC,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;kCAqBzB,kBAAkB,kBACN,MAAM,GACrB,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAmBhC;;;;;;;;OAQG;2BAEG,kBAAkB,YACZ,MAAM,GACf,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAiBvC;;;OAGG;qBACoB,kBAAkB,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAezE;;;;OAIG;kCAEG,kBAAkB,WACb,aAAa,GACrB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAKhC;;;;OAIG;kCAEG,kBAAkB,WACb,aAAa,GACrB,OAAO,CAAC,4BAA4B,CAAC;IAuDxC;;;OAGG;mBACkB,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;CAqBjE,CAAA;AAwCD,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAElE"}
|
package/dist/service-search.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* `cruise_search_index` is optional; storefront deployments populate it
|
|
4
4
|
* from local projection hooks and adapter `searchProjection()` streams.
|
|
5
5
|
*/
|
|
6
|
+
import { listResponse } from "@voyant-travel/types";
|
|
6
7
|
import { and, asc, eq, gte, ilike, lte, notInArray, or, sql } from "drizzle-orm";
|
|
7
8
|
import { listCruiseAdapters } from "./adapters/registry.js";
|
|
8
9
|
import { cruiseShips } from "./schema-cabins.js";
|
|
@@ -82,12 +83,11 @@ export const cruisesSearchService = {
|
|
|
82
83
|
.offset(query.offset),
|
|
83
84
|
db.select({ value: sql `count(*)::int` }).from(cruiseSearchIndex).where(where),
|
|
84
85
|
]);
|
|
85
|
-
return {
|
|
86
|
-
data: rows,
|
|
86
|
+
return listResponse(rows, {
|
|
87
87
|
total: totalRows[0]?.value ?? 0,
|
|
88
88
|
limit: query.limit,
|
|
89
89
|
offset: query.offset,
|
|
90
|
-
};
|
|
90
|
+
});
|
|
91
91
|
},
|
|
92
92
|
async getBySlug(db, slug) {
|
|
93
93
|
const [row] = await db
|
package/dist/service-ships.d.ts
CHANGED
|
@@ -2,35 +2,30 @@ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
|
2
2
|
import type { CruiseCabin, CruiseCabinCategory, CruiseDeck, CruiseShip } from "./schema-cabins.js";
|
|
3
3
|
import type { InsertCabin, InsertCabinCategory, InsertDeck, InsertShip, ShipListQuery, UpdateCabin, UpdateCabinCategory, UpdateDeck, UpdateShip } from "./validation-cabins.js";
|
|
4
4
|
export declare const cruiseShipService: {
|
|
5
|
-
listShips(db: PostgresJsDatabase, query: ShipListQuery): Promise<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}[];
|
|
30
|
-
total: number;
|
|
31
|
-
limit: number;
|
|
32
|
-
offset: number;
|
|
33
|
-
}>;
|
|
5
|
+
listShips(db: PostgresJsDatabase, query: ShipListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
6
|
+
id: string;
|
|
7
|
+
lineSupplierId: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
shipType: "ocean" | "river" | "expedition" | "coastal" | "yacht" | "sailing";
|
|
11
|
+
capacityGuests: number | null;
|
|
12
|
+
capacityCrew: number | null;
|
|
13
|
+
cabinCount: number | null;
|
|
14
|
+
deckCount: number | null;
|
|
15
|
+
lengthMeters: string | null;
|
|
16
|
+
cruisingSpeedKnots: string | null;
|
|
17
|
+
yearBuilt: number | null;
|
|
18
|
+
yearRefurbished: number | null;
|
|
19
|
+
imo: string | null;
|
|
20
|
+
description: string | null;
|
|
21
|
+
deckPlanUrl: string | null;
|
|
22
|
+
gallery: string[] | null;
|
|
23
|
+
amenities: Record<string, unknown> | null;
|
|
24
|
+
externalRefs: Record<string, string> | null;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
}>>;
|
|
34
29
|
getShipById(db: PostgresJsDatabase, id: string): Promise<CruiseShip | null>;
|
|
35
30
|
createShip(db: PostgresJsDatabase, data: InsertShip): Promise<CruiseShip>;
|
|
36
31
|
updateShip(db: PostgresJsDatabase, id: string, data: UpdateShip): Promise<CruiseShip | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-ships.d.ts","sourceRoot":"","sources":["../src/service-ships.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-ships.d.ts","sourceRoot":"","sources":["../src/service-ships.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGlG,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,UAAU,EACX,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,iBAAiB;kBACR,kBAAkB,SAAS,aAAa;;;;;;;;;;;;;;;;;;;;;;;;oBAuBtC,kBAAkB,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;mBAK5D,kBAAkB,QAAQ,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;mBAOzE,kBAAkB,MAClB,MAAM,QACJ,UAAU,GACf,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;sBASL,kBAAkB,UAAU,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;mBAQ7D,kBAAkB,QAAQ,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;mBAqBzE,kBAAkB,MAClB,MAAM,QACJ,UAAU,GACf,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;gCAUvB,kBAAkB,UACd,MAAM,GACb,OAAO,CAAC,mBAAmB,EAAE,CAAC;4BAS3B,kBAAkB,QAChB,mBAAmB,GACxB,OAAO,CAAC,mBAAmB,CAAC;4BA0BzB,kBAAkB,MAClB,MAAM,QACJ,mBAAmB,GACxB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;6BASP,kBAAkB,cAAc,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;oBAQxE,kBAAkB,QAAQ,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;oBA0B5E,kBAAkB,MAClB,MAAM,QACJ,WAAW,GAChB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAU/B,CAAA"}
|
package/dist/service-ships.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { listResponse } from "@voyant-travel/types";
|
|
1
2
|
import { and, asc, count, eq, ilike } from "drizzle-orm";
|
|
2
3
|
import { cruiseCabinCategories, cruiseCabins, cruiseDecks, cruiseShips } from "./schema-cabins.js";
|
|
3
4
|
import { paginate, setUpdated } from "./service-shared.js";
|
|
@@ -24,7 +25,7 @@ export const cruiseShipService = {
|
|
|
24
25
|
.offset(offset),
|
|
25
26
|
db.select({ value: count() }).from(cruiseShips).where(where),
|
|
26
27
|
]);
|
|
27
|
-
return
|
|
28
|
+
return listResponse(rows, { total: totalRows[0]?.value ?? 0, limit, offset });
|
|
28
29
|
},
|
|
29
30
|
async getShipById(db, id) {
|
|
30
31
|
const [row] = await db.select().from(cruiseShips).where(eq(cruiseShips.id, id)).limit(1);
|
package/dist/service.d.ts
CHANGED
|
@@ -6,39 +6,34 @@ export declare const cruisesService: {
|
|
|
6
6
|
updateEnrichmentProgram(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-content.js").UpdateEnrichmentProgram): Promise<import("./schema-content.js").CruiseEnrichmentProgram | null>;
|
|
7
7
|
deleteEnrichmentProgram(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<boolean>;
|
|
8
8
|
replaceEnrichmentPrograms(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, payload: import("./validation-content.js").ReplaceEnrichmentPrograms): Promise<import("./schema-content.js").CruiseEnrichmentProgram[]>;
|
|
9
|
-
listPrices(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-pricing.js").PriceListQuery): Promise<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}[];
|
|
38
|
-
total: number;
|
|
39
|
-
limit: number;
|
|
40
|
-
offset: number;
|
|
41
|
-
}>;
|
|
9
|
+
listPrices(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-pricing.js").PriceListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
10
|
+
id: string;
|
|
11
|
+
sailingId: string;
|
|
12
|
+
cabinCategoryId: string;
|
|
13
|
+
occupancy: number;
|
|
14
|
+
fareCode: string | null;
|
|
15
|
+
fareCodeName: string | null;
|
|
16
|
+
fareVariant: "cruise_only" | "air_inclusive";
|
|
17
|
+
currency: string;
|
|
18
|
+
pricePerPerson: string;
|
|
19
|
+
originalPricePerPerson: string | null;
|
|
20
|
+
secondGuestPricePerPerson: string | null;
|
|
21
|
+
singlePricePerPerson: string | null;
|
|
22
|
+
singleSupplementPercent: string | null;
|
|
23
|
+
availability: "available" | "on_request" | "wait_list" | "sold_out" | "limited";
|
|
24
|
+
availabilityCount: number | null;
|
|
25
|
+
priceCatalogId: string | null;
|
|
26
|
+
priceScheduleId: string | null;
|
|
27
|
+
bookingDeadline: string | null;
|
|
28
|
+
earlyBookingDeadline: string | null;
|
|
29
|
+
earlyBookingBonusDescription: string | null;
|
|
30
|
+
requiresRequest: boolean;
|
|
31
|
+
notes: string | null;
|
|
32
|
+
externalRefs: Record<string, string> | null;
|
|
33
|
+
lastSyncedAt: Date | null;
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
updatedAt: Date;
|
|
36
|
+
}>>;
|
|
42
37
|
createPrice(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./validation-pricing.js").InsertPrice): Promise<import("./schema-pricing.js").CruisePrice>;
|
|
43
38
|
updatePrice(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-pricing.js").UpdatePrice): Promise<import("./schema-pricing.js").CruisePrice | null>;
|
|
44
39
|
replaceSailingPricing(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, sailingId: string, payload: {
|
|
@@ -46,35 +41,30 @@ export declare const cruisesService: {
|
|
|
46
41
|
components?: Array<Omit<import("./validation-pricing.js").InsertPriceComponent, "priceId">>;
|
|
47
42
|
}>;
|
|
48
43
|
}): Promise<import("./schema-pricing.js").CruisePrice[]>;
|
|
49
|
-
listShips(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-cabins.js").ShipListQuery): Promise<{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}[];
|
|
74
|
-
total: number;
|
|
75
|
-
limit: number;
|
|
76
|
-
offset: number;
|
|
77
|
-
}>;
|
|
44
|
+
listShips(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-cabins.js").ShipListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
45
|
+
id: string;
|
|
46
|
+
lineSupplierId: string | null;
|
|
47
|
+
name: string;
|
|
48
|
+
slug: string;
|
|
49
|
+
shipType: "ocean" | "river" | "expedition" | "coastal" | "yacht" | "sailing";
|
|
50
|
+
capacityGuests: number | null;
|
|
51
|
+
capacityCrew: number | null;
|
|
52
|
+
cabinCount: number | null;
|
|
53
|
+
deckCount: number | null;
|
|
54
|
+
lengthMeters: string | null;
|
|
55
|
+
cruisingSpeedKnots: string | null;
|
|
56
|
+
yearBuilt: number | null;
|
|
57
|
+
yearRefurbished: number | null;
|
|
58
|
+
imo: string | null;
|
|
59
|
+
description: string | null;
|
|
60
|
+
deckPlanUrl: string | null;
|
|
61
|
+
gallery: string[] | null;
|
|
62
|
+
amenities: Record<string, unknown> | null;
|
|
63
|
+
externalRefs: Record<string, string> | null;
|
|
64
|
+
isActive: boolean;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
}>>;
|
|
78
68
|
getShipById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<import("./schema-cabins.js").CruiseShip | null>;
|
|
79
69
|
createShip(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./validation-cabins.js").InsertShip): Promise<import("./schema-cabins.js").CruiseShip>;
|
|
80
70
|
updateShip(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-cabins.js").UpdateShip): Promise<import("./schema-cabins.js").CruiseShip | null>;
|
|
@@ -87,31 +77,26 @@ export declare const cruisesService: {
|
|
|
87
77
|
listCabinsByCategory(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, categoryId: string): Promise<import("./schema-cabins.js").CruiseCabin[]>;
|
|
88
78
|
upsertCabin(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./validation-cabins.js").InsertCabin): Promise<import("./schema-cabins.js").CruiseCabin>;
|
|
89
79
|
updateCabin(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-cabins.js").UpdateCabin): Promise<import("./schema-cabins.js").CruiseCabin | null>;
|
|
90
|
-
listSailings(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").SailingListQuery): Promise<{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}[];
|
|
111
|
-
total: number;
|
|
112
|
-
limit: number;
|
|
113
|
-
offset: number;
|
|
114
|
-
}>;
|
|
80
|
+
listSailings(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").SailingListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
81
|
+
id: string;
|
|
82
|
+
cruiseId: string;
|
|
83
|
+
shipId: string;
|
|
84
|
+
departureDate: string;
|
|
85
|
+
returnDate: string;
|
|
86
|
+
embarkPortFacilityId: string | null;
|
|
87
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
88
|
+
disembarkPortFacilityId: string | null;
|
|
89
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
90
|
+
direction: "upstream" | "downstream" | "round_trip" | "one_way" | null;
|
|
91
|
+
availabilityNote: string | null;
|
|
92
|
+
isCharter: boolean;
|
|
93
|
+
salesStatus: "open" | "on_request" | "wait_list" | "sold_out" | "closed";
|
|
94
|
+
externalRefs: Record<string, string> | null;
|
|
95
|
+
customerPaymentPolicy: unknown;
|
|
96
|
+
lastSyncedAt: Date | null;
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
updatedAt: Date;
|
|
99
|
+
}>>;
|
|
115
100
|
getSailingById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, options?: {
|
|
116
101
|
withPricing?: boolean;
|
|
117
102
|
withItinerary?: boolean;
|
|
@@ -125,38 +110,33 @@ export declare const cruisesService: {
|
|
|
125
110
|
getEffectiveItinerary(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, sailingId: string): Promise<import("./service-itinerary.js").EffectiveItineraryDay[]>;
|
|
126
111
|
replaceCruiseDays(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, payload: import("./validation-itinerary.js").ReplaceCruiseDays): Promise<import("./schema-itinerary.js").CruiseDay[]>;
|
|
127
112
|
replaceSailingDays(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, payload: import("./validation-itinerary.js").ReplaceSailingDays): Promise<import("./schema-itinerary.js").CruiseSailingDay[]>;
|
|
128
|
-
listVoyageGroups(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").VoyageGroupListQuery): Promise<{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}[];
|
|
156
|
-
total: number;
|
|
157
|
-
limit: number;
|
|
158
|
-
offset: number;
|
|
159
|
-
}>;
|
|
113
|
+
listVoyageGroups(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").VoyageGroupListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
114
|
+
id: string;
|
|
115
|
+
slug: string;
|
|
116
|
+
name: string;
|
|
117
|
+
groupKind: "combination" | "grand_voyage" | "world_cruise" | "cruise_tour";
|
|
118
|
+
lineSupplierId: string | null;
|
|
119
|
+
nights: number;
|
|
120
|
+
embarkPortFacilityId: string | null;
|
|
121
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
122
|
+
disembarkPortFacilityId: string | null;
|
|
123
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
124
|
+
description: string | null;
|
|
125
|
+
shortDescription: string | null;
|
|
126
|
+
highlights: string[] | null;
|
|
127
|
+
regions: string[] | null;
|
|
128
|
+
themes: string[] | null;
|
|
129
|
+
heroImageUrl: string | null;
|
|
130
|
+
mapImageUrl: string | null;
|
|
131
|
+
status: "live" | "draft" | "awaiting_review" | "archived";
|
|
132
|
+
lowestPriceCached: string | null;
|
|
133
|
+
lowestPriceCurrencyCached: string | null;
|
|
134
|
+
earliestDepartureCached: string | null;
|
|
135
|
+
latestDepartureCached: string | null;
|
|
136
|
+
externalRefs: Record<string, string> | null;
|
|
137
|
+
createdAt: Date;
|
|
138
|
+
updatedAt: Date;
|
|
139
|
+
}>>;
|
|
160
140
|
getVoyageGroupById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, options?: {
|
|
161
141
|
withSegments?: boolean;
|
|
162
142
|
}): Promise<(import("./schema-core.js").CruiseVoyageGroup & {
|
|
@@ -165,81 +145,71 @@ export declare const cruisesService: {
|
|
|
165
145
|
createVoyageGroup(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./validation-core.js").InsertVoyageGroup): Promise<import("./schema-core.js").CruiseVoyageGroup>;
|
|
166
146
|
updateVoyageGroup(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-core.js").UpdateVoyageGroup): Promise<import("./schema-core.js").CruiseVoyageGroup | null>;
|
|
167
147
|
archiveVoyageGroup(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<import("./schema-core.js").CruiseVoyageGroup | null>;
|
|
168
|
-
listVoyageGroupSegments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").VoyageGroupSegmentListQuery): Promise<{
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}[];
|
|
193
|
-
total: number;
|
|
194
|
-
limit: number;
|
|
195
|
-
offset: number;
|
|
196
|
-
}>;
|
|
148
|
+
listVoyageGroupSegments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").VoyageGroupSegmentListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
149
|
+
id: string;
|
|
150
|
+
voyageGroupId: string;
|
|
151
|
+
sortOrder: number;
|
|
152
|
+
segmentKind: "other" | "cruise" | "land" | "hotel" | "transfer" | "rail" | "air";
|
|
153
|
+
segmentRole: "core" | "pre_extension" | "post_extension";
|
|
154
|
+
title: string;
|
|
155
|
+
description: string | null;
|
|
156
|
+
cruiseId: string | null;
|
|
157
|
+
sailingId: string | null;
|
|
158
|
+
startDay: number | null;
|
|
159
|
+
endDay: number | null;
|
|
160
|
+
startDate: string | null;
|
|
161
|
+
endDate: string | null;
|
|
162
|
+
embarkPortFacilityId: string | null;
|
|
163
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
164
|
+
disembarkPortFacilityId: string | null;
|
|
165
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
166
|
+
nights: number | null;
|
|
167
|
+
externalRefs: Record<string, string> | null;
|
|
168
|
+
metadata: Record<string, unknown> | null;
|
|
169
|
+
createdAt: Date;
|
|
170
|
+
updatedAt: Date;
|
|
171
|
+
}>>;
|
|
197
172
|
createVoyageGroupSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./validation-core.js").InsertVoyageGroupSegment): Promise<import("./schema-core.js").CruiseVoyageGroupSegment>;
|
|
198
173
|
updateVoyageGroupSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./validation-core.js").UpdateVoyageGroupSegment): Promise<import("./schema-core.js").CruiseVoyageGroupSegment | null>;
|
|
199
174
|
deleteVoyageGroupSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<boolean>;
|
|
200
|
-
listCruises(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").CruiseListQuery): Promise<{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}[];
|
|
239
|
-
total: number;
|
|
240
|
-
limit: number;
|
|
241
|
-
offset: number;
|
|
242
|
-
}>;
|
|
175
|
+
listCruises(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./validation-core.js").CruiseListQuery): Promise<import("@voyant-travel/types").ListResponse<{
|
|
176
|
+
id: string;
|
|
177
|
+
slug: string;
|
|
178
|
+
name: string;
|
|
179
|
+
cruiseType: "ocean" | "river" | "expedition" | "coastal";
|
|
180
|
+
lineSupplierId: string | null;
|
|
181
|
+
defaultShipId: string | null;
|
|
182
|
+
nights: number;
|
|
183
|
+
embarkPortFacilityId: string | null;
|
|
184
|
+
embarkPortCanonicalPlaceId: string | null;
|
|
185
|
+
disembarkPortFacilityId: string | null;
|
|
186
|
+
disembarkPortCanonicalPlaceId: string | null;
|
|
187
|
+
description: string | null;
|
|
188
|
+
shortDescription: string | null;
|
|
189
|
+
highlights: string[] | null;
|
|
190
|
+
inclusionsHtml: string | null;
|
|
191
|
+
exclusionsHtml: string | null;
|
|
192
|
+
regionIds: string[] | null;
|
|
193
|
+
waterwayIds: string[] | null;
|
|
194
|
+
portIds: string[] | null;
|
|
195
|
+
countryIso: string[] | null;
|
|
196
|
+
regions: string[] | null;
|
|
197
|
+
waterways: string[] | null;
|
|
198
|
+
ports: string[] | null;
|
|
199
|
+
countries: string[] | null;
|
|
200
|
+
themes: string[] | null;
|
|
201
|
+
heroImageUrl: string | null;
|
|
202
|
+
mapImageUrl: string | null;
|
|
203
|
+
status: "live" | "draft" | "awaiting_review" | "archived";
|
|
204
|
+
lowestPriceCached: string | null;
|
|
205
|
+
lowestPriceCurrencyCached: string | null;
|
|
206
|
+
earliestDepartureCached: string | null;
|
|
207
|
+
latestDepartureCached: string | null;
|
|
208
|
+
externalRefs: Record<string, string> | null;
|
|
209
|
+
customerPaymentPolicy: unknown;
|
|
210
|
+
createdAt: Date;
|
|
211
|
+
updatedAt: Date;
|
|
212
|
+
}>>;
|
|
243
213
|
getCruiseById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, options?: {
|
|
244
214
|
withSailings?: boolean;
|
|
245
215
|
withDays?: boolean;
|
package/dist/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAMA,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnE,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAOw/D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAriB,CAAC;qBAAwB,CAAC;;cAAuE,CAAC;uBAAuC,CAAC;qBAA8C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAiY,CAAC;;gBAA6E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAumK,CAAC;gBAAmB,CAAC;;gBAAkE,CAAC;YAA8B,CAAC;;;;;;CADr1O,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/cruises",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.133.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -104,11 +104,12 @@
|
|
|
104
104
|
"drizzle-orm": "^0.45.2",
|
|
105
105
|
"hono": "^4.12.10",
|
|
106
106
|
"zod": "^4.3.6",
|
|
107
|
-
"@voyant-travel/bookings": "^0.
|
|
107
|
+
"@voyant-travel/bookings": "^0.134.0",
|
|
108
108
|
"@voyant-travel/core": "^0.111.0",
|
|
109
|
-
"@voyant-travel/db": "^0.
|
|
110
|
-
"@voyant-travel/
|
|
111
|
-
"@voyant-travel/
|
|
109
|
+
"@voyant-travel/db": "^0.109.0",
|
|
110
|
+
"@voyant-travel/types": "^0.106.0",
|
|
111
|
+
"@voyant-travel/hono": "^0.115.0",
|
|
112
|
+
"@voyant-travel/catalog": "^0.132.0",
|
|
112
113
|
"@voyant-travel/cruises-contracts": "^0.105.4"
|
|
113
114
|
},
|
|
114
115
|
"devDependencies": {
|