@voyantjs/products 0.3.0 → 0.4.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/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/routes-public.d.ts +492 -0
- package/dist/routes-public.d.ts.map +1 -0
- package/dist/routes-public.js +44 -0
- package/dist/routes.d.ts +669 -0
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +117 -1
- package/dist/schema-itinerary.d.ts +51 -0
- package/dist/schema-itinerary.d.ts.map +1 -1
- package/dist/schema-itinerary.js +3 -0
- package/dist/schema-relations.d.ts +14 -0
- package/dist/schema-relations.d.ts.map +1 -1
- package/dist/schema-relations.js +28 -1
- package/dist/schema-taxonomy.d.ts +435 -0
- package/dist/schema-taxonomy.d.ts.map +1 -1
- package/dist/schema-taxonomy.js +47 -0
- package/dist/service-catalog.d.ts +237 -0
- package/dist/service-catalog.d.ts.map +1 -0
- package/dist/service-catalog.js +478 -0
- package/dist/service-public.d.ts +383 -0
- package/dist/service-public.d.ts.map +1 -0
- package/dist/service-public.js +365 -0
- package/dist/service.d.ts +292 -1
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +388 -2
- package/dist/tasks/brochure-printers.d.ts +29 -0
- package/dist/tasks/brochure-printers.d.ts.map +1 -0
- package/dist/tasks/brochure-printers.js +94 -0
- package/dist/tasks/brochure-templates.d.ts +36 -0
- package/dist/tasks/brochure-templates.d.ts.map +1 -0
- package/dist/tasks/brochure-templates.js +98 -0
- package/dist/tasks/brochures.d.ts +42 -0
- package/dist/tasks/brochures.d.ts.map +1 -0
- package/dist/tasks/brochures.js +69 -0
- package/dist/tasks/index.d.ts +3 -0
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +3 -0
- package/dist/validation-catalog.d.ts +388 -0
- package/dist/validation-catalog.d.ts.map +1 -0
- package/dist/validation-catalog.js +54 -0
- package/dist/validation-content.d.ts +109 -0
- package/dist/validation-content.d.ts.map +1 -1
- package/dist/validation-content.js +63 -1
- package/dist/validation-public.d.ts +643 -0
- package/dist/validation-public.d.ts.map +1 -0
- package/dist/validation-public.js +167 -0
- package/dist/validation-shared.d.ts +11 -0
- package/dist/validation-shared.d.ts.map +1 -1
- package/dist/validation-shared.js +2 -0
- package/dist/validation.d.ts +1 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +1 -0
- package/package.json +14 -4
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
+
import { products } from "./schema.js";
|
|
3
|
+
import type { CatalogSearchDocument, CatalogSearchDocumentListQuery } from "./validation-catalog.js";
|
|
4
|
+
type CatalogProductRow = typeof products.$inferSelect;
|
|
5
|
+
type HydrateCatalogProductOptions = {
|
|
6
|
+
includeContent?: boolean;
|
|
7
|
+
languageTag?: string | null;
|
|
8
|
+
fallbackLanguageTags?: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const catalogProductsService: {
|
|
11
|
+
hydrateProducts(db: PostgresJsDatabase, productRows: CatalogProductRow[], options?: HydrateCatalogProductOptions): Promise<({
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
contentLanguageTag: string | null;
|
|
16
|
+
slug: string | null;
|
|
17
|
+
shortDescription: string | null;
|
|
18
|
+
seoTitle: string | null;
|
|
19
|
+
seoDescription: string | null;
|
|
20
|
+
bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
|
|
21
|
+
capacityMode: "free_sale" | "limited" | "on_request";
|
|
22
|
+
visibility: "public" | "private" | "hidden";
|
|
23
|
+
sellCurrency: string;
|
|
24
|
+
sellAmountCents: number | null;
|
|
25
|
+
startDate: string | null;
|
|
26
|
+
endDate: string | null;
|
|
27
|
+
pax: number | null;
|
|
28
|
+
productType: {
|
|
29
|
+
id: string;
|
|
30
|
+
code: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
} | null;
|
|
34
|
+
categories: {
|
|
35
|
+
id: string;
|
|
36
|
+
parentId: string | null;
|
|
37
|
+
name: string;
|
|
38
|
+
slug: string;
|
|
39
|
+
description: string | null;
|
|
40
|
+
sortOrder: number;
|
|
41
|
+
}[];
|
|
42
|
+
tags: {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
}[];
|
|
46
|
+
capabilities: string[];
|
|
47
|
+
destinations: {
|
|
48
|
+
id: string;
|
|
49
|
+
parentId: string | null;
|
|
50
|
+
slug: string;
|
|
51
|
+
name: string;
|
|
52
|
+
description: string | null;
|
|
53
|
+
seoTitle: string | null;
|
|
54
|
+
seoDescription: string | null;
|
|
55
|
+
destinationType: string;
|
|
56
|
+
sortOrder: number;
|
|
57
|
+
}[];
|
|
58
|
+
locations: {
|
|
59
|
+
id: string;
|
|
60
|
+
locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
|
|
61
|
+
title: string;
|
|
62
|
+
address: string | null;
|
|
63
|
+
city: string | null;
|
|
64
|
+
countryCode: string | null;
|
|
65
|
+
latitude: number | null;
|
|
66
|
+
longitude: number | null;
|
|
67
|
+
sortOrder: number;
|
|
68
|
+
}[];
|
|
69
|
+
coverMedia: {
|
|
70
|
+
id: string;
|
|
71
|
+
mediaType: "image" | "video" | "document";
|
|
72
|
+
name: string;
|
|
73
|
+
url: string;
|
|
74
|
+
mimeType: string | null;
|
|
75
|
+
altText: string | null;
|
|
76
|
+
sortOrder: number;
|
|
77
|
+
isCover: boolean;
|
|
78
|
+
isBrochure: boolean;
|
|
79
|
+
isBrochureCurrent: boolean;
|
|
80
|
+
brochureVersion: number | null;
|
|
81
|
+
} | null;
|
|
82
|
+
isFeatured: boolean;
|
|
83
|
+
} | {
|
|
84
|
+
brochure: {
|
|
85
|
+
id: string;
|
|
86
|
+
mediaType: "image" | "video" | "document";
|
|
87
|
+
name: string;
|
|
88
|
+
url: string;
|
|
89
|
+
mimeType: string | null;
|
|
90
|
+
altText: string | null;
|
|
91
|
+
sortOrder: number;
|
|
92
|
+
isCover: boolean;
|
|
93
|
+
isBrochure: boolean;
|
|
94
|
+
isBrochureCurrent: boolean;
|
|
95
|
+
brochureVersion: number | null;
|
|
96
|
+
} | null;
|
|
97
|
+
media: {
|
|
98
|
+
id: string;
|
|
99
|
+
mediaType: "image" | "video" | "document";
|
|
100
|
+
name: string;
|
|
101
|
+
url: string;
|
|
102
|
+
mimeType: string | null;
|
|
103
|
+
altText: string | null;
|
|
104
|
+
sortOrder: number;
|
|
105
|
+
isCover: boolean;
|
|
106
|
+
isBrochure: boolean;
|
|
107
|
+
isBrochureCurrent: boolean;
|
|
108
|
+
brochureVersion: number | null;
|
|
109
|
+
}[];
|
|
110
|
+
features: {
|
|
111
|
+
id: string;
|
|
112
|
+
featureType: "other" | "inclusion" | "exclusion" | "highlight" | "important_information";
|
|
113
|
+
title: string;
|
|
114
|
+
description: string | null;
|
|
115
|
+
sortOrder: number;
|
|
116
|
+
}[];
|
|
117
|
+
faqs: {
|
|
118
|
+
id: string;
|
|
119
|
+
question: string;
|
|
120
|
+
answer: string;
|
|
121
|
+
sortOrder: number;
|
|
122
|
+
}[];
|
|
123
|
+
id: string;
|
|
124
|
+
name: string;
|
|
125
|
+
description: string | null;
|
|
126
|
+
contentLanguageTag: string | null;
|
|
127
|
+
slug: string | null;
|
|
128
|
+
shortDescription: string | null;
|
|
129
|
+
seoTitle: string | null;
|
|
130
|
+
seoDescription: string | null;
|
|
131
|
+
bookingMode: "date" | "other" | "date_time" | "open" | "stay" | "transfer" | "itinerary";
|
|
132
|
+
capacityMode: "free_sale" | "limited" | "on_request";
|
|
133
|
+
visibility: "public" | "private" | "hidden";
|
|
134
|
+
sellCurrency: string;
|
|
135
|
+
sellAmountCents: number | null;
|
|
136
|
+
startDate: string | null;
|
|
137
|
+
endDate: string | null;
|
|
138
|
+
pax: number | null;
|
|
139
|
+
productType: {
|
|
140
|
+
id: string;
|
|
141
|
+
code: string;
|
|
142
|
+
name: string;
|
|
143
|
+
description: string | null;
|
|
144
|
+
} | null;
|
|
145
|
+
categories: {
|
|
146
|
+
id: string;
|
|
147
|
+
parentId: string | null;
|
|
148
|
+
name: string;
|
|
149
|
+
slug: string;
|
|
150
|
+
description: string | null;
|
|
151
|
+
sortOrder: number;
|
|
152
|
+
}[];
|
|
153
|
+
tags: {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
}[];
|
|
157
|
+
capabilities: string[];
|
|
158
|
+
destinations: {
|
|
159
|
+
id: string;
|
|
160
|
+
parentId: string | null;
|
|
161
|
+
slug: string;
|
|
162
|
+
name: string;
|
|
163
|
+
description: string | null;
|
|
164
|
+
seoTitle: string | null;
|
|
165
|
+
seoDescription: string | null;
|
|
166
|
+
destinationType: string;
|
|
167
|
+
sortOrder: number;
|
|
168
|
+
}[];
|
|
169
|
+
locations: {
|
|
170
|
+
id: string;
|
|
171
|
+
locationType: "other" | "start" | "end" | "meeting_point" | "pickup" | "dropoff" | "point_of_interest";
|
|
172
|
+
title: string;
|
|
173
|
+
address: string | null;
|
|
174
|
+
city: string | null;
|
|
175
|
+
countryCode: string | null;
|
|
176
|
+
latitude: number | null;
|
|
177
|
+
longitude: number | null;
|
|
178
|
+
sortOrder: number;
|
|
179
|
+
}[];
|
|
180
|
+
coverMedia: {
|
|
181
|
+
id: string;
|
|
182
|
+
mediaType: "image" | "video" | "document";
|
|
183
|
+
name: string;
|
|
184
|
+
url: string;
|
|
185
|
+
mimeType: string | null;
|
|
186
|
+
altText: string | null;
|
|
187
|
+
sortOrder: number;
|
|
188
|
+
isCover: boolean;
|
|
189
|
+
isBrochure: boolean;
|
|
190
|
+
isBrochureCurrent: boolean;
|
|
191
|
+
brochureVersion: number | null;
|
|
192
|
+
} | null;
|
|
193
|
+
isFeatured: boolean;
|
|
194
|
+
})[]>;
|
|
195
|
+
listSearchDocuments(db: PostgresJsDatabase, query: CatalogSearchDocumentListQuery): Promise<{
|
|
196
|
+
data: CatalogSearchDocument[];
|
|
197
|
+
total: number;
|
|
198
|
+
limit: number;
|
|
199
|
+
offset: number;
|
|
200
|
+
}>;
|
|
201
|
+
getSearchDocumentByProductId(db: PostgresJsDatabase, productId: string, query?: Partial<Omit<CatalogSearchDocumentListQuery, "productIds" | "limit" | "offset">>): Promise<{
|
|
202
|
+
id: string;
|
|
203
|
+
productId: string;
|
|
204
|
+
languageTag: string | null;
|
|
205
|
+
name: string;
|
|
206
|
+
slug: string | null;
|
|
207
|
+
shortDescription: string | null;
|
|
208
|
+
description: string | null;
|
|
209
|
+
seoTitle: string | null;
|
|
210
|
+
seoDescription: string | null;
|
|
211
|
+
sellCurrency: string;
|
|
212
|
+
sellAmountCents: number | null;
|
|
213
|
+
startDate: string | null;
|
|
214
|
+
endDate: string | null;
|
|
215
|
+
pax: number | null;
|
|
216
|
+
productTypeCode: string | null;
|
|
217
|
+
productTypeName: string | null;
|
|
218
|
+
categoryIds: string[];
|
|
219
|
+
categoryNames: string[];
|
|
220
|
+
categorySlugs: string[];
|
|
221
|
+
tagIds: string[];
|
|
222
|
+
tagNames: string[];
|
|
223
|
+
capabilities: string[];
|
|
224
|
+
destinationIds: string[];
|
|
225
|
+
destinationNames: string[];
|
|
226
|
+
destinationSlugs: string[];
|
|
227
|
+
locationTitles: string[];
|
|
228
|
+
locationCities: string[];
|
|
229
|
+
locationCountryCodes: string[];
|
|
230
|
+
coverMediaUrl: string | null;
|
|
231
|
+
isFeatured: boolean;
|
|
232
|
+
createdAt: string | null;
|
|
233
|
+
updatedAt: string | null;
|
|
234
|
+
} | null>;
|
|
235
|
+
};
|
|
236
|
+
export {};
|
|
237
|
+
//# sourceMappingURL=service-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-catalog.d.ts","sourceRoot":"","sources":["../src/service-catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAWL,QAAQ,EAMT,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,qBAAqB,EACrB,8BAA8B,EAE/B,MAAM,yBAAyB,CAAA;AAEhC,KAAK,iBAAiB,GAAG,OAAO,QAAQ,CAAC,YAAY,CAAA;AAErD,KAAK,4BAA4B,GAAG;IAClC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;CAChC,CAAA;AA+YD,eAAO,MAAM,sBAAsB;wBAE3B,kBAAkB,eACT,iBAAiB,EAAE,YACvB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAkHjC,kBAAkB,SACf,8BAA8B,GACpC,OAAO,CAAC;QACT,IAAI,EAAE,qBAAqB,EAAE,CAAA;QAC7B,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;KACf,CAAC;qCAkFI,kBAAkB,aACX,MAAM,UACV,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa1F,CAAA"}
|