@voyant-travel/inventory 0.5.5 → 0.5.6
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/action-ledger.d.ts +5 -5
- package/dist/authoring/extension.d.ts +4 -4
- package/dist/authoring/spec.d.ts +2 -2
- package/dist/booking-extension.js +1 -1
- package/dist/extras/routes.d.ts +470 -119
- package/dist/extras/routes.d.ts.map +1 -1
- package/dist/extras/routes.js +252 -37
- package/dist/extras/schema.d.ts +2 -2
- package/dist/extras/service.d.ts +11 -11
- package/dist/extras/validation.d.ts +37 -37
- package/dist/extras.d.ts +15 -15
- package/dist/extras.js +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/interface.d.ts +4242 -1825
- package/dist/interface.d.ts.map +1 -1
- package/dist/interface.js +0 -1
- package/dist/public-taxonomy-contract.test.d.ts +2 -0
- package/dist/public-taxonomy-contract.test.d.ts.map +1 -0
- package/dist/public-taxonomy-contract.test.js +37 -0
- package/dist/routes-associations.d.ts +101 -42
- package/dist/routes-associations.d.ts.map +1 -1
- package/dist/routes-associations.js +177 -38
- package/dist/routes-brochure.d.ts +3 -2
- package/dist/routes-brochure.d.ts.map +1 -1
- package/dist/routes-brochure.js +65 -6
- package/dist/routes-brochure.test.js +1 -1
- package/dist/routes-catalog.d.ts +349 -88
- package/dist/routes-catalog.d.ts.map +1 -1
- package/dist/routes-catalog.js +390 -62
- package/dist/routes-configuration.d.ts +507 -129
- package/dist/routes-configuration.d.ts.map +1 -1
- package/dist/routes-configuration.js +668 -90
- package/dist/routes-content.d.ts +4 -4
- package/dist/routes-content.d.ts.map +1 -1
- package/dist/routes-content.js +44 -6
- package/dist/routes-core.d.ts +307 -66
- package/dist/routes-core.d.ts.map +1 -1
- package/dist/routes-core.js +226 -29
- package/dist/routes-itinerary-translations.d.ts +202 -87
- package/dist/routes-itinerary-translations.d.ts.map +1 -1
- package/dist/routes-itinerary-translations.js +261 -55
- package/dist/routes-itinerary.d.ts +580 -212
- package/dist/routes-itinerary.d.ts.map +1 -1
- package/dist/routes-itinerary.js +655 -129
- package/dist/routes-maintenance.d.ts +21 -9
- package/dist/routes-maintenance.d.ts.map +1 -1
- package/dist/routes-maintenance.js +38 -9
- package/dist/routes-media.d.ts +425 -148
- package/dist/routes-media.d.ts.map +1 -1
- package/dist/routes-media.js +438 -128
- package/dist/routes-merchandising.d.ts +906 -316
- package/dist/routes-merchandising.d.ts.map +1 -1
- package/dist/routes-merchandising.js +945 -125
- package/dist/routes-options.d.ts +356 -115
- package/dist/routes-options.d.ts.map +1 -1
- package/dist/routes-options.js +288 -52
- package/dist/routes-public.d.ts +340 -364
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +230 -37
- package/dist/routes-translations.d.ts +356 -86
- package/dist/routes-translations.d.ts.map +1 -1
- package/dist/routes-translations.js +404 -56
- package/dist/routes.d.ts +4185 -1595
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +8 -3
- package/dist/schema-core.d.ts +1 -1
- package/dist/schema-settings.d.ts +1 -1
- package/dist/service-catalog.d.ts +4 -4
- package/dist/service-core.d.ts +6 -6
- package/dist/service-delivery-formats.d.ts +1 -1
- package/dist/service-destinations.d.ts +3 -3
- package/dist/service-itinerary-translations.d.ts +1 -1
- package/dist/service-itinerary.d.ts +3 -3
- package/dist/service-merchandising.d.ts +5 -5
- package/dist/service-option-translations.d.ts +4 -4
- package/dist/service-options.d.ts +2 -2
- package/dist/service-public.d.ts +12 -12
- package/dist/service-taxonomy.d.ts +4 -4
- package/dist/service.d.ts +41 -41
- package/package.json +9 -9
package/dist/extras/routes.d.ts
CHANGED
|
@@ -1,31 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin routes for inventory extras — a separately, independently mounted
|
|
3
|
+
* surface (`inventoryExtrasRoutes`) composed into the framework's combined
|
|
4
|
+
* "extras" `OpenAPIHono` module. Covers two resource sub-chains: product-extras
|
|
5
|
+
* CRUD and option-extra-configs CRUD.
|
|
6
|
+
*
|
|
7
|
+
* Migrated to `@hono/zod-openapi` for the OpenAPI admin backfill (voyant#2114 —
|
|
8
|
+
* inventory extras sub-batch, the last inventory batch). Request schemas reuse
|
|
9
|
+
* the existing `validation.ts` schemas the handlers already parse; the list
|
|
10
|
+
* endpoints use the framework's canonical `listResponseSchema(...)` envelope;
|
|
11
|
+
* response row schemas are authored from the Drizzle `$inferSelect` shapes in
|
|
12
|
+
* `schema.ts` (§17: timestamp columns serialize to ISO strings over the wire,
|
|
13
|
+
* integer columns stay numbers). Business logic + service wiring are unchanged;
|
|
14
|
+
* handlers read `c.req.valid(...)`.
|
|
15
|
+
*
|
|
16
|
+
* The routes are split into per-resource child `OpenAPIHono` sub-chains
|
|
17
|
+
* (`.route("/", child)`) rather than one long flat `.openapi()` chain to keep
|
|
18
|
+
* the tsc inference cost linear. Within each child, the static collection paths
|
|
19
|
+
* are registered before the dynamic `/{id}` legs.
|
|
20
|
+
*/
|
|
21
|
+
import { OpenAPIHono, z } from "@hono/zod-openapi";
|
|
1
22
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
23
|
type Env = {
|
|
3
24
|
Variables: {
|
|
4
25
|
db: PostgresJsDatabase;
|
|
5
26
|
};
|
|
6
27
|
};
|
|
7
|
-
export declare const inventoryExtrasRoutes: import("hono/
|
|
8
|
-
"/
|
|
28
|
+
export declare const inventoryExtrasRoutes: OpenAPIHono<Env, import("hono/types").MergeSchemaPath<{
|
|
29
|
+
"/option-extra-configs": {
|
|
9
30
|
$get: {
|
|
10
|
-
input: {
|
|
31
|
+
input: {
|
|
32
|
+
query: {
|
|
33
|
+
limit?: unknown;
|
|
34
|
+
offset?: unknown;
|
|
35
|
+
optionId?: string | undefined;
|
|
36
|
+
productExtraId?: string | undefined;
|
|
37
|
+
active?: "0" | "1" | "true" | "false" | undefined;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
output: {
|
|
41
|
+
error: string;
|
|
42
|
+
};
|
|
43
|
+
outputFormat: "json";
|
|
44
|
+
status: 400;
|
|
45
|
+
} | {
|
|
46
|
+
input: {
|
|
47
|
+
query: {
|
|
48
|
+
limit?: unknown;
|
|
49
|
+
offset?: unknown;
|
|
50
|
+
optionId?: string | undefined;
|
|
51
|
+
productExtraId?: string | undefined;
|
|
52
|
+
active?: "0" | "1" | "true" | "false" | undefined;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
11
55
|
output: {
|
|
12
56
|
data: {
|
|
13
57
|
id: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
selectionType: "optional" | "required" | "unavailable" | "default_selected";
|
|
20
|
-
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
21
|
-
pricedPerPerson: boolean;
|
|
22
|
-
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
23
|
-
showOnSlotManifest: boolean;
|
|
58
|
+
optionId: string;
|
|
59
|
+
productExtraId: string;
|
|
60
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable" | null;
|
|
61
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null;
|
|
62
|
+
pricedPerPerson: boolean | null;
|
|
24
63
|
minQuantity: number | null;
|
|
25
64
|
maxQuantity: number | null;
|
|
26
65
|
defaultQuantity: number | null;
|
|
66
|
+
isDefault: boolean;
|
|
27
67
|
active: boolean;
|
|
28
68
|
sortOrder: number;
|
|
69
|
+
notes: string | null;
|
|
29
70
|
metadata: {
|
|
30
71
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
31
72
|
} | null;
|
|
@@ -37,44 +78,80 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
37
78
|
offset: number;
|
|
38
79
|
};
|
|
39
80
|
outputFormat: "json";
|
|
40
|
-
status:
|
|
81
|
+
status: 200;
|
|
41
82
|
};
|
|
42
83
|
};
|
|
43
84
|
} & {
|
|
44
|
-
"/
|
|
85
|
+
"/option-extra-configs": {
|
|
45
86
|
$post: {
|
|
46
|
-
input: {
|
|
87
|
+
input: {
|
|
88
|
+
json: {
|
|
89
|
+
optionId: string;
|
|
90
|
+
productExtraId: string;
|
|
91
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | null | undefined;
|
|
92
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null | undefined;
|
|
93
|
+
pricedPerPerson?: boolean | null | undefined;
|
|
94
|
+
minQuantity?: number | null | undefined;
|
|
95
|
+
maxQuantity?: number | null | undefined;
|
|
96
|
+
defaultQuantity?: number | null | undefined;
|
|
97
|
+
isDefault?: boolean | undefined;
|
|
98
|
+
active?: boolean | undefined;
|
|
99
|
+
sortOrder?: number | undefined;
|
|
100
|
+
notes?: string | null | undefined;
|
|
101
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
output: {
|
|
105
|
+
error: string;
|
|
106
|
+
};
|
|
107
|
+
outputFormat: "json";
|
|
108
|
+
status: 400;
|
|
109
|
+
} | {
|
|
110
|
+
input: {
|
|
111
|
+
json: {
|
|
112
|
+
optionId: string;
|
|
113
|
+
productExtraId: string;
|
|
114
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | null | undefined;
|
|
115
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null | undefined;
|
|
116
|
+
pricedPerPerson?: boolean | null | undefined;
|
|
117
|
+
minQuantity?: number | null | undefined;
|
|
118
|
+
maxQuantity?: number | null | undefined;
|
|
119
|
+
defaultQuantity?: number | null | undefined;
|
|
120
|
+
isDefault?: boolean | undefined;
|
|
121
|
+
active?: boolean | undefined;
|
|
122
|
+
sortOrder?: number | undefined;
|
|
123
|
+
notes?: string | null | undefined;
|
|
124
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
47
127
|
output: {
|
|
48
128
|
data: {
|
|
49
129
|
id: string;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
updatedAt: string;
|
|
56
|
-
productId: string;
|
|
57
|
-
code: string | null;
|
|
58
|
-
sortOrder: number;
|
|
130
|
+
optionId: string;
|
|
131
|
+
productExtraId: string;
|
|
132
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable" | null;
|
|
133
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null;
|
|
134
|
+
pricedPerPerson: boolean | null;
|
|
59
135
|
minQuantity: number | null;
|
|
60
136
|
maxQuantity: number | null;
|
|
137
|
+
defaultQuantity: number | null;
|
|
138
|
+
isDefault: boolean;
|
|
139
|
+
active: boolean;
|
|
140
|
+
sortOrder: number;
|
|
141
|
+
notes: string | null;
|
|
61
142
|
metadata: {
|
|
62
143
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
63
144
|
} | null;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
68
|
-
showOnSlotManifest: boolean;
|
|
69
|
-
defaultQuantity: number | null;
|
|
70
|
-
} | null;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
};
|
|
71
148
|
};
|
|
72
149
|
outputFormat: "json";
|
|
73
150
|
status: 201;
|
|
74
151
|
};
|
|
75
152
|
};
|
|
76
153
|
} & {
|
|
77
|
-
"/
|
|
154
|
+
"/option-extra-configs/:id": {
|
|
78
155
|
$get: {
|
|
79
156
|
input: {
|
|
80
157
|
param: {
|
|
@@ -95,21 +172,18 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
95
172
|
output: {
|
|
96
173
|
data: {
|
|
97
174
|
id: string;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
selectionType: "optional" | "required" | "unavailable" | "default_selected";
|
|
104
|
-
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
105
|
-
pricedPerPerson: boolean;
|
|
106
|
-
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
107
|
-
showOnSlotManifest: boolean;
|
|
175
|
+
optionId: string;
|
|
176
|
+
productExtraId: string;
|
|
177
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable" | null;
|
|
178
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null;
|
|
179
|
+
pricedPerPerson: boolean | null;
|
|
108
180
|
minQuantity: number | null;
|
|
109
181
|
maxQuantity: number | null;
|
|
110
182
|
defaultQuantity: number | null;
|
|
183
|
+
isDefault: boolean;
|
|
111
184
|
active: boolean;
|
|
112
185
|
sortOrder: number;
|
|
186
|
+
notes: string | null;
|
|
113
187
|
metadata: {
|
|
114
188
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
115
189
|
} | null;
|
|
@@ -118,16 +192,59 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
118
192
|
};
|
|
119
193
|
};
|
|
120
194
|
outputFormat: "json";
|
|
121
|
-
status:
|
|
195
|
+
status: 200;
|
|
122
196
|
};
|
|
123
197
|
};
|
|
124
198
|
} & {
|
|
125
|
-
"/
|
|
199
|
+
"/option-extra-configs/:id": {
|
|
126
200
|
$patch: {
|
|
127
201
|
input: {
|
|
128
202
|
param: {
|
|
129
203
|
id: string;
|
|
130
204
|
};
|
|
205
|
+
} & {
|
|
206
|
+
json: {
|
|
207
|
+
optionId?: string | undefined;
|
|
208
|
+
productExtraId?: string | undefined;
|
|
209
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | null | undefined;
|
|
210
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null | undefined;
|
|
211
|
+
pricedPerPerson?: boolean | null | undefined;
|
|
212
|
+
minQuantity?: number | null | undefined;
|
|
213
|
+
maxQuantity?: number | null | undefined;
|
|
214
|
+
defaultQuantity?: number | null | undefined;
|
|
215
|
+
isDefault?: boolean | undefined;
|
|
216
|
+
active?: boolean | undefined;
|
|
217
|
+
sortOrder?: number | undefined;
|
|
218
|
+
notes?: string | null | undefined;
|
|
219
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
output: {
|
|
223
|
+
error: string;
|
|
224
|
+
};
|
|
225
|
+
outputFormat: "json";
|
|
226
|
+
status: 400;
|
|
227
|
+
} | {
|
|
228
|
+
input: {
|
|
229
|
+
param: {
|
|
230
|
+
id: string;
|
|
231
|
+
};
|
|
232
|
+
} & {
|
|
233
|
+
json: {
|
|
234
|
+
optionId?: string | undefined;
|
|
235
|
+
productExtraId?: string | undefined;
|
|
236
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | null | undefined;
|
|
237
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null | undefined;
|
|
238
|
+
pricedPerPerson?: boolean | null | undefined;
|
|
239
|
+
minQuantity?: number | null | undefined;
|
|
240
|
+
maxQuantity?: number | null | undefined;
|
|
241
|
+
defaultQuantity?: number | null | undefined;
|
|
242
|
+
isDefault?: boolean | undefined;
|
|
243
|
+
active?: boolean | undefined;
|
|
244
|
+
sortOrder?: number | undefined;
|
|
245
|
+
notes?: string | null | undefined;
|
|
246
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
247
|
+
};
|
|
131
248
|
};
|
|
132
249
|
output: {
|
|
133
250
|
error: string;
|
|
@@ -139,25 +256,38 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
139
256
|
param: {
|
|
140
257
|
id: string;
|
|
141
258
|
};
|
|
259
|
+
} & {
|
|
260
|
+
json: {
|
|
261
|
+
optionId?: string | undefined;
|
|
262
|
+
productExtraId?: string | undefined;
|
|
263
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | null | undefined;
|
|
264
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null | undefined;
|
|
265
|
+
pricedPerPerson?: boolean | null | undefined;
|
|
266
|
+
minQuantity?: number | null | undefined;
|
|
267
|
+
maxQuantity?: number | null | undefined;
|
|
268
|
+
defaultQuantity?: number | null | undefined;
|
|
269
|
+
isDefault?: boolean | undefined;
|
|
270
|
+
active?: boolean | undefined;
|
|
271
|
+
sortOrder?: number | undefined;
|
|
272
|
+
notes?: string | null | undefined;
|
|
273
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
274
|
+
};
|
|
142
275
|
};
|
|
143
276
|
output: {
|
|
144
277
|
data: {
|
|
145
278
|
id: string;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
selectionType: "optional" | "required" | "unavailable" | "default_selected";
|
|
152
|
-
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
153
|
-
pricedPerPerson: boolean;
|
|
154
|
-
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
155
|
-
showOnSlotManifest: boolean;
|
|
279
|
+
optionId: string;
|
|
280
|
+
productExtraId: string;
|
|
281
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable" | null;
|
|
282
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | null;
|
|
283
|
+
pricedPerPerson: boolean | null;
|
|
156
284
|
minQuantity: number | null;
|
|
157
285
|
maxQuantity: number | null;
|
|
158
286
|
defaultQuantity: number | null;
|
|
287
|
+
isDefault: boolean;
|
|
159
288
|
active: boolean;
|
|
160
289
|
sortOrder: number;
|
|
290
|
+
notes: string | null;
|
|
161
291
|
metadata: {
|
|
162
292
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
163
293
|
} | null;
|
|
@@ -166,11 +296,11 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
166
296
|
};
|
|
167
297
|
};
|
|
168
298
|
outputFormat: "json";
|
|
169
|
-
status:
|
|
299
|
+
status: 200;
|
|
170
300
|
};
|
|
171
301
|
};
|
|
172
302
|
} & {
|
|
173
|
-
"/
|
|
303
|
+
"/option-extra-configs/:id": {
|
|
174
304
|
$delete: {
|
|
175
305
|
input: {
|
|
176
306
|
param: {
|
|
@@ -189,31 +319,43 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
189
319
|
};
|
|
190
320
|
};
|
|
191
321
|
output: {
|
|
192
|
-
success:
|
|
322
|
+
success: boolean;
|
|
193
323
|
};
|
|
194
324
|
outputFormat: "json";
|
|
195
|
-
status:
|
|
325
|
+
status: 200;
|
|
196
326
|
};
|
|
197
327
|
};
|
|
198
|
-
} & {
|
|
199
|
-
"/
|
|
328
|
+
}, "/"> & import("hono/types").MergeSchemaPath<{
|
|
329
|
+
"/product-extras": {
|
|
200
330
|
$get: {
|
|
201
|
-
input: {
|
|
331
|
+
input: {
|
|
332
|
+
query: {
|
|
333
|
+
limit?: unknown;
|
|
334
|
+
offset?: unknown;
|
|
335
|
+
productId?: string | undefined;
|
|
336
|
+
supplierId?: string | undefined;
|
|
337
|
+
active?: "0" | "1" | "true" | "false" | undefined;
|
|
338
|
+
search?: string | undefined;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
202
341
|
output: {
|
|
203
342
|
data: {
|
|
204
343
|
id: string;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
344
|
+
productId: string;
|
|
345
|
+
supplierId: string | null;
|
|
346
|
+
code: string | null;
|
|
347
|
+
name: string;
|
|
348
|
+
description: string | null;
|
|
349
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable";
|
|
350
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
351
|
+
pricedPerPerson: boolean;
|
|
352
|
+
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
353
|
+
showOnSlotManifest: boolean;
|
|
210
354
|
minQuantity: number | null;
|
|
211
355
|
maxQuantity: number | null;
|
|
212
356
|
defaultQuantity: number | null;
|
|
213
|
-
isDefault: boolean;
|
|
214
357
|
active: boolean;
|
|
215
358
|
sortOrder: number;
|
|
216
|
-
notes: string | null;
|
|
217
359
|
metadata: {
|
|
218
360
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
219
361
|
} | null;
|
|
@@ -225,53 +367,106 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
225
367
|
offset: number;
|
|
226
368
|
};
|
|
227
369
|
outputFormat: "json";
|
|
228
|
-
status:
|
|
370
|
+
status: 200;
|
|
371
|
+
} | {
|
|
372
|
+
input: {
|
|
373
|
+
query: {
|
|
374
|
+
limit?: unknown;
|
|
375
|
+
offset?: unknown;
|
|
376
|
+
productId?: string | undefined;
|
|
377
|
+
supplierId?: string | undefined;
|
|
378
|
+
active?: "0" | "1" | "true" | "false" | undefined;
|
|
379
|
+
search?: string | undefined;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
output: {
|
|
383
|
+
error: string;
|
|
384
|
+
};
|
|
385
|
+
outputFormat: "json";
|
|
386
|
+
status: 400;
|
|
229
387
|
};
|
|
230
388
|
};
|
|
231
389
|
} & {
|
|
232
|
-
"/
|
|
390
|
+
"/product-extras": {
|
|
233
391
|
$post: {
|
|
234
|
-
input: {
|
|
392
|
+
input: {
|
|
393
|
+
json: {
|
|
394
|
+
productId: string;
|
|
395
|
+
name: string;
|
|
396
|
+
supplierId?: string | null | undefined;
|
|
397
|
+
code?: string | null | undefined;
|
|
398
|
+
description?: string | null | undefined;
|
|
399
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
|
|
400
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
|
|
401
|
+
pricedPerPerson?: boolean | undefined;
|
|
402
|
+
collectionMode?: "none" | "external" | "included" | "booking_total" | "cash_on_trip" | undefined;
|
|
403
|
+
showOnSlotManifest?: boolean | undefined;
|
|
404
|
+
minQuantity?: number | null | undefined;
|
|
405
|
+
maxQuantity?: number | null | undefined;
|
|
406
|
+
defaultQuantity?: number | null | undefined;
|
|
407
|
+
active?: boolean | undefined;
|
|
408
|
+
sortOrder?: number | undefined;
|
|
409
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
output: {
|
|
413
|
+
error: string;
|
|
414
|
+
};
|
|
415
|
+
outputFormat: "json";
|
|
416
|
+
status: 400;
|
|
417
|
+
} | {
|
|
418
|
+
input: {
|
|
419
|
+
json: {
|
|
420
|
+
productId: string;
|
|
421
|
+
name: string;
|
|
422
|
+
supplierId?: string | null | undefined;
|
|
423
|
+
code?: string | null | undefined;
|
|
424
|
+
description?: string | null | undefined;
|
|
425
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
|
|
426
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
|
|
427
|
+
pricedPerPerson?: boolean | undefined;
|
|
428
|
+
collectionMode?: "none" | "external" | "included" | "booking_total" | "cash_on_trip" | undefined;
|
|
429
|
+
showOnSlotManifest?: boolean | undefined;
|
|
430
|
+
minQuantity?: number | null | undefined;
|
|
431
|
+
maxQuantity?: number | null | undefined;
|
|
432
|
+
defaultQuantity?: number | null | undefined;
|
|
433
|
+
active?: boolean | undefined;
|
|
434
|
+
sortOrder?: number | undefined;
|
|
435
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
235
438
|
output: {
|
|
236
439
|
data: {
|
|
237
440
|
id: string;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
441
|
+
productId: string;
|
|
442
|
+
supplierId: string | null;
|
|
443
|
+
code: string | null;
|
|
444
|
+
name: string;
|
|
445
|
+
description: string | null;
|
|
446
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable";
|
|
447
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
448
|
+
pricedPerPerson: boolean;
|
|
449
|
+
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
450
|
+
showOnSlotManifest: boolean;
|
|
244
451
|
minQuantity: number | null;
|
|
245
452
|
maxQuantity: number | null;
|
|
246
|
-
|
|
453
|
+
defaultQuantity: number | null;
|
|
454
|
+
active: boolean;
|
|
455
|
+
sortOrder: number;
|
|
247
456
|
metadata: {
|
|
248
457
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
249
458
|
} | null;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
defaultQuantity: number | null;
|
|
254
|
-
productExtraId: string;
|
|
255
|
-
} | null;
|
|
459
|
+
createdAt: string;
|
|
460
|
+
updatedAt: string;
|
|
461
|
+
};
|
|
256
462
|
};
|
|
257
463
|
outputFormat: "json";
|
|
258
464
|
status: 201;
|
|
259
465
|
};
|
|
260
466
|
};
|
|
261
467
|
} & {
|
|
262
|
-
"/
|
|
468
|
+
"/product-extras/:id": {
|
|
263
469
|
$get: {
|
|
264
|
-
input: {
|
|
265
|
-
param: {
|
|
266
|
-
id: string;
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
output: {
|
|
270
|
-
error: string;
|
|
271
|
-
};
|
|
272
|
-
outputFormat: "json";
|
|
273
|
-
status: 404;
|
|
274
|
-
} | {
|
|
275
470
|
input: {
|
|
276
471
|
param: {
|
|
277
472
|
id: string;
|
|
@@ -280,18 +475,21 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
280
475
|
output: {
|
|
281
476
|
data: {
|
|
282
477
|
id: string;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
478
|
+
productId: string;
|
|
479
|
+
supplierId: string | null;
|
|
480
|
+
code: string | null;
|
|
481
|
+
name: string;
|
|
482
|
+
description: string | null;
|
|
483
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable";
|
|
484
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
485
|
+
pricedPerPerson: boolean;
|
|
486
|
+
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
487
|
+
showOnSlotManifest: boolean;
|
|
288
488
|
minQuantity: number | null;
|
|
289
489
|
maxQuantity: number | null;
|
|
290
490
|
defaultQuantity: number | null;
|
|
291
|
-
isDefault: boolean;
|
|
292
491
|
active: boolean;
|
|
293
492
|
sortOrder: number;
|
|
294
|
-
notes: string | null;
|
|
295
493
|
metadata: {
|
|
296
494
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
297
495
|
} | null;
|
|
@@ -300,43 +498,95 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
300
498
|
};
|
|
301
499
|
};
|
|
302
500
|
outputFormat: "json";
|
|
303
|
-
status:
|
|
501
|
+
status: 200;
|
|
502
|
+
} | {
|
|
503
|
+
input: {
|
|
504
|
+
param: {
|
|
505
|
+
id: string;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
output: {
|
|
509
|
+
error: string;
|
|
510
|
+
};
|
|
511
|
+
outputFormat: "json";
|
|
512
|
+
status: 404;
|
|
304
513
|
};
|
|
305
514
|
};
|
|
306
515
|
} & {
|
|
307
|
-
"/
|
|
516
|
+
"/product-extras/:id": {
|
|
308
517
|
$patch: {
|
|
309
518
|
input: {
|
|
310
519
|
param: {
|
|
311
520
|
id: string;
|
|
312
521
|
};
|
|
522
|
+
} & {
|
|
523
|
+
json: {
|
|
524
|
+
productId?: string | undefined;
|
|
525
|
+
supplierId?: string | null | undefined;
|
|
526
|
+
code?: string | null | undefined;
|
|
527
|
+
name?: string | undefined;
|
|
528
|
+
description?: string | null | undefined;
|
|
529
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
|
|
530
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
|
|
531
|
+
pricedPerPerson?: boolean | undefined;
|
|
532
|
+
collectionMode?: "none" | "external" | "included" | "booking_total" | "cash_on_trip" | undefined;
|
|
533
|
+
showOnSlotManifest?: boolean | undefined;
|
|
534
|
+
minQuantity?: number | null | undefined;
|
|
535
|
+
maxQuantity?: number | null | undefined;
|
|
536
|
+
defaultQuantity?: number | null | undefined;
|
|
537
|
+
active?: boolean | undefined;
|
|
538
|
+
sortOrder?: number | undefined;
|
|
539
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
540
|
+
};
|
|
313
541
|
};
|
|
314
542
|
output: {
|
|
315
543
|
error: string;
|
|
316
544
|
};
|
|
317
545
|
outputFormat: "json";
|
|
318
|
-
status:
|
|
546
|
+
status: 400;
|
|
319
547
|
} | {
|
|
320
548
|
input: {
|
|
321
549
|
param: {
|
|
322
550
|
id: string;
|
|
323
551
|
};
|
|
552
|
+
} & {
|
|
553
|
+
json: {
|
|
554
|
+
productId?: string | undefined;
|
|
555
|
+
supplierId?: string | null | undefined;
|
|
556
|
+
code?: string | null | undefined;
|
|
557
|
+
name?: string | undefined;
|
|
558
|
+
description?: string | null | undefined;
|
|
559
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
|
|
560
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
|
|
561
|
+
pricedPerPerson?: boolean | undefined;
|
|
562
|
+
collectionMode?: "none" | "external" | "included" | "booking_total" | "cash_on_trip" | undefined;
|
|
563
|
+
showOnSlotManifest?: boolean | undefined;
|
|
564
|
+
minQuantity?: number | null | undefined;
|
|
565
|
+
maxQuantity?: number | null | undefined;
|
|
566
|
+
defaultQuantity?: number | null | undefined;
|
|
567
|
+
active?: boolean | undefined;
|
|
568
|
+
sortOrder?: number | undefined;
|
|
569
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
570
|
+
};
|
|
324
571
|
};
|
|
325
572
|
output: {
|
|
326
573
|
data: {
|
|
327
574
|
id: string;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
575
|
+
productId: string;
|
|
576
|
+
supplierId: string | null;
|
|
577
|
+
code: string | null;
|
|
578
|
+
name: string;
|
|
579
|
+
description: string | null;
|
|
580
|
+
selectionType: "optional" | "required" | "default_selected" | "unavailable";
|
|
581
|
+
pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
|
|
582
|
+
pricedPerPerson: boolean;
|
|
583
|
+
collectionMode: "none" | "external" | "included" | "booking_total" | "cash_on_trip";
|
|
584
|
+
showOnSlotManifest: boolean;
|
|
333
585
|
minQuantity: number | null;
|
|
334
586
|
maxQuantity: number | null;
|
|
335
587
|
defaultQuantity: number | null;
|
|
336
|
-
isDefault: boolean;
|
|
337
588
|
active: boolean;
|
|
338
589
|
sortOrder: number;
|
|
339
|
-
notes: string | null;
|
|
340
590
|
metadata: {
|
|
341
591
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
342
592
|
} | null;
|
|
@@ -345,11 +595,41 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
345
595
|
};
|
|
346
596
|
};
|
|
347
597
|
outputFormat: "json";
|
|
348
|
-
status:
|
|
598
|
+
status: 200;
|
|
599
|
+
} | {
|
|
600
|
+
input: {
|
|
601
|
+
param: {
|
|
602
|
+
id: string;
|
|
603
|
+
};
|
|
604
|
+
} & {
|
|
605
|
+
json: {
|
|
606
|
+
productId?: string | undefined;
|
|
607
|
+
supplierId?: string | null | undefined;
|
|
608
|
+
code?: string | null | undefined;
|
|
609
|
+
name?: string | undefined;
|
|
610
|
+
description?: string | null | undefined;
|
|
611
|
+
selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
|
|
612
|
+
pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
|
|
613
|
+
pricedPerPerson?: boolean | undefined;
|
|
614
|
+
collectionMode?: "none" | "external" | "included" | "booking_total" | "cash_on_trip" | undefined;
|
|
615
|
+
showOnSlotManifest?: boolean | undefined;
|
|
616
|
+
minQuantity?: number | null | undefined;
|
|
617
|
+
maxQuantity?: number | null | undefined;
|
|
618
|
+
defaultQuantity?: number | null | undefined;
|
|
619
|
+
active?: boolean | undefined;
|
|
620
|
+
sortOrder?: number | undefined;
|
|
621
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
output: {
|
|
625
|
+
error: string;
|
|
626
|
+
};
|
|
627
|
+
outputFormat: "json";
|
|
628
|
+
status: 404;
|
|
349
629
|
};
|
|
350
630
|
};
|
|
351
631
|
} & {
|
|
352
|
-
"/
|
|
632
|
+
"/product-extras/:id": {
|
|
353
633
|
$delete: {
|
|
354
634
|
input: {
|
|
355
635
|
param: {
|
|
@@ -368,13 +648,84 @@ export declare const inventoryExtrasRoutes: import("hono/hono-base").HonoBase<En
|
|
|
368
648
|
};
|
|
369
649
|
};
|
|
370
650
|
output: {
|
|
371
|
-
success:
|
|
651
|
+
success: boolean;
|
|
372
652
|
};
|
|
373
653
|
outputFormat: "json";
|
|
374
|
-
status:
|
|
654
|
+
status: 200;
|
|
375
655
|
};
|
|
376
656
|
};
|
|
377
|
-
}, "/"
|
|
657
|
+
}, "/">, "/">;
|
|
378
658
|
export type InventoryExtrasRoutes = typeof inventoryExtrasRoutes;
|
|
659
|
+
export declare const __test__: {
|
|
660
|
+
productExtraSchema: z.ZodObject<{
|
|
661
|
+
id: z.ZodString;
|
|
662
|
+
productId: z.ZodString;
|
|
663
|
+
supplierId: z.ZodNullable<z.ZodString>;
|
|
664
|
+
code: z.ZodNullable<z.ZodString>;
|
|
665
|
+
name: z.ZodString;
|
|
666
|
+
description: z.ZodNullable<z.ZodString>;
|
|
667
|
+
selectionType: z.ZodEnum<{
|
|
668
|
+
optional: "optional";
|
|
669
|
+
required: "required";
|
|
670
|
+
default_selected: "default_selected";
|
|
671
|
+
unavailable: "unavailable";
|
|
672
|
+
}>;
|
|
673
|
+
pricingMode: z.ZodEnum<{
|
|
674
|
+
on_request: "on_request";
|
|
675
|
+
per_booking: "per_booking";
|
|
676
|
+
included: "included";
|
|
677
|
+
per_person: "per_person";
|
|
678
|
+
quantity_based: "quantity_based";
|
|
679
|
+
free: "free";
|
|
680
|
+
}>;
|
|
681
|
+
pricedPerPerson: z.ZodBoolean;
|
|
682
|
+
collectionMode: z.ZodEnum<{
|
|
683
|
+
none: "none";
|
|
684
|
+
external: "external";
|
|
685
|
+
included: "included";
|
|
686
|
+
booking_total: "booking_total";
|
|
687
|
+
cash_on_trip: "cash_on_trip";
|
|
688
|
+
}>;
|
|
689
|
+
showOnSlotManifest: z.ZodBoolean;
|
|
690
|
+
minQuantity: z.ZodNullable<z.ZodNumber>;
|
|
691
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
692
|
+
defaultQuantity: z.ZodNullable<z.ZodNumber>;
|
|
693
|
+
active: z.ZodBoolean;
|
|
694
|
+
sortOrder: z.ZodNumber;
|
|
695
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
696
|
+
createdAt: z.ZodString;
|
|
697
|
+
updatedAt: z.ZodString;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
optionExtraConfigSchema: z.ZodObject<{
|
|
700
|
+
id: z.ZodString;
|
|
701
|
+
optionId: z.ZodString;
|
|
702
|
+
productExtraId: z.ZodString;
|
|
703
|
+
selectionType: z.ZodNullable<z.ZodEnum<{
|
|
704
|
+
optional: "optional";
|
|
705
|
+
required: "required";
|
|
706
|
+
default_selected: "default_selected";
|
|
707
|
+
unavailable: "unavailable";
|
|
708
|
+
}>>;
|
|
709
|
+
pricingMode: z.ZodNullable<z.ZodEnum<{
|
|
710
|
+
on_request: "on_request";
|
|
711
|
+
per_booking: "per_booking";
|
|
712
|
+
included: "included";
|
|
713
|
+
per_person: "per_person";
|
|
714
|
+
quantity_based: "quantity_based";
|
|
715
|
+
free: "free";
|
|
716
|
+
}>>;
|
|
717
|
+
pricedPerPerson: z.ZodNullable<z.ZodBoolean>;
|
|
718
|
+
minQuantity: z.ZodNullable<z.ZodNumber>;
|
|
719
|
+
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
720
|
+
defaultQuantity: z.ZodNullable<z.ZodNumber>;
|
|
721
|
+
isDefault: z.ZodBoolean;
|
|
722
|
+
active: z.ZodBoolean;
|
|
723
|
+
sortOrder: z.ZodNumber;
|
|
724
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
725
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
726
|
+
createdAt: z.ZodString;
|
|
727
|
+
updatedAt: z.ZodString;
|
|
728
|
+
}, z.core.$strip>;
|
|
729
|
+
};
|
|
379
730
|
export {};
|
|
380
731
|
//# sourceMappingURL=routes.d.ts.map
|