@voyantjs/storefront 0.23.0 → 0.24.1
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/package.json +9 -9
- package/dist/index.d.ts +0 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -14
- package/dist/routes-public.d.ts +0 -476
- package/dist/routes-public.d.ts.map +0 -1
- package/dist/routes-public.js +0 -73
- package/dist/service-departures.d.ts +0 -212
- package/dist/service-departures.d.ts.map +0 -1
- package/dist/service-departures.js +0 -943
- package/dist/service.d.ts +0 -303
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -104
- package/dist/validation.d.ts +0 -859
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -377
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
-
import type { StorefrontDepartureListQuery, StorefrontDeparturePricePreviewInput, StorefrontProductAvailabilitySummaryQuery } from "./validation.js";
|
|
3
|
-
export declare function getStorefrontDeparture(db: PostgresJsDatabase, departureId: string): Promise<{
|
|
4
|
-
id: string;
|
|
5
|
-
productId: string;
|
|
6
|
-
itineraryId: string;
|
|
7
|
-
optionId: string | null;
|
|
8
|
-
dateLocal: string | null;
|
|
9
|
-
startAt: string | null;
|
|
10
|
-
endAt: string | null;
|
|
11
|
-
timezone: string;
|
|
12
|
-
startTime: {
|
|
13
|
-
id: string;
|
|
14
|
-
label: string | null;
|
|
15
|
-
startTimeLocal: string;
|
|
16
|
-
durationMinutes: number | null;
|
|
17
|
-
} | null;
|
|
18
|
-
meetingPoint: string | null;
|
|
19
|
-
capacity: number | null;
|
|
20
|
-
remaining: number | null;
|
|
21
|
-
departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
|
|
22
|
-
nights: number | null;
|
|
23
|
-
days: number | null;
|
|
24
|
-
ratePlans: {
|
|
25
|
-
id: string;
|
|
26
|
-
active: boolean;
|
|
27
|
-
name: string;
|
|
28
|
-
pricingModel: string;
|
|
29
|
-
basePrices: {
|
|
30
|
-
amount: number;
|
|
31
|
-
currencyCode: string;
|
|
32
|
-
}[];
|
|
33
|
-
roomPrices: {
|
|
34
|
-
amount: number;
|
|
35
|
-
currencyCode: string;
|
|
36
|
-
roomType: {
|
|
37
|
-
id: string;
|
|
38
|
-
name: string;
|
|
39
|
-
occupancy: {
|
|
40
|
-
adultsMin: number;
|
|
41
|
-
adultsMax: number;
|
|
42
|
-
childrenMax: number;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
46
|
-
}[];
|
|
47
|
-
} | null>;
|
|
48
|
-
export declare function listStorefrontProductDepartures(db: PostgresJsDatabase, productId: string, query: StorefrontDepartureListQuery): Promise<{
|
|
49
|
-
data: {
|
|
50
|
-
id: string;
|
|
51
|
-
productId: string;
|
|
52
|
-
itineraryId: string;
|
|
53
|
-
optionId: string | null;
|
|
54
|
-
dateLocal: string | null;
|
|
55
|
-
startAt: string | null;
|
|
56
|
-
endAt: string | null;
|
|
57
|
-
timezone: string;
|
|
58
|
-
startTime: {
|
|
59
|
-
id: string;
|
|
60
|
-
label: string | null;
|
|
61
|
-
startTimeLocal: string;
|
|
62
|
-
durationMinutes: number | null;
|
|
63
|
-
} | null;
|
|
64
|
-
meetingPoint: string | null;
|
|
65
|
-
capacity: number | null;
|
|
66
|
-
remaining: number | null;
|
|
67
|
-
departureStatus: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
|
|
68
|
-
nights: number | null;
|
|
69
|
-
days: number | null;
|
|
70
|
-
ratePlans: {
|
|
71
|
-
id: string;
|
|
72
|
-
active: boolean;
|
|
73
|
-
name: string;
|
|
74
|
-
pricingModel: string;
|
|
75
|
-
basePrices: {
|
|
76
|
-
amount: number;
|
|
77
|
-
currencyCode: string;
|
|
78
|
-
}[];
|
|
79
|
-
roomPrices: {
|
|
80
|
-
amount: number;
|
|
81
|
-
currencyCode: string;
|
|
82
|
-
roomType: {
|
|
83
|
-
id: string;
|
|
84
|
-
name: string;
|
|
85
|
-
occupancy: {
|
|
86
|
-
adultsMin: number;
|
|
87
|
-
adultsMax: number;
|
|
88
|
-
childrenMax: number;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
}[];
|
|
92
|
-
}[];
|
|
93
|
-
}[];
|
|
94
|
-
total: number;
|
|
95
|
-
limit: number;
|
|
96
|
-
offset: number;
|
|
97
|
-
}>;
|
|
98
|
-
type StorefrontProductAvailabilityState = "available" | "sold_out" | "closed" | "cancelled" | "on_request" | "past_cutoff" | "too_early" | "unavailable";
|
|
99
|
-
export declare function getStorefrontProductAvailabilitySummary(db: PostgresJsDatabase, productId: string, query: StorefrontProductAvailabilitySummaryQuery): Promise<{
|
|
100
|
-
productId: string;
|
|
101
|
-
availabilityState: StorefrontProductAvailabilityState;
|
|
102
|
-
counts: {
|
|
103
|
-
total: number;
|
|
104
|
-
open: number;
|
|
105
|
-
closed: number;
|
|
106
|
-
soldOut: number;
|
|
107
|
-
cancelled: number;
|
|
108
|
-
onRequest: number;
|
|
109
|
-
pastCutoff: number;
|
|
110
|
-
tooEarly: number;
|
|
111
|
-
available: number;
|
|
112
|
-
};
|
|
113
|
-
departures: {
|
|
114
|
-
id: string;
|
|
115
|
-
productId: string;
|
|
116
|
-
optionId: string | null;
|
|
117
|
-
dateLocal: string | null;
|
|
118
|
-
startAt: string | null;
|
|
119
|
-
endAt: string | null;
|
|
120
|
-
timezone: string;
|
|
121
|
-
status: "open" | "closed" | "sold_out" | "cancelled" | "on_request";
|
|
122
|
-
availabilityState: StorefrontProductAvailabilityState;
|
|
123
|
-
capacity: number | null;
|
|
124
|
-
remaining: number | null;
|
|
125
|
-
pastCutoff: boolean;
|
|
126
|
-
tooEarly: boolean;
|
|
127
|
-
}[];
|
|
128
|
-
total: number;
|
|
129
|
-
limit: number;
|
|
130
|
-
offset: number;
|
|
131
|
-
}>;
|
|
132
|
-
export declare function previewStorefrontDeparturePrice(db: PostgresJsDatabase, departureId: string, input: StorefrontDeparturePricePreviewInput): Promise<{
|
|
133
|
-
departureId: string;
|
|
134
|
-
productId: string;
|
|
135
|
-
optionId: string | null;
|
|
136
|
-
currencyCode: string;
|
|
137
|
-
basePrice: number;
|
|
138
|
-
taxAmount: number;
|
|
139
|
-
total: number;
|
|
140
|
-
notes: string | null;
|
|
141
|
-
lineItems: {
|
|
142
|
-
name: string;
|
|
143
|
-
total: number;
|
|
144
|
-
quantity: number;
|
|
145
|
-
unitPrice: number;
|
|
146
|
-
}[];
|
|
147
|
-
} | null>;
|
|
148
|
-
export declare function getStorefrontProductExtensions(db: PostgresJsDatabase, productId: string, optionId?: string): Promise<{
|
|
149
|
-
extensions: {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string;
|
|
152
|
-
label: string;
|
|
153
|
-
required: boolean;
|
|
154
|
-
selectable: boolean;
|
|
155
|
-
hasOptions: boolean;
|
|
156
|
-
refProductId: string | null;
|
|
157
|
-
thumb: string | null;
|
|
158
|
-
pricePerPerson: number | null;
|
|
159
|
-
currencyCode: string;
|
|
160
|
-
pricingMode: string;
|
|
161
|
-
defaultQuantity: number | null;
|
|
162
|
-
minQuantity: number | null;
|
|
163
|
-
maxQuantity: number | null;
|
|
164
|
-
}[];
|
|
165
|
-
items: {
|
|
166
|
-
id: string;
|
|
167
|
-
name: string;
|
|
168
|
-
label: string;
|
|
169
|
-
required: boolean;
|
|
170
|
-
selectable: boolean;
|
|
171
|
-
hasOptions: boolean;
|
|
172
|
-
refProductId: string | null;
|
|
173
|
-
thumb: string | null;
|
|
174
|
-
pricePerPerson: number | null;
|
|
175
|
-
currencyCode: string;
|
|
176
|
-
pricingMode: string;
|
|
177
|
-
defaultQuantity: number | null;
|
|
178
|
-
minQuantity: number | null;
|
|
179
|
-
maxQuantity: number | null;
|
|
180
|
-
}[];
|
|
181
|
-
details: {
|
|
182
|
-
[k: string]: {
|
|
183
|
-
description: string | null;
|
|
184
|
-
media: {
|
|
185
|
-
url: string;
|
|
186
|
-
alt: string | null;
|
|
187
|
-
}[];
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
currencyCode: string;
|
|
191
|
-
}>;
|
|
192
|
-
export declare function getStorefrontDepartureItinerary(db: PostgresJsDatabase, input: {
|
|
193
|
-
departureId: string;
|
|
194
|
-
productId: string;
|
|
195
|
-
}): Promise<{
|
|
196
|
-
id: string;
|
|
197
|
-
days: {
|
|
198
|
-
id: string;
|
|
199
|
-
title: string;
|
|
200
|
-
description: string | null;
|
|
201
|
-
thumbnail: {
|
|
202
|
-
url: string;
|
|
203
|
-
} | null;
|
|
204
|
-
segments: {
|
|
205
|
-
id: string;
|
|
206
|
-
title: string;
|
|
207
|
-
description: string | null;
|
|
208
|
-
}[];
|
|
209
|
-
}[];
|
|
210
|
-
} | null>;
|
|
211
|
-
export {};
|
|
212
|
-
//# sourceMappingURL=service-departures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service-departures.d.ts","sourceRoot":"","sources":["../src/service-departures.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,yCAAyC,EAC1C,MAAM,iBAAiB,CAAA;AA40BxB,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAYvF;AAED,wBAAsB,+BAA+B,CACnD,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BpC;AAED,KAAK,kCAAkC,GACnC,WAAW,GACX,UAAU,GACV,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW,GACX,aAAa,CAAA;AAuDjB,wBAAsB,uCAAuC,CAC3D,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FjD;AAED,wBAAsB,+BAA+B,CACnD,EAAE,EAAE,kBAAkB,EACtB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,oCAAoC;;;;;;;;;;cAzUlB,MAAM;eAAS,MAAM;kBAAY,MAAM;mBAAa,MAAM;;UAwapF;AAED,wBAAsB,8BAA8B,CAClD,EAAE,EAAE,kBAAkB,EACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGlB;AAED,wBAAsB,+BAA+B,CACnD,EAAE,EAAE,kBAAkB,EACtB,KAAK,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;UAyFlD"}
|